Flip Paths Between Lattice Triangulations
FFlip Paths Between Lattice Triangulations
William Sims Meera SitharamAugust 27, 2020
Abstract
The problem of finding a diagonal flip path between two triangulationshas been studied for nearly a century in the combinatorial (topological)setting and for decades in the geometric setting. In the geometric setting,finding a diagonal flip path between two triangulations that minimizesthe number of diagonal flips over all such paths is NP-complete. How-ever, when restricted to lattice triangulations - i.e. triangulations of afinite subset of the integer lattice, or an affine transformation of this lat-tice, bounded by a simple, closed polygon with lattice points as vertices -the problem has a polynomial time algorithm. Lattice triangulations havebeen studied for their uses in discriminant theory, Hilbert’s 16th problem,toric varieties, quantum spin systems, and material science. Our firstmain result shows that there is a polynomial-time computable, uniquepartially-ordered set of diagonal flips such that there is a bijection be-tween valid linear-orderings of this set and minimum diagonal flip pathsbetween two lattice triangulations. This provides an alternative proof ofthe previously known result, as well as new structural insights into thesediagonal flip paths. Our second main result characterizes pairs of trian-gulations, containing sets of edges E and E (cid:48) respectively, such that theminimum diagonal flip path between them contains the minimum numberof diagonal flips over all minimum diagonal flip paths between pairs of tri-angulations, containing sets of edges E and E (cid:48) respectively. Remarkably,all of our results are derived from a simple relationship between edges intriangulations and Farey sequences. Given a finite point-set S in R bounded by a simple, closed polygon Ω withvertices in S , a triangulation of the pair ( S, Ω) is an embedding of a planargraph with vertex set S , non-intersecting straight-line edges including those ofΩ, and triangular interior facets. From here on, all polygons are assumed tobe simple and closed. A triangulation can be transformed into another via asequence of operations called diagonal flips , defined as follows. Definition 1 (Diagonal Flip and Flip Path) . A diagonal flip (shortened to flip ) is an operation transforming one triangulation T into another: for some a r X i v : . [ c s . C G ] A ug a) (b) (c) (d) (e) (f) (g) Figure 1: (a) is the integer lattice and a lattice triangulation of a point-setbounded by a simple, closed polygon. (b) is an affine transformation of (a),yielding the triangular lattice and the triangulation of the transformed point-set and polygon. (c) - (g) show a flip path transforming the equilateral trian-gulation (Definition 7) in (c) into the triangulation in (g). (d) shows the firstflip (Definition 1) along this path, performed on the red quadrilateral, whichreplaces the edge ( v , v ) with the edge ( v , v ). The red edges in (e)-(g) resultfrom flips along this flip path that may be performed simultaneously. convex quadrilateral in T , whose interior contains only a diagonal edge, the flip operation replaces this diagonal edge with the other (Figure 1d). A flippath is a starting triangulation along with a sequence of flips (equivalently, thecorresponding sequence of triangulations ending with the target triangulation)(Figures 1c - 1g). Our results concern flip paths between lattice triangulations - i.e. triangu-lations of the pair ( S, Ω) where the point-set S is the intersection of an affinetransformation of the integer lattice and a polygon Ω with lattice points as ver-tices (Figures 1a and 1b). This point-set is called the lattice point-set of Ω.Since the polygon uniquely determines the lattice point-set, from now on wewill refer to lattice triangulations of Ω. Furthermore, when the context is clearwe will refer to lattice triangulations simply as triangulations . We are interestedin finding minimum flip paths between two lattice triangulations of the samelattice point-set - i.e. those flip paths with the minimum number of flips overall flip paths between these triangulations. The flip graph of a point-set S and a polygon Ω is defined as follows: eachvertex is a triangulation of the pair ( S, Ω) and each edge connects a pair oftriangulations that differ by a single flip. The flip graph encodes flip-connectivity- i.e. flip paths between triangulations. The flip graph was first shown tobe connected for the case when Ω is a convex polygon and the point-set S isthe vertex set of Ω, a result attributed to Lawson [10]. This result was thenextended to arbitrary closed polygons (not necessarily simple nor convex) withvertices contained in the point-set S by Dyn et al. [6], who attribute the idea toEdelsbrunner. Their main proof technique was to show how to generate an edge u, v ) in the point-set S defining a line segment in the interior of the polygon Ω, such that the linesegment contains only these two points of S , they showed how to find a flip pathfrom a triangulation of the pair ( S, Ω) to some triangulation containing the edge( u, v ). The rest of the proof proceeds by induction on the number of edges thatneed to be generated. Finally, Osherovich et al. [14] gave alternative proofs ofthe previous two results using only simple geometric properties of polygons.These flip graph connectivity questions also apply in the combinatorial set-ting, between triangulations of topological spaces - i.e. where a triangulation isembedded on a surface and the topological flip permits a homeomorphism of thesurface. In this case, only the combinatorics, or graph, of the triangulation isrelevant (the boundary facet is generally assumed to be a triangle). In fact, thecombinatorial setting was explored nearly 40 years before the geometric setting.Since we are working exclusively in the geometric setting, we mention these re-sults mainly for completeness. Flip graphs in the combinatorial setting were firstshown to be connected when their vertices correspond to triangulation graphsof small genus - e.g., graphs that are embeddable on a sphere, torus, projectiveplane, or Klein bottle [18, 5, 13]. This result was generalized to triangulationsof arbitrary closed surfaces [12] and later strengthened to the case of topologicalflips that only permit diffeomorphisms [11].Returning to the geometric setting, our results concern the connectivity offlip graphs whose vertices are lattice triangulations. We provide a comparisonto previous results on lattice triangulations in the next section. Lattice trian-gulations arise in algebraic geometry [3], discriminant theory [7], and quantumspin systems [2]; they are additionally connected to Hilbert’s 16th problem [17].Some work has gone into counting and enumerating the lattice triangulationson a square grid [2, 9, 8]. Our previous work relates flip paths that generatean edge from a lattice triangulation to the propagation of cracks in crystallinematerial caused by defects [16]. For a broad treatment of general and latticetriangulations, see [4]
In the geometric setting, the problem of finding a minimum flip path betweentwo triangulations of the same (not necessarily lattice) point-set and polygon isNP-complete [1]. However, Caputo et al. [2] gave a polynomial time algorithmto find a minimum flip path between any two lattice triangulations of a latticepoint-set. Furthermore, they showed that all such minimum flip paths containthe same flips. This result also holds when both lattice triangulations containa set of edges that must be preserved along any flip path. An edge in this set iscalled a constraint . Although they use the integer lattice, their algorithm andproofs carry over to affine transformations of this lattice (see Figure 1b). We givealternative proofs of these results that elucidate the structure of minimum flippaths. Specifically, the algorithm given by Caputo et al. [2] yields a particularminimum flip path between two lattice triangulations, whereas ours yields adescription of all such minimum flip paths.3 .1.2 Application of Previous Results
We will show that the minimum flip path between any two lattice triangulationsis unique (up to reordering flips). Hence, results on flip paths between general(not necessarily lattice) triangulations in the geometric setting, such as thosegiven by Dyn et al. [6], can be used to find the minimum flip path betweentwo lattice triangulations. However, these results do not take advantage of thestructural properties of lattice triangulations. In particular, for each edge to begenerated from the starting triangulatiom, the algorithm given by Dyn et al. [6]takes time linear in the length of the edge to identify a convex quadrilateral forthe next flip. Our results allow us to accomplish this in constant time, leadingto a significant complexity improvement overall.In Section 6, we compare our results to those of Caputo et al. [2]. Wedemonstrate how our structural results offer new incites into flip paths betweenlattice triangulations and discuss our complexity improvements.
From here on, all triangulations discussed are lattice triangulations. Our resultsrely only on the existence of
Farey parallelograms (defined in Section 2.1) in atriangulation, so they apply to triangulations of affine transformations of an in-teger lattice point-set. Hence, we work entirely with triangulations of triangularlattice point-sets without loss of generality. The following are our main results.1. For any two triangulations of a triangular lattice point-set, there is aunique, partially-ordered set of flips such that there is a bijection betweenthe valid linear-orderings of this partial order and the minimum flip pathsbetween these two triangulations. Furthermore, we give an algorithmto compute this partial order in time polynomial in the number of flipscontained in the partial order.2. We characterize pairs of triangulations, containing sets of edges E and E (cid:48) respectively, such that the partial order between them, given by Result1, contains the minimum number of flips over all partial orders betweenpairs of triangulations, containing E and E (cid:48) respectively, given by Result1.Additionally, we significantly improve the complexity of algorithms for vari-ants of flip path problems over lattice triangulations. In this section, we present the concepts and tools necessary to formally state ourresults. First, we give a convenient way to represent an edge in a triangulation.4 efinition 2 (Edge and Edge Equivalence Class) . An edge e = ( x, y ) at apoint v , is a vector ( x, y ) originating at a lattice point v , where x and y arenonnegative, relatively prime integer coefficients when the edge e is expressed asa linear combination of its defining coordinate pair of unit vectors that minimize | x | + | y | (out of the coordinate pairs).An edge e = ( x, y ) is the equivalence class under lattice shifts of the origi-nating point v . Figure 2: Three copies of the edge (2 ,
3) with the same originating point v .For a given section of the plane, the ordering convention for an edge (2 ,
3) isthe anticlockwise ordering of the 2 relevant lattice unit vectors for that section,called the defining coordinate pair (see Section 2.1). Having specified a latticepoint v , along with the vector (2 , e and originatesat the point v (cid:48) .See Figure 2 for examples of edges at points and an edge equivalence class.Throughout this paper, the additional piece of information that disambiguatesan edge is always clear from the context, and is never explicitly specified orused. A default representative of the edge class e = ( x, y ) that is commonlyused is the edge ( x, y ) at the point (0 , for an edge at a point and a flip path for an edge.The primary object we will be working on is the following. Definition 3 (Flip Plans) . A flip plan that generates a set of edges from atriangulation is a partially-ordered set of flips (equivalently the quadrilateralsthe flips are performed on) such that there is a bijection between valid linear-orderings of this partial order and flip paths that generate the set of edges fromthe triangulation and contain exactly the flips in this partial order. minimum flip plan that generates a set of edges from a triangulation is aflip plan such that any of its valid linear-orderings is a minimum flip path forthe edges. (a) (b) Figure 3: (a) and (b) show the minimum flip plans that generate the edges (1 , ,
5) from an equilateral triangulation (see Definition 7).A flip plan is presented as a directed acyclic graph (DAG), because then wemay refer to a flip’s parent or child flips. The edges in a flip plan are alwaysdirected towards parent flips, so they are generally not shown. See Figure 3 forexamples.Now we introduce some convenient notation for working with flip plans. Aflip plan that generates a set of edges E = { e , . . . , e n } at the set of points V = { v , . . . , v n } from a triangulation T is denoted by π E,V ( T ) - i.e. this flipplan generates e at v , e at v , and so on. When T is known from context,or arbitrary, then we refer to a flip plan for the edges in E at the points in V ,denoted by π E,V . The edge equivalence class induces an equivalence class of flipplans for the edges in E , denoted by π E . A default representative of this classthat is commonly used places one edge in E at the point (0 , π e ,u and π e ,v for the edge e at the point u and the edge e at the point v . Let π e ,u || π e ,v denote the partial order suchthat the flips in π e ,u must be performed before the flips in π e ,v . Also, let π e ,u ∪ π e ,v denote the partial order such that the root flip of each flip plan is amaximal element. The edge equivalence class induces the equivalence classes ofpartial orders π e || π e and π e ∪ π e . Common representatives of these classesplace one edge at the point (0 , T and T (cid:48) analo-gously to the above definition. We denote such a flip plan by π ( T, T (cid:48) ). Lastly,let |·| denote the number of flips contained in a flip plan.A key observation that leads to our algorithm to compute a flip plan for anedge, in Section 3, is the connection between an edge in a triangulation and thefollowing elementary number-theoretic concept.
Definition 4 (Farey Sequence) . A Farey sequence [15] of order n , denoted by F n , is a strictly-increasing sequence that lists all fully-reduced fractions (rela-tively prime pairs of nonnegative integers) in the range [0 , with denominatorsof at most n . Property 1 (Mediant of Farey Neighbors) . For all n > , each fraction f i inthe Farey sequence F n , except for the fractions and , is the mediant of its Farey neighbors , which are the fractions f i − and f i +1 . In other words, if thefraction xy has Farey neighbors ab and cd in some Farey sequence, then xy = a + cb + d . Property 2 (Computing Farey Sequences) . Given a Farey sequence F i , theFarey sequence F i +1 can be obtained by taking the mediant of each pair of sub-sequent terms in the Farey sequence F i . Now we relate edges to fractions.
Definition 5 (Farey-Flip Map) . The
Farey-Flip map φ e is the map that takesan edge e = ( x, y ) to the fraction xy if x < y , or to the fraction yx otherwise.The subscript is used to disambiguate between the two possible inverse maps. This map allows us to talk about a Farey sequence containing an edge e - i.e. a Farey sequence containing the fraction f that the edge e is sent tovia the Farey-Flip map φ e . Let F e denote the Farey sequence where e firstappears. Likewise, we can talk about the Farey neighbor edges of the edge e ,which are the edges obtained by applying the inverse Farey-Flip map φ − e onthe Farey neighbors of the fraction f in some Farey sequence. Now we defineparallelograms from Farey neighbor edges. Definition 6 (Farey Parallelogram for an Edge) . The
Farey parallelogram foran edge e at a point v is the parallelogram containing e as its longer diagonal andwhose boundary edges are copies of the Farey neighbor edges of e in the Fareysequence F e , say e and e . This parallelogram is denoted by P e,v = { e , e } . The nodes of the DAGs shown in Figure 3 are (flips performed on) Fareyparallelograms. Note that the edge equivalence class induces an equivalenceclass of Farey parallelograms for the edge e , denoted by P e . Likewise, we getthe equivalence class of flips performed on the Farey paralleloram P e .We conclude this section by defining several unique triangulations of a poly-gon. We adopt some terminology from Caputo et al. [2]. A triangulation is constrained by a set of edges E if the triangulation contains the edges in E .The edges in E are called constraints . Definition 7 (Unique Triangulations of a Polygon) . Let E be a set of con-straints. The following are unique triangulations of a polygon Ω (see Figure4): • the equilateral triangulation of Ω , if it exists, is the unique triangulationwhose edges, including the polygonal edges of Ω , are of equal length. If thistriangulation exists, then Ω is said to admit an equilateral triangulation. • the Minimum Triangulation of Ω , denoted M T (Ω) , is the unique triangu-lation whose total sum of edge lengths is minimum over all triangulations a) T (b) T (cid:48) (c) MCT ( T, T (cid:48) ) (d) MT (Ω , F ) (e) MT (Ω)(f) MET (Ω)
Figure 4: See Definition 7. (a) and (b) show two triangulations of the blue poly-gon constrained by the red edge. (c) shows the maximum common triangulationbetween the triangulations shown in (a) and (b). (d) shows the minimum tri-angulation of the blue polygon Ω constrained by the red edge and (e) shows theminimum triangulation of Ω with no constraints. (f) shows the minimum equi-lateral triangulation of the blue polygon, which is the minimum triangulationof the green polygon. of Ω . Similarly, the minimum triangulation of Ω constrained by E , de-noted by M T (Ω , E ) , is the unique triangulation constrained by E whosetotal sum of edge lengths is minimum over all triangulations of Ω con-strained by E . • the Minimum Equilateral Triangulation of Ω , denoted by M ET (Ω) , isthe minimum triangulation of a polygon Φ such that Φ is the unique poly-gon with the minimum number of vertices that contains Ω and admits anequilateral triangulation. • the Maximum Common Triangulation between any two triangulations T and T (cid:48) of Ω , denoted by M CT ( T, T (cid:48) ) , is the minimum triangulation of Ω containing the edges common to both T and T (cid:48) . For a polygon that admits an equilateral triangulation, clearly this triangula-tion is the minimum triangulation of the polygon and is unique. The uniquenessof the triangulations defined above are proved in general in Section 5.
Now we formally state our results. Refer to Figure 5, which shows minimumflip paths between triangulations of a polygon from Definition 7. Here are isour first main theorem.
Theorem 1 (Unique, Minimum Flip Plan beween Triangulations) . There is aunique, minimum flip plan between any two triangulations, constrained by a set CT ( T, T (cid:48) ) TT (cid:48) MT (Ω , E ) MT (Ω) MET (Ω) π , E π , Eπ , Eπ π Figure 5: A sketch of the triangulations and minimum flip paths involved inour results. The set E is a set of constraints (Definition 7) and the edgeslabelled π , π , π , and π denote minimum flip paths between the two triangu-lations adjacent to the respective edge. The dashed edge labelled π denotesthe computational cost, in terms of a number of flips, to describe the minimumtriangulation of the polygon Ω from the minimum equilateral triangulation ofΩ. of edges, that consists of the flips in π and π . Furthermore, the flips in thisflip plan and the partial order can be obtained in times O ( | π | + | π | + | π | + | π | + | π | ) (1) O ( | π | × | π | ) (2) respectively. As an immediate consequence, we get the following corollary comparingthe minimum flip plan between two triangulations and the minimum flip pathbetween these triangulations given by Caputo et al. [2].
Corollary 1 (Comparison with Previous Results) . The minimum flip path be-tween two triangulations given by Caputo et al. [2] is a valid linear-orderin ofthe minimum flip plan between these triangulations.
As the above corollary shows, Theorem 1 elucidates underlying structuraldifferences between two triangulations that have not been previously explored.We discuss our complexity improvements for computing minimum flip pathsbetween triangulations in Section 6.Next, let ∆ ( E ) denote the set of all triangulations containing a set of edges E . Also, observe that a triangulation can be fully-specified by the set of edgesthat it contains. Assume for the moment that there is a unique, minimum flipplan that generates a set of edges from the unique, minimum triangulation of apolygon. Here is our second main theorem. Theorem 2 (Optimal Minimum Flip Plan Between Sets of Edges) . Let the setsof edges G and G (cid:48) contain sets of edges E and E (cid:48) and represent triangulations U (cid:63) and V (cid:63) of a polygon Ω respectively. Also, consider the minimum flip plans thatgenerate the edges in G and G (cid:48) from the minimum triangulaion of Ω , constrained y a set of edges, respectively. Let π and π be these flip plans with theircommon flips removed. Then, the triangulations attain the minimum min U ∈ ∆( E ) ,V ∈ ∆( E (cid:48) ) | π ( U, V ) | (3) if and only if (i) the flips in the partial order π (resp. π ) are contained inthe minimum flip plan for E (resp. E (cid:48) ) and (ii) any edge generated by a flipin π (resp. π ) intersects an edge generated by a flip in the minimum flip planfor the edges in E (cid:48) (resp. E ). We prove these theorems in Section 6. The necessary tools for these proofsare developed as follows.1. Theorem 3 in Section 3 shows that there is a unique, minimum flip planthat generates an edge from an equilateral triangulation.2. Theorem 6 in Section 4 extends this result to a set of edges.3. Theorem 7 and Lemma 9 in Section 5 demonstrate the following: • the minimum flip plan for a set of edges E given by Theorem 6 yieldsa minimum triangulation of a polygon Ω, which admits an equilateraltriangulation, constrained by the edges in E • this minimum triangulation is unique • the minimum equilateral triangulation of a polygon is unique4. Theorem 8 in Section 5 yields the following: • an algorithm to compute the minimum triangulation of a polygon Ωfrom the minimum equilateral triangulation of Ω in time O ( | π | ) • there is a unique, minimum flip plan that generates a set of edges E from the minimum triangulation of Ω • the triangulation resulting from this minimum flip plan is a minimumtriangulation of Ω constrained by the edges in E
5. Corollary 4 in Section 5 shows that the triangulations of a polygon inDefinition 7 are unique.Corollary 4 shows that the triangulations in Figure 5 are unique. Notice thatthe triangular lattice point-set underlying the minimum equilateral triangulationof the polygon Ω may be different than the minimum triangulation of Ω. Hence π is a dashed edge, because it does not necessary represent a flip path. If theconstraint set E is empty, the minimum flip paths in the figure are unique (upto reordering flips), by Theorem 8. In the presence of constraints, a minimumflip plan π E that generates a set of edges E from an equilateral triangulationadmits a minimum flip path that generate the edges in E one at a time in any10rder, by Theorem 6. The minimum flip plan that generates the edges in E from the minimum triangulation of a polygon is a subset of the minimum flipplan π E , which preserves such a minimum flip path. Thus, these results holdin the presence of constraints and the minimum flip paths in the figure are stillunique. Theorem 1 is proved using the above results by relating minimum flippaths between triangulations to unique minimum flip paths that generate edges.Remarkably, all the above results follow from simple number-theoretic andgeometric concepts. In this section, we prove there is a unique, minimum flip plan that generates anedge at a point from an equilateral triangulation. A more expository proof ofthis result is given in [16]. We state this result as a theorem now.
Theorem 3 (Unique Minimum Flip Plan for an Edge) . There is a unique,minimum flip plan that generates an edge from an equilateral triangulation.Proof idea:
Theorem 4 shows that Algorithm
Flip Plan outputs a flip planfor an edge. This theorem follows directly from Theorem 5. Then, we useCorollary 3 to show that this is the unique, minimum flip plan for an edge.Our first algorithm constructs the unique sequence of fractions correspondingto an edge equivalence class.Algorithm
Farey Plan takes an edge e = ( x, y ) as input and outputs its Fareyplan C (one Farey plan for the equivalence class). The Farey plan C is initiallyempty. If the edge e is (0 ,
1) or (1 , φ e send the edge e to the the fraction f , let the sequence X initially contain the Farey sequence F , and let the fraction d = . Repeatthe following steps until the Farey plan C contains the fraction f .1. Add the fraction d to the end of the Farey plan C .2. If f > d , assign to d the mediant of d and the fraction directly after d inthe sequence X ; otherwise, assign to d the mediant of d and the fractiondirectly before d in the sequence X .3. Add d to the sequence X such that the sequence is in increasing order.On an input edge e , this algorithm terminates in time linear in the orderof the Farey sequence F e and its output is unique by Properties 1 and 2. Thefollowing two lemmas describe the Farey plans of Farey neighbor edges and theedges that compose Farey parallelograms.11 emma 1 (Farey Plan of Longer Farey Neighbor Edge) . If an edge e has aFarey plan C = { f , . . . , f n } , then applying the inverse Farey-Flip map φ − e onthe fraction f n − yields longer boundary edge e (cid:48) in the Farey parallelogram forthe edge e . Furthermore, the Farey plan for the edge e (cid:48) is the sequence C \ f n .Proof. This follows from Properties 1 and 2Before stating the next lemma, define adjacent copies of an edge e to be anedge e at a point u and an edge e at a point v such that these edges and halfof each of their Farey parallelogram exist in a triangulation and these halvesshare an edge. Adjacent copies of the Farey parallelogram for e are two suchFarey parallelograms that share an edge. The edge equivalence class induces anequivalence class for each of these objects. Lemma 2 (Building on Longer Farey Neighbor Edges) . Let the edge e haveFarey neighbor edges e and e in the Farey sequence F e , let the Farey sequence F e have higher order than the Farey sequence F e , and let the shorter diagonalof the Farey parallelogram P e be e d . Then,(i) the Farey parallelogram P e = { e , e } , for some edge e (ii) adjacent copies of the edge e , such that their adjacent Farey parallelo-grams share an edge e , form the Farey parallelogram P e and e d = e Proof.
To show (i), simply observe that the edges e and e must be subsequentterms in the Farey sequence F e , by Property 2. For (ii), the Farey parallelogram P e contains one pair of the edges e and e both at the points (0 ,
0) and anotherpair of the edges e and e both ending at some other point. By (i), the adjacentcopies of the Farey parallelogram P e described in the lemma clearly containthe boundary edges of the Farey parallelogram P e , and we have e d = e − e = e . These lemmas give rise to the following algorithm that constructs a flip planfor an edge.Algorithm Flip Plan takes an edge e = ( x, y ) at a point v and its Farey plan C = { f , . . . , f n } as inputs and outputs a partially-ordered set of flips, denotedby π e,v . Base Cases:
If the Farey plan C is empty, then the partial order π e,v isempty. If the fraction f n = , add a flip on the Farey parallelogram P (1 , ,v = { (0 , , (1 , } to the partial order π e,v . Recursive Step:
Add a flip s on the Farey parallelogram P e,v = { e , e } , obtainedby applying the inverse Farey-Flip map φ − e on the fractions f n − and 1 − f n − ,to the partial order π e,v . Let the edge e be the shorter boundary edge in theFarey parallelogram P e,v . The children of flip s are the root flips of the partialorders that result from recursing on the edge e at the point v with Farey plan C \ f n and the edge e at the point v + e with Farey plan C \ f n .12 lean-up Step: Finally, consolidate duplicate flips in the partial order π e,v .Our goal is now to prove the following theorem. Theorem 4 (Flip Plan for an Edge) . On input edge e , Algorithm Flip Planoutputs a flip plan that generates e from an equilateral triangulation. This theorem follows directly from the following stronger theorem. We define adjacent partially-ordered sets of flips to be partial orders such that their rootparallelograms are adjacent.
Theorem 5 (Flip Plan for Adjacent Copies of an Edge) . If π e and π (cid:48) e areadjacent partially-ordered sets output by Algorithm Flip Plan on input edge e ,then the set π e ∪ π (cid:48) e is a flip plan that generates adjacent copies of the edge e from an equilateral triangulation. Now, we develop tools to prove this theorem. Corollary 2 is a consequence ofLemma 1 that describes the structure of sub-DAGs in the partial order outputof Algorithm Flip Plan. Lemma 4 gives us a way to combine certain flip plansfor individual edges into one for a set of edges. This lemma is proved usingLemma 3.
Corollary 2 (Flip Plan for Longer Farey Neighbor Edge) . Let the partial orderoutput by Algorithm Flip Plan on input edge e have a root flip s , with child flips w and z . If e (cid:48) is the longer boundary edge of the Farey parallelogram for theedge e , then the DAGs rooted at flips w and z are copies of the partial orderoutput by Algorithm Flip Plan on input edge e (cid:48) . Define the bounding parallelogram for an edge e = ( x, y ) to be the parallel-ogram with boundary edges { ( x, , (0 , y ) } , where these edges have the samedefining coordinate pair as the edge e . Two edges whose bounding parallelo-grams do not have intersecting interiors are said to be geometrically separated . Lemma 3 (Bounding Parallelogram Containment) . The Farey parallelogramsin the partial order output by Algorithm Flip Plan on an input edge e are con-tained in the bounding parallelogram for the edge e .Proof. We proceed by induction on the size of the Farey plan for the edge e , say n . When n = 1, we have the edge e = (1 ,
1) and the lemma holds.Assume the lemma holds for n = k and we will show it holds for n = k + 1.Let π e be the partial order output by Algorithm Flip Plan on input edge e .Clearly the root parallelogram of the partial order is contained in the boundingparallelogram for the edge e . Consider the longer boundary edge in the Fareyparallelogram P e , say e k . By Lemma 1 and the inductive hypothesis, the Fareyparallelograms in the partial order output by Algorithm Flip Plan on inputedge e k are contained in the bounding parallelogram for the edge e k . Hence, byCorollary 2 and Lemma 2 the bounding parallelograms for the adjacent copiesof the edge e k , contained in the Farey parallelogram P e , contain all the Fareyparallelograms in the partial order π e , except for the Farey parallelogram P e .13astly, by construction, the adjacent copies of the edge e k have the same definingcoordinate pair as the edge e , so their bounding parallelograms are containedin the bounding parallelogram for the edge e . Thus, the lemma is proved byinduction. Lemma 4 (Flip Plan for Geometrically Separated Edges) . Let E = { e , . . . , e n } be a set of edges such that(i) every pair of edges in E are geometrically separated.(ii) for each edge e i in E , the output of Algorithm Flip Plan on input edge e i , denoted by π e i , is a flip plan that generates e i from an equilateraltriangulationThen, π e ∪ · · · ∪ π e n a flip plan that generates the set of edges E from anequilateral triangulation.Proof. By Lemma 3, for each edge e i in the set of edges E , the Farey paral-lelograms in the flip plan π e i are contained in the bounding parallelogram for e i . Condition (i) tells us that no edge generated by a flip in the flip plan π e i can intersect with any edge generated by a flip in the flip plan π e j , for distinctedges e i and e j in E . Let π E = π e ∪ · · · ∪ π e n . Clearly any valid linear-orderingof π E is a flip path for the set of edges E . Conversely, consider a flip path forthe set of edges E that contains exactly the flips in π E . This flip path consistsof subsequences that are valid linear-orderings of the flip plans π e , . . . , π e n , bydefinition. Thus, this flip path is a valid linear-ordering of π E and the lemmais proved.Now we can prove Theorem 5.Figure 6: Shown are the partial orders in the proof of Theorem 5. These areadjacent partial orders and each is the output of Algorithm Flip Plan on inputedge e . The value of the edge u is such the partial orders are adjacent. Proof of Theorem 5.
We proceed by induction on the the size of the Farey planfor the edge e , say n . When n = 1, the theorem is easily verified for the edge e = (1 , n = k and we will prove it holdsfor n = k + 1. Refer to Figure 6, which shows adjacent copies of the partialorder output by Algorithm Flip Plan on input edge e . Denote the partial orderin blue by π e , the one in green by π (cid:48) e , and the one in red by π e ∪ π (cid:48) e .Corollary 2 tells us that the edge e k is the longer boundary edge in theFarey parallelogram P e . By Lemma 1 and the inductive hypothesis, the partial14 a) (b) Figure 7: The different possibilities for the edge e in the proof of Theorem5. (a) shows adjacent copies of the Farey parallelogram P e k sharing a purpleedge and adjacent copies of the Farey parallelogram P e k sharing a green edge.These result is two different Farey parallelograms for the edge e , and hence twodifferent possibilities for the edge e .order π e with its maximal flip removed is a flip plan for adjacent copies of theedge e k . Hence, by Lemma 2, this flip plan generates the boundary edges ofthe Farey parallelogram P e and its shorter diagonal. Furthermore, since theadjacent copies of the Farey parallelogram for e k , generated by this flip plan,must not contain lattice in their interiors, the Farey parallelogram P e does notcontain a lattice point in its interior. Hence, the maximal flip in π e can beperformed, so π e is a flip plan for the edge e . Similarly, π (cid:48) e is a flip plan for theedge e . Now we must show that π e ∪ π (cid:48) e is a flip plan for adjacent copies of theedge e .For one direction of the bijection, assume a flip path for adjacent copies ofthe edge e that contains exactly the flips in the partial order π e ∪ π (cid:48) e is not avalid-linear ordering of π e ∪ π (cid:48) e . Then, some flip s in the partial order π e ∪ π (cid:48) e is performed before a flip in the DAG rooted at s . Let s be the lowest level flipsatisfying this condition. At least one child flip of s has not been performed,so by Corollary 2 and Lemma 2, the Farey parallelogram that the flip s isperformed on has not been generated. Hence, the flip s cannot be performedand we get a contradiction. Thus, this flip path is a valid-linear ordering of thepartial order π e ∪ π (cid:48) e .For the other direction of the bijection, note that there are two cases for theedge e , resulting from the choice of the edge shared between the copies of theadjacent Farey parallelograms P e k that form the Farey parallelogram P e . (seeFigure 7). This leads to four cases for the configurations of adjacent copies ofthe edge e , as shown in Figure 8. The copies of the edge e k are labelled in thesecases. In terms of Figure 6, cases (a) and (d) arise when u = u and cases (b)and (c) arise otherwise. In each case, it suffices to show that the partial order π e ∪ π (cid:48) e consists of exactly (i) two maximal flips on adjacent copies of the Fareyparallelogram P e and (ii) the flips contained in flip plans for each pair of thecopies of the edge e k . We justify this claim at the end. In all cases, (i) is clearand the (ii) holds for all adjacent copies of the edge e k , by Lemma 1 and theinductive hypothesis. Furthermore, these are all of the flips contained in the15 a) (b) (c) (d) Figure 8: The cases of the adjacent copies of the edge e in the proof of Theorem5.partial order π e ∪ π (cid:48) e , by Corollary 2. For cases (b) and (c), (ii) holds for thepair of copies of the edge e k labelled 1 and 3 by transitivity. Finally, for cases(a) and (d), (ii) holds for the pairs of copies of the edge e k labelled 1 and 3, 1and 4, and 2 and 4 by Lemma 4, since by the inductive hypothesis the DAGsrooted at copies of the Farey parallelogram P e k in the partial order π e ∪ π (cid:48) e areflip plans for the copies of e k .Now we justify the claim above. Suppose the claim is true, but some validlinear-ordering of the partial order π e ∪ π (cid:48) e is not a flip path for adjacent copies ofthe edge e . This ordering consists of two flips on the adjacent copies of the Fareyparallelogram P e and flip paths for every pair of the copies of the edge e k . Sincethese flip paths are valid linear-orderings of flip plans for these pairs of edges, byassumption, the first flip that cannot be performed must be on one of the copiesof the Farey parallelogram P e . Also by assumption, this Farey parallelogramhas been generated by Lemma 2, so the edge e resulting from this flip mustintersect with an edge g in the triangulation other than the shorter diagonalof the Farey parallelogram P e . This implies that the edge g intersects with aboundary edge of the Farey parallelogram, which is a contradiction. Thus, theordering is a flip path for adjacent copies of the edge e .Thus, the theorem is proved by induction.Lastly, we prove Lemma 5, which gives us Corollary 3. With this last tool,we can prove Theorem 3. Lemma 5 (Uniqueness of Parallelograms) . The Farey parallelogram for an edge e is the unique parallelogram, with vertices in the triangular lattice and the edge e as its longer diagonal, whose interior is free of lattice points.Proof. One direction follows from Theorem 4. For the other direction, note thatby definition the Farey neighbor edges of the edge e in the Farey sequence F e arethe unique pair of edges that are shorter than the edge e and whose slopes areclosest to the slope of the edge e from either side. Consider some parallelogram P e , with vertices in the triangular lattice and e as its longer diagonal, that is notthe Farey parallelogram for the edge e . If it contains the Farey parallelogram,then we are done. Otherwise, one of its boundary edges g = ( x, y ) is shorter16han the edge e and has a slope that is closest to the slope of the edge e fromone side. Since the edge g is not a Farey neighbor edge of the edge e , then x and y must not be relatively prime integers so that one of the vertices of theparallelogram P e is not a lattice point. This contradicts our assumption. Thus,the parallelogram P e contains a lattice point. Corollary 3 (Uniqueness of Quadrilaterals) . The Farey parallelogram for anedge e is the unique quadrilateral, with vertices in the triangular lattice and theedge e as its longer diagonal, whose interior is free of lattice points.Proof. By Lemma 5, the Farey parallelogram for the edge e does not contain alattice point in its interior. By the same lemma, it is clear from the symmetryof the lattice that any other quadrilateral contains a lattice point in at least onehalf of its interior. Proof of Theorem 3.
A flip plan π e for an edge e can be obtained via Theorem4. Corollary 3 tells us that every flip plan for the edge e consists of Fareyparallelograms. Finally, by Corollary 2 and Lemma 2, each flip in π e is necessaryfor its parent flip, and the root flip is necessary to generate e . Thus, anyminimum flip plan for the edge e must contain the flips in the flip plan π e . In this section, we prove there is a unique, minimum flip plan that generates aset of edges at a set of points from an equilateral triangulation. We assume theedges only intersect at lattice points. We will use the fact that triangulations aremaximally planar graphs, meaning that if two edges do not intersect at a pointother than their endpoints, then they are both contained in some triangulationof a point-set. The following algorithm constructs the desired flip plan.Algorithm
Multi Flip Plan takes a set of edges E at a set of points V as inputand outputs the partially-ordered set of flips π E = π e ∪ · · · ∪ π e | E | , where π e i is the minimum flip plan for the edge e i in E . These minimum flip plans areobtained by running Algorithms Farey Plan and Flip Plan on each edge in E .Flip plans with flips in common are merged in the obvious way - e.g. Figure 9shows the flip plans for the edges (1 ,
3) and (1 ,
2) both at the point (0 , Theorem 6 (Unique, Minimum Flip Plan for Multiple Edges) . On an input setof edges E , Algorithm Multi Flip Plan outputs the unique, minimum flip planthat generates the edges in E from an equilateral triangulation.Proof idea: Let π E denote the partially-ordered set of flips output by Algo-rithm Multi Flip Plan on an input set of edges E . We use Lemma 7 to showthat π E is a flip plan for E . This lemma is proved using Lemma 6. Minimalityand uniqueness of π E will follow from Theorem 3.17igure 9: The intersection of the minimum flip plans for edges (1 ,
3) and (2 , ,
0) and defined by the same defining coordinate pair. Ifthey were defined using different defining coordinate pairs, then the only flipsthat could be in the intersection are those on copies of the Farey parallelogram P (1 , . See Sections 4 and 6. Lemma 6 (Farey Parallelogram Containment) . Every Farey parallelogram inthe minimum flip plan that generates an edge e from an equilateral triangulationcontains the edge e in its interior.Proof. We proceed by induction on the size of the corresponding Farey plan, n . When n = 1, the edge e = (1 , n = k and we will show it holds for a n = k + 1. Clearly theFarey parallelogram P e contains the edge e in its interior. Let e k be the longerboundary edge in the Farey parallelogram P e . By Lemma 1 and the inductivehypothesis, all Farey parallelograms in the flip plan for the edge e k contain theedge e k in their interiors. Consider the adjacent copies of the edge e k containedin the Farey parallelogram P e , according to Lemma 2. By Corollary 2, if thereis a Farey parallelogram in the flip plan for either of these edges that does notcontain the edge e in its interior, then the Farey parallelogram P e contains alattice point in its interior. This contradicts Lemma 3. Thus, the lemma isproved by induction. Lemma 7 (Sequential Generation of Multiple Edges) . Given a sequence ofedges E = { e , . . . , e n } and the unique, minimum flip plan π e i that generates e i from an equilateral triangulation for each edge e i in E , any valid linear-orderingof the partially-ordered set π e || . . . || π e n is a flip path that generates the edgesin E from an equilateral triangulation in sequential order.Proof. We proceed by induction on the number of edges, say n . When n = 1,the lemma holds by Theorem 3. Assume that the lemma holds when n = k ,and we will show that it holds for n = k + 1. Let e , . . . , e k , e k +1 be a sequenceof k + 1 edges. By the inductive hypothesis, any valid linear-ordering of thepartial order π k = π e || . . . || π e k is a flip path that generates the first k edges insequential order. Let the edge e = e k +1 and let π e be the minimum flip plan for e . It suffices to show that the flips in any valid linear-ordering of the minimumflip plan π e can be performed after the flips in any valid linear-ordering of thepartial order π k . 18 a) (b) (c) Figure 10: See the proof of Lemma 7. (a) shows the set of edges E to begenerated in red. (b) shows the inductive step where e is the next edge in E to be generated, g is the edge resulting from the flip s to be performed, andthe blue edges make up the Farey parallelogram g and its shorter diagonal. (c)shows the contradiction arising in the proof. In the image, the edge h (cid:48) is thesame as the edge e (cid:48) , but this is not always the case.If the minimum flip plan π e is a subset of the partial order π k , then we aredone. Otherwise, consider a flip s in the minimum flip plan π e such that all flipsin the DAG rooted at s have been performed, except for s . It suffices to showthat the flip s can be performed, because s cannot prevent a later flip in a validlinear-ordering of the flip plan π e from being performed, by definition. Let g bethe edge generated by the flip s . Equivalently, we will show that the boundaryedges of the Farey parallelogram for g and its shorter diagonal are generated.Then, by Corollary 3, the flip s can be performed.Assume to the contrary that one of the above-mentioned edges contained inthe Farey parallelogram for g , say h , has not been generated. If h is a boundaryedge of the Farey parallelogram for g , then h was flipped to yield a longer edge h (cid:48) (see Figure 10). Hence, h (cid:48) is either one of the first k edges in the sequence or,by Corollary 2, the longer boundary edge of some Farey parallelogram containedin the minimum flip plan for one of the first k edges in the sequence, say e (cid:48) . Eachflip in the minimum flip plan π e (cid:48) is necessary for its parent flip by Corollary 3and Lemma 2. Hence, the flip generating the edge h (cid:48) is necessary to generatethe edge e (cid:48) . Now, by Lemma 6, the Farey parallelogram for the edge h (cid:48) containsthe edge e (cid:48) . In order to flip the edge h (cid:48) to yield the edge h , we must first flipthe edge e (cid:48) to yield a shorter edge. This means that the edges e and e (cid:48) cannotsimultaneously exist in a triangulation. Thus, the edges e and e (cid:48) must intersect,which is a contradiction.Lastly, if the edge h is the shorter diagonal of the Farey parallelogram for theedge g , then by Lemma 2 some boundary edge of the Farey parallelogram for g is not generated and we get a similar contradiction. Hence, the boundary edgesof the Farey parallelogram for the edge g and its shorter diagonal are generated.Thus, the flip s can be performed and the lemma is proved by induction. Proof of Theorem 6.
First, we show that any valid linear-ordering of the partial19rder π E = π e ∪ · · · ∪ π | E | is a flip path for the edges in E . Such a linearordering is an interleaving of minimum flip paths for the edges in E , whichare valid linear-orderings of their minimum flip plans. For each subsequenceof one of these minimum flip paths in this ordering, consider the DAGs rootedat the highest level flips in the corresponding minimum flip plan reached bythis subsequence. Now simply observe that Lemma 7 can be applied to thecorresponding sequence of DAGs, which is the sequence of minimum flip plansfor a sequence of edges.Next, we show that any flip path for the edges in E that contains exactlythe flips in the partial order π E is a valid linear-ordering of this partial order.Assume this is not the case. Then, some flip s in the minimum flip plan foran edge e in E is performed before a flip in the DAG rooted at s . Considerthe lowest level flip satisfying this condition. By Corollary 2 and Lemma 2,the Farey parallelogram that the flip s is performed on does not exist in thetriangulation. Hence, this flip cannot be performed, which is a contradiction.Thus, π E is a flip plan for the edges in E .Lastly, the flip plan π E consists of unique, minimum flip plans by Theorem3. Furthermore, the roots of these minimum flip plans are maximal elements.Thus, π E must be the unique, minimum flip plan for the edges in E . In this section, we show that there is a unique, minimum flip plan that gen-erates a set of edges G from a minimum triangulation of an arbitrary polygonconstrained by a set of edges E . We begin by showing that when a polygon Ωadmits an equilateral triangulation, then the minimum flip plan that generatesthe edges in E from this equilateral triangulation yields the minimum triangula-tion of Ω constrained by E . Recall that in this case the equilateral triangulationof Ω is the unique, minimum triangulation of Ω. Theorem 7 (Minimum Flip Plans Yield Minimum Triangulations) . For a poly-gon Ω that admits an equilateral triangulation, the minimum flip plan that gen-erates a set of edges E from this equilateral triangulation yields a minimumtriangulation of Ω constrained by E .Proof idea: The theorem follows from Lemma 8, which is an alternativeproof of a consequence from Caputo et al. [2] that shows that if a triangulation T , constrained the set of edges E , is not the minimum triangulation M T (Ω , E ),then some edge in T can be flipped to yield a shorter edge while preserving theconstraints. Lemma 8 (Shortening a Non-Constraint Edge) . If a triangulation T of a poly-gon Ω constrained by a non-empty set of edges E is not the minimum triangu-lation of Ω constrained by E , then i) some non-constraint edge in the triangulation T can be flipped to yield ashorter edge(ii) the Farey parallelogram for the flipped edge does not contain any constraintin its interiorProof. For (i), we will show that some edge in the triangulation T that is notcontained in the minimum triangulation M T (Ω , E ) can be flipped to yield ashorter edge. Let g be an edge in the triangulation T that is not contained inthe minimum triangulation M T (Ω , E ). If the edge g can be flipped to yielda shorter edge, then we are done. Otherwise, by Corollary 3, the edges of theFarey parallelogram for g do not exist in the triangulation T . Hence, there is aquadrilateral in the triangulation T containing the edge g and an edge g (cid:48) that islonger than g . If there is more than one edge contained in this quadrilateral thatis longer than the edge g , let g (cid:48) be the longest one. By the same corollary, thetriangle containing the edges g and g (cid:48) makes up half of the Farey parallelogramfor g (cid:48) . Hence, the edge g is a Farey neighbor edge of the edge g (cid:48) . Furthermore,by Lemma 6, the Farey parallelogram for g contains the edge g (cid:48) . Hence, theedge g (cid:48) must be flipped to yield a shorter edge before the edge g can be flippedto yield a shorter edge. Thus, the edge g (cid:48) cannot be contained in the minimumtriangulation M T (Ω , E ). Now, if the edge g (cid:48) can be flipped to yield a shorteredge, we are done. Otherwise, repeat this process until an edge is found thatcan be flipped to yield a shorter edge.For (ii), let g be a non-constraint edge that can be flipped to yield a shorteredge, which exists by (i). If the Farey parallelogram for the edge g contains aconstraint e in E , then the edge e must be flipped to yield a shorter edge beforethe edge g can be flipped to yield a shorter edge. This contradicts the fact thatthe edge g can be flipped to yield a shorter edge. Proof of Theorem 7.
If the set of edges E is empty or consists of edges in theequilateral triangulation of Ω, then the minimum flip plan for E is empty andthe theorem holds. Otherwise, consider a triangulation T of Ω, constrainedby the set of edges E , that is not the minimum triangulation M T (Ω , E ). ByLemma 8 there is a non-constraint edge g in T such that (i) g can be flippedto yield a shorter edge while preserving the constraints E and (ii) the Fareyparallelogram for g does not contain an edge in E in its interior. Hence, byLemma 6 the minimum flip plan for g is not contained in the minimum flip planfor E . The edge g cannot be a unit-length edge, contained in the equilateraltriangulation of Ω, because these are the shortest possible edges. Hence, theminimum flip plan for all edges in the triangulation T must contain at leastone more flip than the minimum flip plan for the edges in E . This proves thetheorem by contraposition.Before we can construct or establish the uniqueness of any minimum flip planstarting from an arbitrary minimum triangulation of a polygon constrained by aset of edges, we must first show that this triangulation is unique. We now prove21 a) (b) Figure 11: The steps in the proof of Theorem 8. The polygonal edges of Ωare in red and the vertices and edges to be removed are in blue. (a) shows theminimum triangulation of Φ constrained by the polygonal edges of Ω. (b) showsthe minimum triangulation of Φ constrained by the polygonal edges of Ω andan additional red edge.this for the case when the polygon admits an equilateral triangulation. We alsoshow that the minimum equilateral triangulation of a polygon is unique.
Lemma 9 (Uniqueness of Minimum Triangulations) . The minimum equilateraltriangulation of a polygon is unique. Additionally, for a polygon that admits anequilateral triangulation, the minimum triangulation of the polygon constrainedby a set of edges is unique.Proof.
The minimum flip plan that generates the polygonal edges of a poly-gon Ω from an equilateral triangulation uniquely determines the polygon Φ, inDefinition 7, underlying the minimum equilateral triangulation of Ω. Since theequilateral triangulation of Φ is unique, the first part of the lemma is proved.Next, let the polygon Ω admit an equilateral triangulation and consider a setof constraints E . If the set E is empty, then clearly the equilateral triangulationof Ω is the unique, minimum triangulation of Ω constrained by E . Otherwise,by Theorem 7, the minimum flip plan that generates the edges in E from theequilateral triangulation of Ω is a minimum triangulation of Ω constrained by E .The non-unit length edges G in this triangulation are the results of flips in thisminimum flip plan. By Lemma 6, these edges cannot be flipped to yield shorteredges without either flipping or intersecting an edge in E . Furthermore, sincethis minimum flip plan is unique by Theorem 6, any minimum triangulationof Ω constrained by the set of edges E must contain the edges in G . Lastly,any other minimum triangulation of Ω constrained by the set of edges E mustcontain some set of non-unit length edges H other than those contained in G . However, the flips in the minimum flip plan for a set of edges are length-increasing, by construction. Thus, the minimum triangulation Ω constrained bythe set of edges E is unique.Now, we extend Theorems 6, 7, and Lemma 9 to triangulations of polygonsthat do not necessarily admit an equilateral triangulation.22 heorem 8 (Unique, Minimum Flip Plan from Any Minimum Triangulation) . Given a polygon Ω , a set of edges G contained in the triangular lattice point-setof Ω , and the minimum flip plan π Ω ∪ G that generates the polygonal edges of Ω and the edges in G from an equilateral triangulation, the following statementshold:(i) the minimum triangulation of Ω is unique and can obtained from the min-imum equilateral triangulation of Ω in time O ( | π Ω ( M ET (Ω)) | ) by per-forming the following steps:(a) use the minimum flip plan π Ω ∪ G to generate the polygonal edges of Ω from the minimum equilateral triangulation of Ω (b) remove the vertices and edges from the resulting triangulation thatare not contained in the triangular lattice point-set of Ω (ii) the remaining flips in the minimum flip plan π Ω ∪ G make up the unique,minimum flip plan π G ( M T (Ω)) that generates the edges in G from theminimum triangulation of Ω . Furthermore, this flip plan yields the unique,minimum triangulation of Ω constrained by G .(iii) If the set of edges G contains a subset of constraints E , then these con-straints can be generated first and the remaining flips in the minimum flipplan π G ( M T (Ω)) make up the unique, minimum flip plan π G \ E ( M T (Ω , E )) that generates the edges in G \ E from the minimum triangulation of Ω constrained by E . Furthermore, this flip plan yields the minimum trian-gulation of Ω constrained by G .Proof. Refer to Figure 11. For (i), let Φ be the polygon underlying the minimumequilateral triangulation of Ω, which is unique by Lemma 9. The triangulationresulting from Step (a) is the unique, minimum triangulation of Φ constrainedby the polygonal edges of Ω, by Theorem 7 and the above lemma. The triangu-lation resulting from Step (b) is clearly a minimum triangulation of Ω with noconstraints. Any other such minimum triangulation of Ω yields another mini-mum triangulation of Φ constrained by the polygonal edges of Ω, by reversingStep (b). Thus, by Lemma 9 the triangulation resulting from Steps (a) and (b)is the unique, minimum triangulation of Ω with no constraints. Clearly, Steps(a) and (b) take time O ( | π Ω ( M ET (Ω)) | ).For (ii), observe that the flips remaining in the minimum flip plan π Ω ∪ G aftergenerating the polygonal edges of Ω from the minimum equilateral triangula-tion of Ω consist of Farey parallelograms that are contained in the triangularlattice point-set of Ω. Hence, these flips make up the unique, minimum flip plan π G ( M T (Ω)) that generates the set of edges G from the minimum triangulationof Ω.Next, modify Step (a) in the algorithm from (i) to perform all flips in theminimum flip plan π Ω ∪ G . By Theorem 7 and Lemma 9, the triangulation re-sulting from the modified Step (a) is the unique, minimum triangulation ofΦ constrained by the polygonal edges of Ω and G . Hence, performing Step (b)23ields a minimum triangulation of Ω constrained by G . Clearly the minimum flipplan π G ( M T (Ω)) yields this minimum triangulation. Similarly to the proof of(i), any other minimum triangulation triangulation of Ω constrained by G yieldsanother minimum triangulation of Φ constrained by the polygonal edges of Ωand G , by reversing Step (b). Thus, the minimum triangulation triangulationof Ω constrained by G is unique.For (iii), by Theorem 6, the partial order of the minimum flip plan π Ω ∪ G allows each edge to be generated independently of the other edges, via its mini-mum flip plan. The minimum flip plan π G ( M T (Ω)) is a subset of the minimumflip plan π Ω ∪ G that preserves this property. Hence, the constraints E can be gen-erated first. By (ii), the triangulation resulting from generating the constraints E first is the minimum triangulation of Ω constrained by E . Thus, the remain-ing flips in the minimum flip plan π G ( M T (Ω)) after generating the constraints E make up the unique, minimum flip plan π G \ E ( M T (Ω , E )). Finally, generat-ing the constraints E first does not change the triangulation resulting from theminimum flip plan π G ( M T (Ω)), so the minimum flip plan π G \ E ( M T (Ω , E ))yields the minimum triangulation of Ω constrained by G .We end this section with a corollary of Theorem 8 that states that thetriangulations in Definition 7 are unique. Corollary 4 (Unique Triangulations) . The triangulations of a polygon given inDefinition 7 are unique.Proof.
These are all minimum triangulations of the polygon with different setsof constraints, so they are unique by Theorem 8.
In this section, we show how to construct the unique, minimum flip plan betweenany two triangulations T and T (cid:48) of a polygon Ω constrained by a set of edges E .The key idea is that Theorem 8 gives the minimum flip plans from the minimaltriangulation of Ω constrained by E to the triangulations T and T (cid:48) respectively.The flips shared between these minimum flip plans form the minimum flip planthat yields the maximum common triangulation between the triangulations T and T (cid:48) . Combining the minimum flip plans between M CT ( T, T (cid:48) ) and the trian-gulations T and T (cid:48) yields the unique, minimum flip plan from T to T (cid:48) . However,we must take care to combine these minimum flip plans correctly.Algorithm Tri Flip Plan takes sets of edges G and G (cid:48) , representing the trian-gulations T and T (cid:48) of a polygon Ω constrained by a set of edges E respectively,as input and outputs a partially-ordered set of flips π ( T, T (cid:48) ). The algorithmperforms the following steps: 24. Apply Theorem 8 to obtain the minimum flip plans π G ( M T (Ω , E )) and π G (cid:48) ( M T (Ω , E )) that generate G and G (cid:48) from the minimum triangulationof Ω constrained by E respectively. The former minimum flip plan containsthe flips in π and π and the latter contains the flips π and π , fromFigure 5.2. Remove the flips π shared between these minimum flip plans to get thesets π and π respectively.3. Recall that an edge in the DAG of a flip plan is always pointing towardsa parent node. Reverse the direction of each edge in the DAG of π , sothat the highest level is now the lowest level and flips generate shorterdiagonals of Farey parallelograms. Denote this partial order as π − .4. Let π ,g (cid:48) denote the portion of the minimum flip plan for an edge g (cid:48) in G (cid:48) contained in the set π . We will insert the set π ,g (cid:48) into the set π − asfollows. For each edge g (cid:48) in G (cid:48) such that the set π ,g (cid:48) is not empty, considereach leaf Farey parallelogram P h , for an edge h , in the set π ,g (cid:48) . Find theFarey parallelograms in the DAG of π − such that their longer diagonalsintersect the edge h . Set these Farey parallelograms to be children of theFarey parallelogram P h . If no such intersecting edge exists, then the Fareyparallelogram P h remains a leaf Farey parallelogram in the set π − .The partial order resulting from these DAG insertions is the output, denotedby π ( T, T (cid:48) ). (a) (b) (c) Figure 12: (c) is the unique, minimum flip plan between the triangulations in(a) and (b). The red and green edges in (b) correspond to the red and greenFarey parallelograms P (1 , , (1 , in (c). For clarity, not all of the arrows betweenthe red leaf flips and their blue child flips are shown, but these are clear fromthe triangulations.Figure 12 shows the unique, minimum flip plan between a triangulationcontaining the edge (2 ,
3) at the point (0 ,
0) and a triangulation containing theedge (2 ,
1) at the point (1 , ,
1) at the point (1 , ,
2) at the point (1 ,
1) output by Algorithm Tri Flip Plan. The set π − fromStep 3 is shown in blue. The sets π , (1 , and π , (2 , are shown in green and redrespectively. The flip in the former set can be performed at any time, but theflips in the latter set must be performed after the maximal flips in the set π − .Note that the edge (1 ,
2) at the point (1 ,
1) is contained in both triangulations,so the flips in its the minimum flip plan are not contained in the the minimumflip plan between these triangulations.We now prove Theorem 1.
Proof of Theorem 1.
Refer to Figure 5. First, we show that any minimum flippath between the triangulations T and T (cid:48) of the polygon Ω constrained by E contains the flips in the partial order π ( T, T (cid:48) ) output by Algorithm Tri FlipPlan on input sets of edges G and G (cid:48) . Then, we demonstrate that this partialorder is a flip plan. Combining these statements shows that this partial orderis the unique, minimum flip plan between the Triangulations T and T (cid:48) . Finally,we will prove Complexity Statements 1 and 2.Step 1 of the algorithm yields the unique, minimum flip plans π G ( M T (Ω , E ))and π G (cid:48) ( M T (Ω , E )), by Theorem 8. The partial order of common flips π be-tween these minimum flip plans is itself a unique, minimum flip plan for a set ofedges. By definition, the triangulation resulting from this minimum flip plan isthe maximum common triangulation M CT ( T, T (cid:48) ). Hence, the sets of flips π and π in Step 2 of the algorithm are the unique, minimum flip plans betweenthe maximum common triangulation M CT ( T, T (cid:48) ) and the triangulations T and T (cid:48) respectively. Now consider the set π − resulting from Step 3 of the algorithm,which reverses the flips in the minimum flip plan π . Any minimum flip pathbetween the triangulations T and T (cid:48) can be partitioned into subsequences offlips that either generate or reverse the generation of edges. Since the maxi-mum common triangulation M CT ( T, T (cid:48) ) is unique, by Corollary 4, it sufficesto show that we can reorder the minimum flip path so that all of the degenerat-ing subsequences of flips are performed prior to the generating subsequences offlips. If this is true, then clearly the collections of degenerating and generatingsequences of flips are valid linear-orderings of the minimum flip plans π − and π respectively.Assume to the contrary that some degenerating subsequence of flips cannotbe performed prior to a generating subsequence of flips. Then, there must bea length-increasing flip s that must be performed prior to a length-decreasingflip w . In particular, we can choose the flips s and w such that there is noother pair of flips satisfying this condition between s and w in the minimumflip path. Hence, we can reorder the minimum flip path such that the flip s isperformed immediately prior to the flip w . Now, by Theorem 8, there is a unique,minimum flip plan that generates the edges contained in the triangulation U prior to the flip s from the minimum triangulation of Ω constrained by E .Denote this minimum flip plan by π ( U ). By Lemma 6, length-decreasing flipscan only be performed on maximal elements in minimum flip plans for edgesin triangulations. Hence, the flip w is not a maximal element in the minimumflip plan π ( U ). The length-increasing flip s generates an edge from U , so the26inimum flip plan π ( U ) is a subset of the minimum flip plan π ( U ), where U is the triangulation resulting from the flip s . The length-decreasing flip w must reverse the length-increasing flip s . However, clearly we can remove theflips s and w from the minimum flip path and obtain a flip path between thetriangulations T and T (cid:48) containing 2 fewer flips. This is a contradiction, so theflip w can be performed prior to the flip s .Next, we show that π ( T, T (cid:48) ) is a flip plan between the triangulations T and T (cid:48) . Consider an arbitrary valid linear-ordering of the partial order π ( T, T (cid:48) ).We show that this ordering is a flip path between the triangulations T and T (cid:48) by demonstrating that the first n flips in this ordering can be performed. Weproceed by induction on n . When n = 1, the first flip is contained in eitherthe set π − or the set π ,g (cid:48) , for some edge g (cid:48) in G (cid:48) . In the former case, the flipcan be performed in the triangulation T , since π − is the minimum flip planbetween T and the maximum common triangulation M CT ( T, T (cid:48) ). In the lattercase, the edge g generated by this flip does not intersect any longer diagonal of aFarey parallelogram in the set π − , by construction. Hence, there is a minimumflip plan that generates the edges in G ∪ g from the minimum triangulation ofΩ constrained by E , by Theorem 8. Futhermore, the edge g can be generatedlast. Thus, the base case holds. Assume the claim holds for n = k and we willshow that it holds for n = k + 1. By the inductive hypothesis, we can performthe first k flips of this ordering, which yield a triangulation represented by a setof edges H . The ( k + 1) th flip is the first flip in a valid linear-ordering of thepartial order output by Algorithm Tri Flip Plan on input edges H and G (cid:48) , sothe argument for the base case applies. Thus, the claim is proved by induction.Now, assume that some minimum flip path between the triangulations T and T (cid:48) that contains exactly the flips in the partial order π ( T, T (cid:48) ) is not a validlinear-ordering of this partial order. Then, either (i) some subsequence of thisminimum flip path is not a valid linear-ordering of the set π − or the set π ,g (cid:48) ,for some edge g (cid:48) in G (cid:48) , or (ii) some leaf flip in the set π ,g (cid:48) is performed beforeone of its child flips in the set π − . In case (i), some flip in this flip path cannotbe performed, by Theorem 8, which is a contradiction. In case (ii), the leaf flipintersects with the longer diagonal of some Farey parallelogram in the set π − .If this longer diagonal exists in the triangulation when the leaf flip is meantto be performed, then the leaf flip cannot be performed. Otherwise, after theleaf flip is performed, the flip in π − that yields the longer diagonal cannotbe performed. In either situation we get a contradiction. Thus, partial order π ( T, T (cid:48) ) is the unique, minimum flip plan between the triangulations T and T (cid:48) .Finally, for Complexity Statement 1, in order to obtain the minimum flipplans π − and π , we must first compute the minimum triangulation of Ω con-strained by E . The minimum triangulation of Ω can be computed in time O ( | π | ), by Theorem 8, and the minimum flip plan that generates the edgesin E from this triangulation can be found in time O ( | π | ). Next, we canobtain the minimum flip plans π G ( M T (Ω , E )) and π G (cid:48) ( M T (Ω , E )) in time O ( | π | + | π | + | π | ). Lastly, the flips in the set π can be reversed in time O ( | π | ), so putting it all together proves Complexity Statement 1. For Com-plexity Statement 2, Step 4 of the algorithm clearly uses at most this much27ime.When minimum flip plan π between two triangulations of a polygon Ω con-tains far more flips than the minimum flip plans for either the polygonal edges ofΩ or the edges contained in the maximum common triangulation, then Theorem1 shows that our algorithm runs in time polynomial in the minimum number offlips between these triangulations. Furthermore, the algorithm given by Caputoet al. [2] compares pairs of edges between the triangulations that pass throughthe same midpoint of the lattice point-set of Ω and collects the pairs of distinctedges (each midpoint is contained in exactly one edge [4]). When this set makesup a sufficiently small fraction of the total number of midpoints and the previ-ous conditions are met, our algorithm performs much faster. Situations like thisappear in material science, where cracks propagate in large sheets of crystallinematerials [16].Finally, we prove Theorem 2. Proof of Theorem 2.
For one direction, assume that triangulations U (cid:63) and V (cid:63) satisfy conditions (i) and (ii). By Theorem 1, the flips in the partial orders π and π in the theorem statement are exactly the flips in the minimum flip planbetween these triangulations. Note that the minimum flip plan between any twotriangulations U and V , containing sets of edges E and E (cid:48) respectively, mustcontain these flips, because they are defined by the edges in E and E (cid:48) and areindependent of the triangulation they are performed in.For the other direction, without loss of generality assume that π violateseither Condition (i) or Condition (ii). If this partial order contains a flip thatis not contained in the minimum flip plan for the edges in E , then this flip iscontained in the minimum flip plan π g for some edge g in G . The root flip π g must be contained in π . This flip can be reversed in U (cid:63) to yield a triangulation U containing the edges in E , by Theorem 8. The minimum flip plan between U and V (cid:63) contains 1 less flip than the minimum flip plan π ( U (cid:63) , V (cid:63) ). Next, assumethat π satisfies Condition (i), but some flip in π violates Condition (ii). If thisflip can be performed in the triangulation V (cid:63) , then this yields a triangulation V such that the minimum flip plan between U (cid:63) and V contains 1 less flip thanthe minimum flip plan π ( U (cid:63) , V (cid:63) ). Otherwise, this flip generates an edge thatintersects with an edge h in V (cid:63) . The edge h is generated by the minimum flipplan π g (cid:48) for some edge g (cid:48) in G (cid:48) , but not in E (cid:48) . This implies that the partialorder π violates Condition (i) and we get a similar situation as before. Thus,triangulations U (cid:63) and V (cid:63) do not attain the minimum in Equation 3.The proof of Theorem 2 gives a simple algorithm for finding pairs of triangu-lations satisfying the minimization in Equation 3. Given any two triangulations U and V , containing a set of edges E and E (cid:48) respectively, perform the flips inthe flip plan π ( U, V ) that maintain the sets of edges E and E (cid:48) in their respec-tive triangulations. This will eventually yield two triangulations such that theminimum flip plan between them satisfies the condition in Theorem 2.28 eferences [1] Oswin Aichholzer, Wolfgang Mulzer, and Alexander Pilz. Flip distancebetween triangulations of a simple polygon is np-complete. Discrete &computational geometry , 54(2):368–389, 2015.[2] Pietro Caputo, Fabio Martinelli, Alistair Sinclair, and Alexandre Stauf-fer. Random lattice triangulations: Structure and algorithms.
Ann. Appl.Probab. , 25(3):1650–1685, 6 2015.[3] Dimitrios I Dais. Resolving 3-dimensional toric singularities.
S´eminaires& Congr´es , 6:155–186, 2002.[4] Jes´us A De Loera, J¨org Rambau, and Francisco Santos.
TriangulationsStructures for algorithms and applications . Springer, 2010.[5] AK Dewdney. Wagner’s theorem for torus graphs.
Discrete Mathematics ,4(2):139–149, 1973.[6] Nira Dyn, Ifat Goren, and Shmuel Rippa. Transforming triangulationsin polygonal domains.
Computer Aided Geometric Design , 10(6):531–536,1993.[7] I Gelfand, M Kapranov, and Andrey V Zelevinsky. Discriminants, re-sultants and multidimensional determinants. reprint of the 1994 edition.modern birkh¨auser classics, 2008.[8] Volker Kaibel and G¨unter M Ziegler. Counting lattice triangulations.
Sur-veys in combinatorics , 307:277–307, 2003.[9] Johannes F Knauf, Benedikt Kr¨uger, and Klaus Mecke. Entropy of uni-modular lattice triangulations.
EPL (Europhysics Letters) , 109(4):40011,2015.[10] Charles L Lawson. Transforming triangulations.
Discrete mathematics ,3(4):365–372, 1972.[11] Atsuhiro Nakamoto and Katsuhiro Ota. Diagonal transformations of graphsand dehn twists of surfaces. journal of combinatorial theory, Series B ,70(2):292–300, 1997.[12] Seiya Negami. Diagonal flips in triangulations of surfaces.
Discrete Math-ematics , 135(1-3):225–232, 1994.[13] Seiya Negami, Shin Watanabe, et al. Diagonal transformations of triangu-lations on surfaces.
Tsukuba J. Math , 14:155–166, 1990.[14] Eliyahu Osherovich and Alfred M Bruckstein. All triangulations are reach-able via sequences of edge-flips: an elementary proof.
Computer AidedGeometric Design , 25(3):157–161, 2008.2915] Mr. J. Farey Sen. Lxxix. on a curious property of vulgar fractions.
ThePhilosophical Magazine , 47(217):385–386, 1816.[16] William Sims and Meera Sitharam. Flip paths, farey sequences, and ma-terial defects.
Pre-print , 2020.[17] O Ya Viro. Plane real algebraic curves: constructions with controlled topol-ogy.
Algebra i analiz , 1:1–73, 1989.[18] Klaus Wagner. Bemerkungen zum vierfarbenproblem.