Hamiltonian cycle polynomial

From HandWiki
Revision as of 20:42, 6 February 2024 by StanislovAI (talk | contribs) (fix)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

In mathematics, the Hamiltonian cycle polynomial of an n×n-matrix is a polynomial in its entries, defined as

[math]\displaystyle{ \operatorname{ham}(A)=\sum_{\sigma\in H_n}\prod_{i=1}^n a_{i,\sigma(i)} }[/math]

where [math]\displaystyle{ H_n }[/math] is the set of n-permutations having exactly one cycle.

This is an algebraic option useful, in a number of cases, for determining the existence of a Hamiltonian cycle in a directed graph.


It is a generalization of the number of Hamiltonian cycles of a digraph as the sum of the products of its Hamiltonian cycles' arc weights (all of which equal unity) for weighted digraphs with arc weights taken from a given commutative ring. In the meantime, for an undirected weighted graph the sum of the products of the edge weights of its Hamiltonian cycles containing any fixed edge (i,j) can be expressed as the product of the weight of (i,j) and the Hamiltonian cycle polynomial of a matrix received from its weighted adjacency matrix via subjecting its rows and columns to any permutation mapping i to 1 and j to 2 and then removing its 1-st row and 2-nd column.

In ((Knezevic Cohen)) it was shown that

[math]\displaystyle{ \operatorname{ham} (A) = \sum_{J\subseteq \{2,\dots,n\}} \det(-A_J)\operatorname{per}(A_{\bar J}) }[/math]

where [math]\displaystyle{ A_J }[/math] is the submatrix of [math]\displaystyle{ A }[/math] induced by the rows and columns of [math]\displaystyle{ A }[/math] indexed by [math]\displaystyle{ J }[/math], and [math]\displaystyle{ \bar J }[/math] is the complement of [math]\displaystyle{ J }[/math] in [math]\displaystyle{ \{1,\dots,n\} }[/math], while the determinant of the empty submatrix is defined to be 1.

Due to this and Borchardt's identities, for a non-singular n×n Cauchy matrix [math]\displaystyle{ C(x,y) }[/math] [math]\displaystyle{ \operatorname{ham}(C(x,y)) = {\det}(- D_{1}^2 C^{*2}(x,y) D_{2}^2 + I_{/1}) \operatorname{det} (C(x,y)) }[/math] where [math]\displaystyle{ D_1, D_2 }[/math] are diagonal matrices that make [math]\displaystyle{ D_1 C(x,y) D_2 }[/math] unitary (in a real field or a field of a finite characteristic, or orthogonal in the field of complex numbers), [math]\displaystyle{ C^{*2}(x,y) }[/math] is the Hadamard (entry-wise) square of [math]\displaystyle{ C(x,y) }[/math], and [math]\displaystyle{ I_{/1} }[/math] is the identity n×n-matrix with the entry of indexes 1,1 replaced by 0.


In a field of characteristic 2 the equality [math]\displaystyle{ \operatorname{ham} (A) = \sum_{J\subseteq \{2,\dots,n\}} \det(-A_J)\operatorname{per}(A_{\bar J}) }[/math] turns into [math]\displaystyle{ \operatorname{ham} (A) = \sum_{J\subseteq \{2,\dots,n\}} \det(A_J)\det(A_{\bar J}) }[/math] what therefore provides an opportunity to polynomial-time calculate the Hamiltonian cycle polynomial of any unitary matrix [math]\displaystyle{ U }[/math] (i.e. such that [math]\displaystyle{ U^{T} U = I }[/math] where [math]\displaystyle{ I }[/math] is the identity n×n-matrix), because in such a field each minor of a unitary matrix coincides with its algebraic complement: [math]\displaystyle{ \operatorname{ham} (U) = {\det}^2(U + I_{/1}) }[/math] where [math]\displaystyle{ I_{/1} }[/math] is the identity n×n-matrix with the entry of indexes 1,1 replaced by 0. Hence if it's possible to polynomial-time assign weights from a field of characteristic 2 to a digraph's arcs that make its weighted adjacency matrix unitary and having a non-zero Hamiltonian cycle polynomial then the digraph is Hamiltonian. Therefore the Hamiltonian cycle problem is computable on such graphs in polynomial time.

In characteristic 2, the Hamiltonian cycle polynomial of an n×n-matrix is zero if n > 2k where k is its rank or if it's involutory and n > 2.


