William Shoaff

# Reductions

We want a concepts that defines at least as hard, in that if we could solve problem A we could solve problem B, so A is at least as hard as problem B. This is the concept of reduction. So far we have used computable reductions: ones that could be implemented by some terminating Turing machine. Now we want to limit the resources used in a reduction. That is, we need to consider the efficiency of the reduction.

Polynomial time bounded reductions We say language L1 reduces to language L2 if there is a function

that is computable on a deterministic Turing machine in time O(nk)and if and only if .

Logarithmic space bounded reductions We say language L1 reduces to language L2 if there is a function

that is computable on a deterministic Turing machine in space and if and only if .

Note that logarithmic space reductions imply polynomial time reductions. There are at most configurations on input wwhere |w|=n. Since the machine is deterministic, no configuration can repeat. Thus the computation has length at most O(nk) for some k.

See examples of reductions in the text [1].

HAMILTON PATH can be reduced to SAT: Given a graph G we construct a Boolean expression R(G) such that G has a Hamilton path if and only if R(G) is satisfiable.. Suppose G has n vertices: 1, 2, ..., n; R(G) will have n2 variables

where xij will represent that node j is the i node of a Hamilton path'' (which may be true or false). R(G) is made of clauses:

The first series of clauses is true when each node j in the graph lies on a Hamilton path:

node j is either the first, second, ...nth node on such a path.

The second series of clauses is true when node j is not both the ith and kth node on such a path:

Next some vertex must be the ith node on the path:

And no two vertices can be the ith node on the path:

Finally, vertex j can come right after i only if (i, j) is an edge in G, so for each pair (i, j) that is not an edge in Gwe include:

The expression R(G) is the conjunction of all these clauses.

To show that R is a reduction from HAMILTON PATH to SAT we must show: (1) for any graph G, expression R(G) has a satisfying truth assignment if and only if G has a Hamilton path, and (2) R can be computed in logarithmic space.

Suppose R(G) has a truth assignment T.

For each j there is a unique i such that T(xij) = trueotherwise the clauses

cannot all be satisfied. Similarly for each i there is a unique j such that T(xij)=true, or not all of

can all be satisfied.

Hence T can be thought of as a permutation of the vertices of G where T(xij)=true

Moreover, the clauses

where (i,j) is not an edge guarantee that for all k is an edge of G and thus

is a Hamilton path.

Conversely, if G has a Hamilton path

then the truth assignment T(xij) = true if and T(xij) = false if satisfies the clauses of G.

Now let's show we use only logarithmic space in the computation of R. Given G a Turing machine M outputs R(G) as follows:

1.
Write n the number of vertices in G (in binary [logarithmic space])
2.
Generate on the output tape the clauses that do not depend on G (the first four sets of clauses) Here, M just needs three counters for i, j, and k
3.
For the remaining clauses describing edges M generates one by one all clauses of the form:

M then looks at its input to see if (i,j) is an edge of G and if not outputs the Boolean clause. Again the counters i, j, and k are sufficient to complete this computation.

REACHABILITY can be reduced to CIRCUIT VALUE.

Given a graph G construct a variable free circuit R(G)with output true if and only if there is a path from node 1 to node n in G.

Gates of R(G) are of the form

1.
gijk where and
2.
hijk where
gijk will output true if and only if there is a path in G from i to j not using any intermediate node bigger than k.

hijk will output true if and only if there is a path in G from i to j not using any intermediate node bigger than k, but using k as an intermediate node.

For k=0, gij0 are input gates that are true if i=jor (i,j) is an edge of G and false otherwise.

For , hijk is an AND gate with predecessors gi,k,k-1 and gk,j,k-1

For , gijk is an OR gate with predecessors gi,j,k-1 and hi,j,k

Finally g1nn is the output gate.

We will show by induction on k that gijk will output true if and only if there is a path in G from i to j not using any intermediate node bigger than k and hijk will output true if and only if there is a path in G from i to j not using any intermediate node bigger than k, but using k as an intermediate node.

For k=0, gij0 will output true if and only if there is a an path (edge) from i to j (this includes the empty path from ito i when j=i).

Suppose the outputs of g and h gates are as described up to k-1for some . Since hijk will output true if and only if gi,k,k-1 and gk,j,k-1 are true.

And since gijk will output true if and only if one of gi,j,k-1 or hi,j,k is true.

In particular, g1nn will be true if and only if there is a path from 1 to n in G.

Finally, R(G) can be computed in logarithmic space by going over all vertices i, j and kand output the appropriate edges and gate types for the variables. (See the Floyd-Warshall algorithm from a text on algorithms).

# Completeness

Definition Let C be a complexity class, and let . The language L is C-complete if any language can be reduced to L.

It is not clear that complete problems even exist. But they are a central concept, they capture the difficulty of a class (they are at least as hard as every other problem in the class). Being able to solve a complete problem implies we can solve (in theory at least) any problem in that class.

The existence of important, natural problems that are complete for a class tend to make a class significant; absence of such problems indicate the class may be artificial.

The most common use of completeness is to derive a negative complexity result: a complete problem Pfor class C is the least likely to belong to a subclass , provided the class C' is closed under reductions.

Definition: A class C' is closed under reductions if whenever L is reducible to L' and then .

Proposition: , , , , , , are all closed under reductions.

For example, consider and suppose L is reducible to , using logarithmic space reduction R. To decide: construct the reduction R(w) (in logarithmic space, hence polynomial time) and then decide if using the Turing machine M that decides L in polynomial time.

Complete problems are valuable since if we can show an complete problem is in then (and so on for other complexity classes).

Theorem CIRCUIT VALUE is complete.

AND, OR, and NOT can be used in an instance CIRCUIT VALUE. If we exclude NOT gates the problem remains complete. Such (monotone) circuits are less expressive than general circuits, but by appling De Morgan's laws we can move all NOTs to the input and then change to false and vice versa.

Cook's Theorem SAT is complete.

Theorem Let L be complete for class . If and L reduces to L', then L' is complete for class .

Let L'' be any language in class . Since L is -complete there is a reduction R'' from L'' to L. Let R' be the reduction from L to L'. Then, since the composition of reductions is a reduction, is a reduction from L'' to L'

1