
8.5. Gadget Construction 229
Proof. The domain of the witness function b is {a : f(a) = 1}, a set of cardi-
nality s (note that for strict gadgets the domain is of size 2k), so the witness
matrix has s rows, and the number of distinct columns is at most 2 s. Taking into
account that k' primary variables are distinct, there can be no more than 2 s - k'
distinct columns corresponding to auxiliary variables. Exceeding this limit would
allow us to eliminate one auxiliary variable via Lemma 8.24. 9
Another additional property allows us to reduce the number of auxiliary variables
even further.
Definition 8.27 (complementation-closed). A family 2: is complement-
ation-closed if it is hereditary and, for any fi(X1, ... ,Xn,) 9 ~, and any index
j 9 [n,], the~nction f' given by f~(X1,... ,Xn,) = fi(Xl,... ,Xj_l,--~Xj,Xj+l,
9 .., Xn~) is contained in Jr.
Notice that for a complementation-closed family ~, the hereditary property im-
plies that if fi(X1,..., Xn,) is contained in ~c then so is the function fi restricted
to X 3 - -~Xj, for any two distinct indices j, j~ 9 [nil. This guarantees that we can
make substitutions even if two columns in the witness matrix are complements
of each other. This gives us an improved upper bound on the number of auxiliary
variables in Corollary 8.26, namely 2 s-1 - k'. 2SAT is a complementation-closed
family but not CUT or DICuT.
In some cases (e.g. 2SAT but not CUT), there is also no need to consider columns
in the witness matrix which are identically 0 or identically 1 (clauses in which
the corresponding auxiliary variables appear can be replaced by shorter clauses
eliminating those variables).
We now show how to find optimal gadgets via an appropriate formulation of a
linear program (LP). As an example, we are looking for an c~-gadget reducing
PCo to 2SAT with minimum value of ~. According to our previous discussion we
can restrict our search to gadgets over at most 7 variables: 3 primary variables
and 4 = 24-1 - 4 auxiliary variables. 2SAT is complementation-closed, there are
4 satisfying assignments to PCo, and all primary variables are distinct. Over 7
variables, 2- 7 + 4- 0 2SAT constraints can be defined; call them C1,..., Cgs. A
gadget over 7 variables can thus be identified with the vector (Wl,. 9 9 wgs) of the
weights of the constraints. We can now formulate the following linear program
with 4.16 + 4 + 4.16 = 132 constraints over 99 variables:
minimize a
subject to
(V~: f(~) = 1)
= 1):
= 0)
(vj 9 [98]) :
~ ~> 0
wj >~ O.