6月15日是什么星座| 黎明破晓是什么意思| 被蟑螂咬了擦什么药| 磨玻璃结节是什么意思| 海东青是什么鸟| 什么是风象星座| 蜂蜜和柠檬一起喝有什么作用| 三颗星是什么军衔| 为什么空腹血糖比餐后血糖高| 鸭肉煲汤放什么材料好| 长水泡是什么原因| 舌头上有红点点是什么原因| 米放什么不生虫子| 养狗养不活是什么兆头| ks是什么意思| 鼻子出油多是什么原因| 精神什么满| 法本是什么意思| 肾积水有什么症状表现| 胎盘前置是什么意思| 白衬衫太透里面穿什么| 臁疮是什么病| 诺如病毒是什么| 附属医院是什么意思| 为什么会有血管瘤| 狮子的天敌是什么动物| 9月25日什么星座| 体检查什么| 手足口病吃什么药| 小麦粉可以做什么吃的| 胡麻是什么植物| 手指疼挂什么科| 杜甫的诗被称为什么| 嗓子痒干咳是什么原因| 鼻子突然出血是什么原因| 什么节日吃汤圆| 湿疹用什么药膏好| 甲状腺功能亢进症是什么病| 空调外机为什么会滴水| 病人出院送什么花| 充电宝什么牌子好| 双肺呼吸音粗是什么意思| 梦见着火了是什么意思| 验孕棒什么时候测准确| 吐口水有血是什么原因| 溶血性黄疸是什么原因引起的| 天麻种植需要什么条件| 甲亢挂什么科室| 乳头为什么会痒| 小老头是什么意思| 肾病到什么程度腿会肿| 鸢是什么意思| 蝗虫用什么呼吸| 眉头长痘痘什么原因| 梦到借钱给别人什么意思| 布谷鸟是什么鸟| 1973年是什么年| mys是什么意思| 十八岁是什么年华| 吃什么能丰胸| 孕妇做春梦是什么意思| 到底是什么意思| 为什么叫犹太人| 拥趸是什么意思| 罗宾尼手表什么档次| 蕾字五行属什么| 吃什么缓解孕吐| 中元节是什么节日| 明太鱼是什么鱼| 吃什么补气血最快最好| 短阵房速是什么意思| 四不像长什么样| 同型半胱氨酸高有什么症状| 带状疱疹有什么症状| 莴笋什么时候种植| 女性尿酸低是什么原因| 摩卡是什么意思| 孕期用什么护肤品| 尿液有白色絮状物是什么原因| 刘玄德属什么生肖| 神采奕奕是什么意思| 一路向北是什么意思| vod是什么意思| 宫颈病变有什么症状| river是什么意思| tab是什么意思| 甲状腺做什么检查| 孕妇吃什么好对胎儿好三个月前期| 基础代谢是什么| 梦见好多狗是什么预兆| 什么样的大树| 有机奶粉是什么意思| 天津市市长是什么级别| 家里狗死了预示着什么| 淀粉样变是什么病| 老人经常便秘有什么好办法| 蜂蜜水喝了有什么好处| 负荆请罪的负是什么意思| 古代人用什么刷牙| 包臀裙配什么上衣| 凤仙花长什么样| 无语是什么意思| 人心惶惶是什么意思| 钾高是什么原因造成的| 林彪为什么反革命| 慢性肠炎吃什么药调理| 嘚是什么意思| 情愫什么意思| 火眼金睛是什么生肖| 勾引什么意思| 心肌供血不足吃什么| 者加羽念什么| 背上有痣代表什么| 突破性出血是什么意思| 女左上眼皮跳是什么预兆| 2001属什么生肖| 木瓜是什么季节的水果| 蜈蚣最怕什么东西| 什么叫蛇胆疮| 地动山摇是什么生肖| 每天吃一个西红柿有什么好处| 一马平川是什么生肖| 蝉蛹是什么| 水牛是什么意思| 高血压高血脂不能吃什么| 鼻梁有横纹是什么原因| 思字属于五行属什么| 胰岛素ins是什么意思| 生辰纲是什么东西| 洋地黄是什么药| 跳空缺口是什么意思| 吹空调嗓子疼吃什么药| 肺虚吃什么药| py什么意思| pr间期延长是什么意思| 儿童查微量元素挂什么科| 看见老鼠有什么预兆| 菠菜什么时候传入中国| 口臭是什么原因导致的呢| 蚂蚁最怕什么| 眼前的苟且是什么意思| 保和丸有什么功效| 出国旅游需要什么手续和证件| 痛风什么引起的原因有哪些| 叹服是什么意思| 鸡鸡长什么样| 赫兹是什么意思| 睡眠不好总做梦是什么原因| 高血压要注意什么| 肩周炎挂什么科室| 肚子胀不排便什么原因| 59岁属什么生肖| 长江后浪推前浪是什么意思| napoleon是什么酒| 咳嗽完想吐是什么原因| 新是什么意思| 六味地黄丸适合什么人吃| 盆腔积液是什么意思| hpv什么时候检查最好| 天河水是什么意思| 男性检查男科都查什么| 三尖瓣反流什么意思| 新白娘子传奇许仙为什么用女的演| 暗财是什么意思| 吃甘草片有什么副作用| 瓜田李下什么意思| 意下如何什么意思| 茅台为什么这么贵| 桑葚和枸杞泡水喝有什么好处| 情绪低落是什么意思| 大象吃什么食物| 蒜苔炒什么好吃| 吃什么补精| 为什么会长溃疡| ro什么意思| 对酒当歌是什么生肖| 肝内钙化斑是什么意思| 酒后吃什么水果好| 曼陀罗是什么意思| 抹布什么意思| 一叶一菩提一花一世界什么意思| 阳光灿烂是什么意思| 屈髋是什么姿势| 右腿麻木是什么原因| pet是什么意思| 马标志的车是什么牌子| 左侧卵巢多囊样改变什么意思| 什么叫原研药| 奶粉中的opo是什么| 黄精和什么搭配补肾效果最好| 医院三甲是什么意思| 粉瘤是什么东西| 什么鱼吃玉米| 二月初十是什么星座| 黄色配什么颜色好看| 皲裂是什么意思| 新生儿贫血是什么原因造成的| 检查肛门挂什么科| 铁瓷是什么意思| 莘莘学子什么意思| 病人打白蛋白意味着什么| 眼皮发肿是什么原因| 什么的表演| 薤白是什么东西| 浅表性胃炎吃什么药效果好| 捞面条配什么菜好吃| 7月4号是什么节日| 吃榴莲对妇科病有什么好处| 消症是什么意思| tag是什么意思| kcal是什么单位| 四月九号是什么星座| 西洋参泡水喝有什么好处| 孕妇适合喝什么牛奶| 牙疼吃什么消炎药| adp是什么意思| 无名指长代表什么| 什么叫肛裂| 早泄吃什么好| 父母是什么意思| au是什么金属| 高铁与动车的区别是什么| 周杰伦有什么病| 女人梦见鬼是什么征兆| 后巩膜葡萄肿是什么意思| 马赫是什么意思| 126是什么邮箱| 里正是什么官| 为什么会得梅毒| 曹植是什么生肖| 胎儿双肾盂分离是什么意思| 男人吃什么可以补精| 医院什么时候上班| 包皮龟头炎吃什么药| 静脉曲张是什么病| 芥末配什么好吃| 淋巴细胞绝对值偏低说明什么| 后脚跟疼是什么原因| ITIB跟薇娅什么关系| 脱发厉害是什么原因引起的| 耳朵里发炎用什么药好| 精尽人亡什么意思| 梦见女儿结婚是什么意思| 368什么意思| 后脑袋疼是什么原因| 耳加贵念什么| mg什么意思| 金木水火土代表什么| 桂花是什么生肖| 芡实有什么功效| 姑姑家的儿子叫什么| 丸吞是什么意思| 15年是什么婚| 吃什么增强免疫力最快| 一什么眉毛| 小肠ct能检查什么病| 规培结束后是什么医生| 打喷嚏是什么原因| 鼻子疼是什么原因| sat是什么考试| 一戴套就软是什么原因| NT是什么钱| 喝菊花有什么好处| lf是什么意思| 百度Jump to content

