<s>
The	O
complexity	B-Application
of	I-Application
constraint	I-Application
satisfaction	I-Application
is	O
the	O
application	O
of	O
computational	O
complexity	O
theory	O
on	O
constraint	B-Application
satisfaction	I-Application
.	O
</s>
<s>
It	O
has	O
mainly	O
been	O
studied	O
for	O
discriminating	O
between	O
tractable	O
and	O
intractable	O
classes	O
of	O
constraint	B-Application
satisfaction	I-Application
problems	I-Application
on	O
finite	O
domains	O
.	O
</s>
<s>
Solving	O
a	O
constraint	B-Application
satisfaction	I-Application
problem	I-Application
on	O
a	O
finite	O
domain	O
is	O
an	O
NP-complete	O
problem	O
in	O
general	O
.	O
</s>
<s>
Research	O
has	O
also	O
established	O
a	O
relationship	O
between	O
the	O
constraint	B-Application
satisfaction	I-Application
problem	I-Application
and	O
problems	O
in	O
other	O
areas	O
such	O
as	O
finite	O
model	O
theory	O
and	O
databases	O
.	O
</s>
<s>
Establishing	O
whether	O
a	O
constraint	B-Application
satisfaction	I-Application
problem	I-Application
on	O
a	O
finite	O
domain	O
has	O
solutions	O
is	O
an	O
NP	O
complete	O
problem	O
in	O
general	O
.	O
</s>
<s>
This	O
is	O
an	O
easy	O
consequence	O
of	O
a	O
number	O
of	O
other	O
NP	O
complete	O
problems	O
being	O
expressible	O
as	O
constraint	B-Application
satisfaction	I-Application
problems	I-Application
.	O
</s>
<s>
Such	O
other	O
problems	O
include	O
propositional	B-Algorithm
satisfiability	I-Algorithm
and	O
three-colorability	O
.	O
</s>
<s>
Tractability	O
can	O
be	O
obtained	O
by	O
considering	O
specific	O
classes	O
of	O
constraint	B-Application
satisfaction	I-Application
problems	I-Application
.	O
</s>
<s>
As	O
an	O
example	O
,	O
if	O
the	O
domain	O
is	O
binary	O
and	O
all	O
constraints	O
are	O
binary	O
,	O
establishing	O
satisfiability	O
is	O
a	O
polynomial-time	O
problem	O
because	O
this	O
problem	O
is	O
equivalent	O
to	O
2-SAT	B-Application
,	O
which	O
is	O
tractable	O
.	O
</s>
<s>
One	O
line	O
of	O
research	O
used	O
a	O
correspondence	O
between	O
constraint	B-Application
satisfaction	I-Application
problem	I-Application
and	O
the	O
problem	O
of	O
establishing	O
the	O
existence	O
of	O
a	O
homomorphism	O
between	O
two	O
relational	O
structures	O
.	O
</s>
<s>
This	O
correspondence	O
has	O
been	O
used	O
to	O
link	O
constraint	B-Application
satisfaction	I-Application
with	O
topics	O
traditionally	O
related	O
to	O
database	B-General_Concept
theory	I-General_Concept
.	O
</s>
<s>
This	O
is	O
considered	O
by	O
some	O
authors	O
the	O
most	O
important	O
open	O
question	O
about	O
the	O
complexity	B-Application
of	I-Application
constraint	I-Application
satisfaction	I-Application
.	O
</s>
<s>
Tractable	O
subcases	O
of	O
the	O
general	O
constraint	B-Application
satisfaction	I-Application
problems	I-Application
can	O
be	O
obtained	O
by	O
placing	O
suitable	O
restrictions	O
on	O
the	O
problems	O
.	O
</s>
<s>
A	O
constraint	B-Application
satisfaction	I-Application
problem	I-Application
meets	O
this	O
restriction	O
if	O
it	O
has	O
exactly	O
this	O
domain	O
and	O
the	O
relation	O
of	O
each	O
constraint	O
is	O
in	O
the	O
given	O
set	O
of	O
relations	O
.	O
</s>
<s>
Given	O
a	O
constraint	B-Application
satisfaction	I-Application
problem	I-Application
with	O
only	O
binary	O
constraints	O
,	O
its	O
associated	O
graph	O
has	O
a	O
vertex	O
for	O
every	O
variable	O
and	O
an	O
edge	O
for	O
every	O
constraint	O
;	O
two	O
vertices	O
are	O
joined	O
if	O
they	O
are	O
in	O
a	O
constraint	O
.	O
</s>
<s>
While	O
relational	O
and	O
structural	O
restrictions	O
are	O
the	O
ones	O
mostly	O
used	O
to	O
derive	O
tractable	O
classes	O
of	O
constraint	B-Application
satisfaction	I-Application
,	O
there	O
are	O
some	O
tractable	O
classes	O
that	O
cannot	O
be	O
defined	O
by	O
relational	O
restrictions	O
only	O
or	O
structural	O
restrictions	O
only	O
.	O
</s>
<s>
These	O
problems	O
are	O
mostly	O
considered	O
when	O
expressing	O
constraint	B-Application
satisfaction	I-Application
in	O
terms	O
of	O
the	O
homomorphism	O
problem	O
,	O
as	O
explained	O
below	O
.	O
</s>
<s>
Some	O
considered	O
restrictions	O
are	O
based	O
on	O
the	O
tractability	O
of	O
the	O
constraint	B-Application
satisfaction	I-Application
problem	I-Application
where	O
the	O
constraints	O
are	O
all	O
binary	O
and	O
form	O
a	O
tree	O
over	O
the	O
variables	O
.	O
</s>
<s>
This	O
restriction	O
is	O
based	O
on	O
primal	B-Application
graph	I-Application
of	O
the	O
problem	O
,	O
which	O
is	O
a	O
graph	O
whose	O
vertices	O
are	O
the	O
variables	O
of	O
the	O
problem	O
and	O
the	O
edges	O
represent	O
the	O
presence	O
of	O
a	O
constraint	O
between	O
two	O
variables	O
.	O
</s>
<s>
Tractability	O
can	O
however	O
also	O
be	O
obtained	O
by	O
placing	O
the	O
condition	O
of	O
being	O
a	O
tree	O
to	O
the	O
primal	B-Application
graph	I-Application
of	O
problems	O
that	O
are	O
reformulations	O
of	O
the	O
original	O
one	O
.	O
</s>
<s>
Constraint	B-Application
satisfaction	I-Application
problems	I-Application
can	O
be	O
reformulated	O
in	O
terms	O
of	O
other	O
problems	O
,	O
leading	O
to	O
equivalent	O
conditions	O
to	O
tractability	O
.	O
</s>
<s>
A	O
link	O
between	O
constraint	B-Application
satisfaction	I-Application
and	O
database	B-General_Concept
theory	I-General_Concept
has	O
been	O
provided	O
in	O
the	O
form	O
of	O
a	O
correspondence	O
between	O
the	O
problem	O
of	O
constraint	O
satisfiability	O
to	O
the	O
problem	O
of	O
checking	O
whether	O
there	O
exists	O
a	O
homomorphism	O
between	O
two	O
relational	O
structures	O
.	O
</s>
<s>
A	O
relational	O
structure	O
is	O
different	O
from	O
a	O
constraint	B-Application
satisfaction	I-Application
problem	I-Application
because	O
a	O
constraint	O
is	O
a	O
relation	O
and	O
a	O
tuple	O
of	O
variables	O
.	O
</s>
<s>
Also	O
different	O
is	O
the	O
way	O
in	O
which	O
they	O
are	O
used	O
:	O
for	O
a	O
constraint	B-Application
satisfaction	I-Application
problem	I-Application
,	O
finding	O
a	O
satisfying	O
assignment	O
is	O
the	O
main	O
problem	O
;	O
for	O
a	O
relation	O
structure	O
,	O
the	O
main	O
problem	O
is	O
finding	O
the	O
answer	O
to	O
a	O
query	B-Language
.	O
</s>
<s>
The	O
constraint	B-Application
satisfaction	I-Application
problem	I-Application
is	O
however	O
related	O
to	O
the	O
problem	O
of	O
establishing	O
the	O
existence	O
of	O
a	O
homomorphism	O
between	O
two	O
relational	O
structures	O
.	O
</s>
<s>
A	O
direct	O
correspondence	O
between	O
the	O
constraint	B-Application
satisfaction	I-Application
problem	I-Application
and	O
the	O
homomorphism	O
problem	O
can	O
be	O
established	O
.	O
</s>
<s>
For	O
a	O
given	O
constraint	B-Application
satisfaction	I-Application
problem	I-Application
,	O
one	O
can	O
build	O
a	O
pair	O
of	O
relational	O
structures	O
,	O
the	O
first	O
encoding	O
the	O
variables	O
and	O
the	O
signatures	O
of	O
constraints	O
,	O
the	O
second	O
encoding	O
the	O
domains	O
and	O
the	O
relations	O
of	O
the	O
constraints	O
.	O
</s>
<s>
Satisfiability	O
of	O
the	O
constraint	B-Application
satisfaction	I-Application
problem	I-Application
corresponds	O
to	O
finding	O
a	O
value	O
for	O
every	O
variable	O
such	O
that	O
replacing	O
a	O
value	O
in	O
a	O
signature	O
makes	O
it	O
a	O
tuple	O
in	O
the	O
relation	O
of	O
the	O
constraint	O
.	O
</s>
<s>
The	O
inverse	O
correspondence	O
is	O
the	O
opposite	O
one	O
:	O
given	O
two	O
relational	O
structures	O
,	O
one	O
encodes	O
the	O
values	O
of	O
the	O
first	O
in	O
the	O
variables	O
of	O
a	O
constraint	B-Application
satisfaction	I-Application
problem	I-Application
,	O
and	O
the	O
values	O
of	O
the	O
second	O
in	O
the	O
domain	O
of	O
the	O
same	O
problem	O
.	O
</s>
<s>
A	O
non-uniform	O
constraint	B-Application
satisfaction	I-Application
problem	I-Application
is	O
a	O
restriction	O
where	O
the	O
second	O
structure	O
of	O
the	O
homomorphism	O
problem	O
is	O
fixed	O
.	O
</s>
<s>
A	O
uniform	O
constraint	B-Application
satisfaction	I-Application
problem	I-Application
is	O
an	O
arbitrary	O
restriction	O
to	O
the	O
sets	O
of	O
structures	O
for	O
the	O
first	O
and	O
second	O
structure	O
of	O
the	O
homomorphism	O
problem	O
.	O
</s>
<s>
Since	O
the	O
homomorphism	O
problem	O
is	O
equivalent	O
to	O
conjunctive	O
query	B-Language
evaluation	O
and	O
conjunctive	O
query	B-Language
containment	O
,	O
these	O
two	O
problems	O
are	O
equivalent	O
to	O
constraint	B-Application
satisfaction	I-Application
as	O
well	O
.	O
</s>
<s>
Every	O
constraint	O
can	O
be	O
viewed	O
as	O
a	O
table	B-Application
in	O
a	O
database	O
,	O
where	O
the	O
variables	O
are	O
interpreted	O
as	O
attributes	O
names	O
and	O
the	O
relation	O
is	O
the	O
set	O
of	O
records	O
in	O
the	O
table	B-Application
.	O
</s>
<s>
The	O
solutions	O
of	O
a	O
constraint	B-Application
satisfaction	I-Application
problem	I-Application
are	O
the	O
result	O
of	O
an	O
inner	B-Language
join	I-Language
of	O
the	O
tables	O
representing	O
its	O
constraints	O
;	O
therefore	O
,	O
the	O
problem	O
of	O
existence	O
of	O
solutions	O
can	O
be	O
reformulated	O
as	O
the	O
problem	O
of	O
checking	O
whether	O
the	O
result	O
of	O
an	O
inner	B-Language
join	I-Language
of	O
a	O
number	O
of	O
tables	O
is	O
empty	O
.	O
</s>
<s>
,	O
it	O
is	O
not	O
known	O
if	O
such	O
problems	O
can	O
be	O
expressed	O
as	O
constraint	B-Application
satisfaction	I-Application
problems	I-Application
with	O
a	O
fixed	O
constraint	O
language	O
.	O
</s>
<s>
The	O
best	O
known	O
such	O
result	O
is	O
Schaefer	B-Application
's	I-Application
dichotomy	I-Application
theorem	I-Application
,	O
which	O
proves	O
the	O
existence	O
of	O
a	O
dichotomy	O
in	O
the	O
set	O
of	O
constraint	O
languages	O
on	O
a	O
binary	O
domain	O
.	O
</s>
<s>
A	O
sufficient	O
condition	O
for	O
tractability	O
is	O
related	O
to	O
expressibility	O
in	O
Datalog	B-Language
.	O
</s>
<s>
A	O
Boolean	O
Datalog	B-Language
query	B-Language
gives	O
a	O
truth	O
value	O
to	O
a	O
set	O
of	O
literals	O
over	O
a	O
given	O
alphabet	O
,	O
each	O
literal	O
being	O
an	O
expression	O
of	O
the	O
form	O
;	O
as	O
a	O
result	O
,	O
a	O
Boolean	O
Datalog	B-Language
query	B-Language
expresses	O
a	O
set	O
of	O
sets	O
of	O
literals	O
,	O
as	O
it	O
can	O
be	O
considered	O
semantically	O
equivalent	O
to	O
the	O
set	O
of	O
all	O
sets	O
of	O
literals	O
that	O
it	O
evaluates	O
to	O
true	O
.	O
</s>
<s>
A	O
sufficient	O
condition	O
of	O
tractability	O
is	O
that	O
a	O
non-uniform	O
problem	O
is	O
tractable	O
if	O
the	O
set	O
of	O
its	O
unsatisfiable	O
instances	O
can	O
be	O
expressed	O
by	O
a	O
Boolean	O
Datalog	B-Language
query	B-Language
.	O
</s>
<s>
In	O
other	O
words	O
,	O
if	O
the	O
set	O
of	O
sets	O
of	O
literals	O
that	O
represent	O
unsatisfiable	O
instances	O
of	O
the	O
non-uniform	O
problem	O
is	O
also	O
the	O
set	O
of	O
sets	O
of	O
literals	O
that	O
satisfy	O
a	O
Boolean	O
Datalog	B-Language
query	B-Language
,	O
then	O
the	O
non-uniform	O
problem	O
is	O
tractable	O
.	O
</s>
<s>
Satisfiability	O
can	O
sometimes	O
be	O
established	O
by	O
enforcing	O
a	O
form	O
of	O
local	B-Application
consistency	I-Application
and	O
then	O
checking	O
the	O
existence	O
of	O
an	O
empty	O
domain	O
or	O
constraint	O
relation	O
.	O
</s>
<s>
For	O
some	O
forms	O
of	O
local	B-Application
consistency	I-Application
,	O
this	O
algorithm	O
may	O
also	O
require	O
exponential	O
time	O
.	O
</s>
<s>
However	O
,	O
for	O
some	O
problems	O
and	O
for	O
some	O
kinds	O
of	O
local	B-Application
consistency	I-Application
,	O
it	O
is	O
correct	O
and	O
polynomial-time	O
.	O
</s>
<s>
The	O
following	O
conditions	O
exploit	O
the	O
primal	B-Application
graph	I-Application
of	O
the	O
problem	O
,	O
which	O
has	O
a	O
vertex	O
for	O
each	O
variable	O
and	O
an	O
edge	O
between	O
two	O
nodes	O
if	O
the	O
corresponding	O
variables	O
are	O
in	O
a	O
constraint	O
.	O
</s>
<s>
The	O
following	O
are	O
conditions	O
on	O
binary	O
constraint	B-Application
satisfaction	I-Application
problems	I-Application
where	O
enforcing	O
local	B-Application
consistency	I-Application
is	O
tractable	O
and	O
allows	O
establishing	O
satisfiability	O
:	O
</s>
<s>
enforcing	O
arc	O
consistency	O
,	O
if	O
the	O
primal	B-Application
graph	I-Application
is	O
acyclic	O
;	O
</s>
<s>
enforcing	O
directional	B-Application
arc	I-Application
consistency	I-Application
for	O
an	O
ordering	O
of	O
the	O
variables	O
that	O
makes	O
the	O
ordered	B-Application
graph	I-Application
of	O
constraint	O
having	O
width	O
1	O
(	O
such	O
an	O
ordering	O
exists	O
if	O
and	O
only	O
if	O
the	O
primal	B-Application
graph	I-Application
is	O
a	O
tree	O
,	O
but	O
not	O
all	O
orderings	O
of	O
a	O
tree	O
generate	O
width	O
1	O
)	O
;	O
</s>
<s>
enforcing	O
strong	B-Application
directional	I-Application
path	I-Application
consistency	I-Application
for	O
an	O
ordering	O
of	O
the	O
variables	O
that	O
makes	O
the	O
primal	B-Application
graph	I-Application
having	O
induced	O
width	O
2	O
.	O
</s>
<s>
A	O
condition	O
that	O
extends	O
the	O
last	O
one	O
holds	O
for	O
non-binary	O
constraint	B-Application
satisfaction	I-Application
problems	I-Application
.	O
</s>
<s>
Namely	O
,	O
for	O
all	O
problems	O
for	O
which	O
there	O
exists	O
an	O
ordering	O
that	O
makes	O
the	O
primal	B-Application
graph	I-Application
having	O
induced	O
width	O
bounded	O
by	O
a	O
constant	O
i	O
,	O
enforcing	O
strong	B-Application
directional	I-Application
i-consistency	I-Application
is	O
tractable	O
and	O
allows	O
establishing	O
satisfiability	O
.	O
</s>
<s>
Constraint	B-Application
satisfaction	I-Application
problems	I-Application
composed	O
of	O
binary	O
constraints	O
only	O
can	O
be	O
viewed	O
as	O
graphs	O
,	O
where	O
the	O
vertices	O
are	O
variables	O
and	O
the	O
edges	O
represent	O
the	O
presence	O
of	O
a	O
constraint	O
between	O
two	O
variables	O
.	O
</s>
<s>
This	O
graph	O
is	O
called	O
the	O
Gaifman	O
graph	O
or	O
primal	B-Application
constraint	I-Application
graph	I-Application
(	O
or	O
simply	O
primal	B-Application
graph	I-Application
)	O
of	O
the	O
problem	O
.	O
</s>
<s>
If	O
the	O
primal	B-Application
graph	I-Application
of	O
a	O
problem	O
is	O
acyclic	O
,	O
establishing	O
satisfiability	O
of	O
the	O
problem	O
is	O
a	O
tractable	O
problem	O
.	O
</s>
<s>
This	O
property	O
of	O
tree-like	O
constraint	B-Application
satisfaction	I-Application
problems	I-Application
is	O
exploited	O
by	O
decomposition	B-Application
methods	I-Application
,	O
which	O
convert	O
problems	O
into	O
equivalent	O
ones	O
that	O
only	O
contain	O
binary	O
constraints	O
arranged	O
as	O
a	O
tree	O
.	O
</s>
<s>
A	O
necessary	O
condition	O
for	O
the	O
tractability	O
of	O
a	O
constraint	O
language	O
based	O
on	O
the	O
universal	O
gadget	B-Algorithm
has	O
been	O
proved	O
.	O
</s>
<s>
The	O
universal	O
gadget	B-Algorithm
is	O
a	O
particular	O
constraint	B-Application
satisfaction	I-Application
problem	I-Application
that	O
was	O
initially	O
defined	O
for	O
the	O
sake	O
of	O
expressing	O
new	O
relations	O
by	O
projection	O
.	O
</s>
<s>
Every	O
constraint	B-Application
satisfaction	I-Application
problem	I-Application
and	O
subset	O
of	O
its	O
variables	O
defines	O
a	O
relation	O
,	O
which	O
is	O
composed	O
by	O
all	O
tuples	O
of	O
values	O
of	O
the	O
variables	O
that	O
can	O
be	O
extended	O
to	O
the	O
other	O
variables	O
to	O
form	O
a	O
solution	O
.	O
</s>
<s>
The	O
universal	O
gadget	B-Algorithm
is	O
based	O
on	O
the	O
observation	O
that	O
every	O
relation	O
that	O
contains	O
-tuples	O
can	O
be	O
defined	O
by	O
projecting	O
a	O
relation	O
that	O
contains	O
all	O
possible	O
columns	O
of	O
elements	O
from	O
the	O
domain	O
.	O
</s>
<s>
If	O
the	O
table	B-Application
on	O
the	O
left	O
is	O
the	O
set	O
of	O
solutions	O
of	O
a	O
constraint	B-Application
satisfaction	I-Application
problem	I-Application
,	O
its	O
variables	O
and	O
are	O
constrained	O
to	O
the	O
values	O
of	O
the	O
table	B-Application
to	O
the	O
right	O
.	O
</s>
<s>
As	O
a	O
result	O
,	O
the	O
constraint	B-Application
satisfaction	I-Application
problem	I-Application
can	O
be	O
used	O
to	O
set	O
a	O
constraint	O
whose	O
relation	O
is	O
the	O
table	B-Application
on	O
the	O
right	O
,	O
which	O
may	O
not	O
be	O
in	O
the	O
constraint	O
language	O
.	O
</s>
<s>
As	O
a	O
result	O
,	O
if	O
a	O
constraint	B-Application
satisfaction	I-Application
problem	I-Application
has	O
the	O
table	B-Application
on	O
the	O
left	O
as	O
its	O
set	O
of	O
solutions	O
,	O
every	O
relation	O
can	O
be	O
expressed	O
by	O
projecting	O
over	O
a	O
suitable	O
set	O
of	O
variables	O
.	O
</s>
<s>
A	O
way	O
for	O
trying	O
to	O
obtain	O
this	O
table	B-Application
as	O
the	O
set	O
of	O
solution	O
is	O
to	O
place	O
every	O
possible	O
constraint	O
that	O
is	O
not	O
violated	O
by	O
the	O
required	O
solutions	O
.	O
</s>
<s>
As	O
an	O
example	O
,	O
if	O
the	O
language	O
contains	O
the	O
binary	O
relation	O
representing	O
the	O
Boolean	O
disjunction	O
(	O
a	O
relation	O
containing	O
all	O
tuples	O
of	O
two	O
elements	O
that	O
contains	O
at	O
least	O
a	O
1	O
)	O
,	O
this	O
relation	O
is	O
placed	O
as	O
a	O
constraint	O
on	O
and	O
,	O
because	O
their	O
values	O
in	O
the	O
table	B-Application
above	O
are	O
,	O
again	O
,	O
and	O
.	O
</s>
<s>
On	O
the	O
other	O
hand	O
,	O
a	O
constraint	O
with	O
this	O
relation	O
is	O
not	O
placed	O
on	O
and	O
,	O
since	O
the	O
restriction	O
of	O
the	O
table	B-Application
above	O
to	O
these	O
two	O
variables	O
contains	O
as	O
a	O
third	O
row	O
,	O
and	O
this	O
evaluation	O
violates	O
that	O
constraint	O
.	O
</s>
<s>
The	O
universal	O
gadget	B-Algorithm
of	O
order	O
is	O
the	O
constraint	B-Application
satisfaction	I-Application
problem	I-Application
containing	O
all	O
constraints	O
that	O
can	O
be	O
placed	O
in	O
order	O
to	O
obtain	O
the	O
table	B-Application
above	O
.	O
</s>
<s>
The	O
solutions	O
of	O
the	O
universal	O
gadget	B-Algorithm
include	O
the	O
rows	O
of	O
this	O
table	B-Application
,	O
but	O
can	O
contain	O
other	O
rows	O
.	O
</s>
<s>
If	O
the	O
solutions	O
are	O
exactly	O
the	O
rows	O
of	O
the	O
table	B-Application
,	O
every	O
relation	O
can	O
be	O
expressed	O
by	O
projecting	O
on	O
a	O
subset	O
of	O
the	O
variables	O
.	O
</s>
<s>
A	O
property	O
of	O
the	O
universal	O
gadget	B-Algorithm
is	O
that	O
it	O
is	O
able	O
to	O
express	O
,	O
by	O
projection	O
,	O
every	O
relation	O
that	O
can	O
be	O
expressed	O
by	O
projection	O
from	O
an	O
arbitrary	O
constraint	B-Application
satisfaction	I-Application
problem	I-Application
based	O
on	O
the	O
same	O
language	O
.	O
</s>
<s>
More	O
precisely	O
,	O
the	O
universal	O
gadget	B-Algorithm
of	O
order	O
expresses	O
all	O
relations	O
of	O
rows	O
that	O
can	O
be	O
expressed	O
in	O
the	O
constraint	O
language	O
.	O
</s>
<s>
Given	O
a	O
specific	O
relation	O
,	O
its	O
expressibility	O
in	O
the	O
language	O
can	O
be	O
checked	O
by	O
considering	O
an	O
arbitrary	O
list	O
of	O
variables	O
whose	O
columns	O
in	O
the	O
table	B-Application
above	O
(	O
the	O
"	O
ideal	O
"	O
solutions	O
to	O
the	O
universal	O
gadget	B-Algorithm
)	O
form	O
that	O
relation	O
.	O
</s>
<s>
The	O
relation	O
can	O
be	O
expressed	O
in	O
the	O
language	O
if	O
and	O
only	O
if	O
the	O
solutions	O
of	O
the	O
universal	O
gadget	B-Algorithm
coincides	O
with	O
the	O
relation	O
when	O
projected	O
over	O
such	O
a	O
list	O
of	O
variables	O
.	O
</s>
<s>
In	O
other	O
words	O
,	O
one	O
can	O
check	O
expressibility	O
by	O
selecting	O
variables	O
"	O
as	O
if	O
"	O
the	O
solutions	O
of	O
the	O
universal	O
gadget	B-Algorithm
were	O
like	O
in	O
the	O
table	B-Application
,	O
and	O
then	O
check	O
whether	O
the	O
restriction	O
of	O
the	O
"	O
real	O
"	O
solutions	O
is	O
actually	O
the	O
same	O
as	O
the	O
relation	O
.	O
</s>
<s>
In	O
the	O
example	O
above	O
,	O
the	O
expressibility	O
of	O
the	O
relation	O
in	O
the	O
table	B-Application
on	O
the	O
right	O
can	O
be	O
checked	O
by	O
looking	O
whether	O
the	O
solutions	O
of	O
the	O
universal	O
gadget	B-Algorithm
,	O
when	O
restricted	O
to	O
the	O
variables	O
and	O
,	O
are	O
exactly	O
the	O
rows	O
of	O
this	O
table	B-Application
.	O
</s>
<s>
A	O
necessary	O
condition	O
for	O
tractability	O
can	O
be	O
expressed	O
in	O
terms	O
of	O
the	O
universal	O
gadget	B-Algorithm
.	O
</s>
<s>
The	O
solutions	O
of	O
such	O
a	O
gadget	B-Algorithm
can	O
be	O
tabulated	O
as	O
follows	O
:	O
</s>
<s>
This	O
table	B-Application
is	O
made	O
of	O
two	O
parts	O
.	O
</s>
<s>
Since	O
the	O
columns	O
of	O
the	O
table	B-Application
are	O
by	O
definition	O
associated	O
to	O
the	O
possible	O
-tuples	O
of	O
values	O
of	O
the	O
domain	O
,	O
every	O
solution	O
can	O
be	O
viewed	O
as	O
a	O
function	O
from	O
a	O
-tuple	O
of	O
elements	O
to	O
a	O
single	O
element	O
.	O
</s>
<s>
The	O
function	O
corresponding	O
to	O
a	O
solution	O
can	O
be	O
calculated	O
from	O
the	O
first	O
part	O
of	O
the	O
table	B-Application
above	O
and	O
the	O
solution	O
.	O
</s>
<s>
As	O
an	O
example	O
,	O
for	O
the	O
last	O
solution	O
marked	O
in	O
the	O
table	B-Application
,	O
this	O
function	O
can	O
be	O
determined	O
for	O
arguments	O
as	O
follows	O
:	O
first	O
,	O
these	O
three	O
values	O
are	O
the	O
first	O
part	O
of	O
the	O
row	O
"	O
c	O
"	O
in	O
the	O
table	B-Application
;	O
the	O
value	O
of	O
the	O
function	O
is	O
the	O
value	O
of	O
the	O
solution	O
in	O
the	O
same	O
column	O
,	O
that	O
is	O
,	O
0	O
.	O
</s>
<s>
A	O
necessary	O
condition	O
for	O
tractability	O
is	O
the	O
existence	O
of	O
a	O
solution	O
for	O
a	O
universal	O
gadget	B-Algorithm
of	O
some	O
order	O
that	O
is	O
part	O
of	O
some	O
classes	O
of	O
functions	O
.	O
</s>
<s>
The	O
necessary	O
condition	O
for	O
tractability	O
based	O
on	O
the	O
universal	O
gadget	B-Algorithm
holds	O
for	O
reduced	O
languages	O
.	O
</s>
<s>
Such	O
a	O
language	O
is	O
tractable	O
if	O
the	O
universal	O
gadget	B-Algorithm
has	O
a	O
solution	O
that	O
,	O
when	O
viewed	O
as	O
a	O
function	O
in	O
the	O
way	O
specified	O
above	O
,	O
is	O
either	O
a	O
constant	O
function	O
,	O
a	O
majority	O
function	O
,	O
an	O
idempotent	O
binary	O
function	O
,	O
an	O
affine	O
function	O
,	O
or	O
a	O
semi-projection	O
.	O
</s>