Besides, in an arbitrary ring [math]\displaystyle{ R }[/math] whose characteristic isn't an even natural number, for any skew-symmetric n×n-matrix [math]\displaystyle{ A }[/math] there exists a power series in a formal variable [math]\displaystyle{ \varepsilon }[/math] [math]\displaystyle{ U(\varepsilon) =\sum_{n=0}^\infty U_n \varepsilon^n }[/math] such that it's a unitary n×n-matrix over [math]\displaystyle{ R\left(\varepsilon\right) }[/math] and [math]\displaystyle{ U_0 = I }[/math], [math]\displaystyle{ U_1 = A }[/math], while for any [math]\displaystyle{ U(\varepsilon) }[/math] satisfying these conditions [math]\displaystyle{ \operatorname{ham} (A) }[/math] equals the coefficient at the [math]\displaystyle{ n }[/math]-th power of [math]\displaystyle{ \varepsilon }[/math] in the power series [math]\displaystyle{ \operatorname{ham} (U(\varepsilon)) }[/math]. And for any ring [math]\displaystyle{ R }[/math] of an even characteristic the same is true when the diagonal of [math]\displaystyle{ AA^{T} }[/math] is a multiple of 2. It implies that computing, up to the [math]\displaystyle{ n }[/math]-th power of [math]\displaystyle{ \varepsilon }[/math], the Hamiltonian cycle polynomial of a unitary n×n-matrix over the infinite extension of any ring of characteristic q (not necessarily prime) by the formal variable [math]\displaystyle{ \varepsilon }[/math] is a #[math]\displaystyle{ q }[/math]P-complete problem if [math]\displaystyle{ q }[/math] isn't 2 and computing the Hamiltonian cycle polynomial of a [math]\displaystyle{ k }[/math]-semi-unitary matrix (i.e. an n×n-matrix [math]\displaystyle{ V }[/math] such that [math]\displaystyle{ \operatorname{rank}(V^T V - I \,) = k }[/math]) over such an extension of any ring of characteristic 2 is a #[math]\displaystyle{ 2 }[/math]P-complete problem for any [math]\displaystyle{ k }[/math] > 0 (because any [math]\displaystyle{ k }[/math]-semi-unitary matrix can be received from a unitary matrix via removing [math]\displaystyle{ k }[/math] rows and [math]\displaystyle{ k }[/math] columns). For [math]\displaystyle{ k = 1 }[/math] the latter statement can be re-formulated as the #[math]\displaystyle{ _2 }[/math]P-completeness of computing, for a given unitary n×n-matrix [math]\displaystyle{ U }[/math] over a field of characteristic 2, the n×n-matrix [math]\displaystyle{ H(U) }[/math] whose i,j-th entry is the Hamiltonian cycle polynomial of a matrix received from [math]\displaystyle{ U }[/math] via subjecting its rows and columns to any permutation mapping j to 1 and i to 2 and then removing its 1-st row and 2-nd column (i.e. the sum of the products of the arc weights of the corresponding weighted digraph's Hamiltonian paths from vertex i to vertex j) for ij and zero for i = j. This matrix satisfies the matrix equation [math]\displaystyle{ U(H(U))^T = H(U)U^T }[/math], while [math]\displaystyle{ \operatorname{ham} \left ( \begin{matrix}U & {Ua} \\a^{T} & 1 \end{matrix} \right ) = (a_{1}^{2} +...+ a_{n}^{2}) \operatorname{ham} (U) }[/math] where [math]\displaystyle{ a }[/math] is an arbitrary n-vector (what can be interpreted as the polynomial-time computability of the Hamiltonian cycle polynomial of any 1-semi-unitary m×m-matrix [math]\displaystyle{ A }[/math] such that [math]\displaystyle{ AA^{T} = I + bb^{T} }[/math] where [math]\displaystyle{ b }[/math] is the [math]\displaystyle{ m }[/math]-th column of [math]\displaystyle{ A }[/math] with its [math]\displaystyle{ m }[/math]-th entry replaced by 0 and [math]\displaystyle{ I }[/math] is the identity m×m-matrix).


Moreover, it would be worth noting that in characteristic 2 the Hamiltonian cycle polynomial possesses its invariant matrix compressions (partly analogical to the Gaussian modification that is invariant for the determinant), taking into account the fact that [math]\displaystyle{ \operatorname{ham} (X) = 0 }[/math] for any t×t-matrix [math]\displaystyle{ X }[/math] having three equal rows or, if [math]\displaystyle{ t }[/math] > 2, a pair of indexes i,j such that its i-th and j-th rows are identical and its i-th and j-th columns are identical too.