巅峰之作·典范之选 高培360湖州上市会圆满成功

From Wikipedia, the free encyclopedia
Unsolved problem in computer science
Euler diagram for P, NP, NP-complete, and NP-hard set of problems. Under the assumption that P ≠ NP, the existence of problems within NP but outside both P and NP-complete was established by Ladner.[1]
百度 疑问一是外观也更加的年轻化,自然年轻人会更喜欢,可毕竟雅阁给人的印象是偏向中庸的B级车,它这么一改实际效果真的会很好么;疑问二是这次的国产车型放弃了国外版本有的发动机,在前期它全都用的是发动机,虽然分成了230TURBO和260TURBO高低功率两个版本,但用在这款中车上到底合不合适;带着这些问题,我来到了此次试驾雅阁的试驾会,通过实际的驾驶,来自解我的这些疑问!刚才说了,第十代雅阁用了高低功率两个版本的SPORTTURBO(锐·T动)涡轮增压发动机,新发动机改良了排气道和涡轮,理论是在整体加速性能有所提升,应答更敏捷,涡轮效率提高;其中,低功率版本的230TURBO发动机的最大功率为130千瓦,最大扭矩230牛米/1500-3000转;高功率版的260TURBO车型,它的最大功率为143千瓦,最大扭矩为260牛米/1600-5000转,这也是此次试驾的车型。

