38 ‘THe THEORY OF NP-COMPLETENESS
fequirements we have just described would appear fo be rather demanding
One must show that every problem in NP icansforms to our prospective
NP-complete problem TL. Its not at all obvious how one might go about
doing this. 4 prior, tis not even spparent that any NP-complete problems
need exist,
The following lemma, which is an immediate consequence of our
n for all n €Z) The generic transformation
‘fe wil be derived in terms of M, T,E, B, O» do, dre dus 8 nd p
Twill Be convenient to describe fas i i were'@ mapping from strings
‘over Eto instances of SAT, rather than to strings over the alphabet of our
encoding scheme for SAT, since the details of the encoding scheme could“° ‘THE THEORY OF NP-OOMPLETENESS
be filed in easy, Thus 4, wil have the property that forall x €2*, x6 L
if and ony iff) has a‘susying wath assignment. The key 1 the cor
seuction off iso show fw sel of clases can be used to check what
Gr an input xis cepted bythe NDTM program M, that, whether x €
Ifthe input v€E" accepted by Mf then we ow that ther isa a€-
eting computation for Mf on such that bth the numberof sens inthe
‘hocking sage andthe qumber of symbols in the guessd sting se bound
by pln), where n=[x|. Such a computation cannot involve any tape
Squares’ except for those numbered ptm) through p(n), since the
teadewite head Begins a aque Land moves at mas one squat in any i=
fle step. The satus of the checking computation at any one time can be
Specied completely by giving the contents of these squares, the current,
Ste, and the poston ofthe Teadewrite head. Furthermore, snc there st
40 tore than p(n) steps inthe checking computation, there at mast,
Dlr t dine times thal must be considered. Ths wil ensble us to
describe Soch'a computation comple using only lived number of
Boolean variables anda Wath ssignment co thom
“he variable st U that const is intended for just his purpose.
Label the clments of 2° ay, qrneredamadne dd. where
(Q|- and label the elements of ab gymbriu ay.) where
‘=| }=L. There wil be tree types of variables, each of which as an i
tended meaning as specied in Figure 27. By the phase at time |" we
trean “upon complction ofthe "sap of the cbesking computation”
arable Range Intended meaning
tnd 8S Sat ‘At time (Mis in state a.
Hin OSISPUA)——Attme 1. he reads head
pindsjepind+l is seanting ape ste J
O _there isan accepting computation of Mon x with p(n) or
fewer steps in its checking stage and with a guessed string
ww of length exactly p(n)
<> there is saiiving uth assianment for the collection of|
clauses inf, (2).
‘This will mean thet fi, stises one of the two conditions required of a
polynomial transformation. ‘The other condition, that f, can be computed
in polynomial time, will be verified easily once we have completed our
‘eseription of fe
“The clauses in f(x) can be divided into ix groups, each imposing &
spurte type of restriction on any satisfying truth assignment as given in
Figure 2.8
tis straightforward to observe that if all six clause groups perform
their intended missions, then a satisfying truth assignment will have 10
cortespond to the desired accepting computation for x. Thus all we need to
Show is how clause groups performing these missions can be constructed
‘Group G; consss of the following clauses:
{QUO OUI... Olielh, Oi (S10.n eh,
(Sto.n+1.i}(si0.e+2.0),. ,{St0,aCm+i,on,
where 258°,
& —— (aloww.ath
Figure 2) The fist ive clase group in f.(
‘The romaning subgroup of Ge guarantees thatthe changes from one
coniiguration to the next are in accord with the transition function 8 for A
For each quadruple (i/.k,0), 0S /) and |C| = Olen), Hence
Length /,601 = [U/C] = O(p(a)5, and is bounded by a polynomial
function of as desired.
‘Thus the transformation f, can be computed by a polynomial time
algorithm (athough the particular polyzomial Bound it obeys wil depend on
Land on our choices for Mand p, and we conclude that, for every
LENP, f; is 2 polynomial transformation from L to SAT (technically, of
course, from L to Lsgp). It fllows, as claimed, that SAT is NP-complete
3
Proving NP-Completeness Results
If every NP.completeness proof had to be as complicated as that for
SATISFIABILITY, it's doubtful thatthe class of known NP-complete prob-
lems would have grown as fast sit has. However, as discussed in Section
244, once we have proved a single problem NP-complete, the procedure for
proving addtional problems NP-complete is greatly simplifed, Given a
‘oblem MENP, all we need do is show that some already known NP-
‘Somplete problem I’ can be transformed to TL. Thus, from now oa, the
process of devising an NP-completeness proof fora decision problem Iwill
‘Sonsist of the following our steps:
(1 showing that 11s in NP,
(2) selecting a known NP-complete problem fT,
(6) constructing a transformation f from MT to, and
4) proving that f i (polynomial) transformation
In this chapter, we intend not oaly to acquaint readers with the end
resulis of this process {the finished NP-completeness proofs) but lso {0
Dropare them forthe task of eonsiructing such proofs on their own. in Sec
tion 3.1 we present ix problems that are commonly used as the “known
NP-complete problem” in proofs of NP-completeness, and We prove that