Hence if a matrix has two equal rows with indexes i and j then adding one of them to any third one doesn't change this polynomial in characteristic 2 what allows to Gaussian-style eliminate all the entries of its i-th column except the i,i-th and j,i-th ones (in case if they aren't zero) and remove its i-th column and j-th row (in the manner described above) – then the Hamiltonian cycle polynomial of the initial matrix equals this polynomial of the new one multiplied by the initial j,i-th entry.


Also in characteristic 2 and for matrices with more than two rows the Hamiltonian cycle polynomial isn't changed by adding the i-th column to the j-th one in a matrix where the i-th and j-th rows are identical what, particularly, yields the identity

[math]\displaystyle{ \det(D+D^{-1}) \operatorname{ham} \left ( \begin{matrix}V & A \\B & U \end{matrix} \right ) = \operatorname{ham} \left ( \begin{matrix}V & V+D & A\\ V+D^{-1} & V+D^{-1}+D & A\\ B & B & U\end{matrix} \right ) }[/math]

for an n×n-matrix [math]\displaystyle{ U }[/math], m×m-matrices [math]\displaystyle{ V }[/math] and diagonal [math]\displaystyle{ D }[/math], m×n-matrix [math]\displaystyle{ A }[/math] and n×m-matrix [math]\displaystyle{ B }[/math].

This identity's restriction to the case when [math]\displaystyle{ U }[/math] is unitary, [math]\displaystyle{ VD + DV^{T}+AA^{T}=I+D^{2} }[/math] and [math]\displaystyle{ BD=UA^{T} }[/math], where [math]\displaystyle{ I }[/math] is the identity m×m-matrix, makes the (2m+n)×(2m+n)-matrix in the equality's right side unitary and its Hamiltonian cycle polynomial computable, hence, in polynomial time what therefore generalizes the above-given formula for the Hamiltonian cycle polynomial of a unitary matrix. Besides, in characteristic 2 for square matrices X, Y [math]\displaystyle{ \operatorname{ham}\left ( \begin{matrix}X & Y\\Y & X \end{matrix} \right ) }[/math] is the square of the sum, over all the pairs of non-equal indexes i,j, of the i,j-th entry of Y multiplied by the Hamiltonian cycle polynomial of the matrix received from X+Y via removing its i-th row and j-th column (in the manner described above). Hence, upon putting in the above equality A = B and U = V, we receive another extension of the class of unitary matrices where the Hamiltonian cycle polynomial is computable in polynomial time.


Apart from the above-mentioned compression transformations, in characteristic 2 the following relation is also valid for the Hamiltonian cycle polynomials of a matrix and its partial inverse (for [math]\displaystyle{ A_{11} }[/math] and [math]\displaystyle{ A_{22} }[/math] being square, [math]\displaystyle{ A_{11} }[/math] being invertible):

[math]\displaystyle{ \operatorname{ham}\left ( \begin{matrix}A_{11} & A_{12}\\ A_{21} & A_{22}\end{matrix} \right) = {\det}^2\left ( A_{11} \right ) \operatorname{ham}\left ( \begin{matrix}A_{11}^{-1} & A_{11}^{-1}A_{12}\\ A_{21}A_{11}^{-1} & A_{22} + A_{21} A_{11}^{-1} A_{12} \end{matrix} \right ) }[/math]

and, due to the fact that the Hamiltonian cycle polynomial doesn't depend on the matrix's diagonal entries, adding an arbitrary diagonal matrix doesn't change this polynomial too. These two types of transformation don't compress the matrix, but keep its size unchanged. However, in a number of cases their application allows to reduce the matrix's size by some of the above-mentioned compression operators.


Hence there is a variety of matrix compression operators performed in polynomial time and preserving the Hamiltonian cycle polynomial in characteristic 2 whose sequential application, together with the transpose transformation (utilized each time the operators leave the matrix intact), has, for each matrix, a certain limit that can be defined as the compression-closure operator. When applied to classes of matrices, that operator thus maps one class to another. As it was proven in ((Knezevic Cohen)), if the compression-closure of the class of unitary matrices contains a subset where computing this polynomial is #[math]\displaystyle{ 2 }[/math]P-complete then the Hamiltonian cycle polynomial is computable in polynomial time over any field of this characteristic -- what would imply the equality RP = NP.

References

  • Kogan, Grigoriy (1996). "Computing permanents over fields of characteristic 3: Where and why it becomes difficult". Proceedings of 37th Conference on Foundations of Computer Science. pp. 108–114. doi:10.1109/SFCS.1996.548469. ISBN 0-8186-7594-2. 
  • Cohen, Greg (2010), A new algebraic technique for polynomial-time computing the number modulo 2 of Hamiltonian decompositions and similar partitions of a graph's edge set, Bibcode2010arXiv1005.2281C