Engineering A* Search for the Flip Distance of Plane Triangulations

Authors Philip Mayer , Petra Mutzel

Thumbnail PDF


  • Filesize: 1.07 MB
  • 20 pages

Document Identifiers

Author Details

Philip Mayer
  • Institute of Computer Science, University of Bonn, Germany
Petra Mutzel
  • Institute of Computer Science, University of Bonn, Germany


We thank the anonymous reviewers for their insightful comments and suggestions.

Cite AsGet BibTex

Philip Mayer and Petra Mutzel. Engineering A* Search for the Flip Distance of Plane Triangulations. In 22nd International Symposium on Experimental Algorithms (SEA 2024). Leibniz International Proceedings in Informatics (LIPIcs), Volume 301, pp. 23:1-23:20, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2024)


The flip distance for two triangulations of a point set is defined as the smallest number of edge flips needed to transform one triangulation into another, where an edge flip is the act of replacing an edge of a triangulation by a different edge such that the result remains a triangulation. We adapt and engineer a sophisticated A* search algorithm acting on the so-called flip graph. In particular, we prove that previously proposed lower bounds for the flip distance form consistent heuristics for A* and show that they can be computed efficiently using dynamic algorithms. As an alternative approach, we present an integer linear program (ILP) for the flip distance problem. We experimentally evaluate our approaches on a new real-world benchmark data set based on an application in geodesy, namely sea surface reconstruction. Our evaluation reveals that A* search consistently outperforms our ILP formulation as well as a naive baseline, which is bidirectional breadth-first search. In particular, the runtime of our approach improves upon the baseline by more than two orders of magnitude. Furthermore, our A* search successfully solves most of the considered sea surface instances with up to 41 points. This is a substantial improvement compared to the baseline, which struggles with subsets of the real-world data of size 25. Lastly, to allow the consideration of global sea level data, we developed a decomposition-based heuristic for the flip distance. In our experiments it yields optimal flip distance values for most of the considered sea level data and it can be applied to large data sets due to its fast runtime.

Subject Classification

