Flip Distance of Non-Crossing Spanning Trees:
NP-Hardness and Improved Bounds
Abstract
We consider the problem of reconfiguring non-crossing spanning trees on point sets. For a set of points in general position in the plane, the flip graph has a vertex for each non-crossing spanning tree on and an edge between any two spanning trees that can be transformed into each other by the exchange of a single edge (coined a flip). This flip graph has been intensively studied, lately with an emphasis on determining its diameter for sets of points in convex position. For this case, the current best bounds are , obtained in a recent breakthrough work [Bjerkevik, Kleist, Ueckerdt, and Vogtenhuber; SODA 2025]. The crucial tool for both the upper and lower bound are so-called conflict graphs, which the authors stated might be the key ingredient for determining the diameter (up to lower-order terms).
In this paper, we pick up the concept of conflict graphs from the above-mentioned work and show that this tool is even more versatile than previously hoped. As our first main result, we use conflict graphs to show that computing the flip distance between two non-crossing spanning trees is -hard, even for point sets in convex position. Interestingly, the result still holds for more constrained flip operations, concretely, compatible flips (where the removed and the added edge do not cross) and rotations (where the removed and the added edge share an endpoint).
Additionally, we present new insights on the diameter of the flip graph, by this directly extending the line of research from [BKUV SODA25]. Their lower bound is based on a constant-size pair of trees, one of which is of a type we refer to as stacked. We show that if one of the trees is stacked, then the lower bound is indeed optimal up to a constant term, that is, there exists a flip sequence of length at most to any other tree.
Lastly, we improve the lower bound on the diameter of the flip graph for points in convex position to .
Keywords and phrases:
Non-crossing, spanning tree, plane graph, flip graph, reconfiguration, diameter, complexity, -hard, edge exchange, compatible flip, rotation, happy edge propertyFunding:
Joseph Dorfer: Austrian Science Fund (FWF) 10.55776/DOC183.Copyright and License:
Birgit Vogtenhuber; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Mathematics of computing Discrete mathematics ; Mathematics of computing Combinatorics ; Mathematics of computing Combinatoric problemsEditors:
Hee-Kap Ahn, Michael Hoffmann, and Amir NayyeriSeries and Publisher:
Leibniz International Proceedings in Informatics, Schloss Dagstuhl – Leibniz-Zentrum für Informatik
1 Introduction
Non-crossing configurations such as triangulations, spanning trees, matchings, or polygonizations on planar point sets are fundamental structures in computational geometry, with wide applications. In dynamic environments or interactive settings, it is often necessary to transform one configuration into another through a sequence of local modifications, while ensuring that the non-crossing property is preserved at every step and that the intermediate configurations are of the same type. This process, known as (discrete) reconfiguration, raises natural algorithmic questions: Given two non-crossing configurations, is it possible to convert one into the other using only basic operations? If so, it is of interest to bound the length of a shortest reconfiguration sequence between any two configurations, to compute the length of an optimal sequence between two given configurations, and to efficiently determine a short(est) sequence.
These questions can be nicely rephrased in terms of a so-called flip graph. The flip graph of a discrete reconfiguration problem has a vertex for each configuration and an edge between any two configurations that can be transformed into one another by a single basic discrete operation, called a flip. In terms of the flip graph, the above-mentioned three questions then read as follows: Is the flip graph connected? What is the diameter of the flip graph? Can a shortest path (flip sequence) between two vertices of the flip graph be computed efficiently?
For many types of geometric graphs, the most classical flip operation is the exchange of one edge with another edge, see also Figure 1. For instance, it is known that the flip graph of triangulations on a set of points in the plane in convex position [31] and has diameter exactly [36, 35]. For decades, it has been a tantalizing and important open problem in theoretical computer science whether a shortest flip sequence between two triangulations of a convex point set can be computed in polynomial time. This problem is equivalent to the complexity of computing the rotation distance between two rooted binary trees.
In this work, we consider flips between non-crossing geometric spanning trees. Let denote a set of points in the plane in general position, that is, no three points of are collinear. A non-crossing spanning tree on is a spanning tree that has as its vertex set and whose edges are pairwise non-crossing straight-line segments. A flip in a non-crossing spanning tree on is the exchange of one edge of by a different one such that the resulting graph is again a non-crossing spanning tree on ; see Figure 1 for an example. The according flip graph has a vertex for each non-crossing spanning tree on and an edge between any two trees whenever they can be transformed into each other by a single edge flip. For two trees and on , we denote their flip distance, the length of a shortest path between and in , by .
In 1996, Avis and Fukuda [10] showed in their famous reverse search paper that is connected for any -point set in general position, and that its radius is bounded from above by , implying . In 1999, Hernando, Hurtado, Márquez, Mora, and Noy [25] showed that for convex -point sets , it holds that . Since then, the flip graph of non-crossing geometric spanning trees on point sets in convex position has been subject of intensive study; see the discussion in Section 1.1 below for some details. For a long time, it was conjectured that the true value for its diameter should be for some constant . Very recently, Bjerkevik, Kleist, Ueckerdt, and Vogtenhuber [13] refuted this conjecture by obtaining the currently best known bounds of for the diameter of the flip graph on non-crossing spanning trees on point sets in convex position. The crucial tool for both the upper and lower bound are so-called conflict graphs, which the authors introduced and stated might be the key ingredient for determining the diameter of the flip graph of spanning trees for point sets in convex position (up to lower-order terms). Their lower bound is based on a constant-size example containing a tree belonging to a family of trees that we call stacked.
In this work, we pick up the concept of conflict graphs from [13] and show that this tool is even more versatile than previously hoped. We prove that the flip distance between two trees can be as high as , by this directly extending the line of research from [13].
Theorem 1.
For any set of points in convex position, the flip graph of non-crossing spanning trees on has diameter at least .
We further show that if one of the trees is stacked, then the lower bound from [13] is indeed the best possible. In other words, whenever one of the trees is stacked, then there exists a flip sequence of length at most to any other tree.
Theorem 2.
Let , be non-crossing trees on points in convex position. If is a stacked tree, then .
Moreover, we use conflict graphs beyond the expectations of [13], showing that they can also be used to prove that computing the flip distance between two non-crossing spanning trees is -hard, even for point sets in convex position.
Theorem 3.
Given two non-crossing spanning trees on a point set and an integer , the decision problem of whether there exists a flip sequence of length at most between and is -complete, even for point sets in convex position.
Interestingly, this result still holds for more constrained flip operations, concretely, compatible flips (where the removed and the added edge do not cross) and rotations (where the removed and the added edge share an endpoint). In Figure 1, while the first flip is just an edge exchange, the second flip a compatible flip, and the third flip is a rotation.
Theorem 4.
Given two non-crossing spanning trees on a point set and an integer , the decision problem of whether there exists a compatible flip sequence / a rotation sequence of length at most between and is -complete, even for point sets in convex position.
We point out that the latter two statements constitute the first hardness results for flip graphs on point sets in convex position. Moreover, Theorem 4 refutes the long-held belief that the flip distance can be computed in polynomial time when the so-called happy edge property holds, because that property holds for compatible flips of non-crossing spanning trees on convex point sets. See Section 1.1 for more background and Table 1 for an overview of complexity status for various flip graphs of non-crossing structures on point sets.
| setting | flip type | convex position | general position |
|---|---|---|---|
| triangulations | edge exchange | -hard? [20]111In a very recent arXiv preprint, Dorfer [20] announced that computing the flip distance between triangulations of convex point sets is NP-complete. This (potential since not yet reviewed) result was inspired by and initiated after the submission of the work at hand, and uses similar techniques: Introducing a notion of conflict graphs, showing that the flip distance is closely tied to the size of a largest acyclic subset, and proving -hardness of computing the largest acyclic subset. | -hard [32, 34] |
| non-crossing spanning trees | edge exchange | -hard [*] | -hard [*] |
| compatible | -hard [*] | -hard [*] | |
| rotation | -hard [*] | -hard [*] | |
| slide | open | open | |
| non-crossing spanning paths | edge exchange | in [4] | open |
| non-crossing perfect matchings | edge exchange | in [26] | -hard [11] |
| non-crossing odd matchings | edge exchange | open | -hard [3] |
Outline.
We discuss further related work in Section 1.1 and introduce the central concepts from [13] that are required for our work in Section 2. In Section 3, we prove -completeness for deciding the length of a shortest (general, compatible, or rotational) flip sequence between two spanning trees on a convex point set. In Section 4, we show that the flip distance between two trees on a convex -point set is at most if one of them is stacked. In Section 5, we improve the lower bound on the diameter of the tree flip graph for points in convex position to . We conclude with a summary and open problems in Section 6. Full details and proofs of all statements marked by can be found in the arXiv version of our paper [12].
1.1 Related work
We review the related work in two aspects, concerning the connectedness and diameter bounds on the one hand, and the computational complexity of computing a shortest flip sequence on the other hand.
Connectedness and Diameter.
For triangulations, connectedness of the flip graph for point sets was shown by Lawson [31] and for simple polygons by Hurtado, Noy, and Urrutia [28]. In both cases, the diameter of the flip graph is in . Hurtado, Noy, and Urrutia [28] provided a matching lower bound of for both settings. For triangulations of convex point sets, Sleator, Tarjan, and Thurston [36] showed that the diameter of the flip graph is at most , which is tight for as proven by Pournin [35]. There are many more results on flips in triangulations; see for example [22, 21, 24, 23, 27, 39, 38, 37].
For non-crossing spanning trees of point sets in general position, Avis and Fukuda [10] showed that the flip graph is connected for flips, compatible flips, and rotations, and has a diameter at most . Nichols, Pilz, Tóth, and Zehmakan [33] gave an upper bound on the diameter of for empty triangle rotations. Aicholzer, Aurenhammer, and Hurtado [1] proved that the flip graph is connected for edge slides (where the source and the target edge together with some other edge of the tree form an empty triangle). They also provided an exponential upper bound on the diameter, which was later improved to by Aichholzer and Reinhart [8]. For point sets in convex position, determining the exact diameter of the flip graph has gained considerable attention in the last couple of years. Starting from the benchmark upper bound of [10] and the conjectured to be essentially tight lower bound of [25], the upper bound was subsequently improved to [2] and [16]. The leading constant factor of was broken by Bousquet, de Meyer, Pierron, and Wesolek [15], who improved the upper bound to . The latest advancement before the work at hand is due to the recent work [13], which improved the upper bound to and the lower bound to . We note that the lower bound of is not only the best bound for points in general position, but also holds for restricted flip types. When restricting the flips to compatible flips or rotations in the convex setting, the best standing upper bounds on the diameter of the flip graphs of spanning trees are and , respectively, due to Aichholzer, Dorfer, and Vogtenhuber [5].
For plane spanning paths, connectedness of the flip graph is an interesting open problem. So far, the flip graph has been shown to be connected for convex point sets [9] (with diameter for [18]), wheel sets and double circles [6], as well as point sets with two convex layers [30]. For matchings, the connectedness problem becomes a parity issue: While the flip graph of odd matchings is known to be connected [3], the connectedness of the flip graph remains an open question for perfect matchings. Partial progress has been made for convex point sets by Hernando, Hurtado, Noy [26] and for the case when an unbounded number of edges can be exchanged by Houle, Hurtado, Noy, and Rivera-Campo [27].
Computational complexity of shortest flip sequences and the happy edge property.
In several settings, there is a close connection between the existence of -hardness proofs or polynomial-time algorithms and the happy edge property. A reconfiguration problem has the happy edge property if edges that are in the initial as well as the target configuration (and thus are happy) can remain in the configuration throughout the entire flip sequence.
The happy edge property holds for triangulations of point sets in convex position [36], but not for triangulations of general point sets or polygons [14]. The latter fact was used to show that the flip distance problem for triangulations of point sets and polygons is -complete [32, 7] and also -hard on point sets [34]. In contrast, on point sets without empty convex pentagons, the flip distance can be computed in polynomial time [21]. If we consider point sets in convex position, the flip graph is the 1-skeleton of a famous polytope, the associahedron. For the more general case of graph associahedra [19], the shortest path problem has been recently shown to be -hard [29]. Finding shortest paths in the associahedron or equivalently shortest flip sequences between triangulations of convex point sets might also be hard by a very recent arXiv preprint [20].
In the case of perfect matchings on general point sets, -hardness of computing a shortest flip sequence was shown via counterexamples to the happy edge property [11]. For convex point sets, the happy edge property holds and the flip distance between two matchings can be determined in linear time [26]. Similarly, for the reconfiguration of odd matchings on general point sets, the happy edge property also does not hold and the flip distance is -hard to compute [3].
All these results support the long standing belief that the happy edge property is tied to the complexity of graph reconfiguration problems: If the happy edge property holds, then the problem is supposedly easy to solve. If it doesn’t hold, the problem should be hard to solve.
Most recently, this pattern has been broken, when Aichholzer and Dorfer [4] provided a linear time algorithm to determine the flip distance between non-crossing spanning paths of convex point sets, despite the existence of counterexamples to the happy edge property. What remained open (until now) is the other direction: Is there a graph reconfiguration problem for which it is -hard to compute the flip distance, even though the problem has the happy edge property? We give an affirmative answer to this question in this work: The happy edge property holds for compatible flips on non-crossing spanning trees on convex point sets [5], but the flip distance is -hard to compute as shown in Theorem 4.
2 Fundamental concepts: Edge pairs, conflict graphs, and blowups
Our results build on insights from Bjerkevik, Kleist, Ueckerdt, and Vogtenhuber [13]. In the following, we introduce some of their concepts.
Linear Representation.
A convex point set is usually visualized by equally spaced points on a circle. A linear representation of a non-crossing tree on a convex point set is constructed by cutting open the circle and unfolding the points into a horizontal line segment, called the spine. Edges in can be illustrated nicely by semi-circles connecting their end points above the spine. Given two trees (for example the initial tree and the target tree of a flip sequence) in the same linear representation, it is convenient to represent the edges of one tree above the spine and the edges of the other tree below the spine. For an example, see Figure 2. If an edge between two consecutive vertices on the spine is contained in both trees we will in later parts of the paper depict this by drawing it as a straight line between the two vertices instead of two semicircles.
By labeling the vertices along the linear representation by , we get a natural notion of the length of an edge. Concretely, the length of the edge is defined as . We say a point is covered by an edge with if . An edge covers another edge if it covers both of its endpoints.
Gaps and Edge Pairing.
A gap in the convex hull is the open line segment between two consecutive points and on the spine. For every tree , there is a natural gap-edge bijection between gaps in the linear representation and edges of : Each gap is assigned to the shortest edge that covers the gap. This assignment is indeed a bijection by Lemma 3.1 in [13]. For an example, consider Figure 3(a). Based on the assigned gap, edges of are partitioned into three groups. In particular, an edge is short if it shares both vertices with its gap, near if it shares one vertex with its gap, and long if shares no vertex with its gap.
For two trees and , we obtain an edge-edge bijection by pairing two edges that are assigned to the same gap of the linear representation. The authors of [13] explain how to handle nine types of edge pairs. For our results it is sufficient to concentrate on near-near pairs where the two edges are distinct. We call a gap with edges from and from
- above
-
if and are adjacent and is longer than , see Figure 3(b).
- below
-
if and are adjacent and is shorter than , see Figure 3(c).
- crossing
-
if and are not adjacent, equivalently, the two edges cross if drawn in the same convex point set, see Figure 3(d).
The set of all above, below, and crossing gaps is denoted by , , and , respectively.
Conflict Graphs.
Conflict graphs were introduced as a tool to find the largest set of near-near pairs where the initial edge can be flipped directly to the target edge. The conflict graph has a vertex for each (gap associated to a) near-near pair and a directed edge from a pair to if the edge needs to be removed before the flip that adds and removes can be performed. We denote the set of vertices in by . There exist three types of conflicts. Specifically, there is a directed edge in , from to if
- type 1
-
crosses , see Figure 4(a).
- type 2
-
covers and covers , see Figure 4(b).
- type 3
-
covers and covers , see Figure 4(c).
We slightly abuse terminology and view the vertices of interchangeably as gaps and as near-near pairs. Let denote the largest number of vertices in which induce an acyclic subgraph. The authors of [13] derive the following relations between acyclic sets in the conflict graph and flip distances.
Theorem 5 ([13, Theorem 2.1]).
Let , be two non-crossing trees on linearly ordered points with corresponding conflict graph .
-
(i)
If is non-empty, then . If is empty, then .
-
(ii)
If is non-empty, then there is a constant depending only on and such that for all , we have .
Moreover, we will use the following lemma on the sets of above, below, and crossing gaps.
Lemma 6 ([13, Lemma 3.2]).
Each of , , and is an acyclic set of .
Blowups.
By default, a flip sequence based on the described edge-edge bijection is not necessarily a shortest one and can in fact be very far from optimal. The authors of [13] overcome this by introducing blowups for near-near pairs. For trees and , the -blowup is a pair of trees and obtained by the following construction. For every gap that corresponds to a near-near pair , insert a set of additional points in the gap . In add an edge from each to the endpoint of that is not adjacent to . Proceed similarly in for . Part (ii) of Theorem 5 is obtained by considering blowups.
Lemma 7 ([13, Lemma 23, arXiv-Version]).
The flip distance from to is at least , where .
3 NP-Completeness results
In this section we sketch proofs for our hardness results. Theorem 3 states that the decision problem of whether there exists a flip sequence of length at most between two non-crossing spanning trees is -complete. In fact, this holds even for point sets in convex position. Our proof of Theorem 3 goes via an intermediate problem. Specifically, we show that it is -complete to decide whether a directed graph has an acyclic subset of size at least , even if is the conflict graph of two non-crossing trees with a given linear representation.
Proposition 8.
Given two non-crossing trees on a convex point set, with a linear representation and corresponding non-empty conflict graph , as well as an integer , it is -complete to decide whether .
Our proof of Proposition 8 is a reduction from the -complete problem Planar Max-2SAT. We consider a restricted version [17], in which we are given a 2SAT-formula with variable-set and clause-set whose vertex-clause incidence graph admits an aligned drawing, namely, a drawing with all variables on a horizontal line and no edge crossing or any other edge. In particular, every clause lies either in the upper or lower halfplane defined by . Additionally given an integer , Planar Max-2SAT asks whether admits a truth assignment such that at least clauses in are satisfied.
For fixed and , we construct two non-crossing trees with a linear representation and an integer such that the following are equivalent:
-
The conflict graph admits an acyclic subset of size at least .
-
The 2SAT-formula admits a truth assignment that satisfies at least clauses.
To construct and , we model the variables and clauses in with small gadgets. In doing so, we also discuss the conflicts that occur. Recall that each gap has a type: above, below, or crossing. In fact, it will be enough for us to focus on the mixed conflicts, i.e., those between gaps of different types. We also remark that our construction only has conflicts of type 1, i.e., where properly crosses as illustrated in Figure 4(a).
Let be a variable and be its degree in , i.e., occurs (negated or non-negated) in exactly clauses. The variable-gadget for consists of pairs of edges, of which are near-near pairs and hence their corresponding gaps are vertices in the conflict graph . The gadget is illustrated in Figure 5(a) and the corresponding mixed conflicts in Figure 5(b). The gaps form a path of double conflicts in the conflict graph , i.e., every acyclic subset is an independent set in . We partition into two independent sets and by alternating the gaps in and along . Later we ensure that every acyclic subset of with either contains all of or all of , which encodes the two possible truth assignments True and False for variable .
We place each variable-gadget at the position of the corresponding variable in the aligned drawing of in such a way that the rightmost point of any gadget coincides with the leftmost point of the next gadget (immediately to the right). Secondly, for each clause with incident variables and we introduce a new gap in the variable-gadget of and a new gap in the variable-gadget of . For each , the edge pair for has an edge of length in the variable-gadget of and an edge connecting the gadgets of and . See Figures 6(a) and 7(a) for an illustration. To ensure that different clause-gadgets do not cross, long edges are put in the halfplane that contains the clause in the aligned drawing of . Further, the position of on the path of length in the variable-gadget of is chosen with respect to the order of incident edges at in the drawing of .
Moreover, is chosen such that it has a double conflict with a gap in if appears negated in , and a double conflict with a gap in if appears non-negated in . This ensures that an acyclic set contains the gap only if the truth assignment of variable satisfies the clause . A double conflict between the two gaps of the clause-gadget ensures that at most one of is in any acyclic set . There are six further mixed conflicts between and the variable-gaps, as illustrated in Figures 6(b) and 7(b). Given a truth assignment, we choose all of when is True, when is False, and one gap in each satisfied clause. That this gives an acyclic subset of , relies on the following observation.
Observation 9.
For every mixed conflict one of the following holds:
• is above • is below • and have a double conflict
• there is a --path of three double conflicts with three gaps of some variable-gadget
In fact, each of the sets , , of all above, all below, and all crossing gaps, respectively, is acyclic by Lemma 6. Thus with Observation 9 it follows that every set with no double conflict and none of the exceptional conflicts in Observation 9 is acyclic by taking first , then , and finally for a topological ordering.
This way, every truth assignment satisfying of corresponds to an acyclic set containing exactly half of all variable-gaps and exactly of all clause-gaps. Finally, for the other direction (getting a truth assignment from an acyclic subset ), we need to ensure that for every variable we have or , as long as is large enough. To this end, let and for each variable-gadget we apply an -blowup to the first and last gap, a -blowup to all other variable-gaps, while applying no blowup to the clause-gaps. See Figure 8 for an illustration. Setting concludes our reduction from Planar Max-2SAT and thus the proof of Proposition 8.
In order to finally prove Theorem 3, we now reduce the problem of finding large acyclic subsets in conflict graphs to the problem of finding short flip sequences in -blowups.
Theorem 10.
Let and be two non-crossing spanning trees on vertices with a linear representation and non-empty conflict graph , and be an integer. Let . Then the following are equivalent.
-
The conflict graph has an acyclic subset of size at least .
-
The flip distance between and is at most .
Proof.
For convenience, let us denote . Assume does not contain an acyclic set of size , i.e., . Then by Lemma 7,
For the last inequality observe that and hence , which together with gives the desired lower bound.
Conversely, assume has an acyclic subset of size , i.e., . Then, the conflict graph of the blowup has an acyclic set of size , i.e., . For the original trees we have vertices and gaps, of which are affected by the blowup. Thus, each of and has vertices and edges. Moreover, .
Using one flip for each edge pair in the largest acyclic subset and two flips for each other edge pair gives the desired bound of
and hence completes the proof.
We remark that the proof of Theorem 10 produces a flip sequence that contains non-compatible flips. Next, we modify the proof to the case of flip sequences that contain only compatible flips or only rotations. In fact, a direct flip for an above pair or a below pair is already a rotation. Further, flipping any near edge to a short edge covering its associated gap is also a rotation. We do, however, need to deal with large collections of crossing edge pairs. To this end, we use the following fact.
Lemma 11 ().
Let , be two trees that differ in a single crossing pair. Then the rotation flip distance between and is at most .
With Lemma 11 in place, we prove that finding short compatible flip sequences and short rotation sequences is -hard as well. As before, we use the shorthand notation .
Theorem 12 ().
Let and be two non-crossing spanning trees on vertices with a linear representation, and be an integer. Let . The following are equivalent.
-
The conflict graph has an acyclic subset of size at least .
-
The compatible flip distance .
-
The rotation flip distance .
4 Stacked Trees
In this section, we improve the upper bound for the special case where in one of the two trees, the (relevant) edges can be partitioned into independent “stacks” of nested edges. This can be seen as a first natural generalization of an upper bound where one tree is a separated caterpillar, that is, a tree with two stacks [13, Section 6, arXiv-Version]. Further, the top tree in the best previously known lower bound example in [13], depicted in Figure 9, has this property. Throughout this section, we refer to a non-crossing spanning tree on a convex point set in linear representation simply as a tree.
We call a tree stacked if its edge set can be partitioned into sets such that
-
(i)
no edge in covers an edge in for , and
-
(ii)
each is totally ordered by the covering relation.
Let be another tree on the same vertex set. We say that is stacked with respect to if the subset of edges in that are in near-near pairs of admits a partition into sets satisfying properties (i) and (ii). Note that if is stacked then it is stacked with respect to any . We refer to the edge sets as stacks (with respect to ).
4.1 The Special Case: Three stacks
Fix trees and . We first assume that has exactly three stacks , and with respect to . Let be the set of near-near pairs of . We partition into different sets. A pair will be put into sets by the following rules.
-
if belongs to stack and is an above pair.
-
, if belongs to stack , is a below pair or a crossing pair and crosses an edge in a different stack .
-
If belongs to stack , is a below pair or a crossing pair and does not cross an edge in any other stack , we assign arbitrarily to one of the two sets .
For this to be well-defined, we need to verify that cannot belong to both and for . The edge covers two gaps adjacent to its endpoints. One of these is covered by . If intersects edges and , then the other gap is covered by both and , which is a contradiction, since does not cover or vice versa by the definition of stacks.
Lemma 13 ().
For all choices of such that , both and are acyclic.
We are now ready to obtain the following upper bound on the flip distance if one of the two trees is a stacked tree with three stacks.
Theorem 14.
Let , be non-crossing trees on points in convex position. Let be a stacked tree with three stacks. Then .
Proof.
4.2 Trees with arbitrarily many stacks
We now consider a pair of trees and where is a stacked tree and let denote the stacks of with respect to . Let be the graph with as its vertices and an edge between and with if there is a near edge in paired with a near edge that crosses an edge in . Then is a subset of a triangulation of a convex polygon and therefore 3-colorable. We let the colors be denoted by , and .
We partition the set of near-near pairs into 9 different sets, based on the 3-coloring. A pair will be put into a set by the following rules.
-
if belongs to a stack with color and is an above pair.
-
, if belongs to a stack with color , is a below pair or a crossing pair and crosses an edge in a stack with a color .
-
If belongs to a stack with color , is a below or a crossing pair and does not cross an edge in any other stack, we assign arbitrarily to one of the two sets .
Lemma 15, which is a slight extension of Lemma 13, can be used to prove Theorem 16 in a similar way as Theorem 14 is derived from Lemma 13.
Lemma 15 ().
Let . Then and are acyclic.
Theorem 16.
Let , be non-crossing trees on points in convex position. Let be stacked with respect to . Then .
We remind the reader that if is stacked, then it is stacked with respect to any . Thus, the same statement without “with respect to ” is true a fortiori.
5 A new lower bound
We construct trees and iteratively, and show that their conflict graph has vertices and a largest acyclic subset of size at most . The latter divided by the former tends to , which allows us to use Theorem 5 (ii) to prove .
We start with the trees and illustrated in Figure 11. These are trees on vertices labeled from left to right along the spine and have short edges , and as well as edges and for , respectively.
Next, we construct and inductively for . Assume that and are given. Add vertices from left to right to the left of and let . Further, add a vertex between and , a vertex between and , and a vertex to the right of . For an illustration consider Figure 12.
The edges in and are also present in and , respectively, except that the right endpoint of and (which was ) is changed to , and the left endpoint of and (which was ) is changed to . Correspondingly, we change to and to . We put a short edge in both and .
Lastly, we add the following edges to and
with corresponding gaps
We next show properties of the trees and resulting form the iterative construction.
Lemma 17 ().
The following are true for and :
-
(i)
and are both non-crossing spanning trees,
-
(ii)
their near-near pairs are , with associated gaps , for and ,
-
(iii)
for , the conflict graph has bidirected edges ,
-
(iv)
for , the conflict graph has a bidirected edge .
Lemma 18.
The conflict graph has vertices and its largest acyclic sets have size at most .
Proof.
That the conflict graph has vertices follows immediately from Lemma 17 (ii). Observe that from every bidirected path of length seven given in Lemma 17 (iii), we can pick at most four gaps for the acyclic set. Furthermore, the only way to pick four is to pick the gaps , , and , see also Figure 13. Now assume the cardinality of an acyclic set exceeds . Then, by the pigeonhole principle, there exist at least two paths of length seven from which there are four pairs in the acyclic set. In particular, the set contains and for some which are in double conflict by Lemma 17 (iv), contradicting acyclicity. Together, Lemmas 18 and 5 imply the following.
Theorem 19.
As a function of , .
Proof.
By Lemma 18 and Theorem 5 (ii), for any fixed , we have
for some depending on . As a consequence, for any , for sufficiently large : Choose such that and large enough that , and calculate
It follows that .
6 Conclusion
For spanning trees on convex point sets we proved that finding shortest flip sequences is -hard and we improved the current best lower bound on the diameter of the flip graph.
Interesting future directions include determining the exact diameters for flip graphs on point sets in convex as well as general position. We are also hopeful that our techniques for NP-hardness are fruitful in other settings. Very exciting is a recently announced breakthrough by Dorfer [20] concerning the complexity of computing the flip distance of triangulations on convex point sets, which is inspired by our methods.
References
- [1] Oswin Aichholzer, Franz Aurenhammer, and Ferran Hurtado. Sequences of spanning trees and a fixed tree theorem. Computational Geometry: Theory & Applications, 21(1-2):3–20, 2002. doi:10.1016/S0925-7721(01)00042-6.
- [2] Oswin Aichholzer, Brad Ballinger, Therese Biedl, Mirela Damian, Erik D. Demaine, Adam Hesterberg, Matias Korman, Anna Lubiw, Jayson Lynch, Josef Tkadlec, and Yushi Uno. Reconfiguration of non-crossing spanning trees. Journal of Computational Geometry, 15(1):224–253, 2024. doi:10.20382/jocg.v15i1a9.
- [3] Oswin Aichholzer, Sofia Brenner, Joseph Dorfer, Hung P. Hoang, Daniel Perz, Christian Rieck, and Francesco Verciani. Flipping odd matchings in geometric and combinatorial settings. In Symposium on Graph Drawing and Network Visualization (GD), pages 12:1–12:18, 2025. doi:10.4230/LIPIcs.GD.2025.12.
- [4] Oswin Aichholzer and Joseph Dorfer. A linear time algorithm for the flip distance between plane spanning paths in convex point sets. Computing in Geometry and Topology, 5(3):2–1, 2026.
- [5] Oswin Aichholzer, Joseph Dorfer, and Birgit Vogtenhuber. Constrained flips in plane spanning trees. In Symposium on Graph Drawing and Network Visualization (GD), pages 5:1–5:18, 2025. doi:10.4230/LIPIcs.GD.2025.5.
- [6] Oswin Aichholzer, Kristin Knorr, Wolfgang Mulzer, Johannes Obenaus, Rosna Paul, and Birgit Vogtenhuber. Flipping plane spanning paths. In International Conference and Workshops on Algorithms and Computation (WALCOM), pages 49–60, 2023. doi:10.1007/978-3-031-27051-2_5.
- [7] Oswin Aichholzer, Wolfgang Mulzer, and Alexander Pilz. Flip distance between triangulations of a simple polygon is NP-complete. Discret. Comput. Geom., 54(2):368–389, 2015. doi:10.1007/S00454-015-9709-7.
- [8] Oswin Aichholzer and Klaus Reinhardt. A quadratic distance bound on sliding between crossing-free spanning trees. Computational geometry, 37(3):155–161, 2007. doi:10.1016/J.COMGEO.2004.12.010.
- [9] Selim G. Akl, Md Kamrul Islam, and Henk Meijer. On planar path transformation. Information Processing Letters, 104(2):59–64, 2007. doi:10.1016/j.ipl.2007.05.009.
- [10] David Avis and Komei Fukuda. Reverse search for enumeration. Discrete Applied Mathematics, 65(1-3):21–46, 1996. doi:10.1016/0166-218X(95)00026-N.
- [11] Carla Binucci, Fabrizio Montecchiani, Daniel Perz, and Alessandra Tappini. Flipping matchings is hard, 2025. doi:10.48550/arXiv.2503.02842.
- [12] Håvard Bakke Bjerkevik, Joseph Dorfer, Linda Kleist, Torsten Ueckerdt, and Birgit Vogtenhuber. Flip distance of non-crossing spanning trees: NP-hardness and improved bounds, 2026. arXiv:2603.22262.
- [13] Håvard Bakke Bjerkevik, Linda Kleist, Torsten Ueckerdt, and Birgit Vogtenhuber. Flipping non-crossing spanning trees. Symposium on Discrete Algorithms (SODA), pages 2313–2325, 2025. doi:10.1137/1.9781611978322.77.
- [14] Prosenjit Bose and Ferran Hurtado. Flips in planar graphs. Computational Geometry: Theory & Applications, 42(1):60–80, 2009. doi:10.1016/j.comgeo.2008.04.001.
- [15] Nicolas Bousquet, Lucas de Meyer, Théo Pierron, and Alexandra Wesolek. Reconfiguration of plane trees in convex geometric graphs. In Symposium on Computational Geometry (SoCG 2024), volume 293 of LIPIcs, pages 22:1–22:17, 2024. doi:10.4230/LIPIcs.SoCG.2024.22.
- [16] Nicolas Bousquet, Valentin Gledel, Jonathan Narboni, and Théo Pierron. A note on the flip distance between non-crossing spanning trees. Computing in Geometry and Topology, 2(1):8:1–8:7, 2023. doi:10.57717/cgt.v2i1.36.
- [17] Kevin Buchin, Valentin Polishchuk, Leonid Sedov, and Roman Voronov. Geometric secluded paths and planar satisfiability. In Symposium on Computational Geometry (SoCG), pages 24–1, 2020. doi:10.4230/LIPIcs.SoCG.2020.24.
- [18] Jou-Ming Chang and Ro-Yu Wu. On the diameter of geometric path graphs of points in convex position. Information Processing Letters, 109(8):409–413, 2009. doi:10.1016/j.ipl.2008.12.017.
- [19] Satyan L Devadoss. A realization of graph associahedra. Discrete Mathematics, 309(1):271–276, 2009. doi:10.1016/J.DISC.2007.12.092.
- [20] Joseph Dorfer. Flip distance of triangulations of convex polygons/rotation distance of binary trees is NP-complete, 2026. arXiv:2602.22874.
- [21] David Eppstein. Happy endings for flip graphs. In Symposium on Computational Geometry (SoCG 2007), pages 92–101, 2007. doi:10.1145/1247069.1247084.
- [22] David Eppstein. Happy endings for flip graphs. Journal of Computational Geometry, 1(1):3–28, 2010. doi:10.20382/JOCG.V1I1A2.
- [23] Stefan Felsner, Linda Kleist, Torsten Mütze, and Leon Sering. Rainbow cycles in flip graphs. In Symposium on Computational Geometry (SoCG 2018), volume 99 of LIPIcs, pages 38:1–38:14. Schloss Dagstuhl, 2018. doi:10.4230/LIPIcs.SOCG.2018.38.
- [24] Stefan Felsner, Linda Kleist, Torsten Mütze, and Leon Sering. Rainbow cycles in flip graphs. SIAM Journal on Discrete Mathematics, 34(1):1–39, 2020. doi:10.1137/18M1216456.
- [25] Carmen Hernando, Ferran Hurtado, Alberto Márquez, Mercè Mora, and Marc Noy. Geometric tree graphs of points in convex position. Discrete Applied Mathematics, 93(1):51–66, 1999. doi:10.1016/S0166-218X(99)00006-2.
- [26] M. Carmen Hernando, Ferran Hurtado, and Marc Noy. Graphs of non-crossing perfect matchings. Graphs and Combinatorics, 18(3):517–532, 2002. doi:10.1007/S003730200038.
- [27] Michael E. Houle, Ferran Hurtado, Marc Noy, and Eduardo Rivera-Campo. Graphs of triangulations and perfect matchings. Graphs and Combinatorics, 21(3):325–331, 2005. doi:10.1007/S00373-005-0615-2.
- [28] Ferran Hurtado, Marc Noy, and Jorge Urrutia. Flipping edges in triangulations. Discrete & Computational Geometry, 22(3):333–346, 1999. doi:10.1007/PL00009464.
- [29] Takehiro Ito, Naonori Kakimura, Naoyuki Kamiyama, Yusuke Kobayashi, Shun-ichi Maezawa, Yuta Nozaki, and Yoshio Okamoto. Hardness of finding combinatorial shortest paths on graph associahedra. In International Colloquium on Automata, Languages, and Programming (ICALP), volume 261 of LIPIcs, pages 82:1–82:17, 2023. doi:10.4230/LIPIcs.ICALP.2023.82.
- [30] Linda Kleist, Peter Kramer, and Christian Rieck. On the connectivity of the flip graph of plane spanning paths. In International Workshop on Graph-Theoretic Concepts in Computer Science, pages 327–342, 2024. doi:10.1007/978-3-031-75409-8_23.
- [31] Charles L. Lawson. Transforming triangulations. Discrete Mathematics, 3(4):365–372, 1972. doi:10.1016/0012-365X(72)90093-3.
- [32] Anna Lubiw and Vinayak Pathak. Flip distance between two triangulations of a point set is NP-complete. Computational Geometry: Theory & Applications, 49:17–23, 2015. doi:10.1016/J.COMGEO.2014.11.001.
- [33] Torrie L Nichols, Alexander Pilz, Csaba D Tóth, and Ahad N Zehmakan. Transition operations over plane trees. Discrete Mathematics, 343(8):111929, 2020. doi:10.1016/j.disc.2020.111929.
- [34] Alexander Pilz. Flip distance between triangulations of a planar point set is APX-hard. Computational Geometry, 47(5):589–604, 2014. doi:10.1016/j.comgeo.2014.01.001.
- [35] Lionel Pournin. The diameter of associahedra. Advances in Mathematics, 259:13–42, 2014. doi:10.1016/j.aim.2014.02.035.
- [36] Daniel Dominic Sleator, Robert Endre Tarjan, and William P. Thurston. Rotation distance, triangulations, and hyperbolic geometry. In Symposium on Theory of Computing (STOC), pages 122–135, 1986. doi:10.1145/12130.12143.
- [37] Uli Wagner and Emo Welzl. Connectivity of triangulation flip graphs in the plane (part I: edge flips). In Symposium on Discrete Algorithms (SODA), pages 2823–2841. SIAM, 2020. doi:10.1137/1.9781611975994.172.
- [38] Uli Wagner and Emo Welzl. Connectivity of triangulation flip graphs in the plane (part II: bistellar flips). In Symposium on Computational Geometry (SoCG 2020), volume 164 of LIPIcs, pages 67:1–67:16. Schloss Dagstuhl, 2020. doi:10.4230/LIPIcs.SOCG.2020.67.
- [39] Uli Wagner and Emo Welzl. Connectivity of triangulation flip graphs in the plane. Discrete & Computational Geometry, 68(4):1227–1284, 2022. doi:10.1007/S00454-022-00436-2.
