<s>
The	O
FKT	B-Algorithm
algorithm	I-Algorithm
,	O
named	O
after	O
Fisher	O
,	O
Kasteleyn	O
,	O
and	O
Temperley	O
,	O
counts	O
the	O
number	O
of	O
perfect	O
matchings	O
in	O
a	O
planar	O
graph	O
in	O
polynomial	O
time	O
.	O
</s>
<s>
The	O
key	O
idea	O
of	O
the	O
FKT	B-Algorithm
algorithm	I-Algorithm
is	O
to	O
convert	O
the	O
problem	O
into	O
a	O
Pfaffian	O
computation	O
of	O
a	O
skew-symmetric	B-Algorithm
matrix	I-Algorithm
derived	O
from	O
a	O
planar	O
embedding	B-Algorithm
of	O
the	O
graph	O
.	O
</s>
<s>
Another	O
physical	O
system	O
to	O
consider	O
is	O
the	O
bonding	O
of	O
H2O	B-Language
molecules	O
in	O
the	O
form	O
of	O
ice	O
.	O
</s>
<s>
The	O
main	O
insight	O
is	O
that	O
every	O
non-zero	O
term	O
in	O
the	O
Pfaffian	O
of	O
the	O
adjacency	B-Algorithm
matrix	I-Algorithm
of	O
a	O
graph	O
G	O
corresponds	O
to	O
a	O
perfect	O
matching	O
.	O
</s>
<s>
Thus	O
,	O
if	O
one	O
can	O
find	O
an	O
orientation	O
of	O
G	O
to	O
align	O
all	O
signs	O
of	O
the	O
terms	O
in	O
Pfaffian	O
(	O
no	O
matter	O
+	O
or	O
-	O
)	O
,	O
then	O
the	O
absolute	O
value	O
of	O
the	O
Pfaffian	O
is	O
just	O
the	O
number	O
of	O
perfect	O
matchings	O
in	O
G	O
.	O
The	O
FKT	B-Algorithm
algorithm	I-Algorithm
does	O
such	O
a	O
task	O
for	O
a	O
planar	O
graph	O
G	O
.	O
The	O
orientation	O
it	O
finds	O
is	O
called	O
a	O
Pfaffian	O
orientation	O
.	O
</s>
<s>
Let	O
G	O
=	O
(	O
V	O
,	O
E	O
)	O
be	O
an	O
undirected	O
graph	O
with	O
adjacency	B-Algorithm
matrix	I-Algorithm
A	O
.	O
</s>
<s>
where	O
sgn(M )	O
is	O
the	O
sign	O
of	O
the	O
permutation	O
M	O
.	O
A	O
Pfaffian	O
orientation	O
of	O
G	O
is	O
a	O
directed	O
graph	O
H	O
with	O
adjacency	B-Algorithm
matrix	I-Algorithm
B	O
such	O
that	O
pf(B )	O
=	O
PerfMatch(G )	O
.	O
</s>
<s>
Specifically	O
,	O
for	O
a	O
planar	O
graph	O
G	O
,	O
let	O
H	O
be	O
a	O
directed	O
version	O
of	O
G	O
where	O
an	O
odd	O
number	O
of	O
edges	O
are	O
oriented	O
clockwise	O
for	O
every	O
face	O
in	O
a	O
planar	O
embedding	B-Algorithm
of	O
G	O
.	O
Then	O
H	O
is	O
a	O
Pfaffian	O
orientation	O
of	O
G	O
.	O
</s>
<s>
Finally	O
,	O
for	O
any	O
skew-symmetric	B-Algorithm
matrix	I-Algorithm
A	O
,	O
</s>
<s>
Compute	O
a	O
planar	O
embedding	B-Algorithm
of	O
G	O
.	O
</s>
<s>
Use	O
the	O
planar	O
embedding	B-Algorithm
to	O
create	O
an	O
(	O
undirected	O
)	O
graph	O
T2	O
with	O
the	O
same	O
vertex	O
set	O
as	O
the	O
dual	O
graph	O
of	O
G	O
.	O
</s>
<s>
Return	O
the	O
absolute	O
value	O
of	O
the	O
Pfaffian	O
of	O
the	O
adjacency	B-Algorithm
matrix	I-Algorithm
of	O
G	O
,	O
which	O
is	O
the	O
square	O
root	O
of	O
the	O
determinant	O
.	O
</s>
<s>
The	O
sum	O
of	O
weighted	O
perfect	O
matchings	O
can	O
also	O
be	O
computed	O
by	O
using	O
the	O
Tutte	O
matrix	O
for	O
the	O
adjacency	B-Algorithm
matrix	I-Algorithm
in	O
the	O
last	O
step	O
.	O
</s>
<s>
Vijay	O
Vazirani	O
generalized	O
the	O
FKT	B-Algorithm
algorithm	I-Algorithm
to	O
graphs	O
that	O
do	O
not	O
contain	O
a	O
subgraph	O
homeomorphic	O
to	O
K3	O
,	O
3	O
.	O
</s>
<s>
The	O
FKT	B-Algorithm
algorithm	I-Algorithm
has	O
seen	O
extensive	O
use	O
in	O
holographic	B-Algorithm
algorithms	I-Algorithm
on	O
planar	O
graphs	O
via	O
matchgates	O
.	O
</s>
<s>
For	O
example	O
,	O
consider	O
the	O
planar	O
version	O
of	O
the	O
ice	O
model	O
mentioned	O
above	O
,	O
which	O
has	O
the	O
technical	O
name	O
#PL	O
-3-NAE-SAT	O
(	O
where	O
NAE	O
stands	O
for	O
"	O
not	O
all	O
equal	O
"	O
)	O
.	O
</s>
