CS510: ANALYSIS of
ALGORITHMS
Kalamazoo
College
Spring 1998
Intractible Problems Introduction
Reductions are a way to show that two problems are essentially identical.
A fast algorithm for one of the problems implies a fast algorithm for the
other.
Reduction -
Suppose you know the following algorithm to solve the Bandersnatch
problem.
- Bandersnatch(G)
Translate the input G to an instance of the Bo-billy problem Y.
Call the subroutine Bo-billy on Y to solve this instance.
Return the answer of Bo-billy(Y) as the answer to Bandersnatch(G).
- Provided that, for any instance of G, we have that
Bandersnatch(G)=Bo-billy(Y),
then we have a reduction from G to Y.
- If all the translation is done in THETA(P(n)) time,
then we know that if one of the problems has a polynomial solution (say in
P'(n) time), then the other does.
- A problem is a general question, with parameters for the
input and conditions on what constitues a satisfactory answer or solution.
- An instance is a problem with the input parameters
specified.
- Any problem with answers restricted to yes and no is called a
decision problem.
- Example Problem - The Traveling SalesPerson Problem:
The original problem:
- Input: A weighted graph G.
- Output: Which tour (v1, v2, ..., vn}
minimizes SUM(i=1 to i=n-1 of {d[vi, vi+1]}) +
d[vn,v1]?
The decision problem:
- Input: A weighted graph G and an integer k.
- Output: Does there exist a TSP tour with cost <= k?
Reduction of Hamiltonian Circuit to Hamiltonian
Path -
- Hamiltonian Cycle:
Input: An unweighted graph G
Output: Does there exist a simple tour that visits each vertex of G
without repetition?
- Hamiltonian Path:
Input: An unweighted graph G
Output: Does there exist a simple path that visits each vertex of G
without repetition?
- HamiltonianPath (G)
Construct a complete unweighted graph G' by adding a vertex v' and
all possible edges from v' to G.
Return the answer to HamiltonianCycle(G')
Kelly Schultz, Kalamazoo College