Hafnian
From Wikipedia, the free encyclopedia
In mathematics, the hafnian is a scalar function of a symmetric matrix that generalizes the permanent.
The hafnian was 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 defined as
where is the set of all partitions of the set into subsets of size .[2][3]
This definition 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.[4]
Basic properties
Besides its definition as a sum over perfect pairings, the hafnian of a symmetric matrix can equivalently be written as
where is the symmetric group on .[5]
An equivalent Levi-Civita representation holds for any even-dimensional symmetric matrix :
where is even.[6]
The hafnian also admits a fermionic (Berezin integral) representation. If is a symmetric matrix and are Grassmann variables, then
where
and
For low-dimensional examples,
and for a symmetric matrix,
A useful scaling property is the following. If and are symmetric matrices such that
then, for even ,
In particular, if for a scalar , then
The hafnian of the adjacency matrix of a graph counts its perfect matchings (also known as 1-factors). Indeed, a partition of into subsets of size 2 is equivalent to a perfect matching of the complete graph .
The hafnian is closely related to the permanent. In particular,
- .[2]
Thus, just as the hafnian counts perfect matchings in a graph from its adjacency matrix, the permanent counts matchings in a bipartite graph from its biadjacency matrix.
The hafnian is also related to moments of multivariate Gaussian distributions. By Wick's probability theorem, for a real symmetric matrix ,
where is any number large enough that is positive semi-definite. Since the hafnian does not depend on the diagonal entries of the matrix, the expectation on the right-hand side is independent of the choice of .
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:[4]
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 proved[4] by means of multivariate Gaussian integrals and Wick's probability 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 .
Non-negativity
If is a Hermitian positive semi-definite matrix and is a complex symmetric matrix, then
where denotes the complex conjugate of .[7]
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 .
This result is a generalization of the fact that the permanent of a Hermitian positive semi-definite matrix is non-negative. This corresponds to the special case using 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 pairs or singletons (treating a singleton as the pair ).[8] Thus the loop hafnian depends on the diagonal entries of the matrix, unlike the hafnian.[8] Furthermore, the loop hafnian can be non-zero when is odd.
The loop hafnian can be used to count the total number of matchings in a graph (perfect or non-perfect), also known as its Hosoya index. Specifically, if one takes the adjacency matrix of a graph and sets the diagonal elements to 1, then the loop hafnian of the resulting matrix is equal to the total number of matchings in the graph.[8]
The loop hafnian can also be thought of as incorporating a mean into the interpretation of the hafnian as a multivariate Gaussian moment. Specifically, by Wick's probability theorem again, the loop hafnian of a real symmetric matrix can be expressed as
where is any number large enough to make positive semi-definite.