Imagine you have many small tiles. 
Imagine you have many small tiles. 
Math can help you count every way. This is a hard puzzle. It is like matching pairs of toys.
Scientists used this math to study tiny things. They looked at how small bits of ice fit together. They also looked at how tiny molecules sit on a surface.
Three smart people found a way to solve it. They used a special way to count. It makes the big puzzle much easier to finish.
Imagine you have a floor made of many squares. You want to cover it with dominoes. How many ways can you do this? This is a hard puzzle. It is hard because there are so many ways to fit the pieces. 
Scientists first used this math to study tiny things. They wanted to know how small molecules sit on a surface. They also studied how bits of ice fit together. To solve these puzzles, they needed a way to count perfect matchings. A perfect matching is when every point in a group has exactly one partner.
Three people found a way to solve this. Their names are Michael Fisher, Pieter Kasteleyn, and Neville Temperley. They created the FKT algorithm. This is a set of steps to count the ways. It works on planar graphs. These are shapes that can be drawn on a flat surface without lines crossing.
First, the math finds a special way to point the lines. This is called a Pfaffian orientation. Then, it uses a math tool called a Pfaffian. This tool uses a large grid of numbers called a matrix. By using this, the hard puzzle becomes easy for a computer to solve.
Imagine you are covering a floor with dominoes. You want to know every possible way to fit them. This sounds simple, but it is a very hard puzzle. For many shapes, there are too many ways to count by hand. This task is called finding perfect matchings. A perfect matching happens when every point in a group has exactly one partner. In math, we call the shapes used for these puzzles graphs. Some graphs are planar, meaning they can be drawn flat without lines crossing. 
To solve this, mathematicians use a special set of steps called the FKT algorithm. First, they look at a planar graph and find a special way to point its lines. This is called a Pfaffian orientation. The goal is to make sure the signs in a math grid work out correctly. This grid is called a skew-symmetric matrix. Once the lines are pointed, the algorithm uses a tool called a Pfaffian. The Pfaffian is a way to find a number from that grid. Finally, the computer finds the square root of a value called a determinant. 
This math started with questions about science. Scientists in chemistry wanted to know how tiny molecules sit on a surface. They studied things called dimers, which are molecules with two atoms. They also looked at how water molecules bond to make ice. Counting how these tiny parts fit together helps explain how systems work. In the early 1960s, people were still figuring out how to define these problems. By 1965, computer science gave us a way to measure how fast a computer can solve them. 
Three important people helped solve this puzzle. Their names are Michael Fisher, Pieter Kasteleyn, and Neville Temperley. In 1961, they found how to count dominoes in a rectangle. This was a big step for the dimer model. Later, in 1967, Kasteleyn showed it worked for all planar graphs. This made the solution much more powerful. Other math experts like Vijay Vazirani later expanded these ideas. They looked at graphs that were almost planar but had a few extra rules. 
This algorithm connects many different worlds. It links chemistry and physics to the logic of computers. It helps us understand how patterns repeat in nature. Even though it is a math rule, it describes real things like ice and molecules. It shows how a hard counting problem can become easy with the right steps. We can use these steps to solve complex puzzles in science. This makes the FKT algorithm a very useful tool for many researchers. 
The Fisher–Kasteleyn–Temperley algorithm, or FKT algorithm, is a mathematical method for counting perfect matchings. A perfect matching occurs when every vertex in a graph is paired with exactly one partner through an edge. This task is incredibly difficult for most types of graphs. In computer science, counting these matchings in general graphs is classified as #P-complete. This means the problem is computationally very hard. However, the FKT algorithm can solve this problem in polynomial time for planar graphs. A planar graph is a graph that can be drawn on a flat surface without any edges crossing each other.
To understand how the algorithm works, we must look at its mechanism. The core idea involves converting the counting problem into a Pfaffian computation. This computation uses a skew-symmetric matrix, which is a special type of square matrix. The algorithm begins by finding a planar embedding of the graph. It then seeks a specific way to direct the edges, known as a Pfaffian orientation. In this orientation, the signs of the terms in the Pfaffian align correctly. Once this orientation is found, the absolute value of the Pfaffian equals the number of perfect matchings. The Pfaffian itself can be calculated efficiently by finding the square root of the determinant of the matrix. 
Finding this Pfaffian orientation follows a specific sequence of steps. First, the algorithm computes a planar embedding of the graph. Next, it identifies a spanning tree, which is a subgraph that connects all vertices without forming any loops. The algorithm gives an arbitrary orientation to the edges within this tree. It then uses the planar embedding to create a second tree, T2, based on the dual graph. The vertices of T2 correspond to the faces of the original graph. For each leaf in this new tree, the algorithm orients the remaining edges so that an odd number of edges are oriented clockwise around each face. This specific arrangement ensures the orientation is a Pfaffian orientation.
The history of this algorithm is rooted in the fields of statistical mechanics and chemistry. Scientists were interested in how diatomic molecules, called dimers, arrange themselves on a surface. They wanted to know how many ways these molecules could form a single layer. This question is related to finding the partition function, which describes the statistical properties of a system at equilibrium. In 1961, Pieter Kasteleyn, Neville Temperley, and Michael Fisher independently discovered how to count domino tilings in an m-by-n rectangle. This was equivalent to counting perfect matchings in an m-by-n lattice graph. By 1967, Kasteleyn expanded this work to include all planar graphs. 
Mathematical rigor evolved alongside these discoveries. In the early 1960s, the term "exactly solvable" was not yet strictly defined. Computer science provided clarity in 1965 with the introduction of polynomial time. Later, in 1979, the concept of #P-hardness was defined to describe problems that are not easily solvable. The FKT algorithm is significant because it moves a problem from the realm of the impossible to the realm of the efficient. While counting matchings in general graphs remains #P-complete, the FKT algorithm provides a fast solution for the planar subset. This distinction is vital for researchers working with large-scale physical models.
There are several notable variations and generalizations of this work. For instance, the algorithm can be used to compute the sum of weighted perfect matchings by using a Tutte matrix. Researchers have also looked at graphs that are nearly planar. Vijay Vazirani generalized the algorithm to graphs that do not contain a specific type of subgraph known as K3,3. The complexity of these problems is often tied to graph minors. For example, counting perfect matchings is solvable in polynomial time for certain minor-closed families of graphs. However, if a family includes all shallow vortex grids, the problem becomes #P-complete again. 
The FKT algorithm connects deep mathematical theory to practical scientific models. It has been used in holographic algorithms through the use of matchgates. One specific application involves the ice model, technically known as #PL-3-NAE-SAT. This model describes the bonding of H2O molecules in the form of ice. In this model, the system is represented as a directed, 3-regular graph. The algorithm helps determine how many ways these molecules can orient their edges. By bridging the gap between graph theory and physical chemistry, the FKT algorithm remains a fundamental tool in modern science.
🖼️ Images & Media (1)
More to explore
✨ What else?
Related topics you might enjoy
🔬 Go deeper
More advanced topics to explore
🪜 Step back
Simpler topics to build understanding
What is Nepedia?
A free, ad-free encyclopedia for children. Every article is written at five reading levels, so the same page works for a five-year-old and a fifteen-year-old — use the level switcher above to see this one change. No account needed to read.