Bounding the Mim-Width of Hereditary Graph Classes

A large number of NP-hard graph problems become polynomial-time solvable on graph classes where the mim-width is bounded and quickly computable. Hence, when solving such problems on special graph classes, it is helpful to know whether the graph class under consideration has bounded mim-width. We first extend the toolkit for proving (un)boundedness of mim-width of graph classes. This enables us to initiate a systematic study into bounding mim-width from the perspective of hereditary graph classes. For a given graph $H$, the class of $H$-free graphs has bounded mim-width if and only if it has bounded clique-width. We show that the same is not true for $(H_1,H_2)$-free graphs. We find several general classes of $(H_1,H_2)$-free graphs having unbounded clique-width, but the mim-width is bounded and quickly computable. We also prove a number of new results showing that, for certain $H_1$ and $H_2$, the class of $(H_1,H_2)$-free graphs has unbounded mim-width. Combining these with known results, we present summary theorems of the current state of the art for the boundedness of mim-width for $(H_1,H_2)$-free graphs.


Introduction
Many computationally hard graph problems can be solved efficiently after placing appropriate restrictions on the input graph. Instead of trying to solve individual problems in an ad hoc way, one may aim to find the underlying reasons why some sets of problems behave better on certain graph classes than other sets of problems. The ultimate goal in this type of research is to obtain complexity dichotomies for large families of graph problems. Such dichotomies tell us for which graph classes a certain problem or set of problems can or cannot be solved efficiently (under standard complexity assumptions). One reason that might explain the jump from computational hardness to tractability after restricting the input to some graph class G is that G has bounded "width", that is, every graph in G has width at most c for some constant c. One can define the notion of "width" in many different ways (see the surveys [31,32,38,49]). As such, the various width parameters differ in strength. To explain this, we say that a width parameter p dominates a width parameter q if there is a function f such that p(G) ≤ f (q(G)) for all graphs G. If p dominates q but q does not dominate p, then p is said to be more powerful than q. As a consequence, proving that a problem is polynomial-time solvable for graph classes for which p is bounded yields more tractable graph classes than doing this for graph classes for which q is bounded. If both p and q dominate each other, then p and q are equivalent. For instance, the width parameters boolean-width, clique-width, module-width, NLC-width and rank-width are all equivalent [15,37,44,46], but more powerful than the equivalent parameters branchwidth and treewidth [19,47,49]. In this paper we focus on an even more powerful width parameter called mim-width (maximum induced matching width). Vatshelle [49] introduced mim-width, which we define in Section 3, and proved that mim-width is more powerful than boolean-width, and consequently, clique-width, module-width, NLC-width and rank-width.

Algorithmic Implications
One trade-off of a more powerful width parameter is the difficulty in obtaining a branch decomposition of bounded width. In general, computing mim-width is NP-hard; deciding if the mim-width is at most k is W[1]-hard when parameterized by k; and there is no polynomial-time algorithm for approximating the mim-width of a graph to within a constant factor of the optimal, unless NP = ZPP [48]. Hence, in contrast to algorithms for graphs of bounded treewidth or clique-width, algorithms for graphs of bounded mim-width require a branch decomposition of constant mim-width as part of the input. On the other hand, there are many interesting graph classes for which mim-width is bounded and quickly computable, that is, the class admits a polynomial-time algorithm for obtaining a branch decomposition of constant mim-width. We give examples of such graph classes known in the literature in Section 1.2 before discussing the new graph classes we found in Section 1.4. Below we briefly discuss known algorithms for problems on graph classes of bounded mim-width.
Belmonte and Vatshelle [1] and Bui-Xuan, Telle and Vatshelle [16] proved that a large set of problems, known as Locally Checkable Vertex Subset and Vertex Partitioning (LC-VSVP) problems [45], can be solved in polynomial time for graph classes where mim-width is bounded and quickly computable. Well-known examples of such problems include (Total) Dominating Set, Independent Set and k-Colouring for every fixed positive integer k. 1 Later, Fomin, Golovach and Raymond [27] proved that the XP algorithms for Independent Set and Dominating Set are in a sense best possible, showing that these two problems are W[1]-hard when parameterized by mim-width.
On the positive side, XP algorithms parameterized by mim-width are now also known for problems outside the LC-VSVP framework. In particular, Jaffke, Kwon, Strømme and Telle [34] proved that the distance versions of LC-VSVP problems can be solved in polynomial time for graph classes where mim-width is bounded and quickly computable. Jaffke, Kwon and Telle [35,36] proved similar results for Longest Induced Path, Induced Disjoint Paths, H-Induced Topological Minor and Feedback Vertex Set. The latter result has recently been generalized to Subset Feedback Vertex Set and Node Multiway Cut, by Bergougnoux, Papadopoulos and Telle [3].
Bergougnoux and Kanté [2] gave a meta-algorithm for problems with a global constraint, providing unifying XP algorithms in mim-width for several of the aforementioned problems, as well as Connected Dominating Set, Node Weighted Steiner Tree, and Maximum Induced Tree. Galby, Munaro and Ries [29] proved that Semitotal Dominating Set is polynomial-time solvable for graph classes where mim-width is bounded and quickly computable.

Mim-width of Special Graph Classes
Belmonte and Vatshelle [1] proved that the mim-width of the following graph classes is bounded and quickly computable: permutation graphs, convex graphs and their complements, interval graphs and their complements, circular k-trapezoid graphs, circular permutation graphs, Dilworth-k graphs, k-polygon graphs, circular-arc graphs and complements of ddegenerate graphs.
Some of the results of [1] have been extended. Let K r K r be the graph obtained from 2K r by adding a perfect matching, and let K r rP 1 be the graph obtained from K r K r by removing all the edges in one of the complete graphs (see Section 2 for undefined notation). Kang et al. [39] showed that for any integer r ≥ 2, there is a polynomial-time algorithm for computing a branch decomposition of mim-width at most r − 1 when the input is restricted to (K r rP 1 )-free chordal graphs, which generalize interval graphs, or (K r K r )-free co-comparability graphs, which generalize permutation graphs. Hence, in particular, all these classes have bounded mim-width.
Kang et al. [39] also proved that the classes of chordal graphs, circle graphs and cocomparability graphs have unbounded mim-width; for the latter two classes, this was shown independently by Mengel [43]. Vatshelle [49] and Brault-Baron et al. [11] showed the same for grids and chordal bipartite graphs, respectively, whereas Mengel [43] proved that strongly chordal split graphs have unbounded mim-width.
Brettell et al. [12] showed that the mim-width of (K r , sP 1 + P 5 )-free graphs is bounded and quickly computable for every r ≥ 1 and s ≥ 0. In particular, this yielded an alternative proof for showing that List k-Colouring is polynomially solvable for (sP 1 + P 5 )-free graphs for all k ≥ 1 and s ≥ 0 [20]. Let K 1 1,s be the graph obtained from the (s + 1)-vertex star K 1,s after subdividing each edge once; note that sP 1 + P 5 is an induced subgraph of K 1 1,s+2 . In [13], the result of [12] on the mim-width of (K r , sP 1 + P 5 )-free graphs was generalized to (K r , K 1 1,s , P t )-free graphs. As a consequence, for all k ≥ 3, s ≥ 1 and t ≥ 1, List k-Colouring is polynomial-time solvable even for (K 1 1,s , P t )-free graphs; previously this was shown for k = 3 by Chudnovsky et al. [18].
Brettell et al. [14] considered the following generalisation of convex graphs. A bipartite graph G = (A, B, E) is H-convex, for some family of graphs H, if there exists a graph H ∈ H with V (H) = A such that the set of neighbours in A of each b ∈ B induces a connected subgraph of H (when H is the set of paths, we obtain exactly convex graphs). They showed that the class of H-convex graphs has bounded and quickly computable mim-width if H is the set of cycles, or H is the set of trees with bounded maximum degree and bounded number of vertices of degree at least 3.

Our Focus
We continue the study on boundedness of mim-width and aim to identify more graph classes of bounded or unbounded mim-width. Our motivation is both algorithmic and structural. As discussed above, there are clear algorithmic benefits if a graph class has bounded mim-width. From a structural point of view, we aim to initiate a systematic study of the boundedness of mim-width, comparable to a similar, long-standing study of the boundedness of clique-width (see [23,32,38] for some surveys on clique-width).
The framework of hereditary graph classes is highly suitable for such a study. A graph class G is hereditary if it is closed under vertex deletion. A class G is hereditary if and only if there exists a (unique) set of graphs F of (minimal) forbidden induced subgraphs for G. That is, a graph G belongs to G if and only if G does not contain any graph from F as an induced subgraph. We also say that G is F-free. Note that F may have infinite size. For example, if G is the class of bipartite graphs, then F is the set of all odd cycles.
As a natural starting point we consider the case where |F| = 1, say F = {H}. It is not difficult to verify that a class of H-free graphs has bounded mim-width if and only if it has bounded clique-width if and only if H is an induced subgraph of the 4-vertex path P 4 ; see Section 3 for details. On the other hand, there exist hereditary graph classes, such as interval graphs and permutation graphs, that have bounded mim-width, even mim-width 1 [49], but unbounded clique-width [33]. However, these graph classes have an infinite set of forbidden induced subgraphs. Hence, questions we aim to address in this paper are: Does there exist a hereditary graph class characterized by a finite set F that has bounded mim-width but unbounded clique-width? Can we use the same techniques as when dealing with clique-width? In particular we focus on the case where |F| = 2. Such classes are called bigenic.

Our Results and Methodology
In order to work with width parameters it is useful to have a set of graph operations that preserve boundedness or unboundedness of the width parameter. That is, if we apply such a width-preserving operation, or only apply it a constant number of times, the width of the graph does not change by too much. In this way one might be able to modify an arbitrary graph from a given "unknown" class G 1 into a graph from a class G 2 known to have bounded or unbounded width. This would then imply that G 1 also has bounded or unbounded width, respectively. Two useful operations preserving clique-width are vertex deletion [42] and subgraph complementation [38]. The latter operation replaces every edge in some subgraph of the graph by a non-edge, and vice versa. As we will see in Section 6, subgraph complementation does not preserve boundedness or unboundedness of mim-width 2 .
To work around this limitation, we collect and generalize known mim-width preserving graph operations from the literature in Section 3 (some of these operations only show that the mim-width cannot decrease after applying them). In the same section we also state some known useful results on mim-width and prove that elementary graph classes, such as walls and net-walls, have unbounded mim-width.
In Sections 4 and 5 we use the results from Section 3. In Section 4 we present new bigenic classes of bounded mim-width. These graph classes are all known to have unbounded clique-width. Hence, our results show that the dichotomy for boundedness of mim-width no longer coincides with the one for clique-width when |F| = 2 instead of |F| = 1. Moreover, for each of these classes, a branch decomposition of constant mim-width is easily computable for any graph in the class. This immediately implies that there are polynomial-time algorithms for many problems when restricted to these classes, as described in Section 1.1. In Section 5 we present new bigenic classes of unbounded mim-width; these graph classes are known to have unbounded clique-width.
In Section 6 we give a state-of-the-art summary of our new results combined with known results. The known results include the bigenic graph classes of bounded clique-width (as bounded clique-width implies bounded mim-width). In the same section we compare our results for the mim-width of bigenic graph classes with the ones for clique-width. We also state a number of open problems.

Preliminaries
We consider only finite graphs G = (V, E) with no loops and no multiple edges.
A graph is subcubic if every vertex has degree at most 3. For disjoint S, T ⊆ V , we say that S is complete to T if every vertex of S is adjacent to every vertex of T , and S is anticomplete to T if there are no edges between S and T . The distance from a vertex u to a vertex v in G is the length of a shortest path between u and v. A set S ⊆ V induces the subgraph G[S] = (S, {uv : u, v ∈ S, uv ∈ E}). If G is an induced subgraph of G we write G ⊆ i G. The complement of G is the graph G with vertex set V (G), such that uv ∈ E(G) if and only if uv / ∈ E(G). Given a graph G and a degree-k vertex v of G with N (v) = {u 1 , . . . , u k }, the clique implant on v is the operation of deleting v, adding k new vertices v 1 , . . . , v k forming a clique, and adding edges v i u i for each i ∈ {1, . . . , k}. The k-subdivision of an edge uv in a graph replaces uv by k new vertices w 1 , . . . , w k with edges uw 1 , w k v and w i w i+1 for each i ∈ {1, . . . , k − 1}, i.e. the edge is replaced by a path of length k + 1. The disjoint union G + H of graphs G and H has vertex set V (G) ∪ V (H) and edge set E(G) ∪ E(H). We denote the disjoint union of k copies of G by kG. For a graph H, a graph G is H-free if G has no induced subgraph isomorphic to H. For a set of graphs An independent set of a graph is a set of pairwise non-adjacent vertices. A clique of a graph is a set of pairwise adjacent vertices. A matching of a graph is a set of pairwise non-adjacent edges. A matching M of a graph G is induced if there are no edges of G between vertices incident to distinct edges of M .
The path, cycle and complete graph on n vertices are denoted by P n , C n and K n , respectively. The graph K 3 is also called the triangle. A graph is r-partite, for r ≥ 2, if its vertex set admits a partition into r classes such that every edge has its endpoints in different classes. An r-partite graph in which every two vertices from different partition classes are adjacent is a complete r-partite graph and a 2-partite graph is also called bipartite. A graph is co-bipartite if it is the complement of a bipartite graph. A split graph is a graph G that admits a split partition (C, I), that is, V (G) can be partitioned into a clique C and an independent set I. Equivalently, a graph is split if and only if it is (2P 2 , C 4 , C 5 )-free. The subdivided claw S h,i,j , for 1 ≤ h ≤ i ≤ j is the tree with one vertex x of degree 3 and exactly three leaves, which are of distance h, i and j from x, respectively. Note that S 1,1,1 = K 1,3 . For t ≥ 3, sun t denotes the graph on 2t vertices obtained from a complete graph on t vertices u 1 , . . . , u t by adding t vertices v 1 , . . . , v t such that v i is adjacent to u i and u i+1 for each i ∈ {1, . . . , t − 1} and v t is adjacent to u 1 and u t . See Figure 1 for a picture of sun 5 .     We now prove that mimw(G ) ≤ mimw(G) + d (v). Suppose that v is a degree-k vertex of G, and let {v 1 , . . . , v k } be the clique implanted on v. Given a branch decomposition (T, δ) for G, we construct a branch decomposition (T , δ ) for G such that mimw We claim that mimw G (T , δ ) ≤ mimw G (T, δ) + k. Suppose, to the contrary, that there exists e ∈ E(T ) such that cutmim G (A e , A e ) > mimw G (T, δ) + k. We have that e ∈ E(T ), Mengel [43] showed that adding edges inside the partition classes of a bipartite graph does not decrease mim-width by much. This result can be generalized to k-partite graphs in the following way.

Lemma 4.
Let G be a k-partite graph with partition classes V 1 , . . . , V k , and let G be a graph obtained from G by adding edges where for each added edge, there exists some i such that both endpoints are in V i . Then mimw(G ) ≥ 1 k · mimw(G).
Proof. Let (T, δ) be a branch decomposition for G . Since G and G have the same vertex set, (T, δ) is a branch decomposition for G as well. It is enough to show that mimw G (T, δ) ≤ k · mimw G (T, δ). Therefore, let e ∈ E(T ) be such that mimw The next lemma shows that to bound the mim-width of a class of graphs, we may restrict our attention to 2-connected graphs in the class. We note that this property is not specific to mim-width: it has also been observed, in [31], for rank-width, and this argument also applies for any appropriate width parameter defined using branch decompositions. A block is a maximal connected subgraph with no cut-vertex. Proof. By Lemma 1, mimw(G) ≥ max{mimw(H) : H is a block of G}. We describe how to compute a branch decomposition (T, δ) of G such that mimw G (T, δ) ≤ max{mimw H (T H , δ H ) : H is a block of G}, in polynomial time. It suffices to describe a polynomial-time procedure when G consists of two blocks H 1 and H 2 joined at a vertex v (we can repeat this procedure O(n) times, thereby constructing a branch decomposition for G block-by-block). To construct T , join T H1 and T H2 by identifying the leaf t 1 ∈ T H1 and the leaf t 2 ∈ T H2 such that δ H1 (v) = t 1 and δ H2 (v) = t 2 , and then create a new leaf t incident to the identified vertex. Let δ inherit the mappings from δ H1 and δ H2 , and set δ(v) = t. If e ∈ E(T ) is incident to t, then cutmim G (A e , A e ) ≤ 1, since one of A e and A e has size one. For any other edge of T , either A e or A e contains V (H 1 ) or V (H 2 ). The result follows.
The following lemma is due to Galby and Munaro, who used it to prove that Dominating Set admits a PTAS for a subclass of VPG graphs when the representation is given.

Lemma 6 ([28]). Let G be a graph and let
The final structural lemma is used to prove that (sP 1 + P 5 , K t )-free graphs have bounded mim-width for every s ≥ 0 and t ≥ 1. It shows how we can bound the mim-width of a graph in terms of the mim-width of the graphs induced by blocks of a partition of the vertex set and the mim-width between any two of the parts. We include it here as it might be useful for bounding the mim-width of other graph classes.

Mim-width of Some Basic Classes
Recall that Vatshelle [49] showed that the class of grids has unbounded mim-width. We next prove that the same holds for the class of walls, which we define momentarily. Thus, we obtain a class of graphs with maximum degree 3 having unbounded mim-width, and we will use this result in order to prove Lemma 11. Note that it also gives us a dichotomy, as graphs with maximum degree 2 have bounded clique-width and hence bounded mim-width. A wall of height h and width r (an (h × r)-wall for short) is the graph obtained from the grid of height h and width 2r as follows. Let C 1 , . . . , C 2r be the set of vertices in each of the 2r columns of the grid, in their natural left-to-right order. For each column C j , let e j 1 , e j 2 , . . . , e j h−1 be the edges between two vertices of C j , in their natural top-to-bottom order. If j is odd, we delete all edges e j i with i even. If j is even, we delete all edges e j i with i odd. We then remove all vertices of the resulting graph whose degree is 1. This final graph is an elementary (h × r)-wall and any subdivision of the elementary (h × r)-wall is an (h × r)-wall. For an example, see Figure 3.  ] has a component Q of size at least n(W )/3. The component Q is contained in a rectangle of the underlying n × 2n grid. Consider the smallest such rectangle B, i.e., the rectangle whose horizontal sides contain the uppermost and lowermost vertex in Q and whose vertical sides contain the leftmost and rightmost vertex in Q. Let h and r be the height and width of B, respectively. Since |V (Q)| ≥ n(W )/3, one of h and r is at least 4 n(W )/3. Suppose first that h ≥ 4 n(W )/3. If r < 2n, say without loss of generality B does not intersect column C 1 , we do the following. For each row of B, consider the leftmost vertex of Q in that row (since Q is connected, each row contains at least one vertex of Q). Clearly, the left neighbours of each such vertex belongs to A e , and so we have a matching in W [A e , A e ] of size h − 2 ≥ 4 n(W )/3 − 2, which is at least √ n/10 when n ≥ 7. If r = 2n, we distinguish two cases according to whether h = n or not. In the first case (i.e., r = 2n and h = n) we argue as follows. Since Q is connected, each row of B contains a vertex of Q ⊆ A e . Moreover, there are at most 2n/3 rows of B with all vertices contained in A e , for otherwise |A e | > (2n/3) · 2n ≥ 2n(W )/3. So there are at least n/3 rows of B containing a vertex of A e and a vertex of A e . We can therefore find a matching in W [A e , A e ] of size at least n/3. In the second case (i.e., r = 2n and h < n), we proceed as follows. We assume, without loss of generality, that B does not intersect the uppermost row of the grid. We partition the columns of B into disjoint layers containing two consecutive columns each. For each layer, we consider its left column and the uppermost vertex v ∈ A e therein (since Q is connected, such a vertex exists). Let v 1 be the vertex on the grid above v, let v 2 be the vertex to the right of v and let v 3 be the vertex above v 2 . By construction, v 1 ∈ A e and if vv 1 ∈ E(W ), we select this edge. Otherwise, vv 1 / ∈ E(W ) and so v 2 v 3 ∈ E(W ) and we have a path vv 2 v 3 v 1 in W with v ∈ A e and v 1 ∈ A e . We then select an edge of this path which belongs to Proceeding similarly for each layer, we obtain a matching in W [A e , A e ] of size at least r/2 = n. Suppose finally that h < 4 n(W )/3. We have that r ≥ 4 n(W )/3 and we proceed exactly as in the case r = 2n and h < n to obtain a matching in W [A e , A e ] of size at least r/2 ≥ 4 n(W )/3/2.
It remains to consider the situation in which all components of W [A e ] and W [A e ] have size less than n(W )/3. In particular, since W [A e ] has more than n(W )/3 vertices, it has more than n(W )/3 components. Let Q 1 , . . . , Q k be these components.
. . , }. By construction, n i ≥ 2, for each i. Moreover, since H i is a connected subcubic graph, it has a matching of size at least (n i − 1)/3 ≥ n i /6 [4]. But then H has a matching of size As in all cases we find a matching in W [A e , A e ] of size at least √ n 10 , this concludes the proof.

Corollary 9.
For an integer ∆, let G ∆ be the class of graphs of maximum degree at most ∆.

Then the mim-width of G ∆ is bounded if and only if ∆ ≤ 2.
A net-wall is a graph that can be obtained from a wall G by performing a clique implant on each vertex of G having degree three. An example of part of a net-wall is given in Figure 7.
The following lemma is a straightforward consequence of Theorem 8 and Lemma 3.

Lemma 10. The class of net-walls has unbounded mim-width.
Mengel [43] showed that strongly chordal split graphs, or equivalently (sun 3 , sun 4 , . . .)-free split graphs, have unbounded mim-width. We find two more subclasses of split graphs with unbounded mim-width by using Lemmas 2 and 4. Lemma 11. Let G be the class of split graphs, or equivalently (C 4 , C 5 , 2P 2 )-free graphs, where one of the following properties is satisfied by every G ∈ G: (i) G has a split partition (C, I) where each vertex in I has degree 2 and each vertex in C has at most three neighbours in I, (ii) G has a split partition (C, I) where each vertex in I has degree at most 3, and each vertex in C has two neighbours in I, or Then G has unbounded mim-width.
Proof. Statement (iii) is due to Mengel [43]. To prove (i) and (ii), let G be a wall, and let G be the graph obtained by 1-subdividing each edge of G. Partition V (G ) into (A, B), where B consists of the vertices of degree two introduced by the 1-subdivisions. Observe that G is bipartite, with vertex bipartition (A, B). Let G be the graph obtained by making one of A or B a clique. By Lemmas 2 and 4, mimw(G ) ≥ mimw(G)/2. The result now follows from Theorem 8.
A graph is chordal bipartite if it is bipartite and every induced cycle has four vertices. Brault-Baron et al. [11] showed that the class of chordal bipartite graphs has unbounded mimwidth (we describe their construction in Section 5). Combining their result with Lemma 4, after adding all edges in a colour class, yields the following: Lemma 12. The class of co-bipartite graphs, or equivalently (3P 1 , C 5 , C 7 , C 9 , . . .)-free graphs, has unbounded mim-width.
As the last result in this section we consider hereditary classes defined by one forbidden induced subgraph. It is folklore that the class of H-free graphs has bounded clique-width if and only if H ⊆ i P 4 (see [26] for a proof). It turns out that the same dichotomy holds for mim-width.

Theorem 13. The class of H-free graphs has bounded mim-width if and only if
Proof. If H ⊆ i P 4 , then H-free graphs form a subclass of P 4 -free graphs. Every P 4 -free graph has clique-width at most 2 [19] and so mim-width at most 2 [49]. Suppose now that H is a graph such that the class of H-free graphs has bounded mim-width. Recall that chordal bipartite graphs have unbounded mim-width [11] (see also Section 5). Hence, H is C 3 -free. As co-bipartite graphs, and thus 3P 1 -free graphs, and split graphs, or equivalently, (C 4 , C 5 , 2P 2 )-free graphs, have unbounded mim-width by Lemmas 11 and 12, this means that H is a (3P 1 , 2P 2 )-free forest. It follows that H ⊆ i P 4 .

New Bounded Cases
In this section, we present three general classes and two further specific classes, of (H 1 , H 2 )free graphs having bounded mim-width, but unbounded clique-width. First, we present the three infinite families of classes of (H 1 , H 2 )-free graphs. We show that for a class in one of these three families, there exists a constant k such that for every graph G in the class, and every X ⊆ V (G), we have that cutmim G (X, X) ≤ k. This implies that every branch decomposition of G has mim-width at most k. Thus, for a graph in one of these classes, a branch decomposition of constant mim-width is quickly computable: any branch decomposition will suffice. Finally, we present two more classes of (H 1 , H 2 )-free graphs having bounded mim-width, which do not have this property, but for which we prove that a branch decomposition of constant width can be computed in polynomial-time.
We make use of Ramsey theory. By Ramsey's Theorem, for all positive integers a and b, there exists an integer R(a, b) such that if G is a graph on at least R(a, b) vertices, then G has either a clique of size a, or an independent set of size b.
Recall that K r K r is the graph obtained from 2K r by adding a perfect matching and that K r rP 1 is the graph obtained from K r K r by removing all the edges in one of the complete graphs. We let K r P 1 denote the graph obtained from K r by adding a single vertex, attached to K r by a single pendant edge. We also denote C 4 + P 1 as bowtie.
Proof. Let k = max{6, r} and let (T, δ) be a branch decomposition of G. Towards a contradiction, suppose that there exists X ⊆ V (G) such that G[X, X] has an induced matching of size at least k. Let X = {x 1 , x 2 , . . . , x k } ⊆ X and Y = {y 1 , y 2 , . . . , y k } ⊆ X such that x i y i is an edge of the induced matching for each i ∈ {1, 2, . . . , k}.
First, observe that for any distinct i, j ∈ {1, 2, . . . , k}, either , the set X contains either a clique on 3 vertices, or an independent set on 3 vertices. So we may assume that X contains an independent set on 3 vertices, Without loss of generality, we may now assume that X contains a clique of size 3. Suppose X is not a clique. Then there exist distinct i, j ∈ {1, 2, . . . , k} such that x i is not adjacent to x j . Now y i y j is an edge, since G is 2P 2 -free. Let X be a maximum-sized clique contained in X , so |X | ≥ 3. Note that {x i , x j } X , since X is a clique, so we may assume that x j / ∈ X . As any pair in X \ {x i } induces an edge that is anticomplete to the edge y i y j , we see that G contains an induced 2P 2 , a contradiction. We deduce that X is a The class of (K r rP 1 , 2P 2 )-free graphs for r ∈ {1, 2} is a subclass of P 4 -free graphs, and thus has bounded clique-width and mim-width. However, for r ≥ 3, the class of (K r rP 1 , 2P 2 )free graphs has unbounded clique-width [23,Theorem 4.18], whereas Theorem 14 shows it has bounded mim-width. In particular, (net, 2P 2 )-free graphs and (bull, 2P 2 )-free graphs have bounded mim-width but unbounded clique-width.
In our next two results, we present two other new classes of bounded mim-width.
Proof. Let k = R(r, R(r, t)) and let (T, δ) be a branch decomposition of G. Towards a contradiction, suppose that there exists X ⊆ V (G) such that G[X, X] has an induced matching of size at least k. Let X = {x 1 , x 2 , . . . , x k } ⊆ X and Y = {y 1 , y 2 , . . . , y k } ⊆ X such that x i y i is an edge of the induced matching for each i ∈ {1, 2, . . . , k}.
Since |X | = k = R(r, R(r, t)), the set X contains either a clique of size r, or an independent set of size R(r, t). Suppose there is some J ⊆ {1, 2, . . . , k} such that X J = {x i : i ∈ J} is a clique of size r. Then, for an arbitrarily chosen j ∈ J, the vertices X J ∪ {y j } induce a K r P 1 , a contradiction. So X contains an independent set of size R(r, t). Let I ⊆ {1, 2, . . . , k} such that X I = {x i : i ∈ I} is an independent set of size R(r, t), and consider the set Y I = {y i : i ∈ I}. Since |Y I | = R(r, t), the set Y I either contains a clique of size r, or an independent set of size t. In the former case, G contains an induced K r P 1 , while in the latter case, G contains an induced tP 2 , a contradiction. Theorem 16. Let G be a (K r K r , sP 1 + P 2 )-free graph for r ≥ 1 and s ≥ 0. Then cutmim G (X, X) < R(R(r, s + 1), s + 1) for every X ⊆ V (G). In particular, mimw(G) < R(R(r, s + 1), s + 1).
Proof. Let k = R(R(r, s + 1), s + 1) and let (T, δ) be a branch decomposition of G. Towards a contradiction, suppose that there exists X ⊆ V (G) such that G[X, X] has an induced matching of size at least k. Let X = {x 1 , x 2 , . . . , x k } ⊆ X and Y = {y 1 , y 2 , . . . , y k } ⊆ X such that x i y i is an edge of the induced matching for each i ∈ {1, 2, . . . , k}.
Since |X | = k = R(R(r, s + 1), s + 1), the set X contains either a clique of size R(r, s + 1), or an independent set of size s + 1. But the latter implies that G has an induced sP 1 + P 2 subgraph, a contradiction. So X contains a clique of size R(r, s+1). Let I ⊆ {1, 2, . . . , k} such that X I = {x i : i ∈ I} is an clique of size R(r, s + 1), and consider the set Y I = {y i : i ∈ I}. Since |Y I | = R(r, s + 1), the set Y I either contains a clique of size r, or an independent set of size s + 1. In the former case, G contains an induced K r K r , while in the latter case, G contains an induced sP 1 + P 2 , a contradiction.
Our final results of the section are used to resolve the remaining cases where |V (H 1 )| + |V (H 2 )| ≤ 8. 3 For these results, we employ the following approach. Suppose we wish to show that the class of (H 1 , H 2 )-free graphs is bounded, where H 1 ⊆ i H 1 for one of the pairs (H 1 , H 2 ) appearing in Theorems 14 to 16. If G is a H 2 -free graph in the class, then we can compute a branch decomposition of constant mim-width by one of Theorems 14 to 16. So it remains only to show that we can compute a branch decomposition of constant mim-width for (H 1 , H 2 )-free graphs having an induced subgraph isomorphic to H 2 . When H 1 = 2P 2 and H 2 = K 1,3 , we exploit the structure of (2P 2 , K 1,3 )-free graphs having an induced K 3 3P 1 to prove Lemma 17. Then, by combining this lemma with Theorem 14, we obtain Theorem 18. Similarly, when H 1 = 2P 1 + P 2 and H 2 = bowtie (see Figure 4), we use Lemma 19 and Theorem 16 to obtain Theorem 20.
For the proofs of Lemmas 17 and 19, we require the following definition. For an integer l ≥ 1, an l-caterpillar is a subcubic tree T on 2l vertices with V (T ) = {s 1 , . . . , s l , t 1 , . . . , t l }, Note that we label the leaves of an l-caterpillar t 1 , t 2 , . . . , t l , in this order. See Figure 5 for an example.

Figure 5
The 5-caterpillar. A = {a 1 , . . . , a r } and B = {b 1 , . . . , b r } such that A is a clique, B is an independent  set, and (A, B) is a partition of X. Note that G[X] ∼ = K r rP 1 , but for every S ⊆ V (G) \ X, we have that G[X ∪ S] ∼ = K r r P 1 for each integer r > r. We assume that a i b i ∈ E(G) for each i ∈ {1, . . . , r}. Let N 1 be the set of vertices from V (G) \ X that have a neighbour in X, and let N 2 = V (G) \ (X ∪ N 1 ).

Proof. Let
Let Since G is connected, v has a neighbour in A; by symmetry, we may assume that va 1 ∈ E(G). Let i ∈ {2, . . . , r}, and suppose that x 3 x 4 Figure 6 On the left, a (2P2, K1,3)-free graph G, and on the right the branch decomposition (T, δ) of G as constructed in the proof of Lemma 17.
Suppose now that N (v) ∩ B = ∅; without loss of generality we may assume that vb 1 ∈ E(G).
If v is complete to B, then any three vertices of B together with v induces a K 1,3 , a contradiction. Therefore, without loss of generality we assume that vb 2 Suppose that there exist vertices v, v ∈ N 1 such that vv ∈ E(G). Since vertices of N 1 have at most one neighbour in B, we may assume without loss of generality that 3 , a contradiction. Therefore vv ∈ E(G), and hence N 1 is a clique.
We now prove that N 2 = ∅. Towards a contradiction, suppose that there exists a vertex w ∈ N 2 . Since G is connected, there exists a vertex v ∈ N (w) ∩ N 1 . By what we have already proved, either N (v) ∩ X = A or N (v) ∩ X = A ∪ {b} for some b ∈ B. Suppose that N (v) ∩ B = ∅; without loss of generality, we may assume that N (v) ∩ B = {b 1 }. But then G[{v, b 1 , w, a 2 }] ∼ = K 1,3 , a contradiction. Therefore v is anticomplete to B. It now follows that G[X ∪ {v, w}] ∼ = K r+1 (r + 1)P 1 , contradicting the maximality of X. Therefore N 2 = ∅.
For i ∈ {1, . . . , r}, let B i denote the set of vertices from N 1 that are adjacent to b i and let B 0 denote the set of vertices from N 1 that have no neighbour in B. Note that (A, B, B 0 , B 1 , . . . , B r ) If B 0 = ∅ then let T = T , and otherwise let T be the tree obtained from T by adding an additional vertex p r+1 together with all vertices of V (T 0 ), and adding edges p r p r+1 and p r+1 t 0 together with all edges of T 0 . Finally, let δ be any bijection from V (G) to the leaves of T such that for all i ∈ {1, . . . , r} and for all We now prove that mimw G (T, δ) = 1. Let e be an edge of T and let M be a maximum induced matching of G[A e , A e ]. We begin by claiming that at most one edge of M has one endpoint in B and the other in A ∪ N 1 . On the contrary, suppose without loss of generality that b 1 x and b 2 y are distinct edges of M , where b 1 , b 2 ∈ B ∩ A e and x, y ∈ (A ∪ N 1 ) ∩ A e . Observe that if x ∈ N 1 (respectively y ∈ N 1 ), then x ∈ B 1 (respectively y ∈ B 2 ); and if x ∈ A (respectively y ∈ A), then x = a 1 (respectively y = a 2 ). Proof. If G is not connected, we may consider each component in turn, by Lemma 5. If G is (K 3 3P 1 )-free, then mimw(G) < 6 by Theorem 14. On the other hand, if G has an induced subgraph isomorphic to K 3 3P 1 , then mimw(G) = 1 by Lemma 17.
We now show how to compute a branch decomposition (T, δ) of G, with mimw G (T, δ) < 6, in polynomial time. Consider the following algorithm, which takes as input a connected (2P 2 , K 1,3 )-free graph G.
If no such set S exists, then return an arbitrary branch decomposition of G. It is easily checked that Steps 1-4 of this algorithm can be performed in polynomial time. If the algorithm returns a branch decomposition in Step 1, then by Theorem 14 it has mim-width less than 6. Otherwise, the branch decomposition has mim-width 1 by Lemma 17.
Proof. Let A = {a 1 , . . . , a r } and B = {b 1 , . . . , b r } be cliques that partition X, with a i b i ∈ E(G) for all i ∈ {1, . . . , r}. Let N 1 be the set of vertices of V (G) \ X with a neighbour in X. Suppose there exists a vertex v ∈ V (G) \ (X ∪ N 1 ). Then G[{v, a 1 , b 2 We claim each vertex in N 1 is either complete or anticomplete to A. Suppose v ∈ N 1 has a neighbour and a non-neighbour in A. Without loss of generality, let a r be the neighbour and let a 1 be the non-neighbour. If there is a pair of distinct vertices b i , b j non-adjacent to v for i, j ∈ {2, 3, . . . , r}, then G[{v, a 1 , b i So v has at most one non-neighbour in {b 2 , b 3 , . . . , b r }. In particular, as r ≥ 5, we may assume without loss of generality that b 3 and b 4 are neighbours of v. If v is adjacent to a 2 , then  G[{a 2 , a r , v, b 3 From this contradiction, we deduce that v is either complete or anticomplete to A. By symmetry, each v ∈ N 1 is complete or anticomplete to B.
Step 1 Enumerate all subsets S ⊆ V (G) such that |S| = 10 and check whether G[S] ∼ = K 5 K 5 . If no such set S exists, then return an arbitrary branch decomposition of G. let (A, B) be a partition of S such that A is a clique and B is an independent set.

Step 3 Set E = E(G) \ E(G[S]). While E = ∅:
Choose an edge e ∈ E. It is easily checked that Steps 1-4 of this algorithm can be performed in polynomial time. If the algorithm returns a branch decomposition in Step 1, then by Theorem 16 it has mim-width less than R (14,3). Otherwise, the branch decomposition has mim-width 2 by Lemma 19.

New Unbounded Cases
We present a number of graph classes of unbounded mim-width, starting with following two theorems.
Proof. For every integer k, we will construct a (diamond, 5P 1 )-free graph G such that mimw(G) > k. By Lemma 10, for any integer k there exists a net-wall W such that mimw(W ) > 4k. We partition the vertex set V (W ) into four colour classes (V 1 , V 2 , V 3 , V 4 ) as illustrated in Figure 7. Observe that, for each i ∈ {1, 2, 3, 4}, the set V i is independent, and no two distinct vertices v, v ∈ V i have a common neighbour; that is, Let G be the graph obtained from W by making each of V 1 , V 2 , V 3 and V 4 into a clique. By Lemma 4, mimw(G) ≥ mimw(W )/4 > k. Since any set of five vertices of G contains at least two vertices in one of V 1 , V 2 , V 3 , and V 4 , and each of these four sets is a clique, G is , then, since no two vertices in V i have a common neighbour in W , it follows that X ⊆ V i . Now, towards a contradiction, suppose G[Y ] ∼ = diamond for some Y ⊆ V (G). Then Y is the union of two sets X and X that induce triangles in G, and |X ∩ X | = 2. Since W is diamond-free, we may assume that W [X ] is not a triangle. Then X contains at least two vertices of V i for some i ∈ {1, 2, 3, 4}. By the earlier observation, X ⊆ V i . Since |X ∩ X | = 2, we then have |X ∩ V i | ≥ 2, so X ⊆ V i , and hence Y ⊆ V i . But this implies that Y is a clique in G; a contradiction. So G is diamond-free.
Proof. For every integer k, we will construct a (4P 1 , 3P 1 + P 2 , P 1 + 2P 2 )-free graph G such that mimw(G) > k. By Lemma 10, for any integer k there exists a net-wall W such that mimw(W ) > 3k. We partition the vertex set V (W ) into three colour classes (V 1 , V 2 , V 3 ) such that V i is an independent set for each i ∈ {1, 2, 3} as illustrated in Figure 8. Since W has maximum degree 3 and each vertex belongs to a triangle, a vertex has at most two neighbours in each colour class; that is, for each i ∈ {1, 2, 3} and v ∈ V i , we have |N (v) ∩ V j | ≤ 2 for j ∈ {1, 2, 3}. Note that these colour classes are chosen to satisfy the following properties. Firstly, W does not contain a bichromatic induced P 5 ; that is, if Let G be the graph obtained from W by making each of V 1 , V 2 , and V 3 into a clique. By Lemma 4, mimw(G) ≥ mimw(W )/3 > k. As any set of 4 vertices of G contains at least two vertices in one of the cliques V 1 , V 2 , or V 3 , we deduce that G is 4P 1 -free. then X ∩A and Y ∩A are non-empty. Suppose G [A] ∼ = P |A| and Y ∩A = ∅. In G [X ∪Q∪T ], each vertex in T has degree 1, and each vertex in Q has two neighbours: one in X and one in T . If a vertex of T is in A, then it is an end of the path G [A]; so |T ∩ A| ≤ 2. If a vertex of Q is in A, then either it is an end of the path G [A], or it is adjacent to a vertex of T that is an end of the path G [A]. So |Q ∩ A| ≤ 2. Since X is independent, |A| ≤ 5. The claim now follows by symmetry.
is complete bipartite, we may also assume that |X ∩ A| ∈ {1, 2} and implying |X ∩ A| = 2. However, then the vertex in the singleton set Y ∩ A has degree 3 in G [A], a contradiction. So |(Q ∪ T ) ∩ A| < 5, and |A| < 8. It now follows that G is P 8 -free.
Next we suppose, for some F ⊆ V (G ), that G [F ] is a linear forest, one component of which is a P 6 . Let A ⊆ F such that G [A] ∼ = P 6 . By the foregoing claim, Lemma 24 is tight in the following sense: for some graph G, the graph G can contain, as an induced subgraph, tP 2 + P 7 or tP 5 for any non-negative integer t, or S 2,2,4 .
Theorem 25 now follows from Lemmas 23 and 24 and the fact that bipartite graphs can have arbitrarily large treewidth (see, e.g., [49]). We use Lemma 4 to obtain Theorems 26 and 27.
Proof. For every integer k, we will construct a (4P 1 , gem)-free graph G such that mimw(G) > k. Let B be a bipartite graph with tw(B) > 24k. Then, mimw(B ) > 4k by Lemma 23. Observe that B is 4-partite, where V (B ) has a partition (X, Y, T, Q) into independent colour classes, using the labelling described in the construction. Let G be the graph obtained from B by making X, Y , T , and Q into cliques. By Lemma 4, mimw(G) ≥ mimw(B )/4 > k.
Observe that X ∪ Y , T , and Q are cliques that partition V (G), so G is 4P 1 -free. Note also that each vertex in Q has exactly one neighbour in T , exactly one neighbour in X, and no neighbours in Y . By symmetry, each vertex in T has exactly one neighbour in Q, exactly one neighbour in Y , and no neighbours in X. In particular, each vertex in Q ∪ T has at most one neighbour in X ∪ Y . It remains to show that G is (gem, P 1 + 2P 2 )-free. Suppose Note also that D T ∪ Q, since a vertex in T has at most one neighbour in Q (and vice versa). It follows, without loss of generality, that |D ∩ Q| = 3 and |D ∩ X| = 1. Now suppose G[D ] is isomorphic to gem or P 1 + 2P 2 for some D = D ∪ z with z ∈ V (G) \ D. Note that a gem or a P 1 + 2P 2 has a dominating vertex h, and h ∈ D ∩ Q. If z ∈ X, then hz is not an edge, since the only neighbour of h in X is the vertex in D ∩ X. If z ∈ Y ∪ T , then z has degree 1 in G [D ]. If z ∈ Q, then G[D ] contains a K 4 . From this contradiction we deduce that G is (gem, P 1 + 2P 2 )-free.
Proof. For every integer k, we will construct a (diamond, 2P 3 )-free graph G such that mimw(G) > k. Let B be a bipartite graph with tw(B) > 12k. Then, mimw(B ) > 2k by Lemma 23 Let G be the graph obtained from B by making X and Y into cliques. By Lemma 4, mimw(G) ≥ mimw(B )/2 > k.
Observe now that X ∪ Y is a clique of G. Moreover, G can be obtained starting from G[X ∪ Y ] by adding 3-edge xy-paths for some x ∈ X and y ∈ Y . It follows that each induced P 3 subgraph of G contains some vertex of X ∪ Y . Since X ∪ Y is a clique, any two disjoint induced P 3 subgraphs of G have an edge between them. So G is 2P 3 -free.
Finally, observe that for each induced We now describe the construction of a graph G from a graph G = (V, E). This construction is similar to the construction of G ; we adapt the approach taken by [11] to construct graphs with arbitrarily large mim-width. Take two copies of V labelled as follows: Start with a complete bipartite graph with vertex bipartition (X, Y ), and add, for each edge e ∈ E with endpoints u and v, two paths x u z e y v and x v z e y u . Observe that G is 3-partite, with colour classes (X, Y, Z); see also Figure 9.
The following lemma is proven by modifying the proof of Lemma 23 given in [11]. Alternatively, we could take the n × n wall W , which has bipartition classes A and B; 1-subdivide each edge of W ; and make A complete to B. By applying Theorem 8 and Lemmas 2 and 4, we obtain a lower bound on the mim-width in terms of n.

Proof.
Let G be a bipartite graph with vertex bipartition (A, B), and let (T , δ ) be an arbitrary branch decomposition of G . We will show that mimw G (T , δ ) ≥ tw(G)/6.
We first construct a branch decomposition (T, δ) of G such that E(T ) ⊆ E(T ), as follows. Let T be the tree obtained from T by deleting the leaves t ∈ V (T ) such that δ (t) = x v for some v ∈ B, or δ (t) = y u for some u ∈ A, or δ (t) ∈ Q ∪ T . In the resulting tree T , for Suppose e ∈ E(T ). Recall that (A e , A e ) denotes the partition of V (G) induced by the two components of T \e, and let (A e , A e ) denote the partition of V (G ) induced by the two components of T \e. Let uv be an edge in the cut G[A e , A e ]. Since G is bipartite, we may assume u ∈ A and v ∈ B. Then x u and y v are on different sides of the cut G [A e , A e ]; we may assume that x u ∈ A e and y v ∈ A e . Since there is a path x u z uv y v in G , either the edge Let By [11,Lemma 9], there exists some edge e ∈ E(T ) such that G[A e , A e ] has a (not necessarily induced) matching M of size at least tw(G)/3. By the previous paragraph, G [A e , A e ] has a matching M of size at least |M |/2 ≥ tw(G)/6, which consists of edges between a vertex in Z and a vertex in either X or Y .
We claim that M is an induced matching. Suppose not. Then we may assume (up to swapping X and Y ) that M has edges x u z uv and x u z u v , for some distinct u, u ∈ V (G), and G also has an edge x u z u v or x u z uv . But, by construction, the vertices z uv , z u v ∈ Z have only one neighbour in X, so neither x u z u v nor x u z uv is an edge of G . Thus M is induced, and hence mimw G (T , δ ) ≥ tw(G)/6, as required.
We use Lemma 28 to show the following theorem.
Proof. We show that for every integer k, there is a (K 4 , diamond, P 6 , P 2 + P 4 )-free graph G such that mimw(G) > k. Let B be a (simple) bipartite graph with tw(B) > 6k and let G = B . Then mimw(G) > k by Lemma 28. Observe that X, Y and Z are independent sets.
First we claim that G is . Since each vertex in Z has degree 2, the degree-3 vertices of the diamond must be in X or Y . Since these vertices are adjacent, one is in X and one is in Y . As the other two vertices of the diamond are complete to these two vertices, these vertices are in Z. Let A ∩ X = {x u }, A ∩ Y = {y v }, and A ∩ Z = {z e , z e }. Now x u z e y v and x u z e y v are paths in G, corresponding to multiple edges e = uv and e = uv in B, but this contradicts that B is simple.
Next we claim that G is P 2 + P 4 -free. Suppose G[A] ∼ = P 2 + P 4 for some A ⊆ V (G) and G[A ] ∼ = P 4 for some A ⊆ A.If A ⊆ Y ∪ Z, then one end of G[A ] is in Y , and the other end is in Z. But each vertex in Z has one neighbour in X and one neighbour in Y , so A ∩ X = ∅ and, by symmetry, It remains to show that G is P 6 -free. Suppose G[A] ∼ = P 6 for some A ⊆ V (G). If A ⊆ X ∪ Z, then each vertex of A ∩ Z has degree at most 1 in G[A], so there are at most two such vertices. But then |A ∩ X| ≥ 4, and this set is independent in G[A], a contradiction. So A ∩ Y = ∅ and, by symmetry, A ∩ X = ∅. Since X is complete to Y , we also have |A ∩ (X ∪ Y )| ≤ 3. Without loss of generality we may assume A ∩ X is a singleton {x}. Then x has two neighbours in A ∩ Y , so A ∩ X and A ∩ Z are anticomplete. But then A ∩ (X ∪ Z) is an independent set of size at least 4, a contradiction.

State of the Art
In this section, we show the consequences of the results from Sections 3-5 for the boundedness and unboundedness of mim-width of classes of (H 1 , H 2 )-free graphs. We will also make a comparison between the results for mim-width and clique-width. In contrast to the situation where only one induced subgraph is forbidden, we note many differences when two induced subgraphs H 1 and H 2 are forbidden. Figure 10 illustrates a number of graphs that we use throughout the section.

Two Summary Theorems
In our first summary theorem we give all pairs (H 1 , H 2 ) for which the mim-width of the class of (H 1 , H 2 )-free graphs is bounded. This theorem gives more bounded cases than the corresponding summary theorem for boundedness of clique-width of classes of (H 1 , H 2 )-free graphs, which can be found in [23] and which we need for our proof. To get the summary theorem for clique-width, replace Cases (x)-(xv) of Theorem 30 by the more restricted case where H 1 = K s and H 2 = tP 1 for some s, t ≥ 1.

Theorem 30.
For graphs H 1 and H 2 , the mim-width of the class of (H 1 , H 2 )-free graphs is bounded and quickly computable if one of the following holds: Proof. Cases (i)-(ix) follows from the fact that each of the classes of (H 1 , H 2 )-free graphs in these cases has bounded clique-width and that clique-width is quickly computable for general graphs [44]. For Case (i) we also refer to Theorem 13. Boundedness of clique-width has been proven for Case (ii) as follows: in [26] for K 1,3 + 3P 1 ; in [25] for K 1,3 + P 2 ; in [21] for P 1 + P 2 + P 3 and P 1 + P 5 ; in [26] for P 1 + S 1,1,2 ; in [24] for P 2 + P 4 ; in [7] for P 6 ; in [25] for S 1,1,3 ; and in [21] for S 1,2,2 . It has been proven for Case (iv) as follows: in [21] for P 1 + 2P 2 ; and in [22] for 3P 1 + P 2 and P 2 + P 3 . It has been been proven for Case (vi) as follows: in [8] for P 1 + P 4 ; and in [9] for P 5 . It has been proven for Case (viii) and (ix) in [6,10] and [5], respectively. Cases (iii), (v), (vii) follow from Cases (ii), (iv) and (vi), respectively, after recalling that the clique-width of a class of (H 1 , H 2 )-free graphs is bounded if and only if the clique-width of the class of H 1 , H 2 -free graphs is bounded [38]. Cases (x) and (xi) follow from Theorems 20 and 18 respectively. Case (xii) has been proven in [12]. Cases (xiii)-(xv) follow from Theorems 14-16, respectively.
For our second summary theorem, we turn to the unbounded cases. We let S be the class of graphs every connected component of which is either a subdivided claw or a path. We let N denote the class of graphs that contain a connected component with either a cycle of length at least 4 or at least two (not necessarily vertex-disjoint) triangles; note, for example, that N contains C 4 , diamond, and K 4 .

Theorem 31.
For graphs H 1 and H 2 , the class of (H 1 , H 2 )-free graphs has unbounded mim-width if one of the following holds: Proof. Cases (i) and (iii) follow from Theorem 8 and Lemma 10, respectively, possibly after applying Lemma 2 a sufficient number of times. All three subcases of Case (ii) follows from Theorem 25. The first subcase of Case (iv) follows from Theorem 21, the second one follows from Theorem 29, the third one follows from Theorem 27 and the fourth one follows from Theorem 29. All three subcases of Case (v) follow from Lemma 12. Case (vi) follows from Theorems 22 and 26. All subcases of Case (vii) follow from Lemma 11. Case (viii) follows from Theorem 29.
We note that the situation for the unbounded cases is again different from the situation for the unbounded cases of clique-width. For example, (H 1 , H 2 )-free graphs have unbounded clique-width if both H 1 / ∈ S and H 2 / ∈ S (see, for example, [26]). Take, for instance, H 1 = 4P 1 and H 2 = 2P 2 . Then H 1 = K 4 and H 2 = C 4 , and thus H 1 / ∈ S and H 2 / ∈ S, so (H 1 , H 2 )free graphs have unbounded clique-width. However, by Theorem 30-(xiii), (H 1 , H 2 )-free graphs have bounded mim-width. As (H 1 , H 2 )-free graphs have unbounded mim-width by , this example also shows that the complementation operation, a standard tool for working with clique-width, does not preserve mim-width. Consequently, for mim-width there are many more open cases than the only five open cases for clique-width [23].

Three Consequences of the Summary Theorems
In order to get a handle on the open cases for mim-width, we now present some consequences of Theorems 30 and 31. We first consider the case where H 1 and H 2 are forests.  4 , paw, K 3 + P 1 , K 4 }, then we apply Theorem 30-(xiv) or Theorem 30-(xv); whereas if H 2 = diamond, then we apply Theorem 30-(iv).

When H 1 is Complete or Edgeless
We first consider the (un)boundedness of mim-width for the class of (K r , H 2 )-free graphs for a positive integer r and a graph H 2 . Such classes are interesting for the following reason. For any H 2 such that mim-width is bounded and quickly computable for the class of (K r , H 2 )-free graphs, k-Colouring is polynomial-time solvable for all k < r; for example, see [12] for the case where H 2 ⊆ i sP 1 + P 5 . More generally, for problems having polynomial-time algorithms when mim-width is bounded and quickly computable, we obtain n f (ω(G)) -time algorithms, for some function f , when restricted to H 2 -free graphs; that is, XP algorithms parameterized by ω(G) (the size of the largest clique in G). Recently, Chudnovsky et al. [17] showed that for P 5 -free graphs, there exists an n O(ω(G)) -time algorithm for Max Partial H-Colouring, a problem generalizing Maximum Independent Set and Odd Cycle Transversal, and which is polynomial-time solvable when mim-width is bounded and quickly computable.
For r ≥ 4, Theorems 30 and 31 imply that the mim-width of the class of (K r , H 2 )-free graphs is bounded and quickly computable when H 2 ⊆ i sP 1 + P 5 or tP 2 , and unbounded when H 2 ⊇ i K 1,3 , P 2 + P 4 , or P 6 , or H 2 / ∈ S. In the following theorem we prove that all remaining cases belong to one infinite family: when H 2 = tP 2 + uP 3 for u ≥ 1 and t + u ≥ 2. Note that Theorem 35 just concerns the case that r ≥ 4. When r = 3, further open cases arise; for example, see Open Problem 2.

Theorem 35.
Let H be a graph and let r ≥ 4 be an integer. Then exactly one of the following holds: H ⊆ i sP 1 + P 5 or tP 2 , and the mim-width of the class of (K r , H)-free graphs is bounded and quickly computable; H / ∈ S, or H ⊇ i K 1,3 , P 2 + P 4 , or P 6 , and the mim-width of the class of (K r , H)-free graphs is unbounded; or H = tP 2 + uP 3 where u ≥ 1 and t + u ≥ 2.
Proof. By Theorem 31-(i), if H / ∈ S, then the mim-width of the class of (K r , H)-free graphs is unbounded. So we may assume that H is a forest of paths and subdivided claws. By Theorem 31-(iii), if H contains a K 1,3 , then the mim-width is again unbounded. So we may assume that H is a linear forest. If H ⊆ i sP 1 + P 5 or H ⊆ i tP 2 , then mim-width is bounded and quickly computable by parts (xii) and (xiv) of Theorem 30. So we may assume that H is a linear forest containing P 2 + P 3 . By Theorem 31-(viii), we may also assume H contains neither P 2 + P 4 nor P 6 , otherwise the mim-width is again unbounded. It now follows that H ⊆ i tP 2 + uP 3 for some u, t such that u ≥ 1 and t + u ≥ 2.

Open Problem 3.
For an integer r ≥ 4, and for each integer t ≥ 0 and u ≥ 1 such that t + u ≥ 2, determine the (un)boundedness of the class of (K r , tP 2 + uP 3 )-free graphs.
We note that this is also open when r = 3, except when u = t = 1 (so H 2 = P 2 + P 3 ) in which case we can apply Theorem 30-(ii).
We now consider the class of (rP 1 , H 2 )-free graphs, for an integer r and a graph H 2 . If the mim-width of such a class of graphs is bounded and quickly computable, we obtain, for many problems, XP algorithms parameterized by α(G) for the class of H 2 -free graphs, where α(G) is the size of the largest independent set in G. For r ≥ 5, Theorems 30 and 31 imply that the mim-width of the class of (rP 1 , H 2 )-free graphs is bounded and quickly computable when H 2 ⊆ i K t K t for some t, and unbounded when H 2 is not co-bipartite, or H 2 ⊇ i diamond. Below we show that all unresolved cases belong to the infinite family H 2 = K s,t + P 1 for s, t ≥ 2 (we observe that if s = t = 2, then H 2 = bowtie). Note that Theorem 36 just concerns the case that r ≥ 5. When r ∈ {3, 4}, further open cases arise, and there are more cases where the class of (rP 1 , H)-free graphs has bounded mim-width, by cases (iii) and (x) of Theorem 30.

Theorem 36.
Let H be a graph and let r ≥ 5 be an integer. Then exactly one of the following holds: H ⊆ i K t K t for some integer t ≥ 1, and the mim-width of the class of (rP 1 , H)-free graphs is bounded and quickly computable; H is not co-bipartite or H ⊇ i diamond, and the mim-width of the class of (rP 1 , H)-free graphs is unbounded; or H = K s,t + P 1 for some s, t ≥ 2.
Proof. By , if H is not co-bipartite, then the mim-width of the class of (rP 1 , H)-free graphs is unbounded. So we may assume that H is co-bipartite. In particular, H is 3P 1 -free, and hence if H is a forest, we have that H ⊆ i P 4 or H ⊆ i 2P 2 . In either case, H ⊆ K 4 K 4 , so the mim-width is bounded and quickly computable by Theorem 30-(i). So we may assume that H contains a cycle. In particular, since H is (C 5 , 3P 1 )-free, H contains no induced cycle of length at least 5. By Theorem 31-(iv) we may assume that H contains no diamond, otherwise the class has unbounded mim-width.
Suppose that H contains an induced C 4 . It follows from H being co-bipartite and diamond-free that H ⊆ i K t K t for some t, in which case mim-width is bounded and quickly computable by . So we may assume that H does not contain an induced C 4 , and hence H is chordal.
It remains to show that H is a block graph consisting of two blocks each being complete and having at least 3 vertices. Let K be a maximum clique of H. So K has size at least 3. By Theorem 30-(xv) we may assume that V (H) \ K = ∅. Since H is diamond-free and by the maximality of K, any vertex of H not in K has at most one neighbour in K. Then since H is 3P 1 -free, V (H) \ K is a clique. Now, if at most one vertex of V (H) \ K has a neighbour in K, then H is an induced subgraph of K r K r , so we can apply Theorem 30-(xv). So we may assume there are distinct vertices u, v ∈ V (H) \ K each with a single neighbour in K.
Since H is 3P 1 -free, uv ∈ E(H). But then {u, v, k u , k v } induces a C 4 in H, a contradiction. Without loss of generality, N (V (H) \ K) ∩ K ⊆ {k u }. Now, since H is diamond-free and V (H) \ K is a clique, V (H) \ K is complete to {k u }. It follows that H = K s,t + P 1 for some s, t ≥ 2.
Open Problem 4. For each integer r ≥ 4, and for each integer s, t ≥ 2, determine the (un)boundedness of the class of (rP 1 , K s,t + P 1 )-free graphs.
We note that Open Problem 4 includes the case r = 4, in contrast to Theorem 36, since the (un)boundedness of (4P 1 , K s,t + P 1 )-free graphs is also open for s ≥ 2 and t ≥ 2. In fact, when r = 3, the (un)boundedness of (3P 1 , K s,t + P 1 )-free graphs is also open except when s = t = 2, in which case we have the class of (3P 1 , bowtie)-free graphs, and so we can apply Theorem 20.

Conclusion
We extended the toolkit for proving (un)boundedness of mim-width of hereditary graph classes. Using the extended toolkit, we found new classes of (H 1 , H 2 )-free graphs of bounded width and unbounded mim-width. We showed that the situation for mim-width of hereditary graph classes is different from the situation for clique-width, even when only two induced subgraphs H 1 and H 2 are forbidden. For future work, Open Problems 1-4 deserve attention.