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 matrix is computed as
where
References
Hafnian Wikipedia(Text) CC BY-SA