In computational complexity theory, NP (nondeterministic polynomial time) is a complexity class used to classify decision problems. NP is the set of decision problems for which the problem instances, where the answer is "yes", have proofs verifiable in polynomial time by a deterministic Turing machine, or alternatively the set of problems that can be solved in polynomial time by a nondeterministic Turing machine.[2][Note 1]

The first definition is the basis for the abbreviation NP; "nondeterministic, polynomial time". These two definitions are equivalent because the algorithm based on the Turing machine consists of two phases, the first of which consists of a guess about the solution, which is generated in a nondeterministic way, while the second phase consists of a deterministic algorithm that verifies whether the guess is a solution to the problem.[3]

The complexity class P (all problems solvable, deterministically, in polynomial time) is contained in NP (problems where solutions can be verified in polynomial time), because if a problem is solvable in polynomial time, then a solution is also verifiable in polynomial time by simply solving the problem. It is widely believed, but not proven, that P is smaller than NP, in other words, that decision problems exist that cannot be solved in polynomial time even though their solutions can be checked in polynomial time. The hardest problems in NP are called NP-complete problems. An algorithm solving such a problem in polynomial time is also able to solve any other NP problem in polynomial time. If P were in fact equal to NP, then a polynomial-time algorithm would exist for solving NP-complete, and by corollary, all NP problems.[4]

The complexity class NP is related to the complexity class co-NP, for which the answer "no" can be verified in polynomial time. Whether or not NP = co-NP is another outstanding question in complexity theory.[5]

Formal definition

[edit]

The complexity class NP can be defined in terms of NTIME as follows:

where is the set of decision problems that can be solved by a nondeterministic Turing machine in time.

Equivalently, NP can be defined using deterministic Turing machines as verifiers. A language L is in NP if and only if there exist polynomials p and q, and a deterministic Turing machine M, such that

  • For all x and y, the machine M runs in time p(|x|) on input ??.
  • For all x in L, there exists a string y of length q(|x|) such that ??.
  • For all x not in L and all strings y of length q(|x|), ??.

Background

[edit]

Many computer science problems are contained in NP, like decision versions of many search and optimization problems.

Verifier-based definition

[edit]

In order to explain the verifier-based definition of NP, consider the subset sum problem: Assume that we are given some integers, {?7, ?3, ?2, 5, 8}, and we wish to know whether some of these integers sum up to zero. Here the answer is "yes", since the integers {?3, ?2, 5} corresponds to the sum (?3) + (?2) + 5 = 0.

To answer whether some of the integers add to zero we can create an algorithm that obtains all the possible subsets. As the number of integers that we feed into the algorithm becomes larger, both the number of subsets and the computation time grows exponentially.

