Hafnian

In mathematics, the hafnian of an adjacency matrix of a graph is the number of perfect matchings in the graph. It was so named by Eduardo R. Caianiello "to mark the fruitful period of stay in Copenhagen (Hafnia in Latin)."
The hafnian of a 2n × 2n symmetric matrix is computed as
where formula_2 is the symmetric group on ["2n"].
Equivalently,
where formula_4 is the set of all 1-factors (perfect matchings) on the complete graph formula_5, namely the set of all formula_6 ways to partition the set formula_7 into formula_8 subsets of size formula_9.