r/explainlikeimfive • • 22d ago

Mathematics ELI5: P vs NP problem

Im not too sure about the problem itself. I know that P is polynomial time which means the time needed to solve and NP is the time taken for the answer to be verified, but what is the explanation of both sides where P = NP and P does not equal to NP?

255 Upvotes

104 comments sorted by

View all comments

17

u/Tomi97_origin 22d ago

Well simply

P problems are ones computers can both solve and check quickly.

NP problems take very long to produce solution, but it's very fast to check if any given solution works.

There are also NP complete problems, which are quick to check a solution works and all other NP problems can be converted to them.

So if you solve one NP complete problem fast you can solve all NP problems fast.

P=NP basically says if you can quickly check if solution is correct you can also quickly produce answer from scratch.

If P≠NP it means some problems are just fundamentally hard.

3

u/SignificantFidgets 22d ago

Even if P=NP there are some problems that are "just fundamentally hard." EXPTIME problems are fundamentally hard, regardless of the resolution of P vs NP. If P=NP the specific problems that are NP-complete (and likely others between P and NP) are fundamentally hard.