But notice that if we are given a particular subset, we can efficiently verify whether the subset sum is zero, by summing the integers of the subset. If the sum is zero, that subset is a proof or witness for the answer is "yes". An algorithm that verifies whether a given subset has sum zero is a verifier. Clearly, summing the integers of a subset can be done in polynomial time, and the subset sum problem is therefore in NP.

The above example can be generalized for any decision problem. Given any instance I of problem and witness W, if there exists a verifier V so that given the ordered pair (I, W) as input, V returns "yes" in polynomial time if the witness proves that the answer is "yes" or "no" in polynomial time otherwise, then is in NP.

The "no"-answer version of this problem is stated as: "given a finite set of integers, does every non-empty subset have a nonzero sum?". The verifier-based definition of NP does not require an efficient verifier for the "no"-answers. The class of problems with such verifiers for the "no"-answers is called co-NP. In fact, it is an open question whether all problems in NP also have verifiers for the "no"-answers and thus are in co-NP.

In some literature the verifier is called the "certifier", and the witness the "certificate".[2]

Machine-definition

[edit]

Equivalent to the verifier-based definition is the following characterization: NP is the class of decision problems solvable by a nondeterministic Turing machine that runs in polynomial time. That is to say, a decision problem is in NP whenever is recognized by some polynomial-time nondeterministic Turing machine with an existential acceptance condition, meaning that if and only if some computation path of leads to an accepting state. This definition is equivalent to the verifier-based definition because a nondeterministic Turing machine could solve an NP problem in polynomial time by nondeterministically selecting a certificate and running the verifier on the certificate. Similarly, if such a machine exists, then a polynomial time verifier can naturally be constructed from it.

In this light, we can define co-NP dually as the class of decision problems recognizable by polynomial-time nondeterministic Turing machines with an existential rejection condition. Since an existential rejection condition is exactly the same thing as a universal acceptance condition, we can understand the NP vs. co-NP question as asking whether the existential and universal acceptance conditions have the same expressive power for the class of polynomial-time nondeterministic Turing machines.

Properties

[edit]

NP is closed under union, intersection, concatenation, Kleene star and reversal. It is not known whether NP is closed under complement (this question is the so-called "NP versus co-NP" question).

Why some NP problems are hard to solve

[edit]

Because of the many important problems in this class, there have been extensive efforts to find polynomial-time algorithms for problems in NP. However, there remain a large number of problems in NP that defy such attempts, seeming to require super-polynomial time. Whether these problems are not decidable in polynomial time is one of the greatest open questions in computer science (see P versus NP ("P = NP") problem for an in-depth discussion).

An important notion in this context is the set of NP-complete decision problems, which is a subset of NP and might be informally described as the "hardest" problems in NP. If there is a polynomial-time algorithm for even one of them, then there is a polynomial-time algorithm for all the problems in NP. Because of this, and because dedicated research has failed to find a polynomial algorithm for any NP-complete problem, once a problem has been proven to be NP-complete, this is widely regarded as a sign that a polynomial algorithm for this problem is unlikely to exist.

However, in practical uses, instead of spending computational resources looking for an optimal solution, a good enough (but potentially suboptimal) solution may often be found in polynomial time. Also, the real-life applications of some problems are easier than their theoretical equivalents.

Equivalence of definitions

[edit]

The two definitions of NP as the class of problems solvable by a nondeterministic Turing machine (TM) in polynomial time and the class of problems verifiable by a deterministic Turing machine in polynomial time are equivalent. The proof is described by many textbooks, for example, Sipser's Introduction to the Theory of Computation, section 7.3.

To show this, first, suppose we have a deterministic verifier. A non-deterministic machine can simply nondeterministically run the verifier on all possible proof strings (this requires only polynomially many steps because it can nondeterministically choose the next character in the proof string in each step, and the length of the proof string must be polynomially bounded). If any proof is valid, some path will accept; if no proof is valid, the string is not in the language and it will reject.

