Lably
Skip to content

NP-hardness

Complexity class

  • 4 min read
  • 6 chapters

Related on Lably

Through Optimization problem, Turing machine and Data mining

A simple example of an NP-hard problem is the subset sum problem.

Informally, if H is NP-hard, then it is at least as difficult to solve as the problems in NP. However, the opposite direction is not true: some problems are undecidable, and therefore even more difficult to solve than all problems in NP, but they are probably not NP-hard (unless P=NP).

Definition

A decision problem H is NP-hard when for every problem L in NP, there is a polynomial-time many-one reduction from L to H.

Another definition is to require that there be a polynomial-time reduction from an NP-complete problem G to H. As any problem L in NP reduces in polynomial time to G, L reduces in turn to H in polynomial time so this new definition implies the previous one. It does not restrict the class NP-hard to decision problems, and it also includes search problems or optimization problems.

Sign in to keep reading

5 more chapters are free with a Lably account.

More in Theoretical computer science