CIS 3223. Data Structures and Algorithms

NP-complete problems

 

1. Algorithm efficiency and tractability

Traditionally, if the time requirement of an algorithm grows no faster than a polynomial function of the size of the input, the algorithm is considered as efficient or tractable, otherwise it is considered as intractable or inefficient, where the function is normally exponential.

Exhaustive search is usually intractable.

Please remember here the related property of an algorithm is not its running time on some instance(s), but how fast the running time increases with the instance size. As a result, for a given problem instance, an "intractable" algorithm may actually cost less time than an "efficient" algorithm!

 

2. P, NP, and NPC

From the complexity of an algorithm to the complexity of a problem

Roughly speaking, P is the set of problems whose solutions can be found in polynomial time; NP is the set of problems whose solutions can be verified in polynomial time. Since to find a solution is a special way to verify a solution, P is a subset of NP. Now the problem is whether the two sets are the same. Though the intuitive answer is "No", it has not been proved yet.

A problem belongs to set NP-Complete, or NPC, if and only if all NP problems can be reduced into it. To prove a problem is in NPC, first proving it is in NP, then proving a known NPC problem can be reduced into it. The textbook gives many examples on how to reduce one NPC problem into another.

Here is a list of well known NPC problems. No polynomial-time solution has been found for any of them, though there is no proof that such a solution is impossible.

 

3. How to deal with NPC problems in practice

Possible strategies include to redefine the problem by: Example: approximate solution of the traveling-salesman problem

Example: heuristic search

Example: case-by-case problem solving