Conversely, suppose we have a non-deterministic TM called A accepting a given language L. At each of its polynomially many steps, the machine's computation tree branches in at most a finite number of directions. There must be at least one accepting path, and the string describing this path is the proof supplied to the verifier. The verifier can then deterministically simulate A, following only the accepting path, and verifying that it accepts at the end. If A rejects the input, there is no accepting path, and the verifier will always reject.

Relationship to other classes

[edit]
A representation of the relation among complexity classes
Inclusions of complexity classes including P, NP, co-NP, BPP, P/poly, PH, and PSPACE

NP contains all problems in P, since one can verify any instance of the problem by simply ignoring the proof and solving it. NP is contained in PSPACE—to show this, it suffices to construct a PSPACE machine that loops over all proof strings and feeds each one to a polynomial-time verifier. Since a polynomial-time machine can only read polynomially many bits, it cannot use more than polynomial space, nor can it read a proof string occupying more than polynomial space (so we do not have to consider proofs longer than this). NP is also contained in EXPTIME, since the same algorithm operates in exponential time.

co-NP contains those problems that have a simple proof for no instances, sometimes called counterexamples. For example, primality testing trivially lies in co-NP, since one can refute the primality of an integer by merely supplying a nontrivial factor. NP and co-NP together form the first level in the polynomial hierarchy, higher only than P.

NP is defined using only deterministic machines. If we permit the verifier to be probabilistic (this, however, is not necessarily a BPP machine[6]), we get the class MA solvable using an Arthur–Merlin protocol with no communication from Arthur to Merlin.

The relationship between BPP and NP is unknown: it is not known whether BPP is a subset of NP, NP is a subset of BPP or neither. If NP is contained in BPP, which is considered unlikely since it would imply practical solutions for NP-complete problems, then NP = RP and PH ? BPP.[7]

NP is a class of decision problems; the analogous class of function problems is FNP.

The only known strict inclusions come from the time hierarchy theorem and the space hierarchy theorem, and respectively they are and .

Other characterizations

[edit]

