Skip to main content
Log in

Computing a Hamiltonian Path of Minimum Euclidean Length Inside a Simple Polygon

  • Published:
Algorithmica Aims and scope Submit manuscript

Abstract

Given an n-vertex convex polygon, we show that a shortest Hamiltonian path visiting all vertices without imposing any restriction on the starting and ending vertices of the path can be found in O(nlogn) time and Θ(n) space. The time complexity increases to O(nlog2 n) for computing this path inside an n-vertex simple polygon. The previous best algorithms for these problems are quadratic in time and space. For our purposes, we reformulate the above shortest-path problems in terms of a dynamic programming scheme involving falling staircase anti-Monge weight-arrays, and, in addition, we provide an O(nlogn) time and Θ(n) space algorithm to solve the following one-dimensional dynamic programming recurrence

$$E[i] = \min _{1\le j\le k}\min _{k\le i} \{V[k-1] + b(i,j) + c(j,k)\},\quad i=1, \dots,n,$$

where V[0] is known, V[k], for k=1,…,n, can be computed from E[k] in constant time, and B={b(i,j)} and C={c(j,k)} are known falling staircase anti-Monge weight-arrays of size n×n.

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.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5

Similar content being viewed by others

References

  1. Aggarwal, A., Park, J.K.: Notes on searching in multidimensional monotone arrays. In: Proceedings of the 29th IEEE Symposium on Foundations of Computer Science, pp 497–512. IEEE Comput. Soc., Los Alamitos (1988)

    Google Scholar 

  2. Aggarwal, A., Park, J.K.: Improved algorithms for economic lot-size problems. Oper. Res. 41, 549–571 (1993)

    Article  MathSciNet  MATH  Google Scholar 

  3. Aggarwal, A., Klawe, M.M., Moran, S., Shor, P., Wilber, R.: Geometric applications of a matrix-searching algorithm. Algorithmica 2, 195–208 (1987)

    Article  MathSciNet  MATH  Google Scholar 

  4. Aggarwal, A., Kravets, D., Park, J.K., Sen, S.: Parallel searching in generalized Monge arrays. Algorithmica 19, 291–317 (1997)

    Article  MathSciNet  MATH  Google Scholar 

  5. Alsuwaiyel, M.H.: Finding a shortest Hamiltonian path inside a simple polygon. Inf. Process. Lett. 59, 207–210 (1996)

    Article  MathSciNet  MATH  Google Scholar 

  6. Andreica, M.I., Briciu, S., Andreica, M.E.: Algorithmic solutions to some transportation optimization problems with applications in the metallurgical industry. Metal. Int. 14, 46–53 (2009)

    Google Scholar 

  7. Bar-Noy, A., Golin, M.J., Zhang, Y.: Online dynamic programming speedups. Theory Comput. Syst. 45, 429–445 (2009)

    Article  MathSciNet  MATH  Google Scholar 

  8. Bein, W.W., Brucker, P., Park, J.K., Pathak, P.K.: A Monge property for the d-dimensional transportation problem. Discrete Appl. Math. 58, 97–109 (1995)

    Article  MathSciNet  MATH  Google Scholar 

  9. Bradford, P., Golin, M.J., Larmore, L.L., Rytter, W.: Optimal prefix-free codes for unequal letter costs: dynamic programming with the Monge property. J. Algorithms 42, 277–303 (2002)

    Article  MathSciNet  MATH  Google Scholar 

  10. Burkard, R.E.: Monge properties, discrete convexity and applications. Eur. J. Oper. Res. 176, 1–14 (2007)

    Article  MathSciNet  MATH  Google Scholar 

  11. Burkard, R.E., Klinz, B., Rudolf, R.: Perspectives of Monge properties in optimization. Discrete Appl. Math. 70, 95–161 (1996)

    Article  MathSciNet  MATH  Google Scholar 

  12. Carlsson, S., Jonsson, H.: Computing a shortest watchman path in a simple polygon in polynomial-time. In: Lecture Notes in Computer Science, vol. 955, pp. 122–134. Springer, Berlin (1995)

    Google Scholar 

  13. Eppstein, D., Galil, Z., Giancarlo, R., Italiano, G.F.: Sparse dynamic programming. In: Proceedings of the 1st Annual ACM-SIAM Symposium on Discrete Algorithms, San Francisco, California, pp. 513–522 (1990)

    Google Scholar 

  14. Galil, Z., Giancarlo, R.: Speeding up dynamic programming with applications to molecular biology. Theor. Comput. Sci. 64, 107–118 (1989)

    Article  MathSciNet  MATH  Google Scholar 

  15. Galil, Z., Park, K.: A linear-time algorithm for concave one-dimensional dynamic programming. Inf. Process. Lett. 33, 309–311 (1990)

    Article  MathSciNet  MATH  Google Scholar 

  16. García, A., Tejel, J.: Using total monotonicity for two optimization problems on the plane. Inf. Process. Lett. 60, 13–17 (1996)

    Article  Google Scholar 

  17. García, A., Jodrá, P., Tejel, J.: An efficient algorithm for on-line searching of minima in Monge path-decomposable tridimensional arrays. Inf. Process. Lett. 68, 3–9 (1998)

    Article  Google Scholar 

  18. García, A., Jodrá, P., Tejel, J.: A note on the traveling repairman problem. Networks 40, 27–31 (2002)

    Article  MathSciNet  MATH  Google Scholar 

  19. Guibas, L., Hershberger, J.: Optimal shortest path queries in a simple polygon. J. Comput. Syst. Sci. 39, 126–152 (1989)

    Article  MathSciNet  MATH  Google Scholar 

  20. Günlük, O.: A pricing problem under Monge property. Discrete Optim. 5, 328–336 (2008)

    Article  MathSciNet  MATH  Google Scholar 

  21. Hershberger, J.: A new data structure for shortest path queries in a simple polygon. Inf. Process. Lett. 38, 231–235 (1991)

    Article  MathSciNet  MATH  Google Scholar 

  22. Klawe, M., Kleitman, D.J.: An almost linear time algorithm for generalized matrix searching. SIAM J. Discrete Math. 3, 81–97 (1990)

    Article  MathSciNet  MATH  Google Scholar 

  23. Larmore, L.L., Schieber, B.: On-line dynamic programming with applications to the prediction of RNA secondary structure. J. Algorithms 12, 490–515 (1991)

    Article  MathSciNet  MATH  Google Scholar 

  24. Mitchell, J.S.B.: Geometric shortest paths and network optimization. In: Sack, J.-R., Urrutia, J. (eds.) Handbook of Computational Geometry, pp. 633–701. North-Holland, Amsterdam (2000)

    Chapter  Google Scholar 

  25. Okamoto, Y.: Traveling salesman games with the Monge property. Discrete Appl. Math. 138, 349–369 (2004)

    Article  MathSciNet  MATH  Google Scholar 

  26. Park, J.K.: The Monge array: An abstraction and its applications. Ph.D. thesis. MIT, Massachusetts (1991)

  27. Rudolf, R.: Recognition of d-dimensional Monge arrays. Discrete Appl. Math. 52, 71–82 (1994)

    Article  MathSciNet  MATH  Google Scholar 

  28. Schieber, B.: Computing a minimum weight k-link path in graphs with the concave Monge property. J. Algorithms 29, 204–222 (1998)

    Article  MathSciNet  MATH  Google Scholar 

  29. Woeginger, G.J.: Monge strikes again: optimal placement of web proxies in the internet. Oper. Res. Lett. 27, 93–96 (2000)

    Article  MathSciNet  MATH  Google Scholar 

Download references

Acknowledgements

The authors express their sincere thanks to the anonymous referees for their insightful comments, which led to an improvement of the presentation of the paper.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to P. Jodrá.

Additional information

Research of A. García and J. Tejel partially supported by the projects MTM2009-07242 and DGA E58 228/80.

Research of P. Jodrá partially supported by the projects MTM2009-14394-C02-01 and DGA E18 226/172.

Rights and permissions

Reprints and permissions

About this article

Cite this article

García, A., Jodrá, P. & Tejel, J. Computing a Hamiltonian Path of Minimum Euclidean Length Inside a Simple Polygon. Algorithmica 65, 481–497 (2013). https://doi.org/10.1007/s00453-011-9603-5

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00453-011-9603-5

Keywords

Navigation