Abstract
A grid graph \(G_{\mathrm{g}}\) is a finite vertex-induced subgraph of the two-dimensional integer grid \(G^\infty \). A rectangular grid graph R(m, n) is a grid graph with horizontal size m and vertical size n. A rectangular grid graph with a rectangular hole is a rectangular grid graph R(m, n) such that a rectangular grid subgraph R(k, l) is removed from it. The Hamiltonian path problem for general grid graphs is NP-complete. In this paper, we give necessary conditions for the existence of a Hamiltonian path between two given vertices in an odd-sized rectangular grid graph with a rectangular hole. In addition, we show that how such paths can be computed in linear time.
Similar content being viewed by others
References
Abdullah M, Abuelrub E, Mahafzah B (2011) The chained-cubic tree interconnection network. Int Arab J Inf Technol 8(3):334–343
Afrati FN (1994) The Hamilton circuit problem on grids. Theor Inform Appl 28(6):567–582
Arikati SR, Rangan CP (1990) Linear algorithm for optimal path cover problem on interval graphs. Inf Process Lett 35:149–153
Bhandarkar SM, Arabnia HR (1997) Parallel computer vision on a reconfigurable multiprocessor network. IEEE Trans Parallel Distrib Syst 8(3):292–309
Bertossi AA (1983) Finding Hamiltonian circuits in proper interval graphs. Inf Process Lett 17(2):97–101
Chen SD, Shen H, Topor R (2002) An efficient algorithm for constructing Hamiltonian paths in meshes. Parallel Comput 28(9):1293–1305
Chen YC, Huang YZ, Hsu LH, Tan JJM (2010) A family of Hamiltonian and Hamiltonian connected graphs with fault tolerance. J Supercomput 54:229–238
Damasachke P (1989) The Hamiltonian circuit problem for circle graphs is NP-complete. Inf Process Lett 32:1–2
Damaschke P, Deogun JS, Kratsch D, Steiner G (1991) Finding Hamiltonian paths in cocomparability graphs using the bump number algorithm. Order 8(4):383–391
Du L (2010) A polynomial time algorithm for Hamiltonian cycle (path). In: Proceedings of the International MultiConference of Engineers and Computer Scientists, IMECS I. pp 17–19
Felsner S, Liotta G, Wismath S (2003) Straight-line drawings on restricted integer grids in two and three dimensions. J Graph Algorithms Appl 7(4):363–398
Fu JS (2008) Hamiltonian connectivity of the WK-recursive with faulty nodes. Inf Sci 178:2573–2584
Garey MR, Johnson DS (1979) Computers and intractability: a guide to the theory of NP-completeness. Freeman, San Francisco
Garey MR, Johnson DS, Tarjan RE (1976) The planar Hamiltonian circuit problem is NP-complete. SIAM J Comput 5:704–714
Gorbenko A, Popov V, Sheka A (2012) Localization on discrete grid graphs. In: He X, Hua E, Lin Y, Liu X (eds) Computer, informatics, cybernetics and applications, lecture notes in electrical engineering. pp 971–978
Gould RJ (2003) Advances on the Hamiltonian problem: a survey. Graphs Comb 19(1):7–52
Gordon VS, Orlovich YL, Werne F (2008) Hamiltonian properties of triangular grid graphs. Discrete Math 308(24):6166–6188
Hamada K (2013) A picturesque maze generation algorithm with any given endpoints. J Inf Process 21(3):393–397
Hsieh SY, Kuo CN (2007) Hamiltonian-connectivity and strongly Hamiltonian-laceability of folded hypercubes. Comput Math Appl 53:1040–1044
Hung RW (2016) Hamiltonian cycles in linear-convex supergrid graphs. Discrete Appl Math 211:99–112
Hung RW (2012) Constructing two edge-disjoint Hamiltonian cycles and two-equal path cover in augmented cubes. IAENG Int J Comput Sci 39(1):42–49
Icking C, Kamphans T, Klein R, Langetepe E (2005) Exploring simple grid polygons. In: Proceedings of 11th Annual International Computing and Combinatorics Conference, COCOON. pp 524–533
Islam K, Meijer H, Rodriguez YN, Rappaport D, Xiao H (2007) Hamiltonian circuits in hexagonal grid graphs. In: Proceedings of 19th Canadian Conference of Computational Geometry, CCCG’97. pp 85–88
Itai A, Papadimitriou CH, Szwarcfiter JL (1982) Hamiltonian paths in grid graphs. SIAM J Comput 11(4):676–686
Keshavarz-Kohjerdi F, Bagheri A (2012) Hamiltonian paths in some classes of grid graphs. J Appl Math. doi:10.1155/2012/475087
Keshavarz-Kohjerdi F, Bagheri A, Asgharian-Sardroud A (2012) A linear-time algorithm for the longest path problem in rectangular grid graphs. Discrete Appl Math 160(3):210–217
Keshavarz-Kohjerdi F, Bagheri A (2013) A parallel algorithm for the longest path problem in rectangular grid graphs. J Supercomput 65:723–741
Keshavarz-Kohjerdi F, Bagheri A (2016) Hamiltonian paths in \(L\)-shaped grid graphs. Theor Comput Sci 621:37–56
Keshavarz-Kohjerdi F, Bagheri A (2016) Hamiltonian paths in \(C\)-shaped grid graphs. arXiv:1602.07407
Lenhart W, Umans C (1997) Hamiltonian cycles in solid grid graphs. In: Proceedings of 38th Annual Symposium on Foundations of Computer Science, FOCS ’97. pp 496–505
Li Y, Peng S, Chu W (2009) Hamiltonian connectedness of recursive dual-net. In: Proceedings of the 9th IEEE International Conference on Computer and Information Technology, CIT09, vol 1. pp 203–208
Luccio F, Mugnia C (1978) Hamiltonian paths on a rectangular chessboard. In: Proceedings of 16th Annual Allerton Conference, pp 161–173
Myers BR (1981) Enumeration of tours in Hamiltonian rectangular lattice graphs. Math Mag 54:19–23
Park CD, Chwa KY (2004) Hamiltonian properties on the class of hypercube-like networks. Inf Process Lett 91:11–17
Rahman MS, Kaykobad M (2005) On Hamiltonian cycles and Hamiltonian paths. Inf Process Lett 94(1):37–41
Ray SS (2013) Graph theory with algorithms and applications: in applied science and technology. Springer, Berlin
Salman ANM, Broersma HJ, Baskoro ET (2003) Spanning 2-connected subgraphs in alphabet graphs, special classes of grid graphs. J Autom Lang Comb 8(4):675–681
Srinivasa Rao ASR, Tomleyc F, Blakec D (2015) Understanding chicken walks on \(n \times n\) grid: Hamiltonian paths, discrete dynamics, and rectifiable paths. Math Methods Appl Sci 38(15):3346–3358
Zamfirescu C, Zamfirescu T (1992) Hamiltonian properties of grid graphs. SIAM J Discrete Math 5(4):564–570
Zhang WQ, Liu YJ (2011) Approximating the longest paths in grid graphs. Theor Comput Sci 412(39):5340–5350
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
About this article
Cite this article
Keshavarz-Kohjerdi, F., Bagheri, A. A linear-time algorithm for finding Hamiltonian (s, t)-paths in odd-sized rectangular grid graphs with a rectangular hole. J Supercomput 73, 3821–3860 (2017). https://doi.org/10.1007/s11227-017-1984-z
Published:
Issue Date:
DOI: https://doi.org/10.1007/s11227-017-1984-z