Live data from Hacker News

Introduction to P vs. NP

wesammikhail.com

1–10 of 41 posts

Re: Introduction to P vs. NP

#3
I like GPT-4's explanation of P vs NP.

Prompt:

"Give me good computer science arguments for why P = NP and why P != NP"

Response:

"The P vs. NP problem is a major open question in computer science, which asks whether problems whose solutions can be quickly verified by a computer can also be quickly solved by a computer. Both sides of the argument have been extensively debated, but the problem remains unsolved. Here are some arguments for both possibilities:

Arguments for P = NP:

Lack of counterexamples: Despite extensive research, no concrete counterexample has been found to definitively prove that P != NP. This lack of evidence may suggest that P = NP could still be true.

Potential algorithmic breakthroughs: If P = NP, this implies that a polynomial-time algorithm exists for every problem in NP, even though such algorithms may not be known yet. There is always the possibility that new algorithmic techniques or breakthroughs could be discovered, leading to polynomial-time solutions for NP problems.

Simplicity and symmetry: From a theoretical perspective, some argue that P = NP is a more elegant and symmetric outcome, as it would mean all problems that can be verified in polynomial time can also be solved in polynomial time.

Arguments for P != NP:

Exponential lower bounds: Some computational problems have proven exponential lower bounds, indicating that these problems are fundamentally difficult to solve. While these problems may not be in NP, they provide evidence that not all problems can be solved efficiently.

The lack of efficient algorithms: Despite extensive research and many attempts, no efficient (i.e., polynomial-time) algorithms have been found for any of the NP-complete problems, which are among the hardest problems in NP. This suggests that P and NP might indeed be separate complexity classes.

The existence of NP-complete problems: NP-complete problems are those that, if any one of them can be solved in polynomial time, then all NP problems can be solved in polynomial time. They are considered the hardest problems in NP. The existence of such problems, and the lack of polynomial-time algorithms for them, supports the belief that P != NP.

Cryptography: Modern cryptography relies on the assumption that certain problems are hard to solve, such as factoring large numbers. If P = NP, then these cryptographic schemes would become insecure, as the difficult problems on which they are based could be solved efficiently. The widespread use and success of cryptography provide some evidence that P != NP.

It is important to note that these arguments are speculative, and no definitive proof has been found for either side of the debate. The P vs. NP problem remains a significant open question in computer science."

Re: Introduction to P vs. NP

#4

I feel like this is a pretty bad introduction to P vs NP., no? It doesn't ever actually even begin to explain what P and NP are, only what their vague properties are.

I think it is a good layman's explanation, but I think the author could have explained NPC a bit better though, ie. mapping the inputs and outputs of a problem to a known NPC problem. Perhaps a brief overview of how NPC problems are proved to be NPC.

Re: Introduction to P vs. NP

#5

I feel like this is a pretty bad introduction to P vs NP., no? It doesn't ever actually even begin to explain what P and NP are, only what their vague properties are.

I think it is a good layman's explanation, but I think the author could have explained NPC a bit better though, ie. mapping the inputs and outputs of a problem to a known NPC problem. Perhaps a brief overview of how NPC problems are proved to be NPC.

It suffers from the same problem a lot of layman's explanations have: it jumbles the explanation of what NP is.

This is really annoying because it's so easy to do better: instead of saying (like the article does) "NP is a class of problems that are hard to solve yet easy to verify", you just have to say "NP is a class of problems that are easy to verify, no matter how hard they are to solve".

With this small change it's much easier to see that P is inside NP, whereas with the original explanation, most people have to re-calibrate their understanding of what NP is when they learn that it actually does include P.

It also makes it easy to see that "P vs NP" is just the question: "are there really any hard problems that are easy to verify, or is every problem like that easy and we just aren't very good at solving some of them?"

Re: Introduction to P vs. NP

#6

I feel like this is a pretty bad introduction to P vs NP., no? It doesn't ever actually even begin to explain what P and NP are, only what their vague properties are.

Perhaps it depends on the audience. For a non-CS person, it's a pretty good introduction to solvability vs verifiability, and how seemingly similar math operations are quite asymmetric.

I personally might use the example to convey the concept to non-CS people.

Re: Introduction to P vs. NP

#7
post #3

I like GPT-4's explanation of P vs NP. Prompt: "Give me good computer science arguments for why P = NP and why P != NP" Response: "The P vs. NP problem is a major open question in computer science, which asks whether problems whose solutions can be quickly verified by a computer can also be quickly solved by a computer. Both sides of the argument have been extensively debated, but the problem remains unsolved. Here a…

It's kind of disappointing that GPT-4 defines NP-completeness in terms of Turing/Cook reductions while Karp reductions have been the preferred definition for the last half century or so. For example, under GPT-4's definition there is no distinction between NP-Completeness and Co-NP-Completeness. I guess that speaks to the volumes of laymen explanations out there.

Re: Introduction to P vs. NP

#9
One problem here ... it needs to come with a huge caveat: this is much more a theoretical discussion than necessarily a practical one.

This is to say, it's possible for a problem the best P algorithm we can find takes n^(10^82) time while the NP algorithm we can find is say (1.00000000.....(10^82 zeroes)... 1)^n. For any practical number the NP algorithm will be faster. (I used 10^82 because it's the approximate number of atoms in the observable universe.)

Re: Introduction to P vs. NP

#10
> Every decade or so we come across an algorithm that takes a problem from the NP domain to the P domain

Wish they’d given/linked a few examples there, anyone happen to know some off the top of their head?

Post reply on HN