🤖 AI Summary
This paper addresses several classical #P-hard counting problems: Hamiltonian path counting in undirected/directed bipartite graphs, permanent computation of {0,1}-matrices (i.e., perfect matching counting), k-star partition counting, and maximum matching counting in general graphs. We propose the first unified exact algorithmic framework based on the Matrix-Tree Theorem and root-of-unity filtering. Our method integrates generating functions with the Gallai–Edmonds decomposition to achieve structural sensitivity in time complexity optimization. Specifically, perfect matching counting nearly matches Ryser’s algorithm’s optimality; k-star partition counting runs in O*((1+εₖ)ⁿ); and Hamiltonian path counting achieves the first single-exponential-time algorithm for directed bipartite graphs. All algorithms operate in polynomial space, offering simplicity, extensibility, and practicality. This work marks the first systematic application of algebraic combinatorial tools—particularly matrix-theoretic and algebraic-numeric techniques—to unify the exact solution of diverse graph counting problems.
📝 Abstract
Fast exact algorithms are known for Hamiltonian paths in undirected and directed bipartite graphs through elegant though involved algorithms that are quite different from each other. We devise algorithms that are simple and similar to each other while having the same upper bounds. The common features of these algorithms is the use of the Matrix-Tree theorem and sieving using roots of unity.
Next, we use the framework to provide alternative algorithms to count perfect matchings in bipartite graphs on $n$ vertices, i.e., computing the ${0,1}$-permanent of a square $n/2 imes n/2$ matrix which runs in a time similar to Ryser.
We demonstrate the flexibility of our method by counting the number of ways to vertex partition the graph into $k$-stars (a $k$-star consist of a tree with a root having $k-1$ children that are all leaves). Interestingly, our running time improves to $O^*((1+ε_k)^n)$ with $ε_k
ightarrow 0$ as $k
ightarrow infty$.
As an aside, making use of Björklund's algorithm for exact counting perfect matchings in general graphs, we show that the count of maximum matchings can be computed in time $O^*(2^ν)$ where $ν$ is the size of a maximum matching. The crucial ingredient here is the famous Gallai-Edmonds decomposition theorem.
All our algorithms run in polynomial space.