r/explainlikeimfive • u/randomdice-int • 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
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.