Computer scientists sort problems by how the time to solve them grows as the input gets bigger.
- P (polynomial time) is the class of problems a computer can solve efficiently. Sorting a million names or finding the shortest driving route on a map are in P.
- NP (nondeterministic polynomial time) is the class of problems where a proposed answer can be checked efficiently. A filled-in Sudoku is quick to check, even though finding the solution from a blank grid can be very slow.
Every problem in P is also in NP, because if you can solve it quickly you can check it quickly. The open question is the reverse: is every quickly-checkable problem also quickly solvable? If yes, then P = NP. If no, then P ≠ NP.
Everyday version: recognising a great song is easy. Writing one is hard. P vs NP asks whether that gap is a law of nature or just a lack of cleverness.





