Counting (and Randomly Generating) Hamiltonian Cycles in Rectangular Grids
Combinatorics
2026-03-26 v1
Abstract
We first fully implement, in Maple, the ingenious method of Robert Stoyan and Volker Strehl from 1995 to automatically derive generating functions for the number of Hamiltonian cycles in an m by n grid graph ,for a fixed width m, but general length n, and actually compute these generating functions for all m up to ten. We also show how to generate a uniformly-at-random such Hamiltonian cycle, and also derive more informative generating functions for other parameters besides the length of the grid graph.
Keywords
Cite
@article{arxiv.2603.24315,
title = {Counting (and Randomly Generating) Hamiltonian Cycles in Rectangular Grids},
author = {Pablo Blanco and Doron Zeilberger},
journal= {arXiv preprint arXiv:2603.24315},
year = {2026}
}
Comments
9 pages; Accompanied by two several Maple packages and numerous output files available from https://sites.math.rutgers.edu/~zeilberg/mamarim/mamarimhtml/volker.html Dedicated to Volker Strehl on his forthcoming 81st birthday