简体   繁体   English

NP完全与NP困难(为什么它们不相等?)

[英]NP-complete vs NP-hard (why are they unequal?)

Why is NP-hard unequal to NP-complete? 为什么NP-hard不等于NP-complete?

My informal understanding of definitions being used: 我对所使用的定义的非正式理解:

NP - all problems that can be verified in polynomial time NP-可以在多项式时间内验证的所有问题

NP-complete - all problems that are NP and NP-hard NP完全-NP和NP困难的所有问题

NP-hard - at least as hard as the hardest problem in NP NP难-至少和NP中最难的问题一样难

Decision Problem - A problem that asks a question with regards to an input and outputs a bool value 决策问题-有关输入的问题并输出布尔值的问题

Confusion: 混乱:

The problem with unknown solution of P vs NP arises from the fact that we cannot prove or disprove all problems in NP can be solved in polynomial time. P vs NP未知解的问题源于以下事实:我们无法证明或反驳NP中的所有问题都可以在多项式时间内解决。 It feels like a similar question arises from NP-complete vs NP-hard. 感觉像是NP完全与NP困难也产生了类似的问题。 How do we know all problems in NP-hard cannot be verified in polynomial time and thus result in NP-hard=NP-complete? 我们如何知道NP-hard中的所有问题都无法在多项式时间内得到验证,从而导致NP-hard = NP-complete?

Here is my line of reasoning 这是我的推理

From online research the distinction seems that this has something to do with decision problems (a concept I'm entirely new to but seem simple enough). 从在线研究中可以看出,这种区别似乎与决策问题有关(这个概念我很陌生,但看起来很简单)。 I think this means that problems in NP have complementary decision problems that ask if an input is the solution to the problem. 我认为这意味着NP中的问题具有互补的决策问题,这些问题询问输入是否可以解决问题。 Let's say the problem is to find an optimal solution. 假设问题是找到最佳解决方案。 I believe the complementary decision problem to be "is the given input the optimal solution?"and I believe that if this decision problem is verifiable in polynomial time then the problem is NP-complete (or in NP). 我认为补充决策问题是“给定的输入是否是最优解?”,并且我相信,如果该决策问题在多项式时间内是可验证的,则该问题是NP完全的(或在NP中)。 So this means that NP-hard problems that aren't NP-complete problems are those that either have no decision problem (which I believe is never true since any brute force solution can answer this) or a problem is NP-hard and not NP-complete if it has a decision problem that's not verifiable in polynomial time. 因此,这意味着不是NP完全问题的NP困难问题就是那些没有决策问题(我相信这是不正确的,因为任何强力解决方案都可以回答这个问题),或者是NP困难而不是NP的问题-如果决策问题在多项式时间内无法验证,请完成。 If it is the latter then it feels like we have the same problem from P vs NP. 如果是后者,那么感觉就像我们在P vs NP中有同样的问题。 That is, how do we confirm all decision problems in NP-hard do not have polynomial time solutions? 也就是说,如何确定NP-hard中的所有决策问题都没有多项式时间解?

Sorry if the above phrasing is weird. 抱歉,以上措词很奇怪。 I will try and clarify any confusion in my question. 我将尝试澄清我的问题中的任何困惑。

notes 笔记

I am interested in both an intuitive explanation and a formal explanation (a proof if it's a complicated answer). 我对直观的解释和形式的解释(如果是复杂的答案的证明)都感兴趣。 The formal explanation can certainly be a link to an academic paper. 正式的解释当然可以链接到学术论文。 I don't want anyone to invest a significant amount of time into an overly complicated proof that may be beyond the scope of my understanding (I've found complexity theory to become very quickly... complex). 我不希望任何人花费大量时间来建立过于复杂的证明,而这可能超出了我的理解范围(我发现复杂性理论很快变得...复杂)。

If it helps for the sake of explanation I have done work on the traveling salesman problem and I am currently working on a paper for the nurse scheduling problem (I believe these are NP-hard problems). 如果出于解释的目的而有所帮助,那么我已经完成了有关旅行推销员问题的工作,并且目前正在撰写有关护士日程安排问题的论文(我相信这些都是NP难题)。

NP-Hard includes all problems whose solutions can be used to derive solutions to problems in NP with polynomial overhead. NP-Hard包括所有问题,这些问题的解可用于导出具有多项式开销的NP中的问题的解。

This includes lots of problems that aren't in NP . 这包括很多NP中没有的问题。 For instance, the halting problem - an undecidable problem - is NP-Hard, because any problem in NP can be reduced to it in polynomial time: 例如,停止问题-一个无法确定的问题-是NP-Hard,因为NP中的任何问题都可以在多项式时间内归结为:

  1. Reduce any problem in NP to an instance of the NP-Complete problem 3-SAT 将NP中的任何问题简化为NP-完全问题3-SAT的实例
  2. Construct in polynomial time a TM which checks all assignments and halts iff a satisfying assignment is found. 在多项式时间内构造一个TM,该TM检查所有分配并在找到满意的分配后停止。
  3. Use a solution to the halting problem to tell whether the TM halts. 使用停止问题的解决方案来判断TM是否停止。
  4. If it halts, accept; 如果停止,则接受; otherwise, reject. 否则,拒绝。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM