Higher Hardness Results for the Reconfiguration of Odd Matchings
Abstract
We study the reconfiguration of odd matchings of combinatorial graphs. Odd matchings are matchings that cover all but one vertex of a graph. A reconfiguration step, or flip, is an operation that matches the isolated vertex and, consequently, isolates another vertex. The flip graph of odd matchings is a graph that has all odd matchings of a graph as vertices and an edge between two vertices if their corresponding matchings can be transformed into one another via a single flip.
We show that computing the diameter of the flip graph of odd matchings is -hard. This complements a recent result by Wulf [FOCS25] that it is -hard to compute the diameter of the flip graph of perfect matchings where a flip swaps matching edges along a single cycle of unbounded size.
Further, we show that computing the radius of the flip graph of odd matchings is -hard. The respective decision problems for the diameter and the radius are also complete in the respective level of the polynomial hierarchy. This shows that computing the radius of the flip graph of odd matchings is provably harder than computing its diameter, unless the polynomial hierarchy collapses.
Finally, we reduce set cover to the problem of finding shortest flip sequences. As a consequence, we show -hardness and that the problem cannot be approximated by a sublogarithmic factor. By doing so, we answer a question asked by Aichholzer, Brenner, Dorfer, Hoang, Perz, Rieck, and Verciani [GD25].
Keywords and phrases:
Graph Reconfiguration Problems, Flip Graphs, Polynomial Hierarchy, APX-hardness2012 ACM Subject Classification:
Mathematics of computing Combinatorics ; Mathematics of computing Combinatoric problems ; Mathematics of computing Discrete mathematicsAcknowledgements:
First, I would like to thank Lasse Wulf for introducing me to the relation between the polynomial hierarchy and diameter computation for flip graphs. Further, I would like to thank Oswin Aichholzer, Sofia Brenner, Hung Hoang, Daniel Perz, Christian Rieck, and Francesco Verciani for our previous joint work on odd matchings. Finally, I want to thank the reviewers for many helpful comments that helped improving the argumentation throughout the paper.Funding:
Austrian Science Foundation (FWF) 10.55776/DOC183.Editors:
Meena Mahajan, Florin Manea, Annabelle McIver, and Nguyễn Kim ThắngSeries and Publisher:
Leibniz International Proceedings in Informatics, Schloss Dagstuhl – Leibniz-Zentrum für Informatik
1 Introduction
Reconfiguration describes the process of changing one structure into another. It is often performed by small, reversible steps, so called flips. Reconfiguration has many applications in the areas of optimization [15] or enumeration [6, 18]. We refer to the following surveys for the discussion of additional applications of reconfiguration [19, 23]. Very recently, reconfiguration has also provided substantial insight into the complexity of computing the diameter of polytopes [20, 21], spiking in the result that computing the combinatorial diameter of a polytope is -hard [25]. Remarkably, all the recent results on the diameter of polytopes study the reconfiguration of perfect matchings.
We study the related problem of the reconfiguration of odd matchings of graphs. An odd matching of a graph is a matching consisting of edges of such that all vertices of are matched except for a single isolated vertex. A flip between two odd matchings is an operation that matches the isolated vertex of the first matching to another vertex . Subsequently, the vertex that previously shared an edge with becomes the new isolated vertex. The flip graph of odd matchings of a graph is a graph that has as vertex set all odd matchings of and has edges between matchings whenever they can be transformed into one another via a single flip. A flip sequence between an initial matching and a target matching is a sequence of matchings , , , , such that consecutive matchings only differ by a single flip. In terms of the flip graph, a flip sequence is a path between two matchings. The index denotes the length of a flip sequence. The flip distance between two odd matchings and , denoted by , is the minimum over all such that there exists a flip sequence of length between and . This can be interpreted as the length of a shortest path in the flip graph. The diameter of the flip graph is defined as and describes the maximal flip distance between any pair of odd matchings in the flip graph. Similarly, the radius is defined as and describes the minimum maximal distance of a matching to a center . Clearly, the diameter of a flip graph is bounded from below by its radius and bounded from above by twice the radius. For an illustration of many of the concepts, we refer to Figure 1.
1.1 Related Work
Odd Matchings.
The reconfiguration of odd matchings has been introduced in [2] for the setting of geometric odd matchings, that is, crossing-free odd matchings with straight line segments as edges between points in general position in the plane. The authors show that in this setting the flip graph is always connected with a diameter of where is the number of points. The study of combinatorial odd matchings has been initiated in [1]. The authors provide a complete, polynomial time checkable characterization when the flip graph of odd matchings on a graph is connected and show that any connected component of the flip graph has a diameter that is linear in the size of . In the same paper, it is shown that the problem of deciding whether there exists a flip sequence of a certain length between two given odd matchings is -complete for both the geometric and the combinatorial setting. The reconfiguration of odd matchings also appears in form of the sliding block game gourds [13, 17] where the underlying graph is a triangular grid graph and the edges have colored or labeled end points. In every flip, the added edge inherits the colors or labels of the removed edge.
Perfect Matchings.
For the reconfiguration of perfect matchings removing and adding a single edge will not yield another perfect matching. Instead a flip in a matching works as follows: Pick a cycle that alternates between edges that lie in and edges that do not. The flip then removes all edges of along the cycle and adds the edges of the cycle that were not in . We can either allow cycles of arbitrary length, or bound the length of the cycle. When bounding the length of the cycle to only allow cycles of length four such that a flip removes two edges from and adds two new edges it is shown to be -complete to decide whether a given matching can be flipped into another matching in the combinatorial setting [8]. In the geometric setting it is a long-standing open question whether any perfect matching on any point set can be transformed into any other matching on the same point set when only allowing flips along -cycles. Up to now, there is not even a published proof that a perfect matching on any point set permits a valid flip of such a form. It further has been shown that deciding whether a flip sequence of a certain length exists is -hard in the geometric setting [7].
If, however, we allow flips along alternating cycles of unbounded size, the flip graph is connected in the geometric setting [14]. In the combinatorial setting it has been shown that deciding whether the flip distance between two perfect matchings is at most is -complete, even for [3, 16]. There also has been particular interest in the complexity of computing the diameter of the flip graph of perfect matchings in the combinatorial setting [20, 21, 25] spiking in the result that computing the diameter is -complete [25]. The research was motivated by its implications for the complexity of computing the diameter of polytopes [9].
Computing Central Structures in Flip Graphs.
This year’s CG:SHOP challenge deals with the search of central structures in flip graphs of triangulations under parallel flip operations [4]. The problem as it is phrased asks for a central structure in the flip graph for a small (compared to the size of the flip graph) finite set of triangulations that are part of the input. The problem is contained in and can be interpreted as an attempt to approximate the search of the center and the radius of the whole flip graph.
1.2 Our Contributions
In this paper, we provide three novel higher complexity results on the reconfiguration of combinatorial odd matchings.
First, we complement the main result in [25] by showing that for a given graph and a parameter the problem of deciding whether the diameter of the flip graph of odd matchings of is at most is -complete. We do so by reducing directly from the -complete problem -SAT.
Theorem 1.
Given a graph and a parameter . Deciding whether the diameter of the flip graph of odd matchings of is at most is -complete.
As a second result, we study the related problem of calculating the radius of the flip graph. We show that deciding whether for a given graph the radius of the flip graph of odd matchings of is at most some value is -complete. We do so by reducing directly from the -complete problem -SAT.
Theorem 2.
Given a graph and a parameter . Deciding whether the radius of the flip graph of odd matchings of is at most is -complete.
By showing -completeness of the problem, we provide a naturally occuring problem that is complete in this complexity class. As discussed in [12], problems in this complexity class are not too well studied and the list of problems that are complete for that class are not too long.
Even though the concepts of diameter and radius seem very similar, we conclude that it is provably harder to compute the radius than to compute the diameter, unless the polynomial hierarchy collapses.
The authors of [1] show that it is -hard to compute shortest flip sequences between odd matchings and motivate the question about the existence of approximation algorithms. As a final result, we settle the question about approximability in the combinatorial setting by reducing Set cover to the problem of finding shortest flip sequences. We will describe the global idea for the reduction and modify it to fit the definition of a PTAS-reduction.
Theorem 3.
Given a graph and two odd matchings and of . Computing the flip distance between and is -hard. Further, it is -hard to approximate the flip distance by a factor better than .
Full technical details and proofs for statements marked with will appear in a full version of the paper.
2 Preliminaries
2.1 Union of Odd Matchings
Let and be two odd matchings on the same graph , then their union admits the following connected components:
-
one alternating path of even length (possibly zero) that connects the isolated vertices of and and alternates between edges of and ,
-
cycles of even length alternating between and , and
-
edges that lie in , called happy edges.
The above partition will be helpful when arguing lower bounds on the length of flip sequences. We will say that we charge flips towards a component if a flip sequence needs to perform that number of flips on this connected component. Some easy observations are: (1) If the alternating path contains edges of and each, then we charge at least flips towards the path; (2) If an alternating cycle contains edges of and each, we charge at least flips towards the cycle, to flip all the edges of in and one additional flip to place the isolated vertex on the cycle, we will call these steps switching a cycle and (3) we either charge no flips at all towards a happy edge or at least two since if we remove the happy edge, we need to add it back in.
2.2 The Polynomial Hierarchy
The polynomial hierarchy was introduced by Stockmeyer [22] and provides a way to compare the complexity of problems beyond -hardness. Complexity classes are defined recursively. The lowest level is . Then, for is defined as the class of all problems that can be decided in non-deterministic polynomial time with the help of an oracle for the class . Further, . In particular and .
We refer to [24] for a definition of the polynomial hierarchy that is easier to work with in our setting. A language is a set . A language is contained in if there exists some polynomial-time computable function such that for all for suitable :
Similarly, a language is contained in if there exists some polynomial-time function such that for all for some suitable :
In [24] problems are provided that are complete for the respective stages of the polynomial hierarchy. The problem -SAT given by all Boolean formulas on variables and such that for all assignments of there exists an assignment of such that is -complete. Further, the problem -SAT given by all Boolean formulas on variables such that there exists an assignment of such that for all assignments of there exists an assignment of such that is -complete. We assume without loss of generality that all Boolean formulas are given in conjunctive normal form (CNF).
2.3 APX-hardness
For an extensive introduction to the concepts see [10]. Let be the set of all problems in that allow for a constant factor approximation. A problem is -hard if there is a PTAS-reduction from every problem in to said problem. A PTAS-reduction from problem to is a set of three functions , , , that are polynomial-time computable for a fixed such that:
-
the function maps an instance of to an instance of .
-
the function takes an instance of and an approximate solution of in and computes an approximation of
-
the function maps error parameters of problems in to corresponding parameters of problems in
-
if the solution to is an -approximation to the optimal solution, then is a solution to .
In particular, if there exists no polynomial-time approximation scheme for and PTAS-reduces to , then there is also no polynomial-time approxiation scheme for and if cannot be approximated within some factor then cannot be approximated within .
2.4 Set Cover
Consider the integers from to and a collection of sets such that and . The Set Cover problem asks for a given integer whether there exists a subset such that and . Set Cover is known to be -hard, since for example Set Cover problems are a superset of the vertex cover problem [5]. Further, the size of a smallest set that covers all integers in can in general not be approximated by a sublogarithmic factor [11], unless =.
3 Computing the Diameter is -complete
We reduce directly from -SAT to computing the diameter of the flip graph. We will introduce gadgets for clauses and for each type of variable.
As a high level idea, the goal of a flip sequence will be to switch the cycles in all clause gadgets by switching the cycles in all the variable gadgets in a way that places isolated vertices next to clause gadgets. The alternating cycle of an -gadget can then be switched in two ways depending on which of the two edges from a central vertex to the gadget is used to enter the gadget. Each direction for the switch will correspond to an assignment of the variable based on what clauses the isolated vertex is placed next to. In a -gadget, there is only one way to enter the gadget from , so the way to switch the cycle is fixed. If the cycle is not crossing in the drawing, the isolated vertex will be placed next to gadgets of clauses that contain the positive literal, and, if the cycle is crossing, next to clauses containing the negative literal.
We now introduce all gadgets of our reduction in more detail. The reduction will be built around one, aforementioned, central vertex .
- Clause gadget (Figure 3(a)):
-
The clause gadget is a 4-cycle that has one vertex which is incident to the later introduced variable gadgets. The idea is to force a perfect matching of the cycle in the initial matching and the other perfect matching in the target matching such that all alternating cycles in variable gadgets need to be switched at some point.
- -gadget (Figure 3(b)):
-
For a given variable , the variable gadget consists of a cycle of length twelve, with vertices labeled to along the cycle, as well as two additional diagonals from vertex to vertex and vertex to vertex in the cycle that form the crossing as seen in Figure 3(b). The vertex with label has an edge that is connected to a central vertex . Two vertices, labeled and , have edges to all clause gadgets that correspond to clauses that contain . Two vertex, labeled and , are incident to edges to all clause gadgets that correspond to clauses that contain . If contains an alternating cycle on a -gadget, then this cycle can either contain the introduced crossing or not. To see a crossed and uncrossed cycle, see Figure 4. The two options will encode the truth value of the corresponding variable.
Figure 4: Left: a crossed alternating cycle in a -gadget, Right: an uncrossed alternating cycle. - -gadget (Figure 3(c)):
-
The -gadget corresponding to a variable consists of a cycle with twelve edges and vertices labeled to along the cycle. Two adjacent vertices, labeled and are incident to an edge to the vertex . Two vertices, labeled and are incident to edges to all gadgets of clauses that contain . Similarly, two vertices, labeled and are connected to gadgets of clauses that contain . If the union contains an alternating cycle on an -gadget, the cycle can be switched in two ways depending on which of the two edges incident to is used to switch the cycle. These two choices will encode the two truth values of the corresponding variable.
- Forcing the position of the isolated vertex:
-
If we take to be the number of vertices in all clause gadgets, -gadgets and -gadgets combined, we obtain by [1, Theorem 10] that any connected component of the flip graph of odd matchings of the constructed graph has diameter at most for a constant . We attach to a path of length (See Figure 5). If the isolated vertex of at least one of the matchings is placed at the vertex of that is farthest away from , then flipping edges along the path already takes flips, which is at least as much as it takes to reconfigure two odd matchings if both have their isolated vertex placed on some clause gadget, -gadget, or -gadget.
- The reduction:
-
Now, let be a Boolean formula on variables ,…, and . We construct a graph as follows: Start from a single vertex . For every introduce a -gadget and connect it to as described above. For every introduce an -gadget and connect it to as described. Further, introduce a clause gadget for every clause in and connect each clause gadget to all the variable gadgets that correspond to variables in the clause. The connection happens in one of two ways described above depending on whether or (resp. or ). Then add the path of length at to obtain a final graph .
First, we need to make sure that the diameter is well defined in this setting.
Proposition 4 ().
The flip graph of odd matchings of is connected.
We show Proposition 4 by showing that fulfills the characterization of graphs for which the flip graph is connected from [1, Theorem 3].
From now on, we will call a pair of matchings and such that equals the diameter of the flip graph a maximizing pair. We will make structural observations on how a maximizing pair looks like. Also, let and denote the isolated vertices of and .
Lemma 5 ().
Let and be a maximizing pair. Then:
-
(1)
is the vertex of that is farthest away from .
-
(2)
contains an alternating cycle on every clause gadget.
-
(3)
contains an alternating cycle on every -gadget.
-
(4)
contains an alternating cycle on every -gadget.
Theorem 1. [Restated, see original statement.]
Given a graph and a parameter . Deciding whether the diameter of the flip graph of odd matchings of is at most is -complete.
Proof.
Containment in follows from the definition of and the fact that the underlying flip distance problem that has to be solved for every pair of matchings is contained in .
Let on variables and and clauses be a -SAT instance and be the graph as constructed above.
Claim 6.
If is a YES-instance of -SAT, then the diameter of the flip graph of odd matchings of is at most .
Proof.
Assume is a YES-instance. In order to upper bound the diameter of the flip graph of odd matchings of it is sufficient to consider pairs of matchings that fulfill the conditions of Lemma 5. Let and be a pair with these properties. We consider on every -gadget for some variable . If they form an uncrossed cycle, then we consider the positive assignment of , otherwise the negative assignment. Since is a YES-instance of -SAT, for the given assignment of the there exists a satisfying assignment of the such that . We can construct a flip sequence from to based on the assignment of .
The flip sequence starts by moving the isolated vertex from to . Then the flip sequence switches all cycles that belong to -gadgets and if the isolated vertex is placed next to an unswitched clause gadget, the flip sequence switches this cycle as well. Afterwards, the flip sequence switches all -gadgets. If is assigned a positive (resp. negative) value, then the flip sequence traverses the gadget such that the isolated vertex is placed next to clause gadgets containing (resp. ). Since , every clause gadget will eventually be switched. The flip sequence ends by moving the isolated vertex back from to . There are flips for moving the isolated vertex between and , seven flips per variable gadget and three flips per clause gadget, which gives us the aspired length of the flip sequence.
Claim 7.
is a YES-instance of -SAT whenever the diameter of the flip graph of odd matchings of is at most .
Proof.
Assume the diameter of the flip graph of odd matchings is at most . For a given assignment of , we construct a pair of matchings and . If appears in its positive form, has an uncrossed cycle in the -gadget that corresponds to , otherwise has a crossed cycle. Additionally, has an alternating cycle on all -gadgets and clause gadgets, and .
Since there exists a flip sequence from to of length at most , exactly seven flips are performed in every variable gagdet and exactly three flips are performed in every clause gadget. Less flips would not suffice to switch the cycle in the respective gadget. With more flips we would exceed the length of the flip sequence. This means there is an isolated vertex placed next to every clause gadget at some point in a flip sequence that switches every variable gadget once. We construct an assignment of from where the isolated vertex was placed during the traversal of the corresponding variable gadgets. This assignment satisfies . Repeating this procedure for all assignments of shows that is a YES-instance of -SAT.
The theorem follows from a combination of the two claims.
4 Computing the Radius is -complete
We reduce from -SAT to computing the radius of the flip graph. We now introduce all gadgets for our reduction that will again be built around one central vertex .
- Clause gadget (Figure 3(a)):
-
The clause gadget is the same as in Section 3.
- First -gadget (Figure 3(b)):
-
The first -gadget is the same as the -gadget of Section 3.
- -gadget (Figure 6):
-
The -gadget corresponding to a variable consists of a cycle with edges and vertices labeled to along the cycle, as well as four diagonals, from to , to , to , and to , of the cycle that form the two crossings in Figure 6. Two vertices, and , have edges to clauses that contain the positive literal and two vertices, and , with edges to clauses containing the negative literal and vertex has an edge from the vertex .
- Second -gadget (Figure 3(c)):
-
The second exists gadget coincides with the -gadget of Section 3. Notation wise, the variables corresponding to those gadgets will now be called instead of .
Figure 7: Instance graph for the quantified formula . - Forcing position of the isolated vertices:
-
We conclude the construction by attaching two paths to . Let be the number of vertices in clause and variable gadgets. We set where is chosen according to [1, Theorem 10] such that is larger than twice the diameter of the flip graph of odd matchings on and the clause and variable gadgets. We add a path of length and attach one end to and to the other end we attach a four-cycle . Further, let and add a path of length and attach one end of to . No matter what a matching in the center of the flip graph looks like, a matching can maximize the distance to by having an isolated vertex at , the end vertex of that is not attached to and by differing from on . By doing so, any flip sequence is forced to traverse both and . Vice versa, by having the isolated vertex of placed on it can be guaranteed that a flip sequence traverses only once instead of twice.
- The reduction:
-
Now, let be a Boolean formula on variables ,…,, and . We construct a graph as follows: Start from a single vertex . For every introduce a first -gadget and connect it to as described above. Repeat for all and -gadgets and all and the second -gadget. Further, for every clause in introduce a clause gadget and connect the gadget to all the variable gadgets that correspond to variables in the clause. The connection happens in one of two described ways depending whether or (resp. or ). Then add the paths and as described to obtain a final graph . Again, we need to make sure that the radius is well defined in this setting.
Proposition 8 ().
The flip graph of odd matchings on is connected.
Again, we verify this by checking the characterization from [1, Theorem 3].
We will again give a characterization of pairs of matchings, which can determine the radius. We will argue that, without loss of generality, we do not have to consider all other pairs of matchings but only a set of candidates. As a high level argument, we make sure that in a candidate pair we cannot make a change to locally in a single gadget such that the flip distance to increases and we cannot immediately make a change to in a single gadget such that the flip distance decreases even if is changed locally to respond to the changes to .
Lemma 9 ().
Without loss of generality, to determine the radius of the flip graph, it is sufficient to consider pairs of matchings and that have the following properties:
-
(1)
is the vertex on that is farthest away from .
-
(2)
is placed on .
-
(3)
contains an alternating cycle on every clause gadget.
-
(4)
contains an alternating cycle on every variable gadget.
With Lemma 9 in mind, we describe the high level strategies for , and a shortest flip sequence:
Since all clause gadgets contain alternating cycles, a shortest flip sequence will have to switch them all by entering them through a variable gadget. Adjacency relations of gadgets correspond to containment relations of variables in clauses.
For the first -gadget, while switching an uncrossed cycle, the isolated vertex will be next to clause gadgets containing the positive literal, otherwise, if the cycle is crossed, the clauses with negative literals can be switched. Also note, that can determine, whether the cycle is crossed or uncrossed. may choose not to control the existence of the crossing if the value of a particular variable does not matter.
For the -gadget, while switching the cycle, the isolated vertex is next to clauses with positive literals if the cycle is crossing twice or not at all, however if it crosses once, the isolated vertex is placed next to clauses with negative literals. While can control to add one crossing to the cycle or not, the existence of a second crossing will then always be controlled by .
For the second -gadget, there is only one option for an alternating cycle up to swapping and . The direction of traversal is then chosen by the flip sequence depending on which of the two edges incident to is chosen to enter the gadget. The direction of traversal then determines whether the isolated vertex will be placed next to clauses with positive or negative literals.
Theorem 2. [Restated, see original statement.]
Given a graph and a parameter . Deciding whether the radius of the flip graph of odd matchings of is at most is -complete.
Proof.
Containment in follows from the definition of and the fact that the underlying flip distance problem that has to be solved for every matching is contained in .
Let on variables , and and clauses be a -SAT instance and be the graph as constructed above.
Claim 10.
If is a YES-instance of -SAT, then the radius of the flip graph of odd matchings of is at most .
Proof.
We construct based on the truth assignment of that is part of a solution of . If has a positive truth value, then we match its corresponding variable gadget such that any completion of the matching to an alternating cycle is uncrossed. If has a negative truth value, match the variable gadget such that the cycle has a crossing. Place the isolated vertex on and match the remaining vertices to form an arbitrary perfect matching. The existence of such perfect matchings is shown as a part of the proof of Proposition 8.
Now for any that maximizes the distance to , we look at the -gadgets. By Lemma 9 we know that forms an alternating cycle on the -gadget. If the cycle in the gadget to some is crossed zero times or twice, we translate this to a positive assignment of , if it is crossed once, translate to a negative assignment of .
Since is a YES-instance of -SAT there exists an assignment of such that combined with the initial assignment of and the translated assignment of it holds that . We build our flip sequence between and around the assignment of the ’s.
A flip sequence from to looks as follows: Perform flips to make the matchings coincide on in up to two flips (since the isolated vertex is already placed on ). Move the isolated vertex along to in flips. Switch all of the first -gadgets using seven flips per gadget and if the isolated vertex is placed next to an unswitched clause gadget, switch it using three flips. Switch all -gadgets using eight flips per gadget and if the isolated vertex is placed next to an unswitched clause gadget, switch it using three flips. For every -gadget that corresponds to some switch the -gadget such that if has a positive truth value, the isolated vertex is placed next to clauses that contain the positive literal . However, if has a negative truth value, the isolated vertex should be placed next to clauses that contain the negative literal . Every switch of a -gadget takes again seven flips. In the end, move the isolated vertex along using flips.
The total length of the flip sequence adds up to .
Claim 11.
is a YES-instance of -SAT whenever the radius of the flip graph of odd matchings of is at most .
Proof.
Let be the center of the flip graph of matchings of . In particular, the flip distance from to any other odd matching of is at most the radius.
Consider the first set of variable gadgets corresponding to and see, in which way they are matched. If the gadget corresponding to is matched, such that any completion to an alternating cycle is uncrossed, assign a positive truth value to , if any completion to an alternating cycle is crossed, assign a negative value. It can happen that the matching can be clompeted to both a crossed and uncrossed alternating cycle, in that case assign an arbitrary truth value.
Now, let there be an arbitrary truth assignment of . We construct based on this assignment. In every -gadget, we complete to an alternating cycle that has zero or two crossings if the corresponding has a positive assignment, and otherwise to have one crossing if has a negative assignment. On all other gadgets, complete arbitrarily to an alternating cycle. Let have a perfect matching on such that and differ on . Let have its isolated vertex at the very end of and complete with a perfect matching on the remainder of and .
Now take a flip sequence from to of length at most . By our observations on lower bounds it follows that the flip sequence has to spend exactly seven flips on every -gadget, eight flips on every gadget and three flips on every clause gadget. We reconstruct an assignment of from how their corresponding gadgets are switched. Since, every clause gadget has been flipped in the flip sequence, every clause contains at least one literal which has the right truth value assigned by the assignment from our constructions. Therefore . Since we can do this for any assignments of , this shows that is a YES-instance of -SAT.
The theorem then follows from the combination of the two claims.
5 Computing the Flip Distance is APX-hard
The reduction from Set Cover to finding minimum flip sequences is illustrated in Figure 8. For every set in from the Set Cover instance we add a path with vertices to the graph , for some even that will be fixed later. We construct and such that they form a perfect matching of the paths. For every integer from to (that denote the elements within the sets), we add a -cycle to such that and cover the cycle alternatingly. At last, we add one single vertex to such that this vertex is the isolated vertex in both and . For each path corresponding to a set in , we add an edge from one end of the path to the isolated vertex and edges from the other end to all gadgets that correspond to integers that are contained in . The strategy for a flip sequence is to traverse a set gadget in order to be able to flip the integer gadgets for integers that are contained in the set. After that the flip sequence has to traverse the set gadget back to the initial isolated vertex. Since is bipartite (see green/orange partition in Figure 8), there are no shortcuts that skip the traversal of set gadgets.
Proposition 12.
There exists a set cover of size if and only if .
Proof.
Assume there exists a set cover of size . To transform to all cycles that correspond to an integer from to need to be switched. The only way to switch such a cycle is to flip along a path that corresponds to a set that is incident to to place the isolated vertex next to the integer gadget and then switch the cycle. At last, add all edges from the path that corresponds to back to the isolated vertex. If we repeat this for all vertices in a set cover, all cycles in integer gadgets will be switched in the end and we reached . Adding and removing the happy edges along a set gadget takes flips. Switching an integer gadget takes three flips. So the total length of the flip sequence is .
For the opposite direction, we first need to see that we indeed have to take the detour back to the isolated vertex. Observe that is a bipartite graph. In Figure 8 we give a -coloring of with two colours, orange and green. The isolated vertex can then only be placed on green vertices. This prevents flip sequences from taking any shortcuts between gadgets, by placing the isolated vertex directly on a different path when leaving an integer gadget.
Now assume that we have a flip sequence from to of length at most . All cycles in integer gadgets have been switched. In particular, every cycle had the isolated vertex placed next to it at some point of the flip sequence. We set to be the set of all sets whose gadget contained the isolated vertex next to an integer gadget at some point. is clearly a set cover. By our initial observation, in order to place an isolated vertex in a set gadget next to an integer gadget, we need to charge at least flips towards the set gadget. Therefore, we get that
Theorem 3. [Restated, see original statement.]
Given a graph and two odd matchings and of . Computing the flip distance between and is -hard. Further, it is -hard to approximate the flip distance by a factor better than .
Proof.
Assume, there exists an efficient algorithm that approximates the flip distance between any two odd matchings on the same graph up to a factor of for an arbitrary but constant and .
For a given instance of the minimum set cover problem. Construct matchings and as described and set . Then, computes a flip sequence between and of length , where
By Proposition 12 we obtain a set cover of size .
Since , we can express in terms of the size of the minimum vertex cover :
Therefore, for any approximation of the flip distance, we can compute an approximation of the size of the minimum set cover. In particular, if we approximate the flip distance with , we obtain the same approximation for a minimum set cover, which is not possible, unless =.
6 Open Questions
We have shown that computing the diameter of the flip graph of combinatorial odd matchings is -complete and computing the radius of a the flip graph is -complete. By doing so, we provide two naturally occuring problems that fall into these complexity classes. Further, by reducing Set Cover to the problem of finding shortest flip sequences between odd matchings we show that the problem is -hard and does not admit any global constant factor approximation.
The following open questions arise from our results:
-
1.
Since the reconfiguration of matchings is closely tied to complexity results in polytopes we motivate the question whether it is -hard to compute the combinatorial radius/center of a polytope. We remark that the result for the diameter of the flip graph in [25] uses a so called canonical structure, that is, a structure that can be reached from any other structure in a reasonable number of flips. An upper bound on the diameter then follows from flipping from any initial structure to the canonical structure and then to the target structure. Therefore, by computing the radius, a center of the flip graph is implicitly also computed. This means that so far computing the radius is only shown to be -hard.
-
2.
Can similar results on the complexity of computing the diameter and radius also be shown in a geometric setting? While in the combinatorial setting, we can control, which edges are part of the input graph and which are not, in the geometric setting all edges between any two points in the plane can theoretically occur in , or any intermediate matching, the only degree of freedom for constructions is the placement of the points.
References
- [1] 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 Vida Dujmović and Fabrizio Montecchiani, editors, 33rd International Symposium on Graph Drawing and Network Visualization (GD 2025), volume 357 of Leibniz International Proceedings in Informatics (LIPIcs), pages 12:1–12:18, Dagstuhl, Germany, 2025. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. doi:10.4230/LIPIcs.GD.2025.12.
- [2] Oswin Aichholzer, Anna Brötzner, Daniel Perz, and Patrick Schnider. Flips in odd matchings. Computational Geometry, 129:102184, 2025. doi:10.1016/j.comgeo.2025.102184.
- [3] Oswin Aichholzer, Jean Cardinal, Tony Huynh, Kolja Knauer, Torsten Mütze, Raphael Steiner, and Birgit Vogtenhuber. Flip distances between graph orientations. Algorithmica, 83(1):116–143, 2021. doi:10.1007/s00453-020-00751-1.
- [4] Oswin Aichholzer, Joseph Dorfer, Sándor Fekete, Phillip Keldenich, Peter Kramer, Dominik Krupke, and Stefan Schirra. Cg:shop 2026: Central triangulation under parallel flip operations, 2025. URL: https://cgshop.ibr.cs.tu-bs.de/competition/cg-shop-2026/#problem-description.
- [5] Paola Alimonti and Viggo Kann. Some APX-completeness results for cubic graphs. Theoretical Computer Science, 237(1):123–134, 2000. doi:10.1016/S0304-3975(98)00158-3.
- [6] 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.
- [7] Carla Binucci, Fabrizio Montecchiani, Daniel Perz, and Alessandra Tappini. Flipping matchings is hard, 2025. doi:10.48550/arXiv.2503.02842.
- [8] Marthe Bonamy, Nicolas Bousquet, Marc Heinrich, Takehiro Ito, Yusuke Kobayashi, Arnaud Mary, Moritz Mühlenthaler, and Kunihiro Wasa. The perfect matching reconfiguration problem. In International Symposium on Mathematical Foundations of Computer Science (MFCS), pages 80:1–80:14, 2019. doi:10.4230/LIPIcs.MFCS.2019.80.
- [9] Vašek Chvátal. On certain polytopes associated with graphs. Journal of Combinatorial Theory, Series B, 18(2):138–154, 1975. doi:10.1016/0095-8956(75)90041-6.
- [10] Pierluigi Crescenzi. A short guide to approximation preserving reductions. In Proceedings of the Twelfth Annual IEEE Conference on Computational Complexity, Ulm, Germany, June 24-27, 1997. IEEE Comput. Soc, 1997. doi:10.1109/ccc.1997.612321.
- [11] Irit Dinur and David Steurer. Analytical approach to parallel repetition. In Proceedings of the Forty-Sixth Annual ACM Symposium on Theory of Computing, STOC ’14, pages 624–633, New York, NY, USA, 2014. Association for Computing Machinery. doi:10.1145/2591796.2591884.
- [12] Christoph Grüne and Lasse Wulf. Completeness in the polynomial hierarchy for many natural problems in bilevel and robust optimization, 2024. arXiv:2311.10540.
- [13] Joep Hamersma, Marc J. van Kreveld, Yushi Uno, and Tom C. van der Zanden. Gourds: A sliding-block puzzle with turning. In International Symposium on Algorithms and Computation (ISAAC), pages 33:1–33:16, 2020. doi:10.4230/LIPIcs.ISAAC.2020.33.
- [14] Michael E. Houle, Ferran Hurtado, Marc Noy, and Eduardo Rivera-Campo. Graphs of triangulations and perfect matchings. Graphs and Combinatorics, 21:325–331, 2005. doi:10.1007/s00373-005-0615-2.
- [15] Takehiro Ito, Erik D. Demaine, Nicholas J. A. Harvey, Christos H. Papadimitriou, Martha Sideri, Ryuhei Uehara, and Yushi Uno. On the complexity of reconfiguration problems. Theoretical Computer Science, 412(12-14):1054–1065, 2011. doi:10.1016/J.TCS.2010.12.005.
- [16] Takehiro Ito, Naonori Kakimura, Naoyuki Kamiyama, Yusuke Kobayashi, and Yoshio Okamoto. Shortest reconfiguration of perfect matchings via alternating cycles. SIAM Journal on Discrete Mathematics, 36(2):1102–1123, 2022. doi:10.1137/20M1364370.
- [17] Naonori Kakimura and Yuta Mishima. Reconfiguration of labeled matchings in triangular grid graphs. In International Symposium on Algorithms and Computation (ISAAC), pages 43:1–43:16, 2024. doi:10.4230/LIPIcs.ISAAC.2024.43.
- [18] Torsten Mütze. Combinatorial gray codes – an updated survey. Electronic Journal of Combinatorics, 2024. Dynamic survey. doi:10.37236/11023.
- [19] Naomi Nishimura. Introduction to reconfiguration. Algorithms, 11(4):52, 2018. doi:10.3390/A11040052.
- [20] Christian Nöbel and Raphael Steiner. Complexity of polytope diameters via perfect matchings. In Proceedings of the 2025 Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 2234–2251. SIAM, 2025. doi:10.1137/1.9781611978322.74.
- [21] Laura Sanità. The diameter of the fractional matching polytope and its hardness implications. In 2018 IEEE 59th Annual Symposium on Foundations of Computer Science (FOCS), pages 910–921. IEEE, 2018. doi:10.1109/FOCS.2018.00090.
- [22] Larry J. Stockmeyer. The polynomial-time hierarchy. Theoretical Computer Science, 3(1):1–22, 1976. doi:10.1016/0304-3975(76)90061-X.
- [23] Jan van den Heuvel. The complexity of change. In Surveys in Combinatorics 2013, volume 409 of London Mathematical Society Lecture Note Series, pages 127–160. 2013. doi:10.1017/CBO9781139506748.005.
- [24] Celia Wrathall. Complete sets and the polynomial-time hierarchy. Theoretical Computer Science, 3(1):23–33, 1976. doi:10.1016/0304-3975(76)90062-1.
- [25] Lasse Wulf. Computing the polytope diameter is even harder than NP-hard (already for perfect matchings), 2025. doi:10.48550/arXiv.2502.16398.
