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





Similar content being viewed by others
References
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)
Aggarwal, A., Park, J.K.: Improved algorithms for economic lot-size problems. Oper. Res. 41, 549–571 (1993)
Aggarwal, A., Klawe, M.M., Moran, S., Shor, P., Wilber, R.: Geometric applications of a matrix-searching algorithm. Algorithmica 2, 195–208 (1987)
Aggarwal, A., Kravets, D., Park, J.K., Sen, S.: Parallel searching in generalized Monge arrays. Algorithmica 19, 291–317 (1997)
Alsuwaiyel, M.H.: Finding a shortest Hamiltonian path inside a simple polygon. Inf. Process. Lett. 59, 207–210 (1996)
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)
Bar-Noy, A., Golin, M.J., Zhang, Y.: Online dynamic programming speedups. Theory Comput. Syst. 45, 429–445 (2009)
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)
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)
Burkard, R.E.: Monge properties, discrete convexity and applications. Eur. J. Oper. Res. 176, 1–14 (2007)
Burkard, R.E., Klinz, B., Rudolf, R.: Perspectives of Monge properties in optimization. Discrete Appl. Math. 70, 95–161 (1996)
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)
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)
Galil, Z., Giancarlo, R.: Speeding up dynamic programming with applications to molecular biology. Theor. Comput. Sci. 64, 107–118 (1989)
Galil, Z., Park, K.: A linear-time algorithm for concave one-dimensional dynamic programming. Inf. Process. Lett. 33, 309–311 (1990)
García, A., Tejel, J.: Using total monotonicity for two optimization problems on the plane. Inf. Process. Lett. 60, 13–17 (1996)
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)
García, A., Jodrá, P., Tejel, J.: A note on the traveling repairman problem. Networks 40, 27–31 (2002)
Guibas, L., Hershberger, J.: Optimal shortest path queries in a simple polygon. J. Comput. Syst. Sci. 39, 126–152 (1989)
Günlük, O.: A pricing problem under Monge property. Discrete Optim. 5, 328–336 (2008)
Hershberger, J.: A new data structure for shortest path queries in a simple polygon. Inf. Process. Lett. 38, 231–235 (1991)
Klawe, M., Kleitman, D.J.: An almost linear time algorithm for generalized matrix searching. SIAM J. Discrete Math. 3, 81–97 (1990)
Larmore, L.L., Schieber, B.: On-line dynamic programming with applications to the prediction of RNA secondary structure. J. Algorithms 12, 490–515 (1991)
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)
Okamoto, Y.: Traveling salesman games with the Monge property. Discrete Appl. Math. 138, 349–369 (2004)
Park, J.K.: The Monge array: An abstraction and its applications. Ph.D. thesis. MIT, Massachusetts (1991)
Rudolf, R.: Recognition of d-dimensional Monge arrays. Discrete Appl. Math. 52, 71–82 (1994)
Schieber, B.: Computing a minimum weight k-link path in graphs with the concave Monge property. J. Algorithms 29, 204–222 (1998)
Woeginger, G.J.: Monge strikes again: optimal placement of web proxies in the internet. Oper. Res. Lett. 27, 93–96 (2000)
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
Corresponding author
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
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
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00453-011-9603-5