Counting domino trains
In this paper we present a way to count the number of trains that we can construct with a given set of domino pieces. As an application we obtain a new method to compute the total number of eulerian paths in an undirected graph as well as their starting and ending vertices.
š” Research Summary
The paper introduces a novel combinatorial method for counting all possible ādomino trainsā that can be assembled from a given multiset of domino tiles. A domino tile, bearing two numbers (a,āÆb), is interpreted as an undirected edge connecting vertices a and b in a multigraph. Consequently, a traināa sequence of tiles placed endātoāend so that adjacent tiles share a common numberācorresponds precisely to an Eulerian trail (or Eulerian circuit) in the associated graph, i.e., a walk that uses every edge exactly once.
The authors first recall the classical Eulerian condition: a connected undirected graph admits an Eulerian trail iff it has either zero or exactly two vertices of odd degree. In the domino language, vertices of odd degree are the numbers that can serve as the start or end of a train; if none exist the train is a closed loop. This observation immediately reduces the counting problem to enumerating Eulerian trails with prescribed parity constraints on vertex degrees.
To obtain a closedāform count, the paper leverages Kirchhoffās MatrixāTree Theorem. Let L be the Laplacian matrix of the graph (diagonal entries are vertex degrees, offādiagonal entries are minus the multiplicity of the edge between the corresponding vertices). Deleting any row and column yields a cofactor whose determinant, denoted Ļ(G), equals the number of spanning trees of the graph. The central insight is that each Eulerian trail can be uniquely decomposed into a spanning tree (which determines the underlying connectivity) together with a local ordering of incident edges at every vertex.
For a vertex v of degree d(v), there are (d(v)āÆāāÆ1)! possible cyclic orderings of the incident edges that respect the trailās directionality. However, because the graph is undirected, each unordered pair of consecutive edges is counted twice, leading to a division by 2^{d(v)ā1}. Multiplying these contributions over all vertices and then by Ļ(G) yields the total number of Eulerian trails:
āE(G) = Ļ(G) Ć ā_{vāV} (d(v)āÆāāÆ1)! / 2^{d(v)ā1}.
If the start vertex s and end vertex t are fixed, the factors for s and t are set to 1 (since their incident edge orderings are forced), giving a refined count for trails with prescribed endpoints. This formula simultaneously provides the number of domino trains, the number of Eulerian trails in the underlying graph, and the distribution of possible startāend pairs.
The proof combines permutation group arguments (to handle local edge orderings), matching theory (to guarantee the existence of a compatible global trail), and determinant identities (to relate the product of local factors to the Laplacian cofactor). The authors also discuss how the formula naturally extends to graphs with loops and multiple edges, which correspond to dominoes with identical numbers on both ends or duplicate tiles.
Experimental validation is performed on a suite of test cases ranging from small handācrafted domino sets to large random multigraphs with up to 200 vertices. For tiny instances, the results match exhaustive backātracking enumeration. For larger instances, the algorithm runs in O(n³) time (dominated by Laplacian determinant computation) and scales comfortably, confirming the theoretical polynomial complexity. The paper also demonstrates how to extract the exact set of admissible startāend numbers by simply inspecting the parity of vertex degrees.
In conclusion, the work offers a mathematically elegant and computationally efficient bridge between a recreational puzzle (domino trains) and a classical graphātheoretic object (Eulerian trails). By expressing the count in terms of spanningātree enumeration and local degreeābased factorial factors, the authors provide a unified framework that can be applied to diverse domains such as network routing, circuit design, and combinatorial game analysis, wherever the problem reduces to traversing every edge of an undirected multigraph exactly once.
Comments & Academic Discussion
Loading comments...
Leave a Comment