<s>
In	O
computational	O
complexity	O
theory	O
,	O
a	O
gadget	B-Algorithm
is	O
a	O
subset	O
of	O
a	O
problem	O
instance	O
that	O
simulates	O
the	O
behavior	O
of	O
one	O
of	O
the	O
fundamental	O
units	O
of	O
a	O
different	O
computational	O
problem	O
.	O
</s>
<s>
Gadgets	B-Algorithm
are	O
typically	O
used	O
to	O
construct	O
reductions	B-Algorithm
from	O
one	O
computational	O
problem	O
to	O
another	O
,	O
as	O
part	O
of	O
proofs	O
of	O
NP-completeness	O
or	O
other	O
types	O
of	O
computational	O
hardness	O
.	O
</s>
<s>
The	O
component	B-Algorithm
design	I-Algorithm
technique	O
is	O
a	O
method	O
for	O
constructing	O
reductions	B-Algorithm
by	O
using	O
gadgets	B-Algorithm
.	O
</s>
<s>
traces	O
the	O
use	O
of	O
gadgets	B-Algorithm
to	O
a	O
1954	O
paper	O
in	O
graph	O
theory	O
by	O
W	O
.	O
T	O
.	O
Tutte	O
,	O
in	O
which	O
Tutte	O
provided	O
gadgets	B-Algorithm
for	O
reducing	O
the	O
problem	O
of	O
finding	O
a	O
subgraph	O
with	O
given	O
degree	O
constraints	O
to	O
a	O
perfect	O
matching	O
problem	O
.	O
</s>
<s>
However	O
,	O
the	O
"	O
gadget	B-Algorithm
"	O
terminology	O
has	O
a	O
later	O
origin	O
,	O
and	O
does	O
not	O
appear	O
in	O
Tutte	O
's	O
paper	O
.	O
</s>
<s>
Many	O
NP-completeness	O
proofs	O
are	O
based	O
on	O
many-one	B-Algorithm
reductions	I-Algorithm
from	O
3-satisfiability	O
,	O
the	O
problem	O
of	O
finding	O
a	O
satisfying	O
assignment	O
to	O
a	O
Boolean	O
formula	O
that	O
is	O
a	O
conjunction	O
(	O
Boolean	O
and	O
)	O
of	O
clauses	O
,	O
each	O
clause	O
being	O
the	O
disjunction	O
(	O
Boolean	O
or	O
)	O
of	O
three	O
terms	O
,	O
and	O
each	O
term	O
being	O
a	O
Boolean	O
variable	O
or	O
its	O
negation	O
.	O
</s>
<s>
A	O
reduction	O
from	O
this	O
problem	O
to	O
a	O
hard	O
problem	O
on	O
undirected	O
graphs	O
,	O
such	O
as	O
the	O
Hamiltonian	O
cycle	O
problem	O
or	O
graph	O
coloring	O
,	O
would	O
typically	O
be	O
based	O
on	O
gadgets	B-Algorithm
in	O
the	O
form	O
of	O
subgraphs	O
that	O
simulate	O
the	O
behavior	O
of	O
the	O
variables	O
and	O
clauses	O
of	O
a	O
given	O
3-satisfiability	O
instance	O
.	O
</s>
<s>
These	O
gadgets	B-Algorithm
would	O
then	O
be	O
glued	O
together	O
to	O
form	O
a	O
single	O
graph	O
,	O
a	O
hard	O
instance	O
for	O
the	O
graph	O
problem	O
in	O
consideration	O
.	O
</s>
<s>
The	O
reduction	O
uses	O
two	O
special	O
graph	O
vertices	O
,	O
labeled	O
as	O
"	O
Ground	O
"	O
and	O
"	O
False	O
"	O
,	O
that	O
are	O
not	O
part	O
of	O
any	O
gadget	B-Algorithm
.	O
</s>
<s>
As	O
shown	O
in	O
the	O
figure	O
,	O
the	O
gadget	B-Algorithm
for	O
a	O
variable	O
x	O
consists	O
of	O
two	O
vertices	O
connected	O
in	O
a	O
triangle	O
with	O
the	O
ground	O
vertex	O
;	O
one	O
of	O
the	O
two	O
vertices	O
of	O
the	O
gadget	B-Algorithm
is	O
labeled	O
with	O
x	O
and	O
the	O
other	O
is	O
labeled	O
with	O
the	O
negation	O
of	O
x	O
.	O
</s>
<s>
The	O
gadget	B-Algorithm
for	O
a	O
clause	O
consists	O
of	O
six	O
vertices	O
,	O
connected	O
to	O
each	O
other	O
,	O
to	O
the	O
vertices	O
representing	O
the	O
terms	O
t0	O
,	O
t1	O
,	O
and	O
t2	O
,	O
and	O
to	O
the	O
ground	O
and	O
false	O
vertices	O
by	O
the	O
edges	O
shown	O
.	O
</s>
<s>
Any	O
3-CNF	B-Application
formula	O
may	O
be	O
converted	O
into	O
a	O
graph	O
by	O
constructing	O
a	O
separate	O
gadget	B-Algorithm
for	O
each	O
of	O
its	O
variables	O
and	O
clauses	O
and	O
connecting	O
them	O
as	O
shown	O
.	O
</s>
<s>
Within	O
a	O
variable	O
gadget	B-Algorithm
,	O
only	O
two	O
colorings	O
are	O
possible	O
:	O
the	O
vertex	O
labeled	O
with	O
the	O
variable	O
must	O
be	O
colored	O
either	O
true	O
or	O
false	O
,	O
and	O
the	O
vertex	O
labeled	O
with	O
the	O
variable	O
's	O
negation	O
must	O
correspondingly	O
be	O
colored	O
either	O
false	O
or	O
true	O
.	O
</s>
<s>
In	O
this	O
way	O
,	O
valid	O
assignments	O
of	O
colors	O
to	O
the	O
variable	O
gadgets	B-Algorithm
correspond	O
one-for-one	O
with	O
truth	O
assignments	O
to	O
the	O
variables	O
:	O
the	O
behavior	O
of	O
the	O
gadget	B-Algorithm
with	O
respect	O
to	O
coloring	O
simulates	O
the	O
behavior	O
of	O
a	O
variable	O
with	O
respect	O
to	O
truth	O
assignment	O
.	O
</s>
<s>
In	O
this	O
way	O
,	O
the	O
clause	O
gadget	B-Algorithm
can	O
be	O
colored	O
if	O
and	O
only	O
if	O
the	O
corresponding	O
truth	O
assignment	O
satisfies	O
the	O
clause	O
,	O
so	O
again	O
the	O
behavior	O
of	O
the	O
gadget	B-Algorithm
simulates	O
the	O
behavior	O
of	O
a	O
clause	O
.	O
</s>
<s>
considered	O
what	O
they	O
called	O
"	O
a	O
radically	O
simple	O
form	O
of	O
gadget	B-Algorithm
reduction	O
"	O
,	O
in	O
which	O
each	O
bit	O
describing	O
part	O
of	O
a	O
gadget	B-Algorithm
may	O
depend	O
only	O
on	O
a	O
bounded	O
number	O
of	O
bits	O
of	O
the	O
input	O
,	O
and	O
used	O
these	O
reductions	B-Algorithm
to	O
prove	O
an	O
analogue	O
of	O
the	O
Berman	O
–	O
Hartmanis	O
conjecture	O
stating	O
that	O
all	O
NP-complete	O
sets	O
are	O
polynomial-time	O
isomorphic	O
.	O
</s>
<s>
The	O
standard	O
definition	O
of	O
NP-completeness	O
involves	O
polynomial	O
time	O
many-one	B-Algorithm
reductions	I-Algorithm
:	O
a	O
problem	O
in	O
NP	O
is	O
by	O
definition	O
NP-complete	O
if	O
every	O
other	O
problem	O
in	O
NP	O
has	O
a	O
reduction	O
of	O
this	O
type	O
to	O
it	O
,	O
and	O
the	O
standard	O
way	O
of	O
proving	O
that	O
a	O
problem	O
in	O
NP	O
is	O
NP-complete	O
is	O
to	O
find	O
a	O
polynomial	O
time	O
many-one	B-Algorithm
reduction	I-Algorithm
from	O
a	O
known	O
NP-complete	O
problem	O
to	O
it	O
.	O
</s>
<s>
called	O
"	O
a	O
curious	O
,	O
often	O
observed	O
fact	O
"	O
)	O
all	O
sets	O
known	O
to	O
be	O
NP-complete	O
at	O
that	O
time	O
could	O
be	O
proved	O
complete	O
using	O
the	O
stronger	O
notion	O
of	O
AC0	O
many-one	B-Algorithm
reductions	I-Algorithm
:	O
that	O
is	O
,	O
reductions	B-Algorithm
that	O
can	O
be	O
computed	O
by	O
circuits	O
of	O
polynomial	O
size	O
,	O
constant	O
depth	O
,	O
and	O
unbounded	O
fan-in	O
.	O
</s>
<s>
proved	O
that	O
every	O
set	O
that	O
is	O
NP-complete	O
under	O
AC0	O
reductions	B-Algorithm
is	O
complete	O
under	O
an	O
even	O
more	O
restricted	O
type	O
of	O
reduction	O
,	O
NC0	O
many-one	B-Algorithm
reductions	I-Algorithm
,	O
using	O
circuits	O
of	O
polynomial	O
size	O
,	O
constant	O
depth	O
,	O
and	O
bounded	O
fan-in	O
.	O
</s>
<s>
used	O
their	O
equivalence	O
between	O
AC0	O
reductions	B-Algorithm
and	O
NC0	O
reductions	B-Algorithm
to	O
show	O
that	O
all	O
sets	O
complete	O
for	O
NP	O
under	O
AC0	O
reductions	B-Algorithm
are	O
AC0-isomorphic	O
.	O
</s>
<s>
One	O
application	O
of	O
gadgets	B-Algorithm
is	O
in	O
proving	O
hardness	O
of	O
approximation	O
results	O
,	O
by	O
reducing	O
a	O
problem	O
that	O
is	O
known	O
to	O
be	O
hard	O
to	O
approximate	O
to	O
another	O
problem	O
whose	O
hardness	O
is	O
to	O
be	O
proven	O
.	O
</s>
<s>
The	O
reductions	B-Algorithm
used	O
in	O
these	O
proofs	O
,	O
and	O
the	O
gadgets	B-Algorithm
used	O
in	O
the	O
reductions	B-Algorithm
,	O
must	O
preserve	O
the	O
existence	O
of	O
this	O
gap	O
,	O
and	O
the	O
strength	O
of	O
the	O
inapproximability	O
result	O
derived	O
from	O
the	O
reduction	O
will	O
depend	O
on	O
how	O
well	O
the	O
gap	O
is	O
preserved	O
.	O
</s>
<s>
formalize	O
the	O
problem	O
of	O
finding	O
gap-preserving	O
gadgets	B-Algorithm
,	O
for	O
families	O
of	O
constraint	B-Application
satisfaction	I-Application
problems	I-Application
in	O
which	O
the	O
goal	O
is	O
to	O
maximize	O
the	O
number	O
of	O
satisfied	O
constraints	O
.	O
</s>
<s>
They	O
give	O
as	O
an	O
example	O
a	O
reduction	O
from	O
3-satisfiability	O
to	O
2-satisfiability	B-Application
by	O
,	O
in	O
which	O
the	O
gadget	B-Algorithm
representing	O
a	O
3-SAT	O
clause	O
consists	O
of	O
ten	O
2-SAT	B-Application
clauses	O
,	O
and	O
in	O
which	O
a	O
truth	O
assignment	O
that	O
satisfies	O
3-SAT	O
clause	O
also	O
satisfies	O
at	O
least	O
seven	O
clauses	O
in	O
the	O
gadget	B-Algorithm
,	O
while	O
a	O
truth	O
assignment	O
that	O
fails	O
to	O
satisfy	O
a	O
3-SAT	O
clause	O
also	O
fails	O
to	O
satisfy	O
more	O
than	O
six	O
clauses	O
of	O
the	O
gadget	B-Algorithm
.	O
</s>
<s>
Using	O
this	O
gadget	B-Algorithm
,	O
and	O
the	O
fact	O
that	O
(	O
unless	O
P	O
=	O
NP	O
)	O
there	O
is	O
no	O
polynomial-time	B-Algorithm
approximation	I-Algorithm
scheme	I-Algorithm
for	O
maximizing	O
the	O
number	O
of	O
3-SAT	O
clauses	O
that	O
a	O
truth	O
assignment	O
satisfies	O
,	O
it	O
can	O
be	O
shown	O
that	O
there	O
is	O
similarly	O
no	O
approximation	O
scheme	O
for	O
MAX	O
2-SAT	B-Application
.	O
</s>
<s>
show	O
that	O
,	O
in	O
many	O
cases	O
of	O
the	O
constraint	B-Application
satisfaction	I-Application
problems	I-Application
they	O
study	O
,	O
the	O
gadgets	B-Algorithm
leading	O
to	O
the	O
strongest	O
possible	O
inapproximability	O
results	O
may	O
be	O
constructed	O
automatically	O
,	O
as	O
the	O
solution	O
to	O
a	O
linear	B-Algorithm
programming	I-Algorithm
problem	I-Algorithm
.	O
</s>
<s>
The	O
same	O
gadget-based	O
reductions	B-Algorithm
may	O
also	O
be	O
used	O
in	O
the	O
other	O
direction	O
,	O
to	O
transfer	O
approximation	O
algorithms	O
from	O
easier	O
problems	O
to	O
harder	O
problems	O
.	O
</s>
<s>
provide	O
an	O
optimal	O
gadget	B-Algorithm
for	O
reducing	O
3-SAT	O
to	O
a	O
weighted	O
variant	O
of	O
2-SAT	B-Application
(	O
consisting	O
of	O
seven	O
weighted	O
2-SAT	B-Application
clauses	O
)	O
that	O
is	O
stronger	O
than	O
the	O
one	O
by	O
;	O
using	O
it	O
,	O
together	O
with	O
known	O
semidefinite	O
programming	O
approximation	O
algorithms	O
for	O
MAX	O
2-SAT	B-Application
,	O
they	O
provide	O
an	O
approximation	O
algorithm	O
for	O
MAX	O
3-SAT	O
with	O
approximation	O
ratio	O
0.801	O
,	O
better	O
than	O
previously	O
known	O
algorithms	O
.	O
</s>
