Contents

-

Enumeration of Hamiltonian Circuits in Rectangular Grids

Robert Stoyan1, Volker Strehl1
1Computer Science Department (Informatik) University of Erlangen-Niirnberg D-91058 Erlangen, Germany

Abstract

We describe an algorithm for computing the number hm,n of Hamiltonian circuits in a rectangular grid graph consisting of m×n squares. For any fixed m, the set of Hamiltonian circuits on such graphs (for varying n) can be identified via an appropriate coding with the words of a certain regular language Lm({0,1}m). We show how to systematically construct a finite automaton Am recognizing Lm. This allows, in principle, the computation of the (rational) generating function hm(z) of Lm. We exhibit a bijection between the states of Am and the words of length m+1 of the familiar Motzkin language. This yields an upper bound on the degree of the denominator polynomial of hm(z), hence of the order of the linear recurrence satisfied by the coefficients hm,n for fixed m.

The method described here has been implemented. Numerical data resulting from this implementation are presented at the end of this article.