Research Article
Hamiltonian Paths in Some Classes of Grid Graphs
Algorithm 2
The Hamiltonian path algorithm for -alphabet grid graphs.
| procedure _HamiltonianPath | | 1: if can be stripped then | | 2: let be a strip of , where is an even-sized rectangular grid graph | | 3: _HamiltonianPath | | 4: HamiltonianCycle | | 5: return MergeStrip | | 6: else | | 7: let be split and | | 8: _HamiltonianPath | | 9: _HamiltonianPath | | 10: return MergeSplit | | 11: end if |
|