Abstract 1 Introduction 2 Fundamental concepts: Edge pairs, conflict graphs, and blowups 3 NP-Completeness results 4 Stacked Trees 5 A new lower bound 6 Conclusion References

Flip Distance of Non-Crossing Spanning Trees:
NP-Hardness and Improved Bounds

Håvard Bakke Bjerkevik ORCID University at Albany, SUNY, NY, USA    Joseph Dorfer ORCID Graz University of Technology, Austria    Linda Kleist ORCID University of Hamburg, Germany    Torsten Ueckerdt ORCID Karlsruhe Institute of Technology, Germany    Birgit Vogtenhuber ORCID Graz University of Technology, Austria
Abstract

We consider the problem of reconfiguring non-crossing spanning trees on point sets. For a set P of n points in general position in the plane, the flip graph (P) has a vertex for each non-crossing spanning tree on P 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 diam((P)) for sets P of n points in convex position. For this case, the current best bounds are 14/9nO(1)diam((P))<15/9n3, 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 14/9(n1) to any other tree.

Lastly, we improve the lower bound on the diameter of the flip graph (P) for n points in convex position to 11/7no(n).

Keywords and phrases:
Non-crossing, spanning tree, plane graph, flip graph, reconfiguration, diameter, complexity, 𝖭𝖯-hard, edge exchange, compatible flip, rotation, happy edge property
Funding:
Joseph Dorfer: Austrian Science Fund (FWF) 10.55776/DOC183.
Torsten Ueckerdt: funded by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) – 520708409.
Birgit Vogtenhuber: Austrian Science Fund (FWF) 10.55776/DOC183.
Copyright and License:
[Uncaptioned image] © Håvard Bakke Bjerkevik, Joseph Dorfer, Linda Kleist, Torsten Ueckerdt, and
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 problems
Related Version:
Full Version: https://arxiv.org/abs/2603.22262 [12]
Editors:
Hee-Kap Ahn, Michael Hoffmann, and Amir Nayyeri

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 n points in the plane in convex position [31] and has diameter exactly 2n10 [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 P denote a set of n points in the plane in general position, that is, no three points of P are collinear. A non-crossing spanning tree on P is a spanning tree that has P as its vertex set and whose edges are pairwise non-crossing straight-line segments. A flip in a non-crossing spanning tree T on P is the exchange of one edge of T by a different one such that the resulting graph is again a non-crossing spanning tree T on P; see Figure 1 for an example. The according flip graph (P) has a vertex for each non-crossing spanning tree on P and an edge between any two trees whenever they can be transformed into each other by a single edge flip. For two trees T and T on P, we denote their flip distance, the length of a shortest path between T and T in (P), by dist(T,T).

Figure 1: Reconfiguration of non-crossing spanning trees on convex point sets by edge exchange. The appearing edge is highlighted in red and the disappearing edge in gray. Can you complete the sequence to obtain the tree on the right? How many further flips are needed?

In 1996, Avis and Fukuda [10] showed in their famous reverse search paper that (P) is connected for any n-point set P in general position, and that its radius is bounded from above by n2, implying diam((P))2n4. In 1999, Hernando, Hurtado, Márquez, Mora, and Noy [25] showed that for convex n-point sets P, it holds that diam((P))3/2n5. Since then, the flip graph (P) of non-crossing geometric spanning trees on point sets P 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 3/2n+c for some constant c. Very recently, Bjerkevik, Kleist, Ueckerdt, and Vogtenhuber [13] refuted this conjecture by obtaining the currently best known bounds of 14/9n+O(1)diam((P))15/9nO(1) 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 11/7no(n), by this directly extending the line of research from [13].

Theorem 1.

For any set P of n3 points in convex position, the flip graph (P) of non-crossing spanning trees on P has diameter at least (11/7o(1))n.

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 14/9nO(1) to any other tree.

Theorem 2.

Let T, T be non-crossing trees on n3 points in convex position. If T is a stacked tree, then dist(T,T)149(n1).

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 T,T on a point set and an integer δ, the decision problem of whether there exists a flip sequence of length at most δ between T and T 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 T,T 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 T and T 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.

Table 1: Overview of complexity results. Results obtained in this work are marked by [*].
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 n-point set is at most 14/9(n1) if one of them is stacked. In Section 5, we improve the lower bound on the diameter of the tree flip graph for n points in convex position to (11/7o(1))n. 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 O(n2). Hurtado, Noy, and Urrutia [28] provided a matching lower bound of Ω(n2) 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 2n10, which is tight for n>13 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 2n4. Nichols, Pilz, Tóth, and Zehmakan [33] gave an upper bound on the diameter of O(nlog(n)) 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 O(n2) 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 2n4 [10] and the conjectured to be essentially tight lower bound of 3n/25 [25], the upper bound was subsequently improved to 2nlog(n) [2] and 2nn [16]. The leading constant factor of 2 was broken by Bousquet, de Meyer, Pierron, and Wesolek [15], who improved the upper bound to 1.96n. The latest advancement before the work at hand is due to the recent work [13], which improved the upper bound to 5/3n3 and the lower bound to 14/9nO(1). We note that the lower bound of 14/9nO(1) 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 5/3n2 and 7/4(n1), 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 2n6 for n>4 [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 T 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 T 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.

(a)
(b)
Figure 2: Figure reproduced from [13]. 2(a) Two non-crossing trees T,T on a circularly labeled point set in convex position and 2(b) its linear representation with T above and T below the spine.

By labeling the vertices along the linear representation by p1,,pn, we get a natural notion of the length of an edge. Concretely, the length of the edge pipj is defined as |ij|. We say a point pk is covered by an edge pipj with i<j if ikj. 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 pi and pi+1 on the spine. For every tree T, there is a natural gap-edge bijection between gaps in the linear representation and edges of T: 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 T 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.

(a)
(b)
(c)
(d)
Figure 3: 3(a) Illustration of the gap-edge and edge-edge bijection. Examples of an above 3(b), a below 3(c), and a crossing pair 3(d). Edges belonging to near-near pairs in A, B, and C are colored green, orange, and purple, respectively (also in several other figures).

For two trees T and T, 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 gi with edges ei from T and ei from T

above

if ei and ei are adjacent and ei is longer than ei, see Figure 3(b).

below

if ei and ei are adjacent and ei is shorter than ei, see Figure 3(c).

crossing

if ei and ei 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 A, B, and C, 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 H has a vertex for each (gap associated to a) near-near pair and a directed edge from a pair (ei,ei) to (ej,ej) if the edge ei needs to be removed before the flip that adds ej and removes ej can be performed. We denote the set of vertices in H by V(H). There exist three types of conflicts. Specifically, there is a directed edge gigj in H, from gi to gj if

type 1

ei crosses ej, see Figure 4(a).

type 2

ej covers ei and ei covers gj, see Figure 4(b).

type 3

ei covers ej and ej covers gi, see Figure 4(c).

(a)
(b)
(c)
Figure 4: Figure reproduced from [13]. Examples of conflicts: 4(a) type 1, 4(b) type 2, 4(c) type 3.

We slightly abuse terminology and view the vertices of H interchangeably as gaps and as near-near pairs. Let ac(H) denote the largest number of vertices in H 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 T, T be two non-crossing trees on linearly ordered points p1,,pn with corresponding conflict graph H=H(T,T).

  1. (i)

    If V(H) is non-empty, then dist(T,T)max{32,2ac(H)|V(H)|}(n1)}. If V(H) is empty, then dist(T,T)32(n1).

  2. (ii)

    If V(H) is non-empty, then there is a constant c depending only on T and T such that for all n¯1, we have diam(n¯)(2ac(H)|V(H)|)n¯c.

Moreover, we will use the following lemma on the sets of above, below, and crossing gaps.

Lemma 6 (​​[13, Lemma 3.2]).

Each of A, B, and C is an acyclic set of H.

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 T and T, the β-blowup is a pair of trees βT and βT obtained by the following construction. For every gap g that corresponds to a near-near pair (e,e), insert a set V(e)=V(e) of β additional points in the gap g. In βT add an edge from each vV(e) to the endpoint of e that is not adjacent to g. Proceed similarly in βT for e. Part (ii) of Theorem 5 is obtained by considering blowups.

Lemma 7 (​​[13, Lemma 23, arXiv-Version]).

The flip distance from βT to βT is at least (β2n)(2|V(H)|ac(H)), where H=H(T,T).

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 T,T 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 H has an acyclic subset of size at least k, even if H is the conflict graph of two non-crossing trees with a given linear representation.

Proposition 8.

Given two non-crossing trees T,T on a convex point set, with a linear representation and corresponding non-empty conflict graph H=H(T,T), as well as an integer k, it is 𝖭𝖯-complete to decide whether ac(H)k.

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 X and clause-set 𝒞 whose vertex-clause incidence graph Gϕ admits an aligned drawing, namely, a drawing with all variables on a horizontal line L and no edge crossing L or any other edge. In particular, every clause lies either in the upper or lower halfplane defined by L. Additionally given an integer t, Planar Max-2SAT asks whether X admits a truth assignment such that at least t clauses in 𝒞 are satisfied.

For fixed ϕ and t, we construct two non-crossing trees T,T with a linear representation and an integer k such that the following are equivalent:

  • The conflict graph H=H(T,T) admits an acyclic subset of size at least k.

  • The 2SAT-formula ϕ admits a truth assignment that satisfies at least t clauses.

To construct T and T, 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 gigj of type 1, i.e., where ei properly crosses ej as illustrated in Figure 4(a).

Let xX be a variable and d=deg(x) be its degree in Gϕ, i.e., x occurs (negated or non-negated) in exactly d clauses. The variable-gadget for x consists of 8d+1 pairs of edges, of which 6d are near-near pairs and hence their corresponding 6d gaps are vertices in the conflict graph H=H(T,T). The gadget is illustrated in Figure 5(a) and the corresponding mixed conflicts in Figure 5(b). The 6d gaps form a path P of double conflicts in the conflict graph H, i.e., every acyclic subset is an independent set in P. We partition P into two independent sets t(x) and f(x) by alternating the gaps in t(x) and f(x) along P. Later we ensure that every acyclic subset S of H with |S|k either contains all of t(x) or all of f(x), which encodes the two possible truth assignments True and False for variable x.

(a)
(b)
Figure 5: Illustration of a variable-gadget and the graph of its mixed conflicts.

We place each variable-gadget at the position of the corresponding variable in the aligned drawing of Gϕ 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 C with incident variables x and y we introduce a new gap gx in the variable-gadget of x and a new gap gy in the variable-gadget of y. For each z{x,y}, the edge pair for gz has an edge of length 3 in the variable-gadget of z and an edge connecting the gadgets of x and y. 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 C in the aligned drawing of Gϕ. Further, the position of gz on the path P of length 6deg(z) in the variable-gadget of z is chosen with respect to the order of incident edges at z in the drawing of Gϕ.

(a)
(b)
Figure 6: Illustration of a clause-gadget for a clause above the horizontal line and its conflict graph. The special conflict corresponding to the last option in Observation 9 is highlighted.

Moreover, gz is chosen such that it has a double conflict with a gap in t(z) if z appears negated in C, and a double conflict with a gap in f(z) if z appears non-negated in C. This ensures that an acyclic set S contains the gap gz only if the truth assignment of variable z satisfies the clause C. A double conflict between the two gaps gx,gy of the clause-gadget ensures that at most one of gx,gy is in any acyclic set S. There are six further mixed conflicts between gx,gy and the variable-gaps, as illustrated in Figures 6(b) and 7(b). Given a truth assignment, we choose all of t(x) when x is True, f(x) when x is False, and one gap gz in each satisfied clause. That this gives an acyclic subset S of H(T,T), relies on the following observation.

Observation 9.

For every mixed conflict g1g2 one of the following holds:
g1 is above   • g2 is below   • g1 and g2 have a double conflict
• there is a g1-g2-path of three double conflicts with three gaps of some variable-gadget

(a)
(b)
Figure 7: Illustration of a clause-gadget for a clause below the horizontal line and its conflict graph. The special conflict corresponding to the last option in Observation 9 is highlighted.

In fact, each of the sets A, B, C of all above, all below, and all crossing gaps, respectively, is acyclic by Lemma 6. Thus with Observation 9 it follows that every set SV(H) with no double conflict and none of the exceptional conflicts in Observation 9 is acyclic by taking first AS, then CS, and finally BS for a topological ordering.

This way, every truth assignment satisfying t of ϕ corresponds to an acyclic set SV(H) containing exactly half of all variable-gaps and exactly t of all clause-gaps. Finally, for the other direction (getting a truth assignment from an acyclic subset S), we need to ensure that for every variable x we have t(x)S or f(x)S, as long as S is large enough. To this end, let m=|𝒞| and for each variable-gadget we apply an m-blowup to the first and last gap, a 2m-blowup to all other variable-gaps, while applying no blowup to the clause-gaps. See Figure 8 for an illustration. Setting k=m(12m+6|X|)+t concludes our reduction from Planar Max-2SAT and thus the proof of Proposition 8.

Figure 8: Applying an m-blowup (here m=2) to the first and last gap of each variable-gadget and 2m-blowups to all other gaps in variable-gadgets.

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 T and T be two non-crossing spanning trees on n vertices with a linear representation and non-empty conflict graph H(T,T), and k>0 be an integer. Let β=4n2+2n. Then the following are equivalent.

  • The conflict graph H=H(T,T) has an acyclic subset of size at least k.

  • The flip distance between βT and βT is at most (β+1)(2|V(H)|k)+2(n|V(H)|).

Proof.

For convenience, let us denote |H|=|V(H)|. Assume H does not contain an acyclic set of size k, i.e., ac(H)<k. Then by Lemma 7,

dist(βT,βT) (β2n)(2|H|ac(H))(β+1(2n+1))(2|H|k+1)
=(β+1)(2|H|k)+(β+1)(2n+1)(2|H|k+1)
>(β+1)(2|H|k)+2(n|H|).

For the last inequality observe that |H|<n and hence (2n+1)(2|H|k+1)(2n+1)(2n1)4n2, which together with β=4n2+2n>4n2+2(n|H|) gives the desired lower bound.

Conversely, assume H=H(T,T) has an acyclic subset of size k, i.e., ac(H)k. Then, the conflict graph Hβ=H(βT,βT) of the blowup has an acyclic set of size k(β+1), i.e., ac(Hβ)k(β+1). For the original trees T,T we have n vertices and n1 gaps, of which |H| are affected by the blowup. Thus, each of βT and βT has n+β|H| vertices and n1+|β| edges. Moreover, |V(Hβ)|=(β+1)|H|.

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
dist(βT,βT)(β+1)(2|H|ac(H))+2(n1|H|)<(β+1)(2|H|k)+2(n|H|).

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 T, T be two trees that differ in a single crossing pair. Then the rotation flip distance between βT and βT is at most β+2.

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 |H|=|V(H)|.

Theorem 12 ().

Let T and T be two non-crossing spanning trees on n vertices with a linear representation, and k>0 be an integer. Let β=4n2+4n. The following are equivalent.

  • The conflict graph H=H(T,T) has an acyclic subset of size at least k.

  • The compatible flip distance distcomp(βT,βT)(β+1)(2|H|k)+|H|+4(n|H|).

  • The rotation flip distance distrot(βT,βT)(β+1)(2|H|k)+|H|+4(n|H|).

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 T stacked if its edge set can be partitioned into sets S1,,Sk such that

  1. (i)

    no edge in Si covers an edge in Sj for ij, and

  2. (ii)

    each Si is totally ordered by the covering relation.

Let T be another tree on the same vertex set. We say that T is stacked with respect to T if the subset N of edges in T that are in near-near pairs of (T,T) admits a partition into sets S1,,Sk satisfying properties (i) and (ii). Note that if T is stacked then it is stacked with respect to any T. We refer to the edge sets Si as stacks (with respect to T).

Figure 9: The best previously known lower bound example from [13]. The top tree is a stacked tree with three stacks. The bottom tree is neither stacked, nor stacked with respect to the top tree.

4.1 The Special Case: Three stacks

Fix trees T and T. We first assume that T has exactly three stacks S1, S2 and S3 with respect to T. Let 𝒫N be the set of near-near pairs of (T,T). We partition 𝒫N into 9 different sets. A pair (e,e)𝒫N will be put into sets by the following rules.

  • Ai if e belongs to stack Si and (e,e) is an above pair.

  • Bi,j, ij if e belongs to stack Si, (e,e) is a below pair or a crossing pair and e crosses an edge in a different stack Sj.

  • If e belongs to stack Si, (e,e) is a below pair or a crossing pair and e does not cross an edge in any other stack Sj, we assign (e,e) arbitrarily to one of the two sets Bi,j.

For this to be well-defined, we need to verify that (e,e) cannot belong to both Bi,j and Bi,j for jj. The edge e covers two gaps adjacent to its endpoints. One of these is covered by e. If e intersects edges fSj and gSj, then the other gap is covered by both f and g, which is a contradiction, since f does not cover g or vice versa by the definition of stacks.

Lemma 13 ().

For all choices of x,y,z such that {x,y,z}={1,2,3}, both Hx:=AyAzBx,yBx,z and Hx,y:=AzBy,zBx,yBx,z 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 T, T be non-crossing trees on n3 points in convex position. Let T be a stacked tree with three stacks. Then dist(T,T)14/9(n1).

Proof.

Each element of V(H) is contained in four of the nine acyclic sets H1,H2,H3, H1,2,H2,1,H1,3,H3,1,H2,3,H3,2 from Lemma 13. Thus, the average size of these sets is 1/9Σi=19|Hi|=4/9|V(H)| and, consequently, the largest acyclic set is of size at least 4/9|V(H)|. By Theorem 5(i), there exists a flip sequence from T to T of length at most 14/9(n1).

4.2 Trees with arbitrarily many stacks

We now consider a pair of trees T and T where T is a stacked tree and let S1,,Sk denote the stacks of T with respect to T. Let G be the graph with S1,,Sk as its vertices and an edge between Si and Sj with ij if there is a near edge e in Si paired with a near edge e that crosses an edge in Sj. Then G is a subset of a triangulation of a convex polygon and therefore 3-colorable. We let the colors be denoted by 1, 2 and 3.

(a)
(b)
Figure 10: (a) A pair of trees where one tree is stacked and (b) the resulting graph G with a proper 3-coloring.

We partition the set of near-near pairs into 9 different sets, based on the 3-coloring. A pair (e,e)𝒫N will be put into a set by the following rules.

  • Ai if e belongs to a stack with color i and (e,e) is an above pair.

  • Bi,j, ij if e belongs to a stack with color i, (e,e) is a below pair or a crossing pair and e crosses an edge in a stack with a color ji.

  • If e belongs to a stack with color i, (e,e) is a below or a crossing pair and e does not cross an edge in any other stack, we assign (e,e) arbitrarily to one of the two sets Bi,j.

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 {x,y,z}={1,2,3}. Then Hx=AyAzBx,yBx,z and Hx,y=AzBy,zBx,yBx,z are acyclic.

Theorem 16.

Let T, T be non-crossing trees on n3 points in convex position. Let T be stacked with respect to T. Then dist(T,T)14/9(n1).

We remind the reader that if T is stacked, then it is stacked with respect to any T. Thus, the same statement without “with respect to T” is true a fortiori.

5 A new lower bound

We construct trees Ti and T~i iteratively, and show that their conflict graph has 7i vertices and a largest acyclic subset of size at most 3i+1. The latter divided by the former tends to 3/7, which allows us to use Theorem 5 (ii) to prove diam(n)11/7no(n).

We start with the trees T1 and T~1 illustrated in Figure 11. These are trees on vertices v1,,v8,x,y,v9 labeled from left to right along the spine and have short edges v2v3, v6v7 and xy as well as edges ei and e~i for i=1,,7, respectively.

(a)
(b)
Figure 11: Illustration of T1 and T~1 and the relevant part of the conflict graph.

Next, we construct T and T~ inductively for 2. Assume that T1 and T~1 are given. Add vertices v1,,v5 from left to right to the left of v11 and let v6=v21. Further, add a vertex v7 between v31 and v41, a vertex v8 between v81 and x, and a vertex v9 to the right of v91. For an illustration consider Figure 12.

Figure 12: Illustration for the iterative construction of T and T~ from T1 and T~1 for =3.

The edges in T1 and T~1 are also present in T and T~, respectively, except that the right endpoint of e41 and e61 (which was x) is changed to v8, and the left endpoint of e~21 and e~71 (which was v31) is changed to v7. Correspondingly, we change g21 to v7v41 and g61 to v81v8. We put a short edge v2v3 in both T and T~. Lastly, we add the following edges to T and T~
e1=v1v5,e2=v2v4,e3=v2v5,e4=v5x,e5=v6v7,e6=v11x,e7=xv9, e~1=v1v3,e~2=v3v91,e~3=v4v31,e~4=v5v31,e~5=v4v7,e~6=v8y,e~7=v3v9,

with corresponding gaps
g1=v1v2,g2=v3v4,g3=v4v5,g4=v5v11,g5=v31v7,g6=v8x,g7=v91v9.

We next show properties of the trees T and T~ resulting form the iterative construction.

Lemma 17 ().

The following are true for T and T~:

  1. (i)

    T and T~ are both non-crossing spanning trees,

  2. (ii)

    their near-near pairs are (eij,e~ij), with associated gaps gij, for 1i7 and 1j,

  3. (iii)

    for 1j, the conflict graph has bidirected edges g7jg2jg1jg3jg5jg4jg6j,

  4. (iv)

    for 1j<j, the conflict graph has a bidirected edge g6jg7j.

Figure 13: The relevant double conflicts in the conflict graph H(T,T~) for =3.
Lemma 18.

The conflict graph H(T,T~) has 7 vertices and its largest acyclic sets have size at most 3+1.

Proof.

That the conflict graph has 7 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 g7j, g1j, g5j and g6j, see also Figure 13. Now assume the cardinality of an acyclic set exceeds 3+1. 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 g6j and g7j for some j<j 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 n, diam(n)11/7no(n).

Proof.

By Lemma 18 and Theorem 5 (ii), for any fixed , we have

diam(n)(23+17)nc=(11717)nc

for some c depending on . As a consequence, for any ϵ>0, diam(n)(117ϵ)n for sufficiently large n: Choose such that 17<ϵ and n large enough that (ϵ17)nc, and calculate

diam(n)(11717)nc=(117ϵ)n+(ϵ17)nc(117ϵ)n.

It follows that diam(n)117no(n).

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.