52 4 Reductions – Algorithmic Relationships Between Problems
If the given set of clauses has a satisfying assignment, then we can assign
values to the variables in such a way that the new set of clauses is also satisfi-
able. If c is satisfied, then z
i
= 1 for some i. Thus one of the clauses of length
3 that came from clause c is already satisfied. All the clauses to the left of this
clause can be satisfied by setting the positive y-literal to 1, and all the clauses
to the right of this clause can be satisfied by setting the negative
y-literal to
1. In our example, if z
3
= 1, then we set y
1
= 1 and y
2
= y
3
= y
4
=0.
On the other hand, if the new clause set is satisfied by an assignment, then
it is not possible that all of the new clauses that come from c are satisfied by
the y-literals alone. If i is the smallest index for which y
i
= 0, then the ith
clause (z
1
+z
2
+y
1
for i =1,and
y
i−1
+z
i+1
+y
i
otherwise) is not satisfied by
a y-literal. If all y
i
= 1, then the last clause is not satisfied by the y-literals.
Therefore, the assignment must satisfy at least one z
i
, and hence satisfy c.
If we measure the input length in terms of the number of literals l in the
clauses, then p(l)=O(l), q(l) = 1, and r(l) ≤ 3l.
It is always easier to reduce a problem to a more general problem. The
reduction
3-Sat ≤
T
Sat, for example, is just as easy as the reduction A ≤
T
A
for any problem A. The reductions
HC ≤
T
DHC and HC ≤
T
TSP
2,,sym
were
also Turing reductions from
HC to more generalized problems. A Turing re-
duction A ≤
T
B of this kind is called a restriction, since problem A represents
a restricted version of problem B. Another example is the following Turing
reduction from
Partition to BinPacking.
Theorem 4.3.3.
Partition ≤
T
BinPacking.
Proof.
Partition is a special case of BinPacking in which there are only two
bins and the objects are to completely fill the two bins. Formally, for
Partition
we are given the numbers w
1
,w
2
,...,w
n
, and the question is whether there
is a set of indices I ⊆{1, 2,...,n} such that the sum
i∈I
w
i
is equal to half
the total sum
i∈{1,...,n}
w
i
. If we now apply a BinPacking algorithm to the
numbers w
1
,...,w
n
with two bins of size b := (w
1
+ ···+ w
n
)/2 we obtain
the correct answer for
Partition as well. In the case that w
1
+ ··· + w
n
is
odd, then the instance is rejected in both cases. Otherwise the instances are
equivalent since if the sum
i∈I
w
i
= b,then
i∈I
w
i
= b,too.Ifwecount
the number of w-values as the size of the input, then p(n)=O(n), q(n)=1,
and r(n)=O(n).
Restrictions appear to be a simple, but not particularly interesting, tool,
since we can already “see” that we are dealing with a generalization. Some
problems, however, “hide” their commonalities so well that we don’t imme-
diately recognize the similarities. For example,
Clique, IndependentSet,and
VertexCover are essentially the same problem. While this is immediately
obvious for
Clique and IndependentSet,wehavetolookmorecloselyto
discover the similarity between these two problems and
VertexCover.