In terms of descriptive complexity theory, NP corresponds precisely to the set of languages definable by existential second-order logic (Fagin's theorem).

NP can be seen as a very simple type of interactive proof system, where the prover comes up with the proof certificate and the verifier is a deterministic polynomial-time machine that checks it. It is complete because the right proof string will make it accept if there is one, and it is sound because the verifier cannot accept if there is no acceptable proof string.

A major result of complexity theory is that NP can be characterized as the problems solvable by probabilistically checkable proofs where the verifier uses O(log n) random bits and examines only a constant number of bits of the proof string (the class PCP(log n, 1)). More informally, this means that the NP verifier described above can be replaced with one that just "spot-checks" a few places in the proof string, and using a limited number of coin flips can determine the correct answer with high probability. This allows several results about the hardness of approximation algorithms to be proven.

Examples

[edit]

P

[edit]

All problems in P, denoted . Given a certificate for a problem in P, we can ignore the certificate and just solve the problem in polynomial time.

Integer factorization

[edit]

The decision problem version of the integer factorization problem: given integers n and k, is there a factor f with 1 < f < k and f dividing n?[8]

NP-complete problems

[edit]

Every NP-complete problem is in NP.

Boolean satisfiability

[edit]

The Boolean satisfiability problem (SAT), where we want to know whether or not a certain formula in propositional logic with Boolean variables is true for some value of the variables.[9]

Travelling salesman

[edit]

The decision version of the travelling salesman problem is in NP. Given an input matrix of distances between n cities, the problem is to determine if there is a route visiting all cities with total distance less than k.

A proof can simply be a list of the cities. Then verification can clearly be done in polynomial time. It simply adds the matrix entries corresponding to the paths between the cities.

A nondeterministic Turing machine can find such a route as follows:

  • At each city it visits it will "guess" the next city to visit, until it has visited every vertex. If it gets stuck, it stops immediately.
  • At the end it verifies that the route it has taken has cost less than k in O(n) time.

One can think of each guess as "forking" a new copy of the Turing machine to follow each of the possible paths forward, and if at least one machine finds a route of distance less than k, that machine accepts the input. (Equivalently, this can be thought of as a single Turing machine that always guesses correctly)

A binary search on the range of possible distances can convert the decision version of Traveling Salesman to the optimization version, by calling the decision version repeatedly (a polynomial number of times).[10][8]

Subgraph isomorphism

[edit]

The subgraph isomorphism problem of determining whether graph G contains a subgraph that is isomorphic to graph H.[11]

See also

[edit]

Notes

[edit]
  1. ^ Polynomial time refers to how quickly the number of operations needed by an algorithm, relative to the size of the problem, grows. It is therefore a measure of efficiency of an algorithm.

References

[edit]
  1. ^ Ladner, R. E. (1975). "On the structure of polynomial time reducibility". J. ACM. 22: 151–171. doi:10.1145/321864.321877. S2CID 14352974. Corollary 1.1.
  2. ^ a b Kleinberg, Jon; Tardos, éva (2006). Algorithm Design (2nd ed.). Addison-Wesley. p. 464. ISBN 0-321-37291-3.
  3. ^ Alsuwaiyel, M. H.: Algorithms: Design Techniques and Analysis, p. 283.
  4. ^ William Gasarch (June 2002). "The P=?NP poll" (PDF). SIGACT News. 33 (2): 34–47. doi:10.1145/1052796.1052804. S2CID 18759797. Retrieved 2025-08-05.
  5. ^ Kleinberg, Jon; Tardos, éva (2006). Algorithm Design (2nd ed.). Pearson/Addison-Wesley. p. 496. ISBN 0-321-37291-3.
  6. ^ "Complexity Zoo:E". Complexity Zoo. Archived from the original on 2025-08-05. Retrieved 23 March 2018.
  7. ^ Lance Fortnow, Pulling Out The Quantumness, December 20, 2005
  8. ^ a b Wigderson, Avi. "P, NP and mathematics – a computational complexity perspective" (PDF). Retrieved 13 Apr 2021.
  9. ^ Karp, Richard (1972). "Reducibility among Combinatorial Problems" (PDF). Complexity of Computer Computations. pp. 85–103. doi:10.1007/978-1-4684-2001-2_9. ISBN 978-1-4684-2003-6.
  10. ^ Aaronson, Scott. "P=? NP" (PDF). Retrieved 13 Apr 2021.
  11. ^ Garey, Michael R.; Johnson, David S. (1979). Computers and Intractability: A Guide to the Theory of NP-Completeness. W.H. Freeman. ISBN 0-7167-1045-5.

Further reading

[edit]
[edit]
什么是灰指甲 什么粥最养胃健脾 国历是什么意思 吃了避孕药有什么副作用 大便黑色是什么问题
成功是什么 l do是什么意思 仰望是什么意思 门口放镜子有什么讲究 女为读什么
大三阳是什么 乙肝挂什么科 口疮是什么原因引起的 vb610是什么药 毛囊炎长什么样
宿命是什么意思 肺结节影是什么意思啊 细胞骨架是由什么构成 童五行属什么 鼻子出汗是什么原因
大眼角痒用什么眼药水hcv8jop3ns3r.cn 肾结石可以吃什么食物hcv7jop6ns0r.cn 欣喜若狂的近义词是什么hcv8jop6ns5r.cn 神经酸是什么hcv9jop3ns0r.cn 拉黑色大便是什么原因hcv9jop6ns7r.cn
土人参长什么样hcv9jop6ns4r.cn 血压低吃什么药见效快hcv9jop7ns3r.cn 晚上很难入睡是什么原因hcv9jop3ns9r.cn hbcab偏高是什么意思520myf.com 牛肉汤配什么菜好吃inbungee.com
喊6个1是什么意思hcv7jop7ns1r.cn 为什么睡觉出虚汗xscnpatent.com 什么药治拉肚子hcv7jop6ns8r.cn 海胆是什么动物hcv9jop0ns1r.cn 睾丸萎缩是什么原因hcv8jop3ns8r.cn
南瓜什么颜色hcv9jop3ns7r.cn tg是什么意思hcv7jop7ns3r.cn 心肌标志物是查什么的hcv8jop1ns8r.cn 为什么每次同房后都会尿路感染hcv9jop4ns3r.cn 下肢血液循环不好吃什么药hcv9jop3ns2r.cn
百度