A Proof of the Orbit Conjecture for Flipping Edge-Labelled Triangulations

Given a triangulation of a point set in the plane, a \emph{flip} deletes an edge $e$ whose removal leaves a convex quadrilateral, and replaces $e$ by the opposite diagonal of the quadrilateral. It is well known that any triangulation of a point set can be reconfigured to any other triangulation by some sequence of flips. We explore this question in the setting where each edge of a triangulation has a label, and a flip transfers the label of the removed edge to the new edge. It is not true that every labelled triangulation of a point set can be reconfigured to every other labelled triangulation via a sequence of flips. We characterize when this is possible by proving the \emph{Orbit Conjecture} of Bose, Lubiw, Pathak and Verdonschot which states that \emph{all} labels can be simultaneously mapped to their destination if and only if \emph{each} label individually can be mapped to its destination. Furthermore, we give a polynomial-time algorithm to find a sequence of flips to reconfigure one labelled triangulation to another, if such a sequence exists, and we prove an upper bound of $O(n^7)$ on the length of the flip sequence. Our proof uses the topological result that the sets of pairwise non-crossing edges on a planar point set form a simplicial complex that is homeomorphic to a high-dimensional ball (this follows from a result of Orden and Santos; we give a different proof based on a shelling argument). The dual cell complex of this simplicial ball, called the \emph{flip complex}, has the usual flip graph as its $1$-skeleton. We use properties of the $2$-skeleton of the flip complex to prove the Orbit Conjecture.


Introduction
The flip operation is fundamental to the study of triangulations of point sets in the plane. A flip removes one edge and replaces it by the opposite diagonal of the resulting quadrilateral, so long as that quadrilateral is convex. Lawson [19] proved the foundational result that any triangulation can be transformed into any other triangulation of the same point set via a sequence of flips. His second proof of this result [20] used the approach that is more widely known-showing that any triangulation can be flipped to the Delaunay triangulation, which then acts as a "hub" through which we can flip any triangulation to any other.
The result that any triangulation can be flipped to any other is captured succinctly by saying that the flip graph is connected, where the flip graph has a vertex for each triangulation of the given point set, and an edge when two triangulations differ by one flip. The special case of a point set in convex position has been very thoroughly studied. In this case triangulations correspond to binary trees, and a flip corresponds to a rotation. The flip graph in this case is the 1-skeleton of a polyhedron called the associahedron.
The use of flips to reconfigure triangulations is relevant to the study of associahedra [29] and mixing [23]. Flips are also important in practice for mesh generation and for finding triangulations that optimize certain quality measures [3,13]. The survey by Bose and Hurtado [6] discusses these and many other aspects of flips.
Despite the extensive work on flips, it is only recently that the question of where edges go under flip operations has been investigated. This can be formalized by attaching a label to each edge in a triangulation. Throughout, we fix a set P of n points in general position, and we identify triangulations with their edge sets (i.e., a triangulation of P is a maximal set T of pairwise non-crossing edges spanned by P ). A labelled triangulation T of P is a pair (T, ) where T is a triangulation of P and is a labelling function that maps the edges of T one-to-one onto the labels 1, 2, . . . , t P . Here t P is the number of edges in any triangulation of P . When we perform a flip operation on T , the label of the removed edge is transferred to the new edge.
We can now capture "where an edge goes" under flip operations. We say that edges e and f lie in the same orbit if we can attach label l to e in some triangulation and apply some sequence of flips to arrive at a triangulation in which edge f has label l. The orbits are exactly the connected components of a graph that Eppstein [14] called the quadrilateral graph-this graph has a vertex for every one of the possible n 2 edges formed by point set P , with e and f being adjacent if they cross and their four endpoints form a convex quadrilateral that is empty of other points. In particular, this implies that there is a polynomial-time algorithm to find the orbits. The orbits can be very different depending on P . For a point set in convex position, all the non-convex hull edges are in a single orbit [7], but at the other extreme, a point set with no empty convex pentagon has the property that in any triangulation, the edges are all in distinct orbits [14].
Orbits tell us where each individual edge label can go, but not how they combine. The main question we address in this paper is: when is there a sequence of flips to reconfigure one labelled triangulation of point set P to another labelled triangulation of P ? A necessary condition is that, for each label l, the edges with label l in the two triangulations must lie in the same orbit. Bose et al. [7] conjectured that this condition is also sufficient. As our main result we prove this "Orbit Conjecture," and strengthen it by providing a polynomial-time algorithm and a bound on the length of the flip sequence. of a point set, there is a flip sequence that transforms one into the other if and only if for every label l, the edges of T 1 and T 2 having label l belong to the same orbit. Furthermore, there is a polynomial-time algorithm that tests whether the condition is satisfied, and if it is, computes a flip sequence of length O(n 7 ) to transform T 1 to T 2 .
The orbit theorem is stated for triangulations T 1 and T 2 that may have different edge sets, but-since we know how to use flips to change the edge set-the crux of the matter is the special case where the two triangulations have the same edge set T but different label functions 1 and 2 . In other words, we are given a permutation of the edge labels of a triangulation, and we seek a flip sequence to realize the permutation. Furthermore, since every permutation is a composition of transpositions, we concentrate first on finding a flip sequence to transpose (or "swap") two labels. This idea of reducing the problem to the case of swaps appears in [7].
One insight to be gained from previous work is that empty convex pentagons in the point set seem to be crucial for swapping edge labels. Certainly, an empty convex pentagon provides a label swap- Figure 1 shows how the edge labels of two diagonals of an empty convex pentagon can be swapped by a sequence of five flips. In the other direction, the special cases of the orbit theorem that were proved by Bose et al. [7] for convex and spiral polygons involved moving pairs of labels into empty convex pentagons and swapping them there. Furthermore, Eppstein [14] showed that in a triangulation of a point set with no empty convex pentagons, no permutations of edge labels are possible via flips.
The foundation of our proof is to make this intuition about empty convex pentagons rigorous. In particular, we show that the only elementary operation that is needed for label permutation is to transpose two labels by moving them into an empty convex pentagon and swapping them there. More formally, given a labelled triangulation T = (T , ), an elementary swap of edges e and f in T is a transposition of the labels of e and f that is accomplished as follows: perform a sequence, σ, of flips on T to get to a triangulation T in which the labels (e) and (f ) are attached to the two diagonals of an empty convex pentagon; then perform the 5-flip sequence, π, that transposes these two labels; then perform the sequence σ −1 . We say that the sequence σπσ −1 realizes the elementary swap. Observe that the effect of σπσ −1 on T is to transpose the labels of e and f while leaving all other labels unchanged. We will prove that an elementary swap can always be realized by a flip sequence of length O(n 6 ), and furthermore, that such a sequence can be found in polynomial time.
One of our main results is the following, from which the Orbit Theorem can readily be derived: In a labelled triangulation T , two edges are in the same orbit if and only if there is an elementary swap between them.
In order to prove Theorem 2, we use the following key result: Theorem 3 (Elementary Swap Theorem). Given a labelled triangulation T , any permutation of the labels that can be realized by a sequence of flips can be realized by a sequence of elementary swaps.
This theorem is proved using topological properties of the flip complex, whose 1-skeleton is the flip graph. A result of Orden and Santos [25] can be used to show that the flip complex has the topology of a high-dimensional ball 1 . We give an alternate proof of this. We use the 2-skeleton of the flip complex, and show that its 2-cells correspond to cycles in the flip graph of two types: quadrilaterals, which do not permute labels; and pentagons, which correspond precisely to the 5-cycles of flips shown in Figure 1. Then we prove the Elementary Swap Theorem by translating it into a result about decomposing closed walks in the flip graph into simpler elementary walks.
Although there is a rich literature on associahedra and on cell complexes associated with triangulations of point sets, we are not aware of any previous combinatorial results on triangulations that require topological proofs, as our proof of the Orbit Theorem seems to.
We now briefly describe the rest of our method after the Elementary Swap Theorem is established. In order to prove Theorem 2, we need one more ingredient about the structure of elementary swaps: we will show that any sequence of elementary swaps that moves the label of edge e to edge f can be "completed" to get the label of f back to e, and that, in fact, the resulting sequence provides an elementary swap of e and f .
The high-level idea of our proof of Theorem 2 is then as follows: From our hypothesis that two edges e and f lie in the same orbit, we show that there is a sequence of flips that permutes the labels of triangulation T , taking the label of e to f . The Elementary Swap Theorem then gives us a sequence of elementary swaps to do the same (this is the significant step of the proof). Finally, from the structure of elementary swaps we can then find an elementary swap of e and f . Our paper is organized as follows. In Section 3 we prove the Elementary Swap Theorem using topological methods. In Section 4 we prove the properties of elementary swaps that were mentioned above. In top-down fashion, we begin in Section 2 by expanding on the high-level ideas, and proving the Orbit Theorem assuming the results in the later sections.

Background
The diameter of the flip graph of a point set gives the worst-case number of flips required to reconfigure one triangulation to another. For unlabelled triangulations, the diameter of the flip graph is known to be Θ(n 2 ), with the upper bound proved by Lawson [19] and the lower bound proved by Hurtado et al. [16]. For the special case of points in convex position, there is an exact bound of 2n − 10 [29,27]. The problem of finding the distance in the flip graph between two given triangulations of a point set is NP-hard [21], and even APX-hard [26]. It has recently been shown to be fixed-parameter tractable [18]. The problem remains NP-hard for triangulations of a polygon [1], but the complexity status is open for the case of points in convex position. For further results on flips, see the survey by Bose and Hurtado [6].
The labelled flip graph of a point set has a vertex for every labelled triangulation of the point set and an edge when two labelled triangulations differ by a flip. Bose et al. [7] formulated the Orbit Conjecture and proved it for the special case of triangulations of any convex polygon, showing that the labelled flip graph has a single connected component (ignoring convex hull edges, which cannot flip), and giving a tight bound of Θ(n log n) on its diameter. Araujo-Pardo et al. [2] independently proved the Orbit Conjecture for convex polygons, and introduced "colorful associahedra" which generalize associahedra to the setting of labelled (or coloured) triangulations. Bose et al. also proved the Orbit Conjecture for spiral polygons. In this case the labelled flip graph may be disconnected but each connected component has diameter O(n 2 ), which is a tight bound.
The best known lower bound on the diameter of a connected component of the labelled flip graph for a point set is Ω(n 3 ) [7]. There is a large gap between this lower bound and our upper bound of O(n 7 ).
The Orbit Theorem holds for combinatorial triangulations [7], and for pseudotriangulations [8]. In both these cases there is a single orbit, so the labelled flip graph is connected. There are also some related results using variants of the flip operation, for example, Cano et al. [9] reconfigured edge-labelled non-maximal plane graphs by "rotating" edges around one of their endpoints; again there is a single orbit. A related result where there are multiple orbits is an analogue of the Orbit Theorem for labelled (or "ordered") bases of a matroid-one labelled basis can be turned into another labelled basis via basis exchange steps if and only if elements with the same label lie in the same connected component of the matroid [22].
For more general problems of reconfiguring one structure to another via elementary steps, see [17,31].

Preliminaries and Definitions
Most definitions were given above, but we fill in a few missing details. Throughout, we assume a set of n point in general position in the plane. A point set determines n 2 edges which are the line segments between pairs of points. Two edges cross if they intersect in a point that is interior to at least one of the two edges. An empty convex k-gon is a subset of k points that forms a convex polygon with no point of P in its interior. A diagonal of a convex polygon is an edge joining two points that are not consecutive on the polygon boundary.
Several times in our proofs we will use the result that if two unlabelled triangulations of the same point set have a subset, S, of constrained edges in common, then there is a sequence of flips that transforms one triangulation into the other, without ever flipping any edge of S, i.e. the edges in S remain fixed throughout the flip sequence. This was first proved by Dyn et al. [12], and can alternatively be proved using constrained Delaunay triangulations [3].

Proof of the Orbit Theorem
In this section we prove the Orbit Theorem assuming the Elementary Swap Theorem (Theorem 3, proved in Section 3), and assuming the following two results on elementary swaps. The first result shows that every elementary swap can be realized by a relatively short flip sequence that can be found efficiently, and the second result gives us a way to combine elementary swaps so that, after moving e's label to f , we can get f 's label back to e. These lemmas will be proved in Section 4.

Lemma 4.
If there is an elementary swap between two edges in a triangulation T then there is a flip sequence of length O(n 6 ) to realize the elementary swap, and, furthermore, this sequence can be found in polynomial time. As we show in Section 4, a simple group-theoretic argument suffices to prove a weaker version of Lemma 5, namely, that under the stated assumptions, there is a sequence of elementary swaps exchanging the labels of e and f in T . Proving the stronger version, which we need for our bounds on the length of flip sequences, requires using the properties of elementary swaps.
We prove the Orbit Theorem in stages, first Theorem 2 (the case of swapping two labels in a triangulation), then the more general case of permuting edge labels in a triangulation, and finally the full result.
Proof of Theorem 2. The "if" direction is clear, so we address the "only if" direction. Suppose that T = (T, ) is the given edge-labelled triangulation and that e and f are edges of T that are in the same orbit. Then there is a sequence of flips that changes T to an edge-labelled triangulation T = (T , ) where T contains f and (f ) = (e). We now apply the result that any constrained triangulation of a point set can be flipped to any other. Fix edge f and flip T to T . Applying the same flip sequence to the labelled triangulation T yields an edge-labelling of triangulation T in which edge f has the label (e). Thus we have a sequence of flips that permutes the labels of T and moves the label of e to f . By the Elementary Swap Theorem (Theorem 3) there is a sequence of elementary swaps whose effect is to move the label of edge e to edge f . By Lemma 5 there is an elementary swap of e and f in T .
Theorem 6 (Edge Label Permutation Theorem). Let T be a triangulation of a point set with two edge-labellings 1 and 2 such that for each label l, the edge with label l in 1 and the edge with label l in 2 are in the same orbit. Then there is a sequence of O(n) elementary swaps to transform the first labelling to the second. Such a sequence can be realized via a sequence of O(n 7 ) flips, which can be found in polynomial time.
Proof. The idea is to effect the permutation as a sequence of swaps. If every edge has the same label in 1 and 2 we are done. So consider a label l that is attached to a different edge in 1 and in 2 . Suppose 1 (e) = l and 2 (f ) = l, with e = f . By hypothesis, e and f are in the same orbit. By Theorem 2 there is an elementary swap of e and f in (T, 1 ) which results in a new labelling 1 that matches 2 in one more edge (namely the edge f ) and still has the property that for every label l, the edge with label l in 1 and the edge with label l in 2 are in the same orbit. Thus we can continue this process until all edge labels match those of 2 . In total we use O(n) elementary swaps. These can be realized via a sequence of O(n 7 ) flips by Lemma 4. Furthermore, the sequence can be found in polynomial time.
We can now prove the Orbit Theorem.
Proof of Theorem 1. The necessity of the condition is clear, and we can test it in polynomial time by finding all the orbits, so we address sufficiency. The idea is to reconfigure T 1 to have the same underlying unlabelled triangulation as T 2 and then apply the previous theorem. The details are as follows. Let T 1 = (T 1 , 1 ) and T 2 = (T 2 , 2 ). There is a sequence σ of O(n 2 ) flips to reconfigure the unlabelled triangulation T 1 to T 2 , and σ can be found in polynomial time. Applying σ to the labelled triangulation T 1 yields a labelled triangulation T 3 = (T 2 , 3 ). Note that for every label l, the edges of T 1 and T 3 having label l belong to the same orbit. This is because flips preserve orbits (by definition of orbits). Thus by Theorem 6 there is a flip sequence τ that reconfigures T 3 to T 2 , and this flip sequence can be found in polynomial time and has length O(n 7 ). The concatenation of the two flip sequences, στ , reconfigures T 1 to T 2 , has length O(n 7 ), and can be found in polynomial time.

Proof of the Elementary Swap Theorem
As mentioned in the introduction, we prove the Elementary Swap Theorem using topological properties of the flip complex, whose 1-skeleton (i.e. vertices and edges) is the flip graph. In fact, we will only need the 2-cells of the flip complex, not any higher-dimensional structure. We will show that 2-cells of the flip complex correspond to 4-and 5-cycles in the flip graph.
The basic idea is as follows. We will translate the Elementary Swap Theorem to a statement about walks in the flip graph. The hypothesis of the Elementary Swap Theorem is that we have a sequence of flips that permutes the edge labels of a triangulation T . In the flip graph, this sequence corresponds to a closed walk w that starts and ends at triangulation T . Our main topological result is that the flip complex has a trivial fundamental group, which will imply that such a closed walk w can be decomposed into simpler elementary walks. Each elementary walk starts at T , traces a path in the flip graph, then traverses the edges of a 2-cell, then retraces the path back to T . The edge-label permutation induced by an elementary walk depends on the 2-cell. If the 2-cell is a 4-cycle, the permutation is the identity; and if the 2-cell is a 5-cycle, then the permutation is a transposition, and the elementary walk corresponds to an elementary swap. Altogether, this implies that the permutation induced by the closed walk w can be expressed as a composition of elementary swaps, which proves the Elementary Swap Theorem.
Before stating our main topological theorem, we first define the special cycles that will be shown to correspond to 2-cells of the flip complex. In the same way that an edge of the flip complex corresponds to two triangulations that differ on one edge, every 2-cell of the flip complex corresponds to a set of triangulations that differ on two edges. Define an elementary 4-cycle to be a cycle of the flip graph obtained in the following way. Take a triangulation T and two edges e, f ∈ T whose removal leaves two internally disjoint convex quadrilaterals in T . Each quadrilateral can be triangulated in two ways, which results in four Define an elementary 5-cycle to be a cycle of the flip graph obtained in the following way. Take a triangulation T and two edges e, f ∈ T whose removal leaves a convex pentagon in T . There are five triangulations that contain F := T \ {e, f }, and they form a 5-cycle in the flip graph, as shown in Figure 2(b). Observe that the sequence of flips around such a cycle permutes labels of e and f as shown in Figure 1.
As a side remark, note that it can be shown that, in fact, any cycle in the flip graph of length less than 6 is an elementary 4-or 5-cycle. However, we will not need this in what follows.
Our main topological theorem is the following.
Theorem 7. Let P be a set of n points in general position in the plane. There is a high-dimensional cell complex X = X(P), which we call the flip complex, such that: 1. The 1-skeleton of X is the flip graph of P ; 2. There is a one-to-one correspondence between the 2-cells of X and the elementary 4-cycles and elementary 5-cycles of the flip graph of P ; 3. X has the topology of (i.e., is homotopy equivalent to) a high-dimensional ball; therefore its fundamental group, π 1 (X), is trivial.
In what follows, we will use a number of notions from combinatorial topology; some of these we will recall along the way, but others we will only describe informally or leave undefined and instead refer the reader to standard textbooks for further background (in particular, we refer the reader to [5,Appendix 4.7] and [15] for background on regular cell complexes, shellability, and piecewise linear balls and spheres, to [30] for background on the fundamental group of cell complexes, and to [15,24] for background on dual complexes; we will provide more detailed references for specific results below).
Theorem 7 follows from a result of Orden and Santos [25]; we are grateful to F. Santos for bringing this reference to our attention. In fact, Orden and Santos show something stronger: There exists a simple polytope Y = Y(P) and a face F of Y such that X can be taken to be the complement of the star of F in Y.
Before becoming aware of the work of Orden and Santos, we found a different proof of Theorem 7 that starts out by considering the simplicial complex T = T(P) whose faces are the sets of pairwise non-crossing edges (line segments) spanned by P . This complex T is shown to be a shellable simplicial ball (by an argument based on constrained Delaunay triangulations), and X is then constructed as the dual complex of T. We hope that this alternative proof of Theorem 7 is of some independent interest and present it in Sections 3.2 and 3.3 below. Before that, in Section 3.1, we show how to derive the Elementary Swap Theorem from Theorem 7.

From Topology to the Elementary Swap Theorem
In this section we use Theorem 7 to prove the Elementary Swap Theorem. We begin by defining elementary walks. A walk in the flip graph is a sequence T 0 , T 1 , . . . , T k of triangulations (possibly with repetitions) such that T i−1 and T i differ by a flip. We will refer to T 0 and T k as the start and the end of the walk, respectively. A walk is closed if it starts and ends at the same triangulation. If w 1 and w 2 are walks such that the end of w 1 equals the start of w 2 then we can define their composition w 1 w 2 in the obvious way. Furthermore, if w = (T = T 0 , T 1 , . . . , T k ) is a walk, we will use the notation w −1 = (T k , T k−1 , . . . , T 0 ) for the inverse walk.
Fix a triangulation T 0 . An elementary quadrilateral walk is a closed walk of the form wzw −1 , where z is an elementary 4-cycle in the flip graph, and w is a walk from T 0 to some triangulation on z. An elementary pentagonal walk is defined analogously, with z an elementary 5-cycle.
It is straightforward to check the effect of these elementary walks on labellings: Lemma 8. Let (T 0 , ) be a labelled triangulation. An elementary quadrilateral walk does not permute the labels. An elementary pentagonal walk swaps the labels of two edges (e and f in Figure 2(b)) and leaves all other labels fixed; this corresponds exactly to the notion of an elementary swap introduced earlier.
Another operation that does not affect the permutation of labels induced by a closed walk is the following. A spur ww −1 starting and ending at T is an arbitrary walk w starting at T , immediately followed by the inverse walk. If w 1 and w 2 are walks in the flip graph such that w 1 ends at a triangulation T and w 2 starts there, and if s is a spur at T , then we say that the walk w 1 sw 2 differs from w 1 w 2 by a spur insertion The inverse operation is called a spur deletion. Lemma 9. If two closed walks w and w in the flip graph differ only by a finite number of spur insertions and deletions then they yield the same permutation of edge labels.
Proof. A flip immediately followed by its inverse flip has no effect on labels. The lemma follows by induction on the length of a spur and the number of spur insertions and deletions.
By Lemmas 8 and 9, the Elementary Swap Theorem directly reduces to the following, which we prove using Theorem 7: Proposition 10. Let w be a closed walk in the flip graph starting and ending at T 0 . Then, up to a finite number of spur insertions and deletions, w can be written as the composition of finitely many elementary walks.
Proof. We use the well-known fact that the fundamental group of a cell complex can be defined combinatorially in terms of closed walks in the 1-skeleton and this definition is equivalent to the usual topological definition in terms of continuous loops, see [28,Chap. 7] or [30,Chap. 4]. In particular, in a cell complex with trivial fundamental group any two closed walks in the 1-skeleton starting at the same vertex are related by a finite number of spur insertions, deletions and so-called 2-cell relations.
We describe the combinatorial definition of the fundamental group of the flip complex X in detail. By Theorem 7, the 1-skeleton of X is the flip graph of P .
Fix a base triangulation T 0 , and, for every triangulation T , fix a walk p T from T 0 to T . Given two triangulations T 1 , T 2 that differ by a flip, we form the closed walk w T1,T2 in the flip graph, called a generating walk, that goes from T 0 to T 1 along p T1 , then flips to T 2 , and then returns to T 0 along p −1 T2 . It is easy to see that, up to a finite number of spur insertions and deletions, every closed walk starting and ending at T 0 can be written as a composition of generating walks.
We say that walks w and w are 2-cell related if we can express them as w = w 1 w 2 and w = w 1 zw 2 , where z is a closed walk traversing the boundary of a 2-cell (an elementary cycle) exactly once in either orientation. Notice that w 1 w 2 and w 1 zz −1 w 2 differ only by the spur zz −1 , hence, up to spur insertion and deletion, being 2-cell related is symmetric.
Also, notice the precomposition property: if w and w are 2-cell related as above and if w is precomposed with the closed walk w 1 zw −1 1 then the result w = (w 1 zw −1 1 )w = w 1 z(w −1 1 w 1 )w 2 differs from w only by the spur w −1 1 w 1 . By Theorem 7, a boundary of a 2-cell is an elementary 4-or 5-cycle and so the walk w 1 zw −1 1 above is an elementary walk. Two walks in the flip graph are called equivalent if they differ by a finite number of spur insertion and/or deletions and by applying a finite number of 2-cell relations. It is not hard to check that this defines an equivalence relation, and the fundamental group π 1 (X) is given as the set of equivalence classes of closed walks starting and ending at T 0 . By Theorem 7, the fundamental group of the flip complex X is trivial. This translates into the fact that every closed walk starting and ending at T 0 is equivalent to the trivial walk. By the precomposition property, this means that, up to a finite number of spur insertions and deletions, every closed walk is a composition of finitely many elementary walks.

The Simplicial Complex of Plane Graphs
In this section and the following one, we give a proof of Theorem 7. This section is about the simplicial complex T = T(P) whose faces are the sets of pairwise non-crossing edges (line segments) spanned by P .
Let P be a set of n points in general position in the plane. Let E be the set of edges (closed line segments) spanned by P . Two edges e, f ∈ E are said to be non-crossing if they are disjoint or if they intersect in a single point of P that is an endpoint of both edges. We say that a subset F ⊆ E is non-crossing if every pair of distinct edges e, f ∈ F is non-crossing. If G is non-crossing and F ⊆ G then F is non-crossing as well. Thus, the non-crossing sets of edges form an abstract simplicial complex which we call the complex of plane graphs on P . We collect some basic properties of T: triangulations. In the latter case, F corresponds to a flip between these two triangulations.
We will show that the topology of T is particularly simple, namely that T is a homeomorphic to an (m − 1)-dimensional ball. Furthermore, there is a combinatorial certificate (shellability) for this homeomorphism. This implies that the homeomorphism is particularly nice and that T is a piecewise-linear ball.
We refer to [15] and [5,Appendix 4.7] for more details and further references on shellability and piecewise-linear balls, spheres, and manifolds. In this extended abstract, we will leave the notion of piecewise-linearity undefined-the only property that we will need is that it ensures that the construction of the dual cell complex T * (see Proposition 14 below) is well-behaved.
We recall that a pure d-dimensional simplicial complex is shellable if there exists a total ordering of its facets F 1 , F 2 , · · · , F N (called a shelling order ) such that, for every 2 ≤ j ≤ N , the intersection of F j with the simplicial complex generated by the preceding facets 2 is pure of dimension d − 1.
We will need the following result (which appears implicitly in [4], and explicitly in [10]; see [5,Prop. 4.7.22] for a short proof): Proposition 11. Suppose K is a finite d-dimensional simplicial complex that is a pseudomanifold, i.e., K is pure and every (d − 1)-dimensional face of K is contained in at most two d-faces. If K is shellable then K is either a piecewiselinear ball or a piecewise-linear sphere. The former case occurs iff there is at least one (d − 1)-dimensional face that is contained in only one d-face of K. 3 Theorem 12. T is shellable, and hence a piecewise-linear (m − 1)-dimensional ball.
Proof. We observed earlier that T is a pure (m − 1)-dimensional simplicial complex, and that every (m − 2)-dimensional face of T is contained in at most two (m − 1)-dimensional faces, hence T is a pseudomanifold. Moreover, if T is a triangulation of P and if e ∈ T is a non-flippable edge (e.g., if e is a convex hull edge) then F := T \ {e} is an (m − 2)-dimensional face of T that is contained in a unique (m − 1)-face, namely T .
Thus, by Proposition 11, it suffices to show that T is shellable, i.e., to exhibit a shelling order for the facets of T.
With every triangulation T of P , we associate the sorted vector of angles α(T ) = (α 1 (T ), α 2 (T ), · · · , α 3t (T )), where α 1 (T ) ≤ α 2 (T ) ≤ · · · ≤ α 3t (T ) are the angles occurring in the triangulation T . We order the triangulations of P by sorting the corresponding angle vectors α(T ) lexicographically from largest to smallest; if the point set is in general position, this defines a total ordering where N is the number of triangulations of P . It is well known (see, for example, [11,Chap. 3.4]) that in this ordering, T 1 is the Delaunay triangulation of P . Moreover, if we consider only triangulations containing a particular plane subgraph corresponding to a face F of T and the corresponding subsequence of the angle vectors, the first of these vectors corresponds to the Delaunay triangulation constrained to F .
We claim that the triangulation ordering (1) defines a shelling. For this, we need to prove that the following holds for 2 ≤ j ≤ N : If F is a face of T that is contained in T j ∩ T i for some i < j, then there exists an (m − 2)-dimensional face G of T j and some i < j such that F ⊆ G = T i ∩ T j . To see this, consider the subsequence T k1 , T k2 , . . . of the sequence (1) consisting only of those triangulations that contain the edge set F . Then T k1 is the constrained Delaunay triangulation with respect to the edge set F , and T i and T j both appear in that subsequence; in particular, T j = T k1 since T i precedes it. Since every triangulation containing F can be transformed to the constrained Delaunay triangulation T k1 , (see, e.g., the description of the Lawson flip algorithm in [11]) there must exist an edge e ∈ T j \ T k1 such that flipping e (a Lawson flip) increases the angle vector; thus, the triangulation resulting from flipping e is some T k with k < j and satisfies F ⊆ T k ∩ T j as desired. Proof. Note that a polygon is non-convex iff it has a reflex vertex. More generally, a bounded region in the complement of the plane graph (P, F ) is non-convex iff there is an interior point p of P and a half-plane H through p with no edge of F from p to a point interior to H-in this case we say that p "has no edge in a half-plane". The statement of the proposition is then equivalent to the following: F is a boundary face if and only if F misses a convex hull edge or there is an interior point p of P with no edge in a half-plane. We prove this statement.
For the forward direction, suppose that F is a boundary face. Then there is a triangulation T , F ⊆ T , and an edge e ∈ T − F such that e is not flippable in T . If e is a convex hull edge, then F does not contain all convex hull edges. Otherwise e is a diagonal of a non-convex quadrilateral in T . Set p to be the reflex vertex of the non-convex quadrilateral and H to contain the other end of e but not the two other vertices of the quadrilateral. Then p has no edge in half-plane H.
For the other direction, first note that if F misses a convex hull edge then F is a boundary face. For the other case, suppose there is a non-convex hull point p of P that has no edge in half-plane H. Augment F to a maximal set F of non-crossing edges without using any edge from p into H. This will not yet be a triangulation (because in a triangulation p is surrounded by triangles and they have angles bounded by π). Now augment further to a triangulation T . Then T − F contains some edge e incident to p, and e is not flippable otherwise we could have further augmented F . Thus F is a boundary face.

The Dual Flip Complex X
To define the flip complex X, we need the notion of dual cells and the dual cell decomposition of a piecewise-linear ball; for the precise definition, we refer to [15,Sec. I.6] or [24, §64 and §70]. 4 Here, we simply collect the properties that we will need: 2. The construction reverses inclusion, i.e., for interior faces F , G of B, 3. The dual cells of the interior faces of B form a regular cell complex, denoted B * and called the dual cell complex. B * need not be a manifold or pure d-dimensional, but it is homotopy equivalent to B [24,Lem. 70.1]. 5 We define the flip complex X := T * as the dual complex of the simplicial complex T. Proof of Theorem 7. By Proposition 14, X = T * is a regular cell complex that is homotopy equivalent to the ball T; consequently, the fundamental group π 1 (X) vanishes.
It remains to show the characterization of the vertices, edges, and 2-cells of

X.
The vertices of X correspond (are dual) to the faces of T of the highest dimension (m−1) = dim T, i.e., to the triangulations of P (these are automatically interior faces of T).
The edges of X correspond to interior (m − 2)-dimensional faces F of T, i.e., faces F that are contained in two triangulations T and T that differ by a flip.
Thus, the 1-skeleton of X is exactly the flip graph of P .

Proofs of Properties of Elementary Swaps
In this section we prove Lemmas 4 and 5.
To prove Lemma 4, the idea is to look at paths in the double quadrilateral graph G D that we will define below. Informally speaking, G D captures where pairs of non-crossing edges can go via flips, similar to the way the quadrilateral graph captures where a single edge can go via flips. We will show that there is an elementary swap between two labels in a triangulation if and only if there exists a path of certain type in the double quadrilateral graph.
Proof of Lemma 4. Construct a graph G D called the double quadrilateral graph. Vertices of the graph G D are pairs of non-crossing edges on the point set P , and we define two vertices (e 1 , f 1 ) and (e 2 , f 2 ) of G D to be adjacent if either e 1 = e 2 and f 1 and f 2 are adjacent in the quadrilateral graph, or if f 1 = f 2 and e 1 and e 2 are adjacent in the quadrilateral graph. (Recall that two edges a and b are adjacent in the quadrilateral graph if a and b cross and their four endpoints form an empty quadrilateral.) In the graph G D we identify some vertices as "swap vertices". These are the vertices (g, h) such that g and h are diagonals of some empty convex pentagon in the point set. Note that the swap vertices can be identified in polynomial time.
We claim that there is an elementary swap of e and f in labelled triangulation T = (T , ) if and only if there is a path in G D from vertex (e, f ) to a swap vertex. For the forward direction, suppose there is such an elementary swap. It begins with a sequence σ of flips from T to a labelled triangulation T in which labels (e) and (f ) are attached to two diagonals g and h of some empty convex pentagon. The subsequence of σ consisting of those flips that apply to an edge whose current label is (e) or (f ) corresponds to a path in G D from (e, f ) to the swap vertex (g, h).
For the other direction, let π be a path in G D from (e, f ) to a swap vertex. It suffices to show that the path π provides a sequence of flips, σ, that takes T to some labelled triangulation T in which labels (e) and (f ) are attached to two diagonals of an empty convex pentagon, because the rest of the elementary swap is then determined. Consider the first edge of π and suppose without loss of generality that it goes from (e, f ) to (e, f ) (the case when e changes is similar). Then e and f are non-crossing. Because f and f are adjacent in the quadrilateral graph, they cross and form an empty convex quadrilateral Q. Note that e does not intersect the interior of Q, since Q is empty and e does not cross f or f . We apply the result that any constrained triangulation can be flipped to any other with O(n 2 ) flips. Fix edges e and f in T and flip T to a labelled triangulation that contains the edges of Q. In this triangulation, we can flip f to f , transferring (f ) to f . We continue in this way to realize each edge of π via O(n 2 ) flips, arriving finally at a labelled triangulation in which labels (e) and (f ) are attached to edges that are the diagonals of some empty convex pentagon in the point set. Fixing the two diagonals, we can flip to a triangulation that contains the edges of the convex pentagon, and at this point we are done.
Because the graph G D has O(n 4 ) vertices, the diameter of any of its connected components is O(n 4 ). Thus, if there is an elementary swap that exchanges the labels of edges e and f , then there is one corresponding to a path in G D of length O(n 4 ). We can explicitly construct G D and find such a path in polynomial time. As argued above, every edge of G D can be realized by O(n 2 ) flips. This proves that, for any elementary swap, we can construct a sequence of O(n 6 ) flips to realize it, and the construction takes polynomial time.
As mentioned in Section 2, there is a group-theoretic argument proving a weaker version of Lemma 5. The argument depends on the following claim: If a permutation group is generated by transpositions and contains a permutation that maps element e to f then the group contains the transposition of e and f . To prove this claim, notice that if the group contains transpositions (ab) and (bc), then it also contains transposition (ac) = (ab)(bc)(ab); and apply induction.
To apply this claim in our situation, observe that by the Elementary Swap Theorem, all label permutations achievable by flips in a triangulation T are compositions of elementary swaps, hence, these label permutations indeed form a group G generated by transpositions. Moreover, by the assumption of Lemma 5, G contains a permutation taking the label of edge e to edge f . Hence, by the above claim, the group G also contains a permutation, which is a composition of elementary swaps, whose effect is to transpose labels of edges e and f . In order to prove the full result of Lemma 5, i.e., that the label transposition of e and f can be done with a single elementary swap, we combine the techniques used in the proof of the group theory claim above with the structure of elementary swaps.
Proof of Lemma 5. An elementary swap in triangulation T acts on two edges of T . We define a graph G S called the elementary swap graph of T . G S has a vertex for every edge of T , and we define vertices e and f to be adjacent in G S if there is an elementary swap of e and f in T .
By hypothesis, there is a sequence of elementary swaps that takes the label of edge e to edge f . Observe that no sequence of elementary swaps will take the label of edge e outside the connected component of G S that contains e. Therefore e and f must lie in the same connected component of G S . We will now show that each connected component of G S is a clique. This implies that there is an elementary swap of e and f , and completes our proof.
Consider a simple path (e 0 , e 1 ), (e 1 , e 2 ), . . . , (e k−1 , e k ) in G S . Let σ i , i = 1, . . . , k be a flip sequence that realizes the elementary swap (e i−1 , e i ), and let σ = σ 1 σ 2 . . . σ k−1 . Observe that σ takes the label of e 0 to e k−1 , and does not change the label of e k (by the assumption that the path is simple). By definition of an elementary swap, the flip sequence σ k has the form ρπρ −1 where ρ is a sequence of flips that moves the labels of e k−1 and e k into an empty convex pentagon, and π is the sequence of five flips that exchanges the labels of e k−1 and e k .
Consider the flip sequence σσ k σ −1 = σρπρ −1 σ −1 = σρπ(σρ) −1 . The first part of this flip sequence, σρ, moves the labels of e 0 and e k into an empty convex pentagon; the middle part, π, exchanges them; and the final part, (σρ) −1 reverses the first part. Therefore this flip sequence realizes an elementary swap of e 0 and e k .

Conclusions
We have characterized when two labelled triangulations of a set of n points belong to the same connected component of the labelled flip graph, and proved that the diameter of each connected component is bounded by O(n 7 ). We conclude with some open problems: 4. What is the complexity of the following flip distance problem for labelled triangulations: Given two labelled triangulations and a number k, is there a flip sequence of length at most k to transform the first triangulation to the second one? This problem is NP-complete in the unlabelled setting, but knowing the mapping of edges might make the problem easier.