Shahed University

Linear-time algorithms for finding Hamiltonian and longest (s,t)-paths in C-shaped grid graphs

Fatemeh Keshavarz-Kohjerdi | Alireza Bagheri

URL :   http://research.shahed.ac.ir/WSR/WebPages/Report/PaperView.aspx?PaperID=116819
Date :  2019/09/03
Publish in :    Discrete Optimization
DOI :  https://doi.org/10.1016/j.disopt.2019.100554
Link :  http://dx.doi.org/10.1016/j.disopt.2019.100554
Keywords :Grid graph، c-shaped grid graph، Hamiltonian cycle، Hamiltonian (s,t)-path، Longest (s,t)-path

Abstract :
The longest and Hamiltonian path problems are well-known NP-hard problems in graph theory. Despite many applications of these problems, they are still open for many classes of graphs, including solid grid graphs and grid graphs with some holes. We consider the longest and Hamiltonian (s,t)-path problems in C-shaped grid graphs. A (s,t)-path is a path between two given vertices and of the graph. A C-shaped grid graph is a rectangular grid graph such that a rectangular grid subgraph is removed from it to make a C-liked shape. In this paper, we first give the necessary conditions for the existence of Hamiltonian cycles and Hamiltonian -paths in such graphs. Then by given a linear-time algorithm for finding Hamiltonian cycles and Hamiltonian (s,t)-paths, we show that these necessary conditions are also sufficient. Finally, we give a linear-time algorithm for finding the longest (s,t)-path in these graphs.