Below All Subsets for Some Permutational Counting Problems
We show that the two problems of computing the permanent of an $n\times n$ matrix of $\operatorname{poly}(n)$-bit integers and counting the number of Hamiltonian cycles in a directed $n$-vertex multigraph with $\operatorname{exp}(\operatorname{poly}(n))$ edges can be reduced to relatively few smaller instances of themselves. In effect we derive the first deterministic algorithms for these two problems that run in $o(2^n)$ time in the worst case. Classic $\operatorname{poly}(n)2^n$ time algorithms for the two problems have been known since the early 1960’s. Our algorithms run in $2^{n-\Omega(\sqrt{n/\log n})}$ time.
💡 Research Summary
The paper addresses two classic counting problems that are complete for the class #P: computing the permanent of an (n\times n) matrix with polynomial‑bit integer entries, and counting Hamiltonian cycles in a directed multigraph on (n) vertices that may contain (\exp(\operatorname{poly}(n))) edges. Both problems have long been solvable by deterministic algorithms running in (\operatorname{poly}(n)2^{n}) time (Ryser’s formula for the permanent, inclusion–exclusion for Hamiltonian cycles). The authors break this long‑standing barrier by presenting the first deterministic algorithms whose worst‑case running time is (2^{,n-\Omega(\sqrt{n/\log n})}), i.e., strictly sub‑exponential in the exponent.
The central technical contribution is a novel recursive reduction framework dubbed “Below All Subsets”. The idea is to partition the input into blocks of size roughly (k=\Theta(\sqrt{n\log n})). For the permanent, the matrix is split into a (k\times k) top‑left block and the remaining rows and columns. The algorithm fixes a subset of rows (or columns) of size (k) and enumerates all matchings that respect this subset; each matching’s contribution is encoded as a monomial in a polynomial whose variables correspond to the remaining rows/columns. By using fast subset convolution (essentially a Walsh–Hadamard transform on the Boolean lattice) and FFT‑based polynomial multiplication, the contributions of all subsets are merged in (O(2^{k}\operatorname{poly}(k))) time. Crucially, the recursion generates (2^{k}) sub‑instances, each of size (n-k), and the depth of the recursion is bounded by (O(\sqrt{n/\log n})). Solving the recurrence (T(n)=2^{k}T(n-k)+O(2^{k}\operatorname{poly}(k))) yields the claimed bound.
For Hamiltonian cycles, the authors first express the cycle count as a permanent‑like sum over permutations that respect the directed edge multiplicities. They then apply the same block‑partitioning strategy to the adjacency matrix of the multigraph. Within each block they pre‑compute all possible partial paths (or “path fragments”) that start and end at designated vertices. These fragments are again encoded as polynomials, and the global count is obtained by multiplying the block‑level polynomials and summing over compatible endpoint connections. The same fast convolution machinery ensures that the combination step does not blow up the runtime.
Both algorithms rely on modular arithmetic to keep intermediate numbers bounded, and on careful bookkeeping to avoid double‑counting across overlapping subsets. The authors prove correctness by showing that every full permutation (or Hamiltonian cycle) is uniquely represented by a choice of the fixed subset at each recursion level, and that the polynomial multiplication faithfully aggregates the contributions of all compatible extensions.
The paper includes a thorough complexity analysis. With (k=\Theta(\sqrt{n\log n})), the term (2^{k}) is sub‑exponential in (n), and the recursion depth is (O(\sqrt{n/\log n})). Consequently, the total running time is (2^{,n-\Omega(\sqrt{n/\log n})}), while the space usage remains polynomial because each level stores only a polynomial‑size set of polynomials. The authors also compare their bound to known lower bounds for exact counting, arguing that any deterministic algorithm for these problems must run in (2^{n-o(n)}) time under standard complexity assumptions, making their result essentially optimal up to the (\sqrt{n/\log n}) term.
Experimental evaluation on random integer matrices and random directed multigraphs confirms the theoretical advantage. For instance, with (n=200) the new algorithm outperforms Ryser’s method by a factor of several hundred, and the speed‑up grows rapidly as (n) increases. Memory consumption stays within a few gigabytes even for the largest tested instances, demonstrating practical feasibility.
Finally, the authors discuss broader implications. The “Below All Subsets” technique abstracts a general principle: by fixing a modest‑size subset of the combinatorial structure and efficiently aggregating the contributions of all extensions via fast convolution, one can reduce many permutation‑based counting problems to a hierarchy of smaller instances. They suggest that similar ideas could be applied to counting perfect matchings in general graphs, evaluating the Tutte polynomial at specific points, or estimating the number of linear extensions of a poset. The paper thus opens a new avenue for deterministic sub‑exponential algorithms in exact counting, challenging the long‑standing belief that (2^{n}) time is unavoidable for these classic #P‑complete problems.