NP-complete In computational complexity theory, the complexity class NP-complete (abbreviated NP-C or NPC) is a class of decision problems.

A decision problem L is NP-complete if it is in the set of NP problems and also in the set of NP-hard problems. The abbreviation NP refers to "nondeterministic polynomial time." Although any given solution to such a problem can be verified quickly, there is no known efficient way to locate a solution in the first place; indeed, the most notable characteristic of NPcomplete problems is that no fast solution to them is known. That is, the time required to solve the problem using any currently known algorithm increases very quickly as the size of the problem grows. This means that the time required to solve even moderately sized versions of many of these problems can easily reach into the billions or trillions of years, using any amount of computing power available today. As a consequence, determining whether or not it is possible to solve these problems quickly, called the P versus NP problem, is one of the principal unsolved problems in computer science today. While a method for computing the solutions to NP-complete problems using a reasonable amount of time remains undiscovered, computer scientists and programmers still frequently encounter NP-complete problems. NP-complete problems are often addressed by using approximation algorithms. A decision problem is NP-complete if:

1. is in NP, and 2. Every problem in NP is reducible to

in polynomial time. can be verified in

can be shown to be in NP by demonstrating that a candidate solution to polynomial time.

Note that a problem satisfying condition 2 is said to be NP-hard, whether or not it satisfies condition 1

NP-hard (Non-deterministic Polynomial-time hard), in computational complexity theory, is a class of problems that are, informally, "at least as hard as the hardest problems in NP". A problem H is NP-hard if and only if there is an NP-complete problem L that is polynomial time

and solves L in polynomial time. also problem H is at least as hard as NP. search problems. however. L ≤ TH). If an optimization problem H has an NP-complete decision version L. not definitions):   Problem H is at least as hard as L. As consequences of definition. NP-hard problems may be of any type: decision problems. this has never been proven. or optimization problems. Informally. .e. Since L is NP-complete. In other words. we can think of an algorithm that can call such an oracle machine as a subroutine for solving H. then H is NP-hard. thus all problems in NP reduce to H. note.. while P = NP does not resolve whether the NP-hard problems can be solved in polynomial time. it need not be in NP).Turing-reducible to H (i. L can be solved in polynomial time by an oracle machine with an oracle for H. then NP-hard problems cannot be solved in polynomial time. if the subroutine call takes only one step to compute. and hence the hardest in class NP. all NP-complete problems can be solved in polynomial time by a reduction to H. the class NP also contains all problems which can be solved in polynomial time. then there are polynomial algorithms for all problems in NP. Although it is widely suspected that there are no polynomial-time algorithms for NP-hard problems. If there is a polynomial algorithm for any NP-hard problem. because H can be used to solve L. we have (note that these are claims. that this involves combining two different transformations: from NP-complete decision problems to NP-complete problem L by polynomial transformation.     A common mistake is to think that the NP in NP-hard stands for non-polynomial. and from L to H by polynomial Turing reduction. Moreover. Since NP-complete problems transform to each other by polynomial-time many-one reduction (also called polynomial transformation). and hence P = NP. If P ≠ NP. but H does not have to be in NP and hence does not have to be a decision problem (even if it is a decision problem.

Euler diagram for P. NP. NP-complete. and NP-hard set of problems .