ACM Subject Classification
  • Theory of computation → Computational geometry
  • Computational Geometry
  • Triangulations
  • Flip Distance
  • A-star Search
  • Integer Linear Programming


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


  1. Anna Arutyunova, Anne Driemel, Jan-Henrik Haunert, Herman Haverkort, Jürgen Kusche, Elmar Langetepe, Philip Mayer, Petra Mutzel, and Heiko Röglin. Minimum-Error Triangulations for Sea Surface Reconstruction. In Xavier Goaoc and Michael Kerber, editors, 38th International Symposium on Computational Geometry (SoCG 2022), volume 224 of Leibniz International Proceedings in Informatics (LIPIcs), pages 7:1-7:18, Dagstuhl, Germany, 2022. Schloss Dagstuhl - Leibniz-Zentrum für Informatik. URL:
  2. Jean-Luc Baril and Jean-Marcel Pallo. Efficient lower and upper bounds of the diagonal-flip distance between triangulations. Information Processing Letters, 100(4):131-136, 2006. URL:
  3. Prosenjit Bose and Ferran Hurtado. Flips in planar graphs. Computational Geometry, 42(1):60-80, 2009. URL:
  4. Miguel Bosch Calvo and Steven Kelk. An improved kernel for the flip distance problem on simple convex polygons. Inf. Process. Lett., 182:106381, 2023. URL:
  5. Richie Chih-Nan Chuang, Ashim Garg, Xin He, Ming-Yang Kao, and Hsueh-I Lu. Compact encodings of planar graphs via canonical orderings and multiple parentheses. In Kim Guldstrand Larsen, Sven Skyum, and Glynn Winskel, editors, Automata, Languages and Programming, 25th International Colloquium, ICALP'98, Aalborg, Denmark, July 13-17, 1998, Proceedings, volume 1443 of Lecture Notes in Computer Science, pages 118-129. Springer, 1998. URL:
  6. Sean Cleary and Katherine St. John. Rotation distance is fixed-parameter tractable. Information Processing Letters, 109(16):918-922, 2009. URL:
  7. Mark de Berg, Otfried Cheong, Marc J. van Kreveld, and Mark H. Overmars. Computational geometry: algorithms and applications, 3rd Edition. Springer, 2008. URL:
  8. Boris Delaunay. Sur la sphère vide. Bulletin de l'Académie des Sciences de l'URSS, Classe des Sciences Mathématiques et Naturelles, 6:793-800, 1934. Google Scholar
  9. David Eppstein. Happy endings for flip graphs. In Proceedings of the Twenty-Third Annual Symposium on Computational Geometry, SCG '07, pages 92-101, New York, NY, USA, 2007. ACM. URL:
  10. Qilong Feng, Shaohua Li, Xiangzhong Meng, and Jianxin Wang. An improved FPT algorithm for the flip distance problem. Information and Computation, 281:104708, 2021. URL:
  11. Joachim Gudmundsson, Mikael Hammar, and Marc van Kreveld. Higher order Delaunay triangulations. Computational Geometry, 23(1):85-98, 2002. URL:
  12. Gurobi Optimization, LLC. Gurobi Optimizer Reference Manual, 2023. URL:
  13. Sabine Hanke, Thomas Ottmann, and Sven Schuierer. The edge-flipping distance of triangulations. Journal of Universal Computer Science, 2, April 1996. Google Scholar
  14. Peter E. Hart, Nils J. Nilsson, and Bertram Raphael. A formal basis for the heuristic determination of minimum cost paths. IEEE Transactions on Systems Science and Cybernetics, 4(2):100-107, 1968. URL:
  15. John F. Hughes, Andries van Dam, Morgan McGuire, David F. Sklar, James D. Foley, Steven K. Feiner, and Kurt Akeley. Computer Graphics - Principles and Practice, 3rd Edition. Addison-Wesley, 2014. URL:,1207,store-12521_isbn-0321399528,00.html.
  16. F. Hurtado, M. Noy, and J. Urrutia. Flipping edges in triangulations. Discrete & Computational Geometry, 22(3):333-346, 1999. URL:
  17. Iyad Kanj, Eric Sedgwick, and Ge Xia. Computing the flip distance between triangulations. Discrete & Computational Geometry, 58(2):313-344, 2017. URL:
  18. H. W. Kuhn. The Hungarian method for the assignment problem. Naval Research Logistics Quarterly, 2(1-2):83-97, 1955. URL:
  19. Charles L. Lawson. Transforming triangulations. Discrete Mathematics, 3(4):365-372, 1972. URL:
  20. Charles L. Lawson. Software for C¹ surface interpolation. In John R. Rice, editor, Mathematical Software, pages 161-194. Academic Press, 1977. URL:
  21. Haohong Li and Ge Xia. An 𝒪(3.82^k) Time FPT Algorithm for Convex Flip Distance. In Petra Berenbrink, Patricia Bouyer, Anuj Dawar, and Mamadou Moustapha Kanté, editors, 40th International Symposium on Theoretical Aspects of Computer Science (STACS 2023), volume 254 of Leibniz International Proceedings in Informatics (LIPIcs), pages 44:1-44:14, Dagstuhl, Germany, 2023. Schloss Dagstuhl - Leibniz-Zentrum für Informatik. URL:
  22. Fabian Lipp. Computing the flip distance of triangulations. Bachelor’s thesis, Julius-Maximilians-Universität Würzburg, 2012. Google Scholar
  23. Jesús A. De Loera, Serkan Hosten, Francisco Santos, and Bernd Sturmfels. The polytope of all triangulations of a point configuration. Documenta Mathematica, 1996. URL:
  24. Anna Lubiw and Vinayak Pathak. Flip distance between two triangulations of a point set is NP-complete. Computational Geometry, 49:17-23, 2015. 24th Canadian Conference on Computational Geometry (CCCG'12). URL:
  25. Joan M. Lucas. An improved kernel size for rotation distance in binary trees. Information Processing Letters, 110(12):481-484, 2010. URL:
  26. Ayorkor Mills-Tettey, Anthony Stent, and M. Dias. The dynamic Hungarian algorithm for the assignment problem with changing costs, 2007. Google Scholar
  27. James Munkres. Algorithms for the assignment and transportation problems. Journal of the Society for Industrial and Applied Mathematics, 5(1):32-38, 1957. URL:
  28. Alina Nitzke, Benjamin Niedermann, Luciana Fenoglio-Marc, Jürgen Kusche, and Jan-Henrik Haunert. Reconstructing the dynamic sea surface from tide gauge records using optimal data-dependent triangulations. Computers & Geosciences, 157:104920, 2021. URL:
  29. Jean Pallo. An efficient upper bound of the rotation distance of binary trees. Information Processing Letters, 73(3):87-92, 2000. URL:
  30. Alexander Pilz. Flip distance between triangulations of a planar point set is APX-hard. Computational Geometry, 47(5):589-604, 2014. URL:
  31. Rodrigo I. Silveira and Marc van Kreveld. Optimal higher order Delaunay triangulations of polygons. Computational Geometry, 42(8):803-813, 2009. Special Issue on the 23rd European Workshop on Computational Geometry. URL:
  32. Daniel Dominic Sleator, Robert Endre Tarjan, and William P. Thurston. Rotation distance, triangulations, and hyperbolic geometry. In Juris Hartmanis, editor, Proceedings of the 18th Annual ACM Symposium on Theory of Computing, May 28-30, 1986, Berkeley, California, USA, pages 122-135. ACM, 1986. URL:
  33. O.C. Zienkiewicz, R.L. Taylor, and J.Z. Zhu. The Finite Element Method: Its Basis and Fundamentals. Butterworth-Heinemann, Oxford, seventh edition, 2013. URL: