Skip to main content
Log in

A linear-time algorithm for finding Hamiltonian (st)-paths in odd-sized rectangular grid graphs with a rectangular hole

  • Published:
The Journal of Supercomputing Aims and scope Submit manuscript

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(mn) 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(mn) such that a rectangular grid subgraph R(kl) 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.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Institutional subscriptions

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12
Fig. 13
Fig. 14
Fig. 15
Fig. 16
Fig. 17
Fig. 18
Fig. 19
Fig. 20
Fig. 21
Fig. 22
Fig. 23
Fig. 24
Fig. 25
Fig. 26
Fig. 27
Fig. 28
Fig. 29
Fig. 30
Fig. 31
Fig. 32

Similar content being viewed by others

References

  1. Abdullah M, Abuelrub E, Mahafzah B (2011) The chained-cubic tree interconnection network. Int Arab J Inf Technol 8(3):334–343

    Google Scholar 

  2. Afrati FN (1994) The Hamilton circuit problem on grids. Theor Inform Appl 28(6):567–582

    Article  MathSciNet  MATH  Google Scholar 

  3. Arikati SR, Rangan CP (1990) Linear algorithm for optimal path cover problem on interval graphs. Inf Process Lett 35:149–153

    Article  MathSciNet  MATH  Google Scholar 

  4. Bhandarkar SM, Arabnia HR (1997) Parallel computer vision on a reconfigurable multiprocessor network. IEEE Trans Parallel Distrib Syst 8(3):292–309

    Article  Google Scholar 

  5. Bertossi AA (1983) Finding Hamiltonian circuits in proper interval graphs. Inf Process Lett 17(2):97–101

    Article  MathSciNet  MATH  Google Scholar 

  6. Chen SD, Shen H, Topor R (2002) An efficient algorithm for constructing Hamiltonian paths in meshes. Parallel Comput 28(9):1293–1305

    Article  MathSciNet  MATH  Google Scholar 

  7. 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

    Article  Google Scholar 

  8. Damasachke P (1989) The Hamiltonian circuit problem for circle graphs is NP-complete. Inf Process Lett 32:1–2

    Article  MathSciNet  Google Scholar 

  9. 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

    Article  MathSciNet  MATH  Google Scholar 

  10. 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

  11. 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

    Article  MathSciNet  MATH  Google Scholar 

  12. Fu JS (2008) Hamiltonian connectivity of the WK-recursive with faulty nodes. Inf Sci 178:2573–2584

    Article  MathSciNet  MATH  Google Scholar 

  13. Garey MR, Johnson DS (1979) Computers and intractability: a guide to the theory of NP-completeness. Freeman, San Francisco

    MATH  Google Scholar 

  14. Garey MR, Johnson DS, Tarjan RE (1976) The planar Hamiltonian circuit problem is NP-complete. SIAM J Comput 5:704–714

    Article  MathSciNet  MATH  Google Scholar 

  15. 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

  16. Gould RJ (2003) Advances on the Hamiltonian problem: a survey. Graphs Comb 19(1):7–52

    Article  MathSciNet  MATH  Google Scholar 

  17. Gordon VS, Orlovich YL, Werne F (2008) Hamiltonian properties of triangular grid graphs. Discrete Math 308(24):6166–6188

    Article  MathSciNet  MATH  Google Scholar 

  18. Hamada K (2013) A picturesque maze generation algorithm with any given endpoints. J Inf Process 21(3):393–397

    Google Scholar 

  19. Hsieh SY, Kuo CN (2007) Hamiltonian-connectivity and strongly Hamiltonian-laceability of folded hypercubes. Comput Math Appl 53:1040–1044

    Article  MathSciNet  MATH  Google Scholar 

  20. Hung RW (2016) Hamiltonian cycles in linear-convex supergrid graphs. Discrete Appl Math 211:99–112

    Article  MathSciNet  MATH  Google Scholar 

  21. 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

    Google Scholar 

  22. 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

  23. 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

  24. Itai A, Papadimitriou CH, Szwarcfiter JL (1982) Hamiltonian paths in grid graphs. SIAM J Comput 11(4):676–686

    Article  MathSciNet  MATH  Google Scholar 

  25. Keshavarz-Kohjerdi F, Bagheri A (2012) Hamiltonian paths in some classes of grid graphs. J Appl Math. doi:10.1155/2012/475087

    MathSciNet  MATH  Google Scholar 

  26. 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

    Article  MathSciNet  MATH  Google Scholar 

  27. Keshavarz-Kohjerdi F, Bagheri A (2013) A parallel algorithm for the longest path problem in rectangular grid graphs. J Supercomput 65:723–741

    Article  Google Scholar 

  28. Keshavarz-Kohjerdi F, Bagheri A (2016) Hamiltonian paths in \(L\)-shaped grid graphs. Theor Comput Sci 621:37–56

    Article  MathSciNet  MATH  Google Scholar 

  29. Keshavarz-Kohjerdi F, Bagheri A (2016) Hamiltonian paths in \(C\)-shaped grid graphs. arXiv:1602.07407

  30. 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

  31. 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

  32. Luccio F, Mugnia C (1978) Hamiltonian paths on a rectangular chessboard. In: Proceedings of 16th Annual Allerton Conference, pp 161–173

  33. Myers BR (1981) Enumeration of tours in Hamiltonian rectangular lattice graphs. Math Mag 54:19–23

    Article  MathSciNet  MATH  Google Scholar 

  34. Park CD, Chwa KY (2004) Hamiltonian properties on the class of hypercube-like networks. Inf Process Lett 91:11–17

    Article  MathSciNet  MATH  Google Scholar 

  35. Rahman MS, Kaykobad M (2005) On Hamiltonian cycles and Hamiltonian paths. Inf Process Lett 94(1):37–41

    Article  MathSciNet  MATH  Google Scholar 

  36. Ray SS (2013) Graph theory with algorithms and applications: in applied science and technology. Springer, Berlin

    MATH  Google Scholar 

  37. 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

    MathSciNet  MATH  Google Scholar 

  38. 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

    Article  MathSciNet  MATH  Google Scholar 

  39. Zamfirescu C, Zamfirescu T (1992) Hamiltonian properties of grid graphs. SIAM J Discrete Math 5(4):564–570

    Article  MathSciNet  MATH  Google Scholar 

  40. Zhang WQ, Liu YJ (2011) Approximating the longest paths in grid graphs. Theor Comput Sci 412(39):5340–5350

    Article  MathSciNet  MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Alireza Bagheri.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Keshavarz-Kohjerdi, F., Bagheri, A. A linear-time algorithm for finding Hamiltonian (st)-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

Download citation

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s11227-017-1984-z

Keywords

Navigation