标签:exists 多项式 there problems VS time NP
目录1.1 P
Def. Algorithm A runs in polynomial time if for every string s, A(s)
terminates in ≤ p( ⎢s⎢) “steps,” where p(⋅) is some polynomial function.
在多项式时间内可以求解的问题就是P类问题。
1.1.1 NP
Def. Algorithm C(s, t) is a certifier for problem X if for every string s : s ∈ X iff there exists a string t such that C(s, t) = yes.
NP = set of decision problems for which there exists a poly-time certifier.
・C(s, t) is a poly-time algorithm.
・Certificate t is of polynomial size: ⎢t⎢ ≤ p(⎢s⎢) for some polynomial p(⋅)
在多项式时间内可以验证一个解的问题就是NP问题。
关于NP举一个例子:
- 我们找是否有两个数相乘等于437669
- 首先我们找到了一个可验证的解就是541
- 那么只要我们可以找多项式时间内找到809我们就可以找到原问题的解。
1.1.2 Certifiers and certificates: satisfiability
- 3-SAT. SAT where each clause contains exactly 3 literals.
- Certificate. An assignment of truth values to the Boolean variables.
- Certifier. Check that each clause in Φ has at least one true literal.
可满足性问题和三元可满足性问题都属于NP问题,我们不一定在多项式时间里找到全部解但是我们可以在多项式时间内验证一个解的成立!
验证步骤是这样的:
- 首先我们找到其中一个解作为验证实例比如x1=true,x2=tru2,x3=false,x4=false;
- 我们必须在多项式时间内可以验证这个解是成立的!
2.1 Certifiers and certificates: Hamilton path
HAMILTON-PATH: Given an undirected graph G = (V, E), does there exist a
simple path P that visits every node?
Certificate: A permutation π of the n nodes.
Certifier: Check that π contains each node in V exactly once,
and that G contains an edge between each pair of adjacent nodes
哈密尔顿圈问题是一个NP问题,我们可以很容易找到一个解比如包含全部结点的路径并在多项式时间内验证解成立!
ps:简单路径:指图G(V,E)中路径上的顶点都不相同的路径。
2.1.1 Some problems in NP
3.1 P, NP, and EXP
P. Decision problems for which there exists a poly-time algorithm.
NP. Decision problems for which there exists a poly-time certifier.
EXP. Decision problems for which there exists an exponential-time algorithm.
EXP是指一个问题在指数级时间内存在解。
3.1.1 The main question: P vs. NP
Does P = NP? [Cook 1971, Edmonds, Levin, Yablonski, Gödel]
Is the decision problem as easy as the certification problem?
If yes… Efficient algorithms for 3-SAT, TSP, VERTEX-COVER, FACTOR, …
If no… No efficient algorithms possible for 3-SAT, TSP, VERTEX-COVER, …
标签:exists,多项式,there,problems,VS,time,NP 来源: https://www.cnblogs.com/xhj928675426/p/13973151.html
本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享; 2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关; 3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关; 4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除; 5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。