Vous êtes sur la page 1sur 3

Complexity Theory – NP-Complete Problems p.

 Classes of problems of the


 Complexity Theory – NP-Complete problems

In this brief report, we shall try to present some of the most important notions and
classes of problems of the
Complexity Theory, the theory of classifying specified discrete problems based on
how difficult they are to solve.

 Polynomial-Time Algorithms
The basic idea for problem classification lies on whether there exists a polynomial-
time (computer) algorithm that can provide the solution to a problem. We say that
algorithms run in polynomial time if i.e., for a problem of size n, the time or number
of steps needed to find the solution is a polynomial function of n, so their time-
complexity function is a polynomial. These algorithms solve the so-called easy, or
tractable, problems. Algorithms for solving hard, or intractable, problems, on the
other hand, require times that are exponential functions of the problem size n. These
algorithms are said to take exponential time to resolve. Polynomial-time algorithms
are considered to be efficient, while exponential-time algorithms are considered
inefficient, because the execution times of the latter grow much more rapidly as the
problem size increases.

 Computationally Tractable – Intractable Problems


A problem is often said to be computationally tractable if there exists an algorithm of
polynomial complexity for all instances and solves the problem. Conversely, a
problem will be said to be computationally intractable (also computationally complex
or computationally hard) if the (provably) optimal algorithm for solving the problem
cannot solve all of its instances in polynomial time.

 Complexity classes of problems – P and NP problems


P-problem: A problem is assigned to the P-problem (polynomial time) class if the
number of steps needed to solve it, is bounded by some power of the problem's size. A
problem is assigned to this class if the number of steps is bounded by a polynomial.
NP-problem: A problem is called NP (nondeterministic polynomial) if its solution (if
one exists) can be guessed and verified in polynomial time; nondeterministic means
that no particular rule is followed to make the guess. A problem is assigned to the NP-
problem (nondeterministic polynomial time) class if it permits a nondeterministic
solution and the number of steps of the solution is bounded by some power of the
problem's size.
 The class of P-problems is a subset of the class of NP-problems.

 Intractable classes of problems – NP-Hard and NP-Complete problems


Proving that a problem is intractable is difficult — researchers have been unable to
determine whether most problems are tractable. There are, however, a number of large
classes of problems that computer scientists believe to be intractable. The oldest ones
considered are the class of NP-hard problems and the one of NP-complete problems.
NP-hard: A problem is NP-hard if an algorithm for solving it can be translated into
one for solving any other NP-problem (nondeterministic polynomial time) problem.
NP-hard therefore means "at least as hard as any NP-problem," although it might, in
Complexity Theory – NP-Complete Problems p.2

fact, be harder. The NP-hard class is a superset containing the NP-complete class (see
below); this class is potentially harder to solve than NP-complete problems because
although if any NP-complete problem is intractable then all NP-hard problems are
intractable, the reverse is not true.

NP-complete: The most important property of NP-complete problems is the so-called


polynomial-time reducibility. Any NP-complete problem can be transformed into any
other NP-complete problem in polynomial time. Thus, if it could be proved that any
NP-complete problem is formally intractable, all such problems would have proved
intractable, and vice-versa. While no proof of intractability has been found, no
polynomial algorithms have ever been found that solve any of these problems, and
because of the breadth of the class of problems it is widely believed that no such
algorithms exist.
If a problem is NP and all other NP problems are polynomial-time reducible to it, the
problem is NP-complete. Thus, finding an efficient algorithm for any NP-complete
problem implies that an efficient algorithm can be found for all such problems, since
any problem belonging to this class can be recast into any other member of the class.
It is not known whether any polynomial-time algorithms will ever be found for NP-
complete problems, and determining whether these problems are tractable or
intractable remains one of the most important questions in theoretical computer
science. When an NP-complete problem must be solved, one approach is to use a
polynomial algorithm to approximate the solution; the answer thus obtained will not
necessarily be optimal but will be reasonably close.

Examples of NP-complete problems include the Hamiltonian cycle and Travelling


salesman problems.
- Hamiltonian cycle problem (HCP)
A Hamiltonian circuit (HC) is a cyclic ordering of a set of nodes such that there is an
edge connecting every pair of nodes in the graph in order. The cyclic condition
ensures that the circuit is closed, and the requirement that all the nodes are included
(with no repeats) ensures that the circuit does not cross over itself, and passes through
every node. The problem is to find if a HC exists for a given graph, thus determining
if a given graph has a cycle visiting each vertex exactly once. This is considered to be
the Hamiltonian cycle problem.
- Travelling salesman problem (TSP):
Given a graph in which the nodes (cities) are connected by directed edges (routes),
where the weight of an edge is the distance between two cities, the problem is to find
a path that visits each city once, returns to the starting city, and minimizes the distance
travelled. The only known solution that guarantees the shortest path, requires a
solution time that grows exponentially with the problem size (i.e., number of cities).
This is an example of an NP-complete problem, for which no known efficient (i.e.,
polynomial time) algorithm exists.
Other well-known NP-problems are: the Graph coloring problem, the Independent set
problem, the Bin packing problem, the Satisfiability problem (SAT), the 3-
Satisfiability problem (3SAT), the Maximum clique problem, and others.

 Why care about NP-completeness?


The polynomial-time reducibility property of NP-complete problems makes, in a
sense, all NP-complete problems equivalent, so solving any NP-complete problem
Complexity Theory – NP-Complete Problems p.3

gives the key to all others and insight into solving any one gives insight into solving a
vast array of problems of extraordinary practical and economic significance
So when the objective is to prove that a problem is NP-complete, all that has to be
done is to show that the problem belongs to the class of NP problems and find a
known NP-complete problem reducible to it.
A final comment regarding the subject presented, would be that understanding the
notion of NP-completeness and NP-complete problems is important for a good
algorithm designer. If a problem can be establish as NP-complete, a good evidence for
its intractability is thus provided, so one would do better spending their time
developing an approximation algorithm (returning near-optimal good-enough
solutions) rather than searching for a fast one that solves the problem exactly.

Vous aimerez peut-être aussi