In the collection Physics and computation

What do the halting problem and P vs NP say about computing's limits?

The halting problem is proven unsolvable by any algorithm. P versus NP asks a different question, whether efficient finding is as easy as efficient checking, and it remains open.

AI-drafted from web search results, then checked by a second, independent AI that read 4 of its 5 cited pages in full and found the thread supported. No person has reviewed it.

0 views
Two side-by-side diagrams. The left one shows NP-hard above, NP-complete inside NP, and P as a smaller dashed region inside NP, labelled P ≠ NP. The right one shows NP-hard above and P = NP ≃ NP-complete merged in one region, labelled P = NP. A vertical arrow labelled Complexity runs between them.
An Euler diagram showing the sets P, NP, NP-complete and NP-hard, drawn for the case P ≠ NP (left) and the case P = NP (right). Image: Behnam Esfahbod, CC BY-SA 3.0, via Wikimedia Commons. Chosen automatically; not checked by a person.
Sourced

The short answer

The two problems mark two different kinds of limit. The halting problem shows that some questions cannot be answered by any algorithm at all, a limit that has been proved. P versus NP concerns which solvable problems can be solved efficiently, and that question is still unresolved. Most theoretical computer scientists believe P and NP differ, but nobody has a proof. [1] [2]

Or ask in your own AI
Sourced

The halting problem: what cannot be computed

The halting problem asks whether an arbitrary program, given an input, will eventually finish or run forever. Alan Turing proved in 1937 that no general algorithm can answer this correctly for every program and input pair. It is therefore called undecidable. According to [Wikipedia](https://en.wikipedia.org/wiki/Halting_problem), it shows that some functions are mathematically definable but not computable. [3]

The Stanford Encyclopedia of Philosophy gives the argument in outline. It considers the set of Turing machines that halt when given their own description as input. Assuming that set could be decided leads to a contradiction, so deciding halting is not a computable problem. [4]

There is also an asymmetry. If a program does halt, you can show it by running it and waiting. What cannot be done in general is to decide in advance, for every program, whether it will halt. In this sense deciding a statement is harder than demonstrating it when it is true. [1]

Or ask in your own AI
Sourced

P versus NP: what cannot be computed efficiently

Here the question shifts from what is computable to what is efficiently computable. P is the class of problems with an efficient, polynomial-time solution. NP is the class of problems where a yes answer can be efficiently demonstrated. The question is whether the two classes are the same, which echoes the deciding-versus-demonstrating gap in the halting problem but with efficiency added. [1]

NP-complete problems are the hardest problems in NP. If any one of them had an efficient algorithm, all of them would, and P would equal NP. If any one were shown to have none, P would not equal NP. Thousands of such problems are known, including the travelling salesperson problem and longest paths. [1] [2]

Or ask in your own AI
Sourced

How the two limits differ

Course notes from Columbia point out that we know for certain some problems have no algorithm, with the halting problem as the example. NP-completeness is weaker evidence. It strongly suggests a problem has no polynomial-time algorithm, but it is not a mathematical proof of that while P versus NP is open. [5]

The practical stakes differ too. OpenStax says an efficient algorithm for any NP-complete problem would help routing, logistics and drug discovery, and would break essentially all modern Internet security and password systems. [2]

Or ask in your own AI

Sources

  1. Millennium Prize: P vs NP (theconversation.com) Found by source search. Not checked by a person.
  2. 3.6 Computer Science Theory - Introduction to Computer Science | OpenStax (openstax.org) Found by source search. Not checked by a person.
  3. Halting problem (en.wikipedia.org) Found by source search. Not checked by a person.
  4. Computability and Complexity (Stanford Encyclopedia of Philosophy) (plato.stanford.edu) Found by source search. Not checked by a person.
  5. Analysis of Algorithms I: NP-Completeness (cs.columbia.edu) Found by source search. Not checked by a person.

Questions to follow next

  • How does the diagonal argument behind the halting problem work?
    Or ask in your own AI
  • What is an NP-complete problem, and what are some examples?
    Or ask in your own AI
  • Why would P = NP break modern cryptography?
    Or ask in your own AI

More from Physics and computation

See the collection

Keep going