P is the set of problems where we can quickly find a solution. For example: multiplying two numbers.
NP is the set of problems where we can quickly check a solution. For example, a Sodoku puzzle. Hard to solve, but if I give you a filled Sudoku grid you can easily check if it’s right or not.
All P problems are also NP problems, that is, P is a subset of NP. Since if you can quickly find a solution, then you can quickly check a solution just by quickly solving the problem and comparing your result.
Latest Answers