Computing the flip distance between triangulations

Iyad Kanj, Eric Sedgwick, Ge Xia · DOI

Abstract

Let $\mathcal{T}$ be a triangulation of a set $\mathcal{P}$ of $n$ points in the plane, and let $e$ be an edge shared by two triangles in $\mathcal{T}$ such that the quadrilateral $Q$ formed by these two triangles is convex. A flip of $e$ is the operation of replacing $e$ by the other diagonal of $Q$ to obtain a new triangulation of $\mathcal{P}$ from $\mathcal{T}$. The flip distance between two triangulations of $\mathcal{P}$ is the minimum number of flips needed to transform one triangulation into the other. This paper presents an algorithm for the Flip Distance problem that runs in time $O(n + k \cdot c^{k})$, for a constant $c \leq 2 \cdot 14^{11}$, proving that the problem is fixed-parameter tractable (FPT). We extend these results to triangulations of polygonal regions with holes and to labeled triangulated graphs.

Introduction: The Flip Distance Problem

In computational geometry, a triangulation is a method of partitioning the convex hull of a set of points into triangles. A fundamental operation within this domain is the "flip": if two triangles share an edge $e$ and form a convex quadrilateral, $e$ can be removed and replaced with the quadrilateral's other diagonal.

Illustration of edges in a triangulation. A flip operation involves replacing an edge like $e$ with the alternative diagonal of its containing quadrilateral.

The Flip Distance problem seeks the minimum number of flips required to transform one triangulation $A$ into another triangulation $B$. This problem has significant applications in computer graphics, mesh generation, and evolutionary biology (specifically regarding rotation distance between binary trees). Despite its importance, the problem was proven to be NP-complete in 2012. The primary challenge has been developing an algorithm that remains efficient when the target distance $k$ is small, even if the total number of points $n$ is large.

Methodology: Modeling Flip Dependencies

The authors' breakthrough involves a structural analysis of how flips depend on one another, moving away from simple exhaustive searches.

  1. The Flip DAG: The solution is represented as a Directed Acyclic Graph (DAG). Nodes represent flips, and edges represent dependencies (e.g., one flip must occur to create an edge required for a subsequent flip).
  2. Topological Sorting: The authors demonstrate that any topological sort of this DAG constitutes a valid sequence of flips. This shifts the algorithmic goal from finding a specific sequence to identifying the underlying DAG.
  3. Local Navigation Search Tree: The algorithm explores the triangulation starting from "changed edges" (those present in the start but not the target). It performs a bounded search using 14 local actions, such as moving to adjacent edges or performing flips, managed via a stack to track connecting points.
  4. Normalization: "Normalized solutions" are introduced to group flips within the same connected component of the dependency graph, effectively pruning the search space.

Key Insights

  • Independence of Flips: Many flips in a sequence are independent. By treating the solution as a DAG rather than a linear list, the algorithm avoids the combinatorial explosion of specific linear orderings.
  • Bounded Search Depth: The authors proved that a "source" flip (one without dependencies) can always be found by traversing at most $O(k)$ adjacent edges, providing a critical bound for the search tree depth.
  • Stack-Based Recursion: To handle independent branches of flips unlocked by a single operation, the algorithm uses a stack to manage discrete "chunks" of the problem, ensuring it doesn't lose its place while navigating the triangulation.

Results and Generalizations

The paper establishes that the Flip Distance problem is Fixed-Parameter Tractable (FPT) with a running time of $O(n + k \cdot c^k)$. While the constant $c \approx 10^{12}$ is theoretically large, the result provides a formal proof of feasibility for the first time.

Furthermore, the results extend to:

  • Polygonal regions with holes: Accommodating more complex geographic or engineering models.
  • Labeled triangulated graphs: Generalizing from straight-line geometric settings to combinatorial topological arcs, with a complexity of $O(n \log n + k \cdot c^k)$.

Limitations and Future Work

The primary limitation is the magnitude of the constant $c$, which currently renders the algorithm more of a theoretical milestone than a practical tool. Future research may focus on reducing this constant or investigating the existence of a "polynomial-size kernel"—a preprocessing step to reduce the problem size to a function purely of $k$ in polynomial time. Additionally, solving the flip distance for unlabeled graphs remains an open challenge, as identifying changed edges is significantly more complex without vertex labels.

Summary updated

BibTeX
@inproceedings{kanj2015computing,
  author = {Iyad Kanj and Eric Sedgwick and Ge Xia},
  title = {{Computing the flip distance between triangulations}},
  booktitle = {STACS},
  year = {2015},
  doi = {10.4230/lipics.stacs.2015.500},
}
Figure