From Surf Wiki (app.surf) — the open knowledge base
FKT algorithm
Algorithm for counting perfect matchings in planar graphs
Algorithm for counting perfect matchings in planar graphs
The Fisher–Kasteleyn–Temperley (FKT) algorithm, named after Michael Fisher, Pieter Kasteleyn, and Neville Temperley, counts the number of perfect matchings in a planar graph in polynomial time. This same task is #P-complete for general graphs. For matchings that are not required to be perfect, counting them remains #P-complete even for planar graphs. The key idea of the FKT algorithm is to convert the problem into a Pfaffian computation of a skew-symmetric matrix derived from a planar embedding of the graph. The Pfaffian of this matrix is then computed efficiently using standard determinant algorithms.
History
The problem of counting planar perfect matchings has its roots in statistical mechanics and chemistry, where the original question was: If diatomic molecules are adsorbed on a surface, forming a single layer, how many ways can they be arranged?{{Citation | author-link = Brian Hayes (scientist) | author-link = Rodney J. Baxter | orig-year = 1982 | conference-url = http://www.egr.unlv.edu/~larmore/FOCS/focs2010/
Another type of physical system to consider is composed of dimers, which is a polymer with two atoms. The dimer model counts the number of dimer coverings of a graph. Another physical system to consider is the bonding of H2O molecules in the form of ice. This can be modelled as a directed, 3-regular graph where the orientation of the edges at each vertex cannot all be the same. How many edge orientations does this model have?
Motivated by physical systems involving dimers, in 1961, Pieter Kasteleyn{{citation | author-link = Pieter Kasteleyn | author-link = Pieter Kasteleyn | author-link = Pieter Kasteleyn | editor-last = Harary | editor-first = F. | editor-link = Frank Harary
Algorithm
Explanation
The main insight is that every non-zero term in the Pfaffian of the adjacency matrix of a graph G corresponds to a perfect matching. Thus, if one can find an orientation of G to align all signs of the terms in Pfaffian (no matter + or - ), then the absolute value of the Pfaffian is just the number of perfect matchings in G. The FKT algorithm does such a task for a planar graph G. The orientation it finds is called a Pfaffian orientation.
Let G = (V, E) be an undirected graph with adjacency matrix A. Define PM(n) to be the set of partitions of n elements into pairs, then the number of perfect matchings in G is :\operatorname{PerfMatch}(G) = \sum_{M \in PM(|V|)} \prod_{(i,j) \in M} A_{i j}. Closely related to this is the Pfaffian for an n by n matrix A :\operatorname{pf}(A) = \sum_{M \in PM(n)} \operatorname{sgn}(M) \prod_{(i,j) \in M} A_{i j}, where sgn(M) is the sign of the permutation M. A Pfaffian orientation of G is a directed graph H with adjacency matrix B such that pf(B) = PerfMatch(G).{{cite conference | author-link = Robin Thomas (mathematician) | conference-url = http://www.icm2006.org/
Finally, for any skew-symmetric matrix A, :\operatorname{pf}(A)^2 = \det(A), where det(A) is the determinant of A. This result is due to Arthur Cayley.{{cite journal | author-link1 = Arthur Cayley |trans-title= On skew determinants
High-level description

- Compute a planar embedding of G.
- Compute a spanning tree T1 of the input graph G.
- Give an arbitrary orientation to each edge in G that is also in T1.
- Use the planar embedding to create an (undirected) graph T2 with the same vertex set as the dual graph of G.
- Create an edge in T2 between two vertices if their corresponding faces in G share an edge in G that is not in T1. (Note that T2 is a tree.)
- For each leaf v in T2 (that is not also the root):
- Let e be the lone edge of G in the face corresponding to v that does not yet have an orientation.
- Give e an orientation such that the number of edges oriented clock-wise is odd.
- Remove v from T2.
- Return the absolute value of the Pfaffian of the adjacency matrix of G, which is the square root of the determinant.
Generalizations
The sum of weighted perfect matchings can also be computed by using the Tutte matrix for the adjacency matrix in the last step.
Kuratowski's theorem states that : a finite graph is planar if and only if it contains no subgraph homeomorphic to K5 (complete graph on five vertices) or K3,3 (complete bipartite graph on two partitions of size three). Vijay Vazirani generalized the FKT algorithm to graphs that do not contain a subgraph homeomorphic to K3,3.{{cite journal | author-link = Vijay Vazirani | doi-access= free | hdl-access= free Since counting the number of perfect matchings in a general graph is also #P-complete, some restriction on the input graph is required unless FP, the function version of P, is equal to #P. Counting matchings, which is known as the Hosoya index, is also #P-complete even for planar graphs.{{citation
Applications
The FKT algorithm has seen extensive use in holographic algorithms on planar graphs via matchgates. For example, consider the planar version of the ice model mentioned above, which has the technical name #PL-3-NAE-SAT (where NAE stands for "not all equal"). Valiant found a polynomial time algorithm for this problem which uses matchgates.{{cite journal
References
References
- (2005). "What is a Dimer?". AMS.
- (1961). "Dimer problem in statistical mechanics-an exact result". Philosophical Magazine.
This article was imported from Wikipedia and is available under the Creative Commons Attribution-ShareAlike 4.0 License. Content has been adapted to SurfDoc format. Original contributors can be found on the article history page.
Ask Mako anything about FKT algorithm — get instant answers, deeper analysis, and related topics.
Research with MakoFree with your Surf account
Create a free account to save articles, ask Mako questions, and organize your research.
Sign up freeThis content may have been generated or modified by AI. CloudSurf Software LLC is not responsible for the accuracy, completeness, or reliability of AI-generated content. Always verify important information from primary sources.
Report