arXiv:2611.00364cs.CGOct 2026

Manuscript Offprint

arXiv:2611.00364

Hamiltonian Cycle Construction in Rectangular Grid Graphs with Three-Stacked Triangular Holes

Cecilia Chen, Dianna Xu

1 Introduction

Hamiltonian cycles are a fundamental concept in graph theory. Given a graph, the Hamiltonian cycle problem asks whether there exists a cycle that visits every vertex exactly once. In general, determining the existence of a Hamiltonian cycle is NP-complete, and this hardness persists even for grid graphs [4]. However, certain structured classes of grid graphs admit efficient algorithms. For example, Hamiltonian cycles in solid grid graphs can be found in polynomial time [13], while rectangular grid graphs admit simple constructions based on their dimensions and parity properties.

The problem becomes more challenging when holes are introduced into the grid. Removing vertices changes the structure of the graph and may create narrow regions or additional constraints on how a Hamiltonian cycle can be constructed. Nevertheless, several structured grid graphs with holes remain tractable. Previous work has developed efficient algorithms for rectangular grid graphs with rectangular holes [7,8], as well as C-shaped and L-shaped grid graphs [5,6].

A common approach in these studies is to decompose the original graph into smaller, more structured subgraphs. Hamiltonian paths or cycles are first constructed within individual subgraphs and then connected to obtain a global solution. This approach takes advantage of the known structural properties of rectangular grid graphs and reduces the difficulty of constructing Hamiltonian cycles in more complex geometries. However, the decomposition must be chosen carefully: the existence of Hamiltonian cycles within individual subgraphs does not necessarily guarantee that they can be combined into a Hamiltonian cycle of the entire graph.

In this paper, we study Hamiltonian cycles in rectangular grid graphs with a triangular hole removed. Unlike rectangular holes, the triangular structure introduces different geometric and parity constraints across its layers, making the construction of a global Hamiltonian cycle more complicated. The main contribution is a constructive algorithm for determining and building Hamiltonian cycles in rectangular grid graphs with a triangular hole, when such cycles exist.