**William Shoaff**

A PDF version of this set of notes

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 *L*_{1} reduces to language *L*_{2} if there is a function

that is computable on a deterministic Turing machine in time

**Logarithmic space bounded reductions**
We say language *L*_{1} reduces to language *L*_{2} 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 *w*where |*w*|=*n*. Since the machine is deterministic, no configuration
can repeat. Thus the computation has length at most *O*(*n*^{k}) 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
*n*^{2} variables

where

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

node

The second series of clauses is true when node *j* is not both
the *i*th and *k*th node on such a path:

Next some vertex must be the *i*th node on the path:

And no two vertices can be the *i*th 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 *G*we 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*(*x*_{ij}) = **true**otherwise the clauses

cannot all be satisfied. Similarly for each

can all be satisfied.

Hence *T* can be thought of as a permutation of the vertices of *G*
where
*T*(*x*_{ij})=**true**

Moreover, the clauses

where (

is a Hamilton path.

Conversely, if *G* has a Hamilton path

then the truth assignment

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.
*g*_{ijk}where and- 2.
*h*_{ijk}where

*h*_{ijk} 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, *g*_{ij0} are input gates that are **true** if *i*=*j*or (*i*,*j*) is an edge of *G* and **false** otherwise.

For
,
*h*_{ijk} is an **AND** gate
with predecessors
*g*_{i,k,k-1} and
*g*_{k,j,k-1}

For
,
*g*_{ijk} is an **OR** gate
with predecessors
*g*_{i,j,k-1} and *h*_{i,j,k}

Finally *g*_{1nn} is the output gate.

We will show by induction on *k* that
*g*_{ijk} 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 *h*_{ijk} 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, *g*_{ij0} will output **true** if and only if there is a
an path (edge) from *i* to *j* (this includes the empty path from *i*to *i* when *j*=*i*).

Suppose the outputs of *g* and *h* gates are as described up to *k*-1for some .
Since
*h*_{ijk} will output **true** if and only if
*g*_{i,k,k-1} and
*g*_{k,j,k-1} are **true**.

And since
*g*_{ijk} will output **true** if and only if
one of
*g*_{i,j,k-1} or *h*_{i,j,k} is **true**.

In particular, *g*_{1nn} 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 *k*and output the appropriate edges and gate types for
the variables. (See the Floyd-Warshall algorithm from
a text on algorithms).

**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 *P*for 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**-
C. H. PAPADIMITRIOU,
*Computational Complexity*, Addison-Wesley, 1994.