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)."[1]

The hafnian of a symmetric matrix is computed as

where is the symmetric group on .[2]

Equivalently,

where is the set of all 1-factors (perfect matchings) on the complete graph , namely the set of all ways to partition the set into subsets of size .[3][4]

The definition of the hafnian is similar to that of the Pfaffian, but differs in that the signatures of the permutations are not taken into account. Thus the relationship of the hafnian to the Pfaffian is the same as relationship of the permanent to the determinant.[5]

Furthermore, the permanent and the hafnian are related as .[3]

If is a Hermitian positive semi-definite matrix and is a complex symmetric matrix, then we have the inequality

where denotes the complex conjugate of .[6] A simple way to see this when is positive semi-definite is to observe that, by Wick's probability theorem, when is a complex normal random vector with mean , covariance matrix and relation matrix .

Generating function

Let be an arbitrary complex symmetric matrix composed of four blocks , , and . Let be a set of independent variables, and let be an antidiagonal block matrix composed of entries (each one is presented twice, one time per nonzero block). Let denote the identity matrix. Then the following identity holds:[5]

where the right-hand side involves hafnians of matrices , whose blocks , , and are built from the blocks , , and respectively in the way introduced in MacMahon's Master theorem. In particular, is a matrix built by replacing each entry in the matrix with a block filled with ; the same scheme is applied to , and . The sum runs over all -tuples of non-negative integers, and it is assumed that .

The identity can be proven[5] by means of multivariate Gaussian integrals and the Wick (or Isserlis) theorem.

The expression in the left-hand side, , is in fact a multivariate generating function for a series of hafnians, and the right-hand side constitutes its multivariable Taylor expansion in the vicinity of the point As a consequence of the given relation, the hafnian of a symmetric matrix can be represented as the following mixed derivative of the order :

The hafnian generating function identity written above can be considered as a hafnian generalization of MacMahon's Master theorem, which introduces the generating function for matrix permanents and has the following form in terms of the introduced notation:

Note that MacMahon's Master theorem comes as a simple corollary from the hafnian generating function identity due to the relation .


Loop hafnian

The loop hafnian of an symmetric matrix is defined as

where is the set of all perfect matchings of the complete graph on vertices with loops, i.e., the set of all ways to partition the set into subsets of size or size (treated as a pair ).[7] Thus the loop hafnian depends on the diagonal entries of the matrix, whereas the hafnian does not.[7] Furthermore, the loop hafnian can be non-zero even when is odd.

The loop hafnian of the matrix obtained by taking the adjacency matrix of a graph and setting the diagonal elements to 1 is equal to the total number of matchings in the graph (perfect or non-perfect),[7] also known as its Hosoya index.

By Wick's probability theorem, the hafnian and loop hafnian of a real symmetric matrix can equivalently be defined as

and

where is any number large enough to make positive semi-definite (since this expectation does not depend on ).

Computation

Computing the hafnian of a (0,1)-matrix is #P-complete, because computing the permanent of a (0,1)-matrix is #P-complete.[5][7]

The hafnian of a matrix can be computed in time.[7]

If the entries of a matrix are non-negative, then its hafnian can be approximated to within an exponential factor in polynomial time.[8]

See also

References

  1. F. Guerra, in Imagination and Rigor: Essays on Eduardo R. Caianiello's Scientific Heritage, edited by Settimo Termini, Springer Science & Business Media, 2006, page 98
  2. Rudelson, Mark; Samorodnitsky, Alex; Zeitouni, Ofer (2016). "Hafnians, perfect matchings and Gaussian matrices". The Annals of Probability. 44 (4): 2858–2888. arXiv:1409.3905. doi:10.1214/15-AOP1036. S2CID 14458608.
  3. 1 2 Alexander Barvinok (13 March 2017). Combinatorics and Complexity of Partition Functions. p. 93. ISBN 9783319518299.
  4. Barvinok, Alexander; Regts, Guus (2019). "Weighted counting of integer points in a subspace". Combinator. Probab. Comp. 28: 696–719. arXiv:1706.05423. doi:10.1017/S0963548319000105. S2CID 126185737.
  5. 1 2 3 4 Kocharovsky, Vitaly V.; Kocharovsky, Vladimir V.; Tarasov, Sergey V. (2022). "The Hafnian Master Theorem". Linear Algebra and Its Applications. Elsevier BV. 651: 144–161. doi:10.1016/j.laa.2022.06.021. ISSN 0024-3795. S2CID 249935016.
  6. Brádler, Kamil; Friedland, Shmuel; Israel, Robert B. (2021-02-24). "Nonnegativity for hafnians of certain matrices". Linear and Multilinear Algebra. Informa UK Limited. 70 (19): 4615–4619. arXiv:1811.10342. doi:10.1080/03081087.2021.1892022. ISSN 0308-1087. S2CID 119601142.
  7. 1 2 3 4 5 Björklund, Andreas; Gupt, Brajesh; Quesada, Nicolás (2018). "A faster hafnian formula for complex matrices and its benchmarking on a supercomputer". arXiv:1805.12498 [cs.DS].
  8. Barvinok, Alexander (1999). "Polynomial Time Algorithms to Approximate Permanents and Mixed Discriminants Within a Simply Exponential Factor". Random Structures and Algorithms. Wiley. 14 (1): 29–61. doi:10.1002/(sici)1098-2418(1999010)14:1<29::aid-rsa2>3.0.co;2-x. hdl:2027.42/35110. ISSN 1042-9832.
This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.