English

Counting perfect matchings and Hamiltonian cycles faster

Data Structures and Algorithms 2026-05-05 v2

Abstract

We show that the hafnian of a symmetric 2n×2n2n\times 2n matrix of poly(n)\operatorname{poly}(n)-bit integers (which counts the number of perfect matchings of a 2n2n-vertex graph) and the number of Hamiltonian cycles of an nn-vertex directed graph can be computed in time 2nΩ(n)2^{n-\Omega(\sqrt{n})}, improving and generalizing an earlier algorithm of Bj\"orklund, Kaski, and Williams (Algorithmica 2019) that runs in time 2nΩ(n/loglogn)2^{n - \Omega\left(\sqrt{n/\log \log n}\right)}. A key tool of our approach is the design of a data structure that supports fast evaluation of high-order derivatives of hafnian and Hamiltonian cycles, which integrates with the new approach on multivariate multipoint evaluation by Bhargava, Ghosh, Guo, Kumar, and Umans (FOCS 2022, JACM 2024).

Keywords

Cite

@article{arxiv.2309.15422,
  title  = {Counting perfect matchings and Hamiltonian cycles faster},
  author = {Baitian Li},
  journal= {arXiv preprint arXiv:2309.15422},
  year   = {2026}
}

Comments

15 pages, to appear in ICALP 2026