On the Hardness of Recognizing Graphs of Small Mim-Width and Its Variants
Abstract
The mim-width of a graph is a powerful structural parameter that, when bounded by a constant, allows several hard problems to be polynomial-time solvable - with a recent meta-theorem encompassing a large class of problems [SODA2023]. Since its introduction, several variants such as sim-width and omim-width were developed, along with a linear version of these parameters. It was recently shown that mim-width and all these variants are all paraNP-hard, a consequence of the NP-hardness of distinguishing between graphs of linear mim-width at most 1211 and graphs of sim-width at least 1216 [ICALP2025]. The complexity of recognizing graphs of small width, particularly those close to , remained open, despite their especially attractive algorithmic applications.
In this work, we show that the width recognition problems remain NP-hard even on small widths. Specifically, after introducing the novel parameter Omim-width sandwiched between omim-width and mim-width, we show that: (1) deciding whether a graph has sim-width = 1, omim-width = 1, or Omim-width = 1 is NP-hard, and the same is true for their linear variants; (2) the problems of deciding whether mim-width 2 or linear mim-width 2 are both NP-hard. Interestingly, our reductions are relatively simple and are from the Unrooted Quartet Consistency problem, which is of great interest in computational biology but is not commonly used in the theory of algorithms.
Keywords and phrases:
Mim-width, NP-hardness, Computational BiologyCategory:
Track A: Algorithms, Complexity and GamesCopyright and License:
2012 ACM Subject Classification:
Mathematics of computing Graph algorithmsEditors:
Sayan Bhattacharya, Danupon Nanongkai, Michael Benedikt, and Gabriele PuppisSeries and Publisher:
Leibniz International Proceedings in Informatics, Schloss Dagstuhl – Leibniz-Zentrum für Informatik
1 Introduction
Many hard problems on graphs become easier when the underlying graph has a simple structure, and over the years several “width” parameters have been developed to capture such structure. One of these is the mim-width (maximum induced matching width), introduced by Vatshelle [23]. A branch decomposition of a graph is a ternary tree whose leaves represent the vertices of , and each of its edges naturally defines a cut of the graph. For any such decomposition, each cut induces a bipartite graph, in which we consider the size of a maximum induced matching. The mim-width of is then the minimum, over all branch decompositions of , of the maximum size of such an induced matching across all cuts of the decomposition [23, 3].
It is a powerful parameter that can be constant even on graphs of high clique-width, and several algorithmic problems are polynomial-time solvable on graphs of constant mim-width [12, 13, 11], under the assumption that a branch decomposition is given. This is notably witnessed by a recent logic-based meta-theorem that solves many problems in polynomial-time under these assumptions [5].
Since its inception, several variants of mim-width were developed: the sim-width parameter is the same, except that edges of within both sides of the cut are kept [14, 16]; the one-sided mim-width () keeps only the edges within either side of the cut and takes the minimum [7]; the large one-sided mim-width (), which we introduce in this work, instead takes the maximum; and the linear variant of all these parameters require the branch decomposition to be a caterpillar (see precise definitions below).
Recognizing graphs of mim-width at most was quickly established to be W[1]-hard in parameter [20], but the question of XP membership was posed several times since the creation of the parameter (in addition to the previous references, this was also raised in [8, 7, 18, 5]). The same remained open for all the aforementioned variants of mim-width, except the linear sim-width = 1 case shown NP-hard in [24]. All these questions were finally answered by Bergougnoux, Bonnet, and Duron [4], where the authors showed that it is NP-hard to distinguish between graphs of linear mim-width at most 1211 and graphs of sim-width at least 1216, implying the paraNP-hardness of but also of all the above variants.
It is still open whether there is a constant such that recognizing graphs of mim-width (and variants) at most is in P. Determining whether such a exists is quite relevant, because graphs of small width are those that matter for algorithmic applications. In this work, we reduce this knowledge gap significantly by proving the following results:
Theorem 1.
The problem of deciding whether a graph has sim-width, omim-width, or Omim-width equal to is NP-complete. Moreover, assuming the ETH, it cannot be solved in time , where is the number of vertices of the graph. The same holds for the linear variant of these three parameters.
Theorem 2.
The problem of deciding whether a graph has mim-width or linear mim-width at most is NP-complete. Moreover, assuming the ETH, it cannot be solved in time , where is the number of vertices of the graph.
Note that the ETH refers to the Exponential Time Hypothesis [10]. We also point out that the new parameter is a lower bound on , and an upper bound on , which in turn is an upper bound on .
Our reductions are relatively simple and arguably less involved than in [4], which require a series of reductions with complex gadgets. Another unique aspect of our reductions is that they are all from the Unrooted Quartet Consistency (UQC) problem, shown NP-hard in [22]. The input to UQC is a set of trees on four leaves, and one must decide whether there is a single tree that contains all of them.
This is not a common problem to reduce from, as UQC is often more seen as an “end-user” problem, in the sense that it is mostly popular for its bioinformatics applications. Its hardness has mainly been used to justify heuristics and approximations. The only notable exception we are aware of is the use of UQC to prove the NP-hardness of the so-called Triangle Ordinal Clustering problem [21], which was then used to show that recognizing the graph class of leaf powers and some of its generalizations is NP-hard [15]. Inspired by the latter, our approach shows that UQC may be well-suited for problems that require finding a branch decomposition, since UQC is a tree reconstruction problem. It is possible that UQC or similar variants may be useful for other open XP membership problems that involve graph-to-tree representations (for instance module-width [19, 3], not to be confused with modular-width, which is within a factor two of clique-width, or other similar problems stated in [9]).
Although our results do not imply hardness for mim-width and variants between 3 and 1210, they indicate that there is little hope of recognizing graphs of small width efficiently. The notable cases of mim-width 1 and linear mim-width 1 remain open. These two graph classes have exploitable structural properties, for instance graphs of mim-width 1 are weakly chordal [23] and graphs of linear mim-width 1 have no so-called asteroidal edge triples [9], and their membership in P is still possible. The aforementioned class of leaf powers is one of the most natural subclasses of graphs of mim-width 1, so its hardness may be seen as evidence for the mim-width 1 hardness. On the other hand, recognizing linear leaf powers, a subclass of graphs of linear mim-width 1, is in P [6].
2 Preliminaries
2.1 Notations and Definitions
All graphs considered are simple and undirected. The vertex set and edge set of a graph are denoted by and , respectively. An edge between two vertices and is denoted by (or equivalently ). For a subset , let denote the subgraph of induced by , and let denote the edge set of . For a set of edges , we write for the graph obtained from by deleting all edges in .
A matching of is a set of edges no two of which share a common endpoint. An induced matching of is a matching such that every edge of is incident with at most one edge of . A cut of is a bipartition of . We denote by the bipartite subgraph of with edge set .
Unless stated otherwise, all trees in this work are unrooted. A tree is ternary if each vertex has either or neighbors111 Note, ternary trees are sometimes called binary, but here we prefer “ternary” to emphasize that internal vertices have 3 neighbors, not 2.. A caterpillar is a tree in which the set of internal vertices induces a path, called its spine. Given a total order on a set of points, we define the ternary caterpillar realizing , with leaf set as follows. If , then the interval forms the spine of the caterpillar. Attach each leaf to the integer , and additionally attach to and to . Note that a given ternary caterpillar with leaf set realizes several total orders, since we may choose which end of the spine is the minimum/maximum and, at each end, which of the two incident leaves plays the “endpoint” role.
Width parameters
Given a cut : The mim-value of , denoted , is the maximum size of an induced matching in .
The sim-value of , denoted , is the maximum size of a matching in that is also an induced matching of (hence, edges within and within are also considered but cannot be in the matching).
For a subset , the upper-induced matching number of is the maximum size of a matching in that is an induced matching of the graph .
The omim-value of a cut , denoted , is the minimum of the upper-induced matching numbers of and .
The Omim-value of a cut , denoted , is the maximum of the upper-induced matching numbers of and .
Note that it directly follows from the definitions of the parameters that .
A branch decomposition of a graph is a ternary tree whose leaves correspond exactly to the vertices of . Given such a tree , each edge of defines a cut , where and are the vertex sets corresponding to the two connected components of . The mim-width (resp. sim-width, omim-width, Omim-width) of is the maximum, over all edges of , of (resp. , , ). Finally, the mim-width (resp. sim-width, omim-width, Omim-width) of is the minimum, over all branch decompositions of , of the mim-width (resp. sim-width, omim-width, Omim-width) of .
Each of these width parameters has a linear variant, which require to be a caterpillar. We denote such a variant by prefixing the parameter name with “linear”, e.g., linear-mim-width is the minimum mim-width of all branch decompositions of that are caterpillars.
The following easily follows from the definitions.
Lemma 3.
For any graph , we have
This chain of inequalities also holds by replacing each parameter by their linear variant. Moreover, , and similarly for each variant of the width parameter.
2.2 Unrooted Quartet Consistency
Given a set of points , a quartet (over ) consists of two unordered pairs of distinct elements of that do not intersect. For clarity, such a quartet is instead denoted . Slightly abusing notation, we may write when is one of the four elements involved in .
In a ternary tree with leaves labeled , consider any four leaves . If there exists an edge of such that and lie on one side of , and and lie on the other, we denote this relation by
In this case, we say that satisfies the quartet . If is a set of quartets, then satisfies if it satisfies each .
Because is ternary, given four leaves , exactly one of the three configurations holds:
The NP-hard problem used in our reductions is the Unrooted Quartet Consistency (UQC) problem, introduced by Steel [22].
Input: A set of points and a set of quartets over .
Question: Does there exist a ternary tree with leaves labeled by the points in that satisfies every quartet in ?
The hardness of UQC is proved by a reduction from Betweenness, a classical problem that was shown to be NP-complete by Opatrný [17]. In that problem, the input is a set of ordered triples whose elements are from a set of points . One must decide whether there is a total order on such that, for each , one of or holds. Steel’s reduction proves a slightly stronger result than NP-hardness, which we will use.
Theorem 4 ([22]).
There is a polynomial-time reduction from Betweenness to UQC. Moreover, if an instance of Betweenness is a YES-instance, then there exists a caterpillar that satisfies the corresponding UQC instance.
By analyzing the chain of reductions used to prove Theorem 4, we can also obtain a slightly stronger result under ETH.
Theorem 5.
Assuming the ETH, the UQC problem cannot be solved in time , where is the number of points of an instance and is the number of quartets.
Proof.
The result can be deduced by simply revisiting the chain of reductions resulting in the NP-hardness of UQC. The first reduction is from 3-Set Splitting to Betweenness. In 3-Set Splitting, we receive sets of size 3 over a universe and must color with two colors so that no set of is monochromatic. This cannot be solved in time under the ETH (a proof appears in [1], or more specifically in the full version on arXiv [2, Proposition 5.1], under the formulation of the Monotone NAE 3-SAT problem, which is equivalent to 3-Set Splitting).
Opatrný’s reduction from 3-Set Splitting to Betweenness [17, Lemma 2] produces from an instance with and (each set in becomes two betweenness triples, each element of has a corresponding elements in , plus an extra point is added). It follows that Betweenness cannot be solved in time .
Finally, Steel’s reduction [22] from Betweenness to UQC transforms to an instance with (each betweenness triple becomes 6 quartets) and (the point set consists of the elements of and two extra points, and each betweenness constraint adds four points). Since is linear in , UQC cannot be solved in time .
3 Sim-width, omim-width and Omim-width
We start with a single reduction showing that it is NP-hard to decide whether a given graph has sim-width, omim-width, or Omim-width equal to . The same holds for their linear variants. Given a UQC instance , we define the following graph :
-
Vertices: For each element , we introduce a vertex in . For each quartet , we introduce four additional vertices in :
Let denote the set of all such -vertices, so that .
-
Edges: For each quartet , add the edges
In addition, connect every pair of vertices whenever they correspond to different quartets. That is, for , we add the edge whenever .
Observe that forms an independent set, and that each has only two non-neighbors in .
Note that . The fact that is linear in and will be used to obtain the ETH-based hardness part of our result. Note that we are not able to obtain the stronger lower bound under ETH of , because the number of edges in this reduction is quadratic.
The combination of Lemma 3, Theorem 5, and the following proposition will imply our first hardness result, Theorem 1.
Proposition 6.
If there is a caterpillar satisfying the UQC instance , then . Otherwise, if , then any branch decomposition of satisfies , and in particular .
We split the proof in two lemmas.
Lemma 7.
If , then any branch decomposition of satisfies , and in particular .
Proof.
We start by proving that .
This follows directly from the fact that the maximum induced matching in the full graph has size at most 2. Suppose, for contradiction, that there exists an induced matching of size at least . Since the set is an independent set in , at least one endpoint of every edge in the matching must belong to . By construction, each vertex in is adjacent to all other vertices of except two, which themselves are adjacent. Hence, among any three such vertices of , there must exist at least one edge between them, contradicting the assumption that they form an induced matching.
We now prove that if , then .
Let , and let be a branch decomposition of . There must exist a quartet not satisfied by , otherwise would be in UQC. Assume without loss of generality that , and let be an edge of inducing the cut such that and . At least one of the edges along the path must cross this cut, and similarly, one of the edges along the path must also cross the cut. Because there is no edge with one endpoint in the first path and the other in the second path, these two edges form an induced matching in , and therefore for every branch decomposition . Consequently, .
Lemma 8.
If there is a caterpillar satisfying the UQC instance , then .
Proof.
Let be such a caterpillar, and let be a total order on that realizes. For each , define
that is, consists of all vertices in whose index is . We extend to a total order on as follows.
For all with , and for all , , we set . Within each , the relative position of and any depends on the quartet :
If , then, since satisfies , we have either or (because the four vertices are distinct). In the former case () we set , in the latter case () we set . Note that this implies that we have either
We choose an arbitrary order within among the -vertices to the left of and among those to the right of . We then consider the ternary caterpillar realizing . We now prove that , that is, for every edge of .
Because is a caterpillar, it suffices to consider the cuts induced by the edges of its spine. Let be an edge of the spine, and let be the cut induced by . Since realizes the order , one side of the cut corresponds to an initial segment of . Thus, we have either for all and , , or for all and , .
To prove that , we need to prove that the upper induced matching numbers of and are both equal to one. This means that there is no matching of size in that is an induced matching in the graph or in the graph . Let be two edges with disjoint endpoints such that and . To prove that it is not an induced matching in or , it suffices to show that one of the two following conditions holds:
-
1.
One of the diagonals or is an edge, or
-
2.
Both and are edges.
Suppose for the sake of contradiction that neither condition holds. Each vertex is connected only to vertices of the form . Consider two edges and with . By the construction of the order , we have either or . Given that the cut can only separate from at most one of its neighbours in , it is therefore impossible for the cut to contain both edges and . Consequently, at most one vertex among can belong to .
Suppose that exactly one vertex among belongs to . Without loss of generality, assume that . Then must be of the form . We are supposing that condition 1 is false and that is not an edge. Since , the only vertices in that are not adjacent to are those corresponding to the other side of the same quartet. That is, if , then these vertices are and . By the definition of the order , we have either , or . Since the edge lies on the path between and in , the vertices and cannot belong to . This yields a contradiction.
Now suppose that all vertices belong to . Let be the quartet associated with and the quartet associated with . As before, We are supposing that condition 1 is false, and that neither nor is an edge. The only vertices in not adjacent to correspond to the other side of the same quartet, so must also be the quartet of . Similarly, must be the quartet of .
If , then we have for some . The only edges among these vertices are and , which are both separated by . Consequently, the quartet is not satisfied by , which, by the definition of , implies that is not satisfied by , and we have a contradiction.
On the other hand, if , then both and are edges, which contradicts the supposition that condition 2 holds.
Theorem 1. [Restated, see original statement.]
The problem of deciding whether a graph has sim-width, omim-width, or Omim-width equal to is NP-complete. Moreover, assuming the ETH, it cannot be solved in time , where is the number of vertices of the graph. The same holds for the linear variant of these three parameters.
Proof.
Let be one of the parameters , , or . We want to show that deciding whether is NP-complete. Membership in NP is easy since a branch decomposition is an easily verifiable certificate.
For NP-hardness, for technical accuracy we need to use Theorem 4 and reduce Betweenness to deciding . Take an instance of Betweenness and let be the UQC instance obtained from Theorem 4, and then obtain as constructed above from that UQC instance. If is a YES-instance of Betweenness, then UQC and by Theorem 4 there is a ternary caterpillar that satisfies . Then, Proposition 6 implies that . This implies that , since is an upper bound on all the possible parameters listed above (by Lemma 3).
Conversely, if is a NO-instance of Betweenness, then no tree satisfies the UQC instance . By Proposition 6, , which implies since is a lower bound on all the possible parameters listed above (by Lemma 3). Therefore, is a YES-instance of Betweenness if and only if .
Moreover , therefore an algorithm recognising graphs with parameter equal to one in time could be used to solve UQC in time , contradicting Theorem 5 assuming ETH.
Remarks on the graph class of hard instances
Let us observe that, denoting by the chordless cycle on vertices, our construction produces a graph that contains no induced nor its complement, for any . Indeed, has no such induced because the vertices are simplicial and thus are not in a , and the vertices induce the complement of a set of disjoint s. Likewise, induce no in . So a would contain some , which in the cycle would be in an induced path of the form of , at which point there is no way to prolong the induced path and form a . It follows that the hard instances are weakly chordal, a subclass of perfect graphs. Although all graphs of 1 are weakly chordal [23], this is not the case for graphs of (linear) sim-width 1. We note that for chordal graphs, i.e., graphs that are -free for every , whether can be decided in polynomial time [24]. The set of forbidden induced cycles from our construction is therefore, in some sense, tight for the case equal to 1.
Using a similar reduction for mim-width 1 (or linear mim-width 1)?
It is interesting to ponder the possibility of using a similar reduction for . It appears difficult to do so and here we provide the intuitive reasons for this. The high-level idea in our reduction is to construct a graph that includes vertices representing the elements of the UQC instance and, for each quartet , a gadget . A reduction for would have the following intended properties.
-
1.
In any branch decomposition of , if the four vertices of a quartet do not satisfy , then some edge of the decomposition induces a cut within containing an induced matching of size 2. Thus, is meant to “force” a particular shape for the subtree containing these four vertices in any branch decomposition of mim-width 1.
-
2.
If the UQC instance is satisfiable, then there exists a branch decomposition of whose mim-width is exactly 1.
The difficulty arises when we try to satisfy these conditions simultaneously. Consider two different quartets and with corresponding gadgets and . In the branch decomposition guaranteed by property 2, the subtrees corresponding to these two gadgets may overlap (it seems hard to avoid this). As a consequence, an edge of used in the induced matching when is unsatisfied (property 1) may lie in the same cut as an edge of used when is unsatisfied.
To ensure mim-width 1, we must prevent these two edges from forming an induced matching. This forces us to add blocking edges between certain endpoints of edges coming from and in order to destroy the unwanted induced matchings. In our reduction, the blocking edges correspond to the edges between the -vertices corresponding to different quartets.
However, these blocking edges create a new problem: they may themselves form an induced matching of size 2 across some cut, contradicting property 2 and preventing the existence of a mim-width 1 decomposition even when the UQC instance is satisfiable. In our reduction, this corresponds to the last case in the proof of Lemma 8: the matching of the type , for different , which is only destroyed with edges not in the cut.
In short, enforcing quartet constraints independently via the gadgets inevitably causes interactions (either among the gadgets or among the blocking edges) that create new induced matchings. We found no way around this, which is why our approach does not seem extendable to mim-width 1 (or linear mim-width 1).
4 Mim-width and linear mim-width
In this section, we describe two closely related reductions. The first is used to prove the hardness of recognizing graphs with 2, and the second establishes the hardness of recognizing graphs with 2.
We modify the previous reduction by adding four new vertices per quartet. Additionally, one extra vertex is introduced in the non-linear version.
Given a UQC instance , we define the following graph :
-
Vertices: For each element , we introduce a vertex . For each quartet , we introduce eight additional vertices:
Let (resp. ) denote the set of all such -vertices (resp. -vertices).
-
Edges: For each quartet , add the edges
together with
Moreover, add all possible edges so that forms a clique, add an edge between every pair of vertices whenever they correspond to different quartets (i.e., whenever their superscript differs), and between every pair of vertices and , whenever they correspond to different quartets.
The graph is obtained from by adding an extra vertex , sharing an edge with every vertex in .
Note, the constructed graphs and have at least 2, since Vatshelle argued that graphs of [23, Corollary 3.7.4] have no induced cycle of length 5 or more, whereas these graphs have such cycles of the form .
Proposition 9.
If there is a caterpillar satisfying the UQC instance , then , and . Otherwise, if then , and .
The proof has the same structure as in the previous section, but require a more involved case analysis. We split it into several lemmas.
Lemma 10.
If then .
Lemma 11.
If then .
The first step in the proofs of these two lemmas is similar. We begin by showing a result on any branch decomposition of . Any branch decomposition of can be transformed into one of by deleting the -leaf. The result will therefore also apply to branch decompositions of .
Let , and let be any branch decomposition of . Assume by contradiction that . There must exist a quartet that is not satisfied by ; otherwise, would belong to .
Without loss of generality, assume that is true. Let be the set of all edges of inducing a cut such that and . Note that forms a path. Let (resp. ) denote (resp. ); that is, (resp. ) consists of all vertices on the side of (resp. ) of .
Claim 12.
Either are all contained in , or they are all contained in .
Proof.
Suppose, for the sake of contradiction, that there exists an edge of such that one of the -vertices lies in and another lies in . We will show that we can always find an induced matching of size in . We proceed by a case analysis.
First, consider the case where both and lie in . Choose such that is a -vertex in . Along the path of , at least one edge crosses the cut ; likewise, at least one edge of the path also crosses the cut. These two crossing edges, together with the edge , form an induced matching in . Indeed, the only other edges that could appear among these six vertices in are , which lies entirely within , and , which lies entirely within .
Therefore, we may assume that at least one of or is in . Without loss of generality, we may assume that . By applying the symmetric argument on the pair , we may assume that one of the vertices or lies in .
Suppose now that . Then one of the edges on the path , together with the edges and , forms an induced matching in . Hence we may assume .
Next, suppose that . Then one of the edges on the path , together with the edges and , forms an induced matching in . Hence we may assume .
If we had , then one of the edges on the path , together with the edges and , forms an induced matching in . Therefore .
It follows that , and by symmetry again, we have as well. In this situation, the three edges , , and form an induced matching in .
This establishes that either are all contained in , or they are all contained in .
We will assume without loss of generality that all the gammas are in . We are now ready to finish the proof of Lemma 10.
Proof of Lemma 10.
We now assume for contradiction that is a caterpillar satisfying , implying in particular that . Note that Claim 12 is applicable to since it holds for any branch decomposition. Now, one of or is adjacent to an endpoint of in (recall that is the set of edges separating and ). Without loss of generality, suppose it is , and let be the neighbor of on the spine of the caterpillar. Let be the edge incident to that is not in , other than (so, is the next edge on the spine beyond , going towards ). This induces a cut with and all the -vertices in , and . Consequently, the edges , , and form an induced matching in . This implies that , which contradicts our initial assumption that .
The proof of Lemma 11 is slightly more complicated, because might not be a caterpillar. Therefore, we need a case analysis depending on which vertices of lie in the branch containing and which lie in the branch containing . The additional vertex is required to force an induced matching of size in all configurations.
Proof of Lemma 11.
We assume for contradiction that is a branch decomposition of satisfying . Let be the endpoint of that lies on the path between and in (thus, one incident “side” of contains , one contains , and the remaining side contains both and , see figure). Let be the edge from toward and , the edge toward , and the edge toward . We denote by , , and the cuts induced by , , , respectively. We have , and we partition as where (resp. ) consists of the vertices of in the branch toward (resp. toward ).
The remainder of the proof accumulates a series of facts under our contradiction assumptions, ultimately showing that every possible placement of the -vertices, the -vertices, and leads to a -induced matching across one of the edges , , or . Recall that we defined and .
Fact 1.
The -vertices of the quartet all lie in or all lie in .
Proof.
Claim 12 still holds, because can be turned into a branch decomposition of by deleting the -leaf, which does not increase the mim-width of the decomposition.
We will now assume without loss of generality that all -vertices of the quartet lie in
Fact 2.
All -vertices of the quartet lie in .
Proof.
Suppose not, and assume without loss of generality that or (the cases or are symmetric). Then one of the edges or crosses the cut (with in the first case). One of the edges of the path must also cross the cut. The vertex is in by Fact 1. These two edges, together with the edge , form an induced matching of size 3.
Fact 3.
The vertex is in .
Proof.
Assume for contradiction that . Using Fact 1 and Fact 2, all the and vertices are in . In the cut , the edges , , and form an induced matching of size 3.
Fact 4.
Each side and contains at least one -vertex.
Proof.
Note that by Fact 2, each -vertex belongs to either or . If all the four -vertices lie on the same side, say , then across the cut the edges , , and form an induced matching of size 3. Likewise, not all four -vertices can lie in .
Fact 5.
At least one of lies in . Symmetrically, at least one of lies in .
Proof.
Using Fact 1, each -vertex is either in or . Assume and are both in . Then one of the edges of the path must cross the cut . Together with the edges and , this yields an induced matching of size 3, a contradiction.
Using Fact 3, the vertex is either in or in . In the rest of the proof, we will assume without loss of generality that (to see why this is without loss of generality, notice that if this is not the case, then we may swap the subscripts of and , and the subscripts of and without affecting the previous arguments since they all apply symmetrically to and ).
Fact 6.
The vertices and are both in .
Proof.
Consider with . Using Fact 2, is either in or in . Assume by contradiction that it is in . We consider two subcases depending of the position of . Using Fact 1, is either in or in .
If is in , across the cut , the following 3 edges form an induced matching:
-
.
-
.
-
One of the edge of the path .
Otherwise is in . Then across the cut , the following 3 edges form an induced matching:
-
.
-
We take an edge joining a -vertex in to in (see Fact 5).
-
One of the edge of the path .
Fact 7.
At least one of lies in .
Proof.
Using Fact 1, each -vertex is either in or . Assume for contradiction that and are both in . Across the cut , the following 3 edges form an induced matching: , , and (we know that using Fact 6).
Fact 8.
The vertex is in .
Proof.
Using Fact 2, is either in or in . Assume by contradiction that it is in . Across the cut , the following 3 edges form an induced matching:
Fact 9.
The vertex is the only gamma vertex in .
Proof.
Assume by contradiction that there is a -vertex other than in . Across the cut , the following 3 edges form an induce matching:
We can finally conclude the proof. By combining Fact 1 and Fact 9, we know that and are both in . Across the cut , the following 3 edges form an induced matching: , , and (since is in by Fact 6). This completes the proof: in all cases we obtain an induced matching of size 3.
Lemma 13.
If there is a caterpillar satisfying the UQC instance , then .
Proof.
As we already observed, because it contains induced cycles of length , implying . We focus on the upper bound.
Let be a caterpillar satisfying , and let be a total order on that realizes. For each , define
that is, consists of all vertices in whose index is . We extend to a total order on as follows: for all with , and for all , , we set ; within each , the order is arbitrary. Let be the ternary caterpillar realizing . We prove that , i.e., for every edge of .
Because is a caterpillar, it suffices to consider the cuts induced by the edges of its spine. Let be an edge of the spine, and let be the cut induced by . Since realizes , one side of the cut is an initial segment of . Thus, either for all and we have , or for all and we have .
Let be three edges with pairwise disjoint endpoints such that and . Suppose, for contradiction, that these three edges form an induced matching in .
First, note that at most one of the six vertices lies in . Indeed, a vertex is adjacent only to vertices of . If were among the six vertices, then would separate from another element of ; by the construction of , this can happen for at most one index .
We say that a vertex of is of type for a quartet if is one of the eight vertices in corresponding to (i.e., the type is the superscript ). Suppose is an edge with of type and of type . In our construction, the only vertices not adjacent to are in or of type ; hence and must each lie in or be of type . Symmetrically, the only vertices not adjacent to are those in or of type , so and must each lie in or be of type . If, without loss of generality, is the only possible vertex possibly in , then is of type and is of type , which forces , contradicting that the three edges form an induced matching.
Therefore, at most one of the six vertices in the induced matching is in and the remaining vertices in all have the same type . The three matching edges must then be of the following kinds: –, –, –, or –.
We cannot have two – edges, since is a clique and there would be an extra edge between the -endpoints, violating the induced property.
Assume there are two – edges. The only possibilities are and . Without loss of generality, let and . By the definition of , this implies , hence in , which contradicts that satisfies the quartet .
Since at most one of the six vertices lies in , it follows that exactly one matching edge is of type – (say ), exactly one is of type – (say ), and the remaining one (say ) is either – or –.
Without loss of generality, let . If , then is adjacent to (both are -vertices), so the matching is not induced. Otherwise, if , then must be . Since separates from , the cut lies inside ; together with crossing the cut, this forces to lie between and in the order , contradicting that satisfies the quartet . This contradiction shows that no induced matching of size can appear in , and hence for every spine edge of . Therefore, and .
Lemma 14.
If there is a caterpillar satisfying the UQC instance , then .
Proof.
Again, follows from the existence of induced cycles of length 6 and we show that .
Let be a caterpillar satisfying . For each , define
that is, consists of all vertices in whose index is .
We define a new tree from by adding the leaf anywhere on the caterpillar. For each , replace the leaf by a rooted subtree whose leaves are exactly the vertices of . The leaf is attached directly to the root of this subtree, and all the other leaves lie on the other branch (see Figure 4).
We prove that , i.e., for every edge of . Fix any edge of .
Let be three edges with pairwise disjoint endpoints such that and . Suppose, for contradiction, that these three edges form an induced matching in .
First note that none of the six endpoints lies in . Indeed, each is adjacent exactly to the vertices of , and by the placement of in , any cut with that separates from some vertex of must be of one of two forms. Either , then there is no matching of size ; or because is in the subtree containing , then, since is adjacent to every vertex of , the matching would not be induced.
As in the previous proof, we say that a vertex of is of type for a quartet if is one of the eight vertices in corresponding to . Suppose is an edge with of type and of type . In our construction of , the only vertices nonadjacent to are those in , those of type , and possibly . Since no endpoint is in , it follows that and must be of type or be ; symmetrically, and must be of type or be . If, without loss of generality, is the only vertex that might be , then is of type and is of type , which forces , contradicting that the three edges form an induced matching.
Hence all of the endpoints of the matching that are in belong to a common type (say ). Moreover, at most one of these endpoints is . Thus the three matching edges must be among the following kinds: –, –, or –.
We cannot have two – edges, since is a clique, which would create an extra edge between -endpoints and violate the induced property.
Assume there are two – edges. The only possibilities are and . Without loss of generality, let and . This implies that in , the path intersects the path (in particular, they intersect at the ends of ). By our construction of from , this in turn implies that in , the path intersects the path, and thus does not satisfy . Since our transformation from to does not alter its quartets but only adds new ones, this contradicts that satisfies .
Moreover, we cannot have simultaneously a – edge and an – edge, because is adjacent to all -vertices, creating a forbidden cross-edge and destroying the induced property. Since there is at most one – edge, any third edge would have to be either – or –, both of which have been ruled out. Therefore no induced matching of size 3 can exist, a contradiction.
This proves that for every edge of , and hence .
Theorem 2. [Restated, see original statement.]
The problem of deciding whether a graph has mim-width or linear mim-width at most is NP-complete. Moreover, assuming the ETH, it cannot be solved in time , where is the number of vertices of the graph.
Proof.
We proceed as in Theorem 1. Take an instance of Betweenness and let be the UQC instance obtained from Theorem 4. Then let and be obtained from as described above. If is a YES-instance, then and by Theorem 4 some ternary caterpillar satisfies . Then by Proposition 9 we have and . If is a NO-instance, then and by Proposition 9 we have and . Thus is a YES-instance of Betweenness if and only if , and if and only if , which proves the NP-hardness of our two problems (and membership in NP is easy).
As for the ETH lower bound, we observe that and . Since and are linear in , Theorem 5 implies that no time algorithm can recognize 2 and 2 graphs under the ETH.
5 Open problems
Many questions remain open. The most important one is whether graphs of mim-width 1 and graphs of linear mim-width 1 can be recognized in polynomial time.
Our result also does not imply that deciding whether (linear) is NP-hard for every fixed constant . One possible direction is to address the following question: Is there a graph operation that transforms any graph into a graph satisfying ? Alternatively, is there a graph operation that multiplies the mim-width of any graph by a constant factor? The same question remains open for other width parameters as well.
Another question is whether UQC can be used to prove hardness of other graph-to-tree representations?
Finally, can one obtain inapproximability results, for instance via a reduction that yields an arbitrarily large approximation gap?
References
- [1] Dhanyamol Antony, Yixin Cao, Sagartanu Pal, and R. B. Sandeep. Switching Classes: Characterization and Computation. In Rastislav Královič and Antonín Kučera, editors, 49th International Symposium on Mathematical Foundations of Computer Science (MFCS 2024), volume 306 of Leibniz International Proceedings in Informatics (LIPIcs), pages 11:1–11:15, Dagstuhl, Germany, 2024. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. doi:10.4230/LIPIcs.MFCS.2024.11.
- [2] Dhanyamol Antony, Yixin Cao, Sagartanu Pal, and RB Sandeep. Switching classes: Characterization and computation. arXiv preprint, 2024. arXiv:2403.04263.
- [3] Rémy Belmonte and Martin Vatshelle. Graph classes with structured neighborhoods and algorithmic applications. Theoretical Computer Science, 511:54–65, 2013. doi:10.1016/J.TCS.2013.01.011.
- [4] Benjamin Bergougnoux, Édouard Bonnet, and Julien Duron. Mim-Width Is paraNP-Complete. In Keren Censor-Hillel, Fabrizio Grandoni, Joël Ouaknine, and Gabriele Puppis, editors, 52nd International Colloquium on Automata, Languages, and Programming (ICALP 2025), volume 334 of Leibniz International Proceedings in Informatics (LIPIcs), pages 25:1–25:17, Dagstuhl, Germany, 2025. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. doi:10.4230/LIPIcs.ICALP.2025.25.
- [5] Benjamin Bergougnoux, Jan Dreier, and Lars Jaffke. A logic-based algorithmic meta-theorem for mim-width. In Proceedings of the 2023 Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 3282–3304. SIAM, 2023. doi:10.1137/1.9781611977554.CH125.
- [6] Benjamin Bergougnoux, Svein Høgemo, Jan Arne Telle, and Martin Vatshelle. Recognition of linear and star variants of leaf powers is in p. In Michael A. Bekos and Michael Kaufmann, editors, Graph-Theoretic Concepts in Computer Science, pages 70–83, Cham, 2022. Springer International Publishing. doi:10.1007/978-3-031-15914-5_6.
- [7] Benjamin Bergougnoux, Tuukka Korhonen, and Igor Razgon. New width parameters for independent set: One-sided-mim-width and neighbor-depth. In International Workshop on Graph-Theoretic Concepts in Computer Science, pages 72–85. Springer, 2023. doi:10.1007/978-3-031-43380-1_6.
- [8] Benjamin Bergougnoux, Charis Papadopoulos, and Jan Arne Telle. Node multiway cut and subset feedback vertex set on graphs of bounded mim-width. Algorithmica, 84(5):1385–1417, 2022. doi:10.1007/S00453-022-00936-W.
- [9] Svein Høgemo. Mapping graphs to trees: Partition trees, leaf powers and decompositions. PhD thesis. The University of Bergen, 2025.
- [10] Russell Impagliazzo and Ramamohan Paturi. On the complexity of k-sat. Journal of Computer and System Sciences, 62(2):367–375, 2001. doi:10.1006/JCSS.2000.1727.
- [11] Lars Jaffke, O-joung Kwon, Torstein JF Strømme, and Jan Arne Telle. Mim-width iii. graph powers and generalized distance domination problems. Theoretical Computer Science, 796:216–236, 2019. doi:10.1016/J.TCS.2019.09.012.
- [12] Lars Jaffke, O-joung Kwon, and Jan Arne Telle. Mim-width i. induced path problems. Discrete Applied Mathematics, 278:153–168, 2020. doi:10.1016/J.DAM.2019.06.026.
- [13] Lars Jaffke, O-joung Kwon, and Jan Arne Telle. Mim-width ii. the feedback vertex set problem. Algorithmica, 82(1):118–145, 2020. doi:10.1007/S00453-019-00607-3.
- [14] Dong Yeap Kang, O-joung Kwon, Torstein JF Strømme, and Jan Arne Telle. A width parameter useful for chordal and co-comparability graphs. Theoretical Computer Science, 704:1–17, 2017. doi:10.1016/J.TCS.2017.09.006.
- [15] Max Dupré la Tour, Manuel Lafond, and Ndiamé Ndiaye. Recognizing leaf powers and pairwise compatibility graphs is np-complete, 2025. doi:10.48550/arXiv.2510.19763.
- [16] Andrea Munaro and Shizhou Yang. On algorithmic applications of sim-width and mim-width of (h1, h2)-free graphs. Theoretical Computer Science, 955:113825, 2023. doi:10.1016/J.TCS.2023.113825.
- [17] J. Opatrny. Total ordering problem. SIAM Journal on Computing, 8(1):111–114, 1979. doi:10.1137/0208008.
- [18] Yota Otachi, Akira Suzuki, and Yuma Tamura. Finding Induced Subgraphs from Graphs with Small Mim-Width. In Hans L. Bodlaender, editor, 19th Scandinavian Symposium and Workshops on Algorithm Theory (SWAT 2024), volume 294 of Leibniz International Proceedings in Informatics (LIPIcs), pages 38:1–38:16, Dagstuhl, Germany, 2024. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. doi:10.4230/LIPIcs.SWAT.2024.38.
- [19] Michaël Rao. Clique-width of graphs defined by one-vertex extensions. Discrete Mathematics, 308(24):6157–6165, 2008. doi:10.1016/J.DISC.2007.11.039.
- [20] Sigve Hortemo Sæther and Martin Vatshelle. Hardness of computing width parameters based on branch decompositions over the vertex set. Theoretical Computer Science, 615:120–125, 2016. doi:10.1016/J.TCS.2015.11.039.
- [21] Rahul Shah and Martin Farach-Colton. On the complexity of ordinal clustering. Journal of Classification, 23(1):79–102, 2006. doi:10.1007/S00357-006-0005-3.
- [22] Michael Steel. The complexity of reconstructing trees from qualitative characters and subtrees. Journal of Classification, 9(1):91–116, January 1992. doi:10.1007/BF02618470.
- [23] Martin Vatshelle. New width parameters of graphs. PhD Thesis. The University of Bergen, 2012.
- [24] Emile Ziedan, Deepak Rajendraprasad, Rogers Mathew, Martin Charles Golumbic, and Jérémie Dusart. The induced separation dimension of a graph. Algorithmica, 80(10):2834–2848, October 2018. doi:10.1007/s00453-017-0353-x.
