What is the relation between P and NP?


Overview of P vs NP

NP is a set of problems that can be solved by a Non-deterministic Turing Machine in Polynomial time. P is a subset of NP, but P≠NP. The statement P=NP questions whether a problem that takes polynomial time on a non-deterministic TM can also be solved by a deterministic TM in polynomial time.

Understanding P and NP

  • P: Set of problems with solution times proportional to polynomials involving N’s.
  • NP: Set of problems whose solutions can be verified in polynomial time. Many of these problems take exponential time to solve.

NP Problems

NP-complete problem represents a class of problems without an efficient solution algorithm. An example is the decision subset sum problem.

Example of NP Problem

An example of an NP-hard problem is the decision subset sum problem, which is NP-complete.

Complexity of Games like Chess

Chess, being a two-player game, does not fall under NP-complete category due to having a finite number of possible positions.

Lascia un commento