Non-Crossing Hamiltonian Paths and Cycles in Output-Polynomial Time

Author David Eppstein

Thumbnail PDF


  • Filesize: 0.83 MB
  • 16 pages

Document Identifiers

Author Details

David Eppstein
  • Computer Science Department, University of California, Irvine, CA, USA

Cite AsGet BibTex

David Eppstein. Non-Crossing Hamiltonian Paths and Cycles in Output-Polynomial Time. In 39th International Symposium on Computational Geometry (SoCG 2023). Leibniz International Proceedings in Informatics (LIPIcs), Volume 258, pp. 29:1-29:16, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2023)


We show that, for planar point sets, the number of non-crossing Hamiltonian paths is polynomially bounded in the number of non-crossing paths, and the number of non-crossing Hamiltonian cycles (polygonalizations) is polynomially bounded in the number of surrounding cycles. As a consequence, we can list the non-crossing Hamiltonian paths or the polygonalizations, in time polynomial in the output size, by filtering the output of simple backtracking algorithms for non-crossing paths or surrounding cycles respectively. To prove these results we relate the numbers of non-crossing structures to two easily-computed parameters of the point set: the minimum number of points whose removal results in a collinear set, and the number of points interior to the convex hull. These relations also lead to polynomial-time approximation algorithms for the numbers of structures of all four types, accurate to within a constant factor of the logarithm of these numbers.

Subject Classification

ACM Subject Classification
  • Theory of computation → Computational geometry
  • Theory of computation → Design and analysis of algorithms
  • polygonalization
  • non-crossing structures
  • output-sensitive algorithms


  • Access Statistics
  • Total Accesses (updated on a weekly basis)
    PDF Downloads


  1. Oswin Aichholzer, Franz Aurenhammer, Clemens Huemer, and Birgit Vogtenhuber. Gray code enumeration of plane straight-line graphs. Graphs Combin., 23(5):467-479, 2007. URL:
  2. Miklós Ajtai, Vašek Chvátal, Monroe M. Newborn, and Endre Szemerédi. Crossing-free subgraphs. In Alexander Rosa, Gert Sabidussi, and Jean Turgeon, editors, Theory and Practice of Combinatorics: A collection of articles honoring Anton Kotzig on the occasion of his sixtieth birthday, volume 12 of Annals of Discrete Mathematics, pages 9-12. North-Holland, 1982. URL:
  3. Noga Alon, Sridhar Rajagopalan, and Subhash Suri. Long non-crossing configurations in the plane. Fund. Inform., 22(4):385-394, 1995. URL:
  4. Victor Alvarez, Karl Bringmann, Radu Curticapean, and Saurabh Ray. Counting triangulations and other crossing-free structures via onion layers. Discrete Comput. Geom., 53(4):675-690, 2015. URL:
  5. David Avis and Komei Fukuda. Reverse search for enumeration. Discrete Appl. Math., 65(1-3):21-46, 1996. URL:
  6. Sayan Bandyapadhyay, Aritra Banik, Sujoy Bhore, and Martin Nöllenburg. Geometric planar networks on bichromatic collinear points. Theoret. Comput. Sci., 895:124-136, 2021. URL:
  7. Sergei Bespamyatnikh. An efficient algorithm for enumeration of triangulations. Comput. Geom. Theory & Appl., 23(3):271-279, 2002. URL:
  8. Gi-Sang Cheon, Hong Joon Choi, Guillermo Esteban, and Minho Song. Enumeration of bipartite non-crossing geometric graphs. Discrete Appl. Math., 317:86-100, 2022. URL:
  9. Mirela Damian, Robin Flatland, Joseph O'Rourke, and Suneeta Ramaswami. Connecting polygonizations via stretches and twangs. Theory Comput. Syst., 47(3):674-695, 2010. URL:
  10. Erik D. Demaine, Sándor P. Fekete, Phillip Keldenich, Dominik Krupke, and Joseph S. B. Mitchell. Area-optimal simple polygonalizations: the CG challenge 2019. ACM J. Exp. Algorithmics, 27:Article 2.4, 2022. URL:
  11. Adrian Dumitrescu and Csaba D. Tóth. Long non-crossing configurations in the plane. Discrete Comput. Geom., 44(4):727-752, 2010. URL:
  12. David Eppstein. Forbidden Configurations in Discrete Geometry. Cambridge University Press, 2018. URL:
  13. David Eppstein. Counting polygon triangulations is hard. Discrete Comput. Geom., 64(4):1210-1234, 2020. URL:
  14. Sándor P. Fekete. On simple polygonalizations with optimal area. Discrete Comput. Geom., 23(1):73-110, 2000. URL:
  15. Philippe Flajolet and Marc Noy. Analytic combinatorics of non-crossing configurations. Discrete Math., 204(1-3):203-229, 1999. URL:
  16. Alfredo García, Marc Noy, and Javier Tejel. Lower bounds on the number of crossing-free subgraphs of K_N. Comput. Geom. Theory & Appl., 16(4):211-221, 2000. URL:
  17. H. Guggenheimer. The Jordan curve theorem and an unpublished manuscript by Max Dehn. Archive for History of Exact Sciences, 17(2):193-200, 1977. URL:
  18. Carmen Hernando, Michael E. Houle, and Ferran Hurtado. On local transformation of polygons with visibility properties. Theoret. Comput. Sci., 289(2):919-937, 2002. URL:
  19. Michael Hoffmann, André Schulz, Micha Sharir, Adam Sheffer, Csaba D. Tóth, and Emo Welzl. Counting plane graphs: flippability and its applications. In János Pach, editor, Thirty Essays on Geometric Graph Theory, pages 303-325. Springer, 2013. URL:
  20. Naoki Katoh and Shin-Ichi Tanigawa. Fast enumeration algorithms for non-crossing geometric graphs. Discrete Comput. Geom., 42(3):443-468, 2009. URL:
  21. D. T. Lee. Visibility of a simple polygon. CVGIP, 22(2):207-221, 1983. URL:
  22. Dániel Marx and Tillmann Miltzow. Peeling and nibbling the cactus: subexponential-time algorithms for counting triangulations and related problems. In Sándor P. Fekete and Anna Lubiw, editors, 32nd International Symposium on Computational Geometry, SoCG 2016, June 14-18, 2016, Boston, MA, USA, volume 51 of LIPIcs, pages 52:1-52:16. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2016. URL:
  23. G. H. Meisters. Polygons have ears. Amer. Math. Monthly, 82(6):648-651, 1975. URL:
  24. Joseph S. B. Mitchell and Joseph O'Rourke. Computational geometry column 42. Internat. J. Comput. Geom. Appl., 11(5):573-582, 2001. URL:
  25. OEIS contributors. Sequence A180562. The On-Line Encyclopedia of Integer Sequences, March 2014. URL:
  26. OEIS contributors. Sequence A238846. The On-Line Encyclopedia of Integer Sequences, November 2021. URL:
  27. OEIS contributors. Sequence A001792. The On-Line Encyclopedia of Integer Sequences, April 2022. URL:
  28. Louis V. Quintas and Fred Supnick. On some properties of shortest Hamiltonian circuits. Amer. Math. Monthly, 72(9):977-980, 1965. URL:
  29. Andreas Razen and Emo Welzl. Counting plane graphs with exponential speed-up. In Cristian S. Calude, Grzegorz Rozenberg, and Arto Salomaa, editors, Rainbow of Computer Science: Dedicated to Hermann Maurer on the Occasion of His 70th Birthday, volume 6570 of Lecture Notes in Computer Science, pages 36-46. Springer, 2011. URL:
  30. Micha Sharir and Adam Sheffer. Counting plane graphs: cross-graph charging schemes. Combin. Probab. Comput., 22(6):935-954, 2013. URL:
  31. Micha Sharir, Adam Sheffer, and Emo Welzl. Counting plane graphs: perfect matchings, spanning cycles, and Kasteleyn’s technique. J. Combin. Theory Ser. A, 120(4):777-794, 2013. URL:
  32. Hugo Steinhaus. One Hundred Problems in Elementary Mathematics. Basic Books, 1964. See pp. 17, 85-86. Google Scholar
  33. Shin-Ichi Tanigawa. Enumeration of non-crossing geometric graphs. In Encyclopedia of Algorithms, pages 638-640. Springer, 2016. URL:
  34. Emo Welzl. Counting simple polygonizations of planar point sets. In Proceedings of the 23rd Annual Canadian Conference on Computational Geometry, Toronto, Ontario, Canada, August 10-12, 2011, 2011. URL:
  35. Manuel Wettstein. Counting and enumerating crossing-free geometric graphs. J. Comput. Geom., 8(1):47-77, 2017. URL:
  36. Ro-Yu Wu, Jou-Ming Chang, Kung-Jui Pai, and Yue-Li Wang. Amortized efficiency of generating planar paths in convex position. Theoret. Comput. Sci., 412(35):4504-4512, 2011. URL:
  37. Katsuhisa Yamanaka, David Avis, Takashi Horiyama, Yoshio Okamoto, Ryuhei Uehara, and Tanami Yamauchi. Algorithmic enumeration of surrounding polygons. Discrete Appl. Math., 303:305-313, 2021. URL: