Solving Problems on Graphs of High Rank-Width

A modulator in a graph is a vertex set whose deletion places the considered graph into some specified graph class. The cardinality of a modulator to various graph classes has long been used as a structural parameter which can be exploited to obtain fixed-parameter algorithms for a range of hard problems. Here we investigate what happens when a graph contains a modulator which is large but “well-structured” (in the sense of having bounded rank-width). Can such modulators still be exploited to obtain efficient algorithms? And is it even possible to find such modulators efficiently? We first show that the parameters derived from such well-structured modulators are more powerful for fixed-parameter algorithms than the cardinality of modulators and rank-width itself. Then, we develop a fixed-parameter algorithm for finding such well-structured modulators to every graph class which can be characterized by a finite set of forbidden induced subgraphs. We proceed by showing how well-structured modulators can be used to obtain efficient parameterized algorithms for Minimum Vertex Cover and Maximum Clique. Finally, we use the concept of well-structured modulators to develop an algorithmic meta-theorem for deciding problems expressible in monadic second order logic, and prove that this result is tight in the sense that it cannot be generalized to LinEMSO problems.


Introduction
Many important graph problems are known to be NP-hard, and yet admit efficient solutions in practice due to the inherent structure of instances. The parameterized complexity [16,34] paradigm allows a more refined analysis of the complexity of various problems and hence enables the design of more efficient algorithms. In particular, given an instance of size n and a numerical parameter k which captures some property of the instance, one asks whether the instance can be solved in time f (k)·n O (1) . Parameterized problems which admit such an algorithm are called fixed-parameter tractable (FPT), and the algorithms themselves are often called fixed-parameter algorithms.
Given the above, it is natural to ask what kind of structure can be exploited to obtain fixed-parameter algorithms for a wide range of natural graph problems. There are two very successful, mutually incomparable approaches which tackle this question.
A: Width measures Treewidth has become an extremely successful structural parameter with a wide range of applications in many fields of computer science. However, treewidth is not suitable for use in dense graphs. This led to the development of algorithms that use the parameter clique-width [11], which can be viewed as a relaxation of treewidth towards dense graphs. However, while there are efficient theoretical algorithms for computing tree decompositions, this is not the case for decompositions for clique-width. This shortcoming has later been overcome by the notion of rank-width [35], which improves upon clique-width by allowing the efficient computation of rank-decompositions while retaining all of the positive algorithmic results previously obtained for clique-width. B: Modulators A modulator is a vertex set whose deletion places the considered graph into some specified graph class. A substantial amount of research has been placed into finding as well as exploiting small modulators to various graph classes [3,18]. Popular notions such as vertex cover and feedback vertex set are also special cases of modulators (to the classes of edgeless graphs and forests, respectively). One advantage of parameterizing by the size of modulators is that it allows us to build on the vast array of research of polynomial-time algorithms on specific graph classes (see, for instance, [10,33]). In other fields of computer science, modulators are often called backdoors and have been successfully used to obtain efficient algorithms for, e.g., satisfiability and constraint satisfaction [21,22].
Our primary goal in this paper is to push the boundaries of tractability for a wide range of problems beyond the state of the art for both of these approaches. We summarize our contributions below.
1. We introduce a family of "hybrid" parameters that combine approaches A and B.
Given a graph G and a fixed graph class H, the new parameters capture (roughly speaking) the minimum rank-width of any modulator of G into H. We call this the well-structure number of G or wsn H (G). The formal definition of the parameter also relies on the notion of split decompositions [13] to restrict the edges between the modulator and the rest of the graph; it is provided in Sect. 3, where we also prove that for any graph class H of unbounded rank-width, wsn H is not larger and in many cases much smaller than both rank-width and the size of a modulator to H.
2. We develop a fixed-parameter algorithm for computing wsn H .
As with most structural parameters, virtually all algorithmic applications of the well-structure number rely on having access to an appropriate decomposition. In Sect. 4 we provide a fixed-parameter algorithm for computing the wsn H along with the corresponding decomposition for any graph class H which can be characterized by a finite set of forbidden induced subgraphs (obstructions). This is achieved by building on the polynomial algorithm for computing split-decompositions [27] in combination with the fixed-parameter algorithm for computing rank-width [29]. 3. We design fixed-parameter algorithms for Minimum Vertex Cover (MinVC) and Maximum Clique (MaxClq) parameterized by wsn H .
Specifically, in Sect. 5 we show that for any graph class H characterizable by a finite obstruction set and admitting a polynomial-time algorithm for MinVC or MaxClq, there is a fixed-parameter algorithm solving MinVC or MaxClq (respectively) when parameterized by wsn H . We also give an overview of possible choices of H for MinVC and MaxClq. 4. We develop a meta-theorem to obtain fixed-parameter algorithms for problems definable in monadic second order (MSO) logic [11] parameterized by wsn H .
The meta-theorem requires that the problem is FPT when parameterized by the cardinality of a modulator to H. We prove that this condition is not only necessary but also tight, in the sense that the weaker condition of polynomial-time tractability on H used for MinVC and MaxClq is not sufficient for FPT-time MSO model checking. Formal statements and proofs can be found in Sect. 6. 5. We show that, in general, solving LinEMSO problems [11,19] is not FPT when parameterized by wsn H .
In particular, in Sect. 7 we give a proof that these problems remain NP-hard even on graphs of fixed wsn H under the same conditions as those used for MSO model checking. This is somewhat surprising, since the fixed-parameter tractability of MSO optimization problems usually follows from the methods used for MSO model checking. On the other hand, there are strictly more classes of bounded width for our parameter than for rank-width and hence one cannot expect that every problem which is FPT parameterized by rank-width would remain FPT when parameterized by the well-structure number.

Preliminaries
The set of natural numbers (that is, positive integers) will be denoted by N. For i ∈ N we write [i] to denote the set {1, . . . , i}. If ∼ is an equivalence relation over a set A, then for a ∈ A we use [a] ∼ to denote the equivalence class containing a.

Graphs
We will use standard graph theoretic terminology and notation (cf. [15]). All graphs we consider are finite, simple and undirected. The non-leaf vertices of a tree are called its internal nodes. If S is a set of leaves of a tree T , then T (S) denotes the smallest connected subtree spanning S.
Given a graph G = (V (G), E(G)) and A ⊆ V (G), we denote by N (A) the set of neighbors of A in V (G)\A; if A contains a single vertex v, we use N (v) instead of N ({v}). We use V and E as shorthand for V (G) and E(G), respectively, when the graph is clear from context.
to denote the subgraph of G obtained by deleting V (G)\A. Let F be a finite set of graphs; then the class of F-free graphs is the class of all graphs which do not contain any graph in F as an induced subgraph. We will often refer to elements of F as obstructions, and we say that the class of F-free graphs is characterized by F.

Fixed-Parameter Tractability
We refer the reader to the standard textbooks [14,16,34] for an introduction to parameterized complexity. A parameterized problem P is a subset of Σ * × N for some finite alphabet Σ. For a problem instance (x, k) ∈ Σ * × N we call x the main part and k the parameter.
A parameterized problem P is fixed-parameter tractable (FPT in short) if a given instance (x, k) can be solved in time f (k) · |x| O (1) where f is an arbitrary computable function of k. Algorithms with running time in this form are called fixed-parameter algorithms, and we also slightly abuse notaton and refer to this runtime simply as FPT time.
A parameterized problem P is paraNP-hard if the unparameterized problem corresponding to the restriction of P to some constant value of the parameter is NP-hard. For instance, the classical Minimum Vertex Cover problem parameterized by the degree of a graph is paraNP-hard, since Minimum Vertex Cover remains NP-hard even on graphs of degree at most 3.

Splits and Graph Labeled Trees
The notions and terminology introduced in this subsection play an important role in particular when formally defining our parameters (Sect. 3) and for computing them (Sect. 3). The contents of this subsection are based on the original work of Cunningham [13] as well as on more recent results by several authors [25][26][27].
A split of a connected graph G = (V, E) is a vertex bipartition {A, B} of V such that every vertex of A = N (B) has the same neighborhood in B = N (A). The sets A and B are called frontiers of the split.
A split is said to be non-trivial if both sides have at least two vertices. A connected graph which does not contain a non-trivial split is called prime. A bipartition is trivial if one of its parts is the empty set or a singleton. Cliques and stars are called degenerate graphs; notice that every non-trivial bipartition of their vertices is a split.
Let G = (V, E) be a graph. To simplify our exposition, we will use the notion of split-modules instead of splits where suitable.
. For technical reasons, V and ∅ are also considered split-modules. We say that two disjoint split-modules X, Y ⊆ V are adjacent if there exist x ∈ X and y ∈ Y such that x and y are adjacent.
Our algorithms for computing well-structured modulators will rely on two deep results related to splits, specifically Theorems 1 and 2. To formally state these theorems, we will need to introduce a bit of extra notation.
A graph-labeled tree (which can be viewed as a more modern approach to the previously used split-decompositions) is a pair (T, F), where T is a tree and F is a set of graphs such that each internal node u of T is labeled by a graph G(u) ∈ F and there is a bijection between the edges of T incident to u and vertices of G(u). When clear from the context, we may use u as a shorthand for G(u) ∈ F; for instance, we use V (u) to denote V (G(u)) and we say that an edge of T incident to u is incident to the vertex of G(u) mapped to it. Graph-labeled trees were introduced by Gioan and Paul [25,26], and in the following paragraphs we recall some useful definitions and facts that also appeared in follow-up work [27].
For an internal node u of T , the vertices of V (u) are called marker vertices and the edges of E(u) are called label-edges. Edges of T incident to two internal nodes are called tree-edges. Marker vertices incident to a tree-edge e are called the extremities of e, and each leaf v is associated with the unique marker vertex q (in the neighbor of v) mapped to the edge incident to v. Perhaps the most important notion for graph-labeled trees with respect to split decomposition is that of accessibility. Definition 1 Let (T, F) be a graph-labeled tree. The marker vertices q and q are accessible from one another if there is a sequence Π of marker vertices q, . . . , q such that the two following conditions holds. 1. Every two consecutive elements of Π are either the vertices of a label-edge or the extremities of a tree-edge; 2. the sequence of edges obtained above alternates between tree-edges and labeledges.
Two leaves are accessible if their associated marker vertices are accessible. The accessibility graph of a graph-labeled tree (T, F), denoted Gr(T, F), is the graph whose vertices are leaves of T and which has an edge between two distinct leaves l and l if and only if they are accessible from one another. Conversely, we may say that (T, F) is the graph-labeled tree of Gr(T, F). See Fig. 1 for an example. ) Let e be a tree-edge incident to internal nodes u and u in a graphlabeled tree, and let q ∈ V (u) and q ∈ V (u ) be the extremities of e. The node-join of u, u replaces u and u with a new internal node v labeled by the graph formed from the disjoint union of G(u) and G(u ) as follows: all possible label-edges are added between N (q) and N (q ), and then q and q are deleted. The new node v is made adjacent to all neighbors of u and u in T . The node-split is then the inverse of the node-join.
Notice that the node-join operation and the node-split operation preserve the accessibility graph of the graph-labeled tree. A graph-labeled tree is reduced if all its labels are either prime or degenerate, and no node-join of two cliques or two stars S 1 and S 2 where the center of S 1 is adjacent to a leaf of S 2 is not possible. It is known that for every connected graph G, there exists a unique reduced graph-labeled tree (T, F) such that G = Gr(T, F) [13,[25][26][27]; this unique reduced graph-labeled tree is called the split-tree and is denoted ST(G).
Theorem 1 ([4,13,25-27]) Let (T, F) be the split-tree of a connected graph G. Every split of G is the bipartition (of leaves) induced by removing an internal tree-edge from T , where T = T or T is obtained from T by exactly one node-split of a degenerate node.

Rank-Width
Rank-width was introduced by Oum and Seymour [35] and is closely related to cliquewidth. To define it, we first need to introduce the bipartite adjacency matrix A G [U, W ].
For a graph G and U, W ⊆ V (G), let A G [U, W ] denote the U × W -submatrix of the adjacency matrix over the two-element field GF(2), i.e., the entry a u,w , u ∈ U and w ∈ W , of A G [U, W ] is 1 if and only if {u, w} is an edge of G. The cut-rank function ρ G of a graph G is defined as follows: For a bipartition (U, W ) of the vertex  (2). We note that ρ G is a symmetric function, and observe that a split-module X can be seen as a subgraph such that A G [X, V (G)\X ] = 1.
A rank-decomposition of a graph G is a pair (T, μ) where T is a tree of maximum degree 3 and μ : V (G) → {t : tis a leaf ofT } is a bijective function. For an edge e of T , the connected components of T − e induce a bipartition (X, Y ) of the set of leaves of T . The width of an edge e of a rank-decomposition (T, μ) is ρ G (μ −1 (X )). The width of (T, μ) is the maximum width over all edges of T . The rank-width of G, r w(G) in short, is the minimum width over all rank-decompositions of G. A graph class H is of unbounded rank-width if for each i ∈ N there exists a graph G ∈ H such that r w(G) > i.
An example of a rank-decomposition is provided in Fig. 2.

Theorem 3 ([29])
Let k ∈ N and n ≥ 2. For an n-vertex graph G, we can output a rank-decomposition of width at most k or confirm that the rank-width of G is larger than k in time f (k) · n 3 , where f is a computable function.

Monadic Second Order Logic on Graphs
Here we introduce monadic second order logic, which will play a crucial role in our positive (Sect. 6) as well as negative (Sect. 7) algorithmic results. We assume that we have an infinite supply of individual variables, denoted by lowercase letters x, y, z, and an infinite supply of set variables, denoted by uppercase letters X, Y, Z . Formulas of monadic second-order logic (MSO) are constructed from atomic formulas E(x, y), X (x), and x = y using the connectives ¬ (negation), ∧ (conjunction) and existential quantification ∃x over individual variables as well as existential quantification ∃X over set variables. Individual variables range over vertices, and set variables range over sets of vertices. The atomic formula E(x, y) expresses adjacency, x = y expresses equality, and X (x) expresses that the vertex x is in the set X . From this, we define the semantics of monadic second-order logic in the standard way (this logic is sometimes called MSO 1 ).
Free and bound variables of a formula are defined in the usual way. A sentence is a formula without free variables. We write ϕ(X 1 , . . . , X n ) to indicate that the set of free variables of formula ϕ is {X 1 , . . . , X n }. If G = (V, E) is a graph and S 1 , . . . , S n ⊆ V we write G | ϕ(S 1 , . . . , S n ) to denote that ϕ holds in G if the variables X i are interpreted by the sets S i , for i ∈ [n]. For a fixed MSO sentence ϕ, the MSO model checking problem (MSO-MC ϕ ) asks whether an input graph G satisfies G | ϕ.
It is known that MSO formulas can be checked in uniformly polynomial time on graphs of bounded rank-width. Theorem 4 ([19]) Let ϕ and ψ = ψ(X ) be fixed MSO formulas. There exists a computable function f and an algorithm such that, given an n-vertex graph G and S ⊆ V (G), decides whether G | ϕ and whether G | ψ(S) in time f (r w(G)) · n 3 .
We review MSO-types roughly following the presentation in the textbook by Libkin [32]. The quantifier rank of an MSO formula ϕ is defined as the nesting depth of quantifiers in ϕ. For non-negative integers q and l, let MSO q,l consist of all MSO formulas of quantifier rank at most q having at most l free set variables.
Let ϕ = ϕ(X 1 , . . . , X l ) and ψ = ψ(X 1 , . . . , X l ) be MSO formulas. We say ϕ and ψ are equivalent, written ϕ ≡ ψ, if for all graphs G and U 1 , . . . , . Given a set F of formulas, let F/≡ denote the set of equivalence classes of F with respect to ≡. A system of representatives of F/≡ is a set R ⊆ F such that R ∩ C = ∅ for each equivalence class C ∈ F/≡. The following statement has a straightforward proof using normal forms (see [32,Proposition 7.5 and Lemma 3.13] for details).

Fact 1
Let q and l be fixed non-negative integers. The set MSO q,l /≡ is finite, and one can compute a finite system of representatives of MSO q,l /≡. Note that the system of representatives obtained in this way need not be inclusionminimal, and we do not assume to have a mapping from this system of representatives to elements of MSO q,l /≡. We will assume that for every pair of non-negative integers q and l the system of representatives of MSO q,l /≡ given by Fact 1 is fixed.

Definition 3 (MSO Type)
Let q, l be non-negative integers. For a graph G and an l-tuple U of sets of vertices of G, we define MSO-type q (G, U) as the set of formulas ϕ ∈ MSO q,l such that G | ϕ(U). We call MSO-type q (G, U) the MSO q-type of U in G.
Since we will only be dealing with MSO logic, throughout the paper we will refer to MSO-types simply as types. It follows from Fact 1 that up to logical equivalence, every type contains only finitely many formulas. This allows us to represent types using MSO formulas, as formalized in the next lemma. We remark that the statement of the next lemma used in previous work [20] did not specify the ("fixed-parameter") dependence of the running time on the rank-width, and so here we give a proof of the lemma for completeness.

Lemma 1 ([20])
Let q and l be non-negative integer constants. Let G be a graph, and let U be an l-tuple of sets of vertices of G. One can compute a formula Φ ∈ MSO q,l such that for any graph G and any l-tuple U of sets of vertices of G we have G | Φ(U ) if and only if type q (G, U) = type q (G , U ). Moreover, Φ can be computed in time f (r w(G)) · |V | 3 .
Proof Let R be a system of representatives of MSO q,l /≡ given by Fact 1. Because q and l are constant, we can consider both the cardinality of R and the time required to compute it as constants. Let Φ ∈ MSO q,l be the formula defined as Since the number of formulas in R is a constant, this can be done in time f (r w(G)) · |V | 3 (for some computable function f ) as checking whether G satisfied ϕ(U) can be done in time q(r w(G)) · |V | 3 (for some computable function q).
Let G be an arbitrary graph and let U be an l-tuple of subsets of V (G ). We claim that type q (G, An analogous argument proves that there has to be a ψ ∈ R such that ψ ≡ ϕ and G | ¬ψ(U ). It follows that G | ϕ(U ), which again yields a contradiction.
The remainder of the section introduces the classical notion of MSO games (Definition 5) and their relation to MSO types (Theorem 5). However, to formally define MSO games, we first need the notion of partial isomorphism.

Definition 4 (Partial isomorphism) Let G, G be graphs, and let
. Then (v, u) defines a partial isomorphism between (G, V) and (G , U) if the following two conditions hold: In the definition of MSO games given below, we denote the concatenation of tuple A by tuple B as A B.
Definition 5 ([32], Definition 7.6) Let G and G be graphs, and let V 0 be a k-tuple of subsets of V (G) and let U 0 be a k-tuple of subsets of V (G ). Let q be a non-negative integer. The q-round MSO game on G and G starting from (V 0 , U 0 ) is played as follows. The game proceeds in rounds, and each round consists of one of the following kinds of moves.

Point move:
The Spoiler picks a vertex in either G or G ; the Duplicator responds by picking a vertex in the other graph. Let be the set moves played in the q-round game, so that l + m = q and moves belonging to same round have the same index. Then the Duplicator wins the game if (v, u) is a partial isomorphism of (G, V 0 V) and (G , U 0 U). If the Duplicator has a winning strategy, we write (G,

Theorem 5 ([32], Theorem 7.7)
Given two graphs G and G and two l-tuples V 0 , U 0 of sets of vertices of G and G , respectively, we have

Well-Structured Modulators
Recall that a modulator to a graph class H is a vertex-subset of a graph G such that its deletion puts G into H (see Sect. 2.1).

Definition 6
Let H be a hereditary graph class and let G be a graph. A set X of pairwise-disjoint split-modules of G is called a k-well-structured modulator to H if An example of a 2-well-structured modulator is provided in Figure 3. For the sake of brevity and when it is clear from the context, we will sometimes identify X with To allow a concise description of our parameters, for any hereditary graph class H we let the well-structure number (wsn H in short) denote the minimum k such that G has a k-well-structured modulator to H. Similarly, we let mod H (G) denote the minimum k such that G has a modulator of cardinality k to H.

Proposition 1
Let H be an arbitrary hereditary graph class of unbounded rank-width.
notice that for every graph G of rank-width k, the set {V (G)} is a k-well-structured modulator to the empty graph. For the second claim, since H has unbounded rank-width, for every i ∈ N it contains some graph For the second claim, let G / ∈ H and let k = r w(G ). Consider the graph G i consisting of i + 1 + k disjoint copies of G and a vertex q which is adjacent to every other vertex of G. Since H is hereditary, we may assume without loss of generality that it contains the single-vertex graph. It is then easy to check that {V (G)\{q}} forms a k-well-structured modulator in G to H. Now consider an arbitrary set X ⊆ V (G) of cardinality at most i + k. Clearly, there must exist some copy of G , say G j , such that

Finding Well-Structured Modulators
The objective of this subsection is to prove the following theorem.

Theorem 6
Let H be a graph class characterized by a finite obstruction set. There exists a fixed-parameter algorithm parameterized by k which for every input graph G either finds a k-well-structured modulator to H, or detects that no such k-wellstructured modulator exists.
Interestingly, the techniques we will use to prove Theorem 6 only work if the rankwidth of the graph is sufficiently large. This is not a problem though, since on graphs of small rank-width we can always directly use rank-width to find k-well-structured modulators.
Our first course of action is the statement of several useful properties of splits in graphs. We remark that for most of this section we will restrict ourselves to connected graphs, and show how to deal with general graphs later on; this allows us to use the following result by Cunningham.

Lemma 2 If A and B are overlapping split-moduleof a connected graph G
We make the following exhaustive case distinction: easily seen to be split-modules; -if |A ∩ B| ≥ 2 and |C ∩ D| = 1, then A ∩ B is a split-module by Theorem 7 and A ∪ B is also a split-module because C ∩ D is a split-module; -if |A ∩ B| = 1 and |C ∩ D| ≥ 2, then A ∩ B is a split-module and A ∪ B is also a split-module because C, D satisfy the conditions of Theorem 7 and hence

by Theorem 7 and
A ∪ B is also a split-module because C, D satisfy the conditions of Theorem 7, as in the previous case.
we have |Z ∩ A| ≥ 2 and hence we conclude that Z ∩ A = A\B is a split module by Theorem 7.
We construct a rank decomposition T = (T, μ) of G as follows.
Let l a be the leaf (note that μ A is bijective) of T A such that μ A (a) = l a . Similarly, let l b and l c be the leaves such that μ B (b) = l b and μ C (c) = l c , respectively. We obtain T from T A by adding disjoint copies of T B and T C and then identifying l a with the copies of l b and l b . Since T A , T B , and T C are subcubic, so is T .
We define the mapping μ : where c maps internal nodes in T B ∪ T C to their copies in T . The mappings μ A , μ B , and μ C are bijections and c is injective, so μ is injective. By construction, the image of V (G) under μ is the set of leaves of T , so μ is a bijection. Thus T = (T, μ) is a rank decomposition of G.
We prove that the width of T is at most k. Given a rank decomposition T * = (T * , μ * ) and an edge e of T * , the connected components of T * −e induce a bipartition (X, Y ) of the leaves of T * . We set f : (T * , e) → (μ * −1 (X ), μ * −1 (Y )). Take any edge e of T . There is a natural bijection β from the edges in T to the edges of T A ∪ T B ∪ T C . Accordingly, we distinguish three cases for e = β(e): . Without loss of generality assume that a ∈ W .
Then by construction of one can simply copy the column corresponding to a in A G (U, W ) or add some empty columns. This does not increase the rank of the matrix.
2. e ∈ T B . This case is symmetric to case 1, with A and B switching their roles and b taking the role of a. 3. e ∈ T C . This case is symmetric to case 1, with A and C switching their roles and c taking the role of a.
Since β is bijective, this proves that the rank of any bipartite adjacency matrix induced by removing an edge e ∈ T is bounded by k. We conclude that the width of T is at most k and thus r w(G) ≤ k.
By repeating the proof technique of Lemma 4 without the set C, we obtain the following corollary. The following lemma in essence shows that the relation of being in a split-module of small rank-width is transitive (assuming sufficiently high rank-width). The significance of this will become clear later on.
This concludes the proof that ∼ k is an equivalence relation. Now let v ∈ V, G be the connected component containing v, and let U = [v] ∼ k . For each u ∈ U there is a split-module W u of G (and of G) such that u, v ∈ W u and r w(G[W u ]) ≤ k. By Lemma 6, W = u∈U W u is a split-module of G (and hence also of G) and r w( Corollary 2 Every graph G of rank-width at least k + 2 has its vertex set uniquely partitioned by the equivalence classes of ∼ k into inclusion-maximal split-modules of rank-width at most k.
Next, we state a simple but useful observation.

Observation 1
Let k ∈ N, G be a disconnected graph having rank-width at least k + 2, and C(G) be the set of connected components of G.
Now that we know ∼ k is an equivalence relation, we show how to compute it in FPT time. It will be useful to recall Theorems 1 and 2 from Sect. 2.3.

Proposition 3
Let k ∈ N. Given an n-vertex graph G of rank-width at least k + 2 and two vertices v, w, we can decide whether v ∼ k w in time f (k) · n 3 for some computable function f . Proof From Observation 1 it follows that if the proposition holds for connected graphs, then it holds for disconnected graphs as well; hence we may assume that G is connected. By Theorem 2 we can compute the unique split-tree ST(G) = (T, F) in O((m + n)α(m + n)) time. Due to Theorem 1, every split in G is the bipartition of leaves of T induced either by removing an internal tree-edge of T or an edge created by a node-split of a degenerate vertex of T .
Vertices of G are leaves of T and we can find a path P between v and w in T in time linear in size of T . Since the number of nodes in a split-decomposition is linear in the number of vertices of the original graph [23], there are at most linearly many vertices on the path. Moreover, if u ∈ T is a degenerate node on P, then we can split it into two nodes u 1 , u 2 in a way such that G(u 1 ) contains exactly the two marker vertices of G(u) incident to an edge of T on P and a new marker vertex connecting it to u 2 . We split all degenerate nodes on P in this way and denote the new tree by T . Note that now every degenerate node on a new path P between u and v has 3 vertices. Now every edge between P and T \P corresponds to a minimal split-module containing v and w. Conversely, as a consequence of Theorem 1 every minimal split-module containing v and w is induced by removing an edge between P and T \P , and let M vw be the set containing all of these at most |T | minimal split modules.
In the rest of this section we show how to find a k-well-structured modulator to any graph class H characterized by a finite obstruction set F. We first present the algorithm and then show its running time and correctness. We will use ∼ k as the input for FindWSM F , however considering general equivalence relations as inputs is useful for proving correctness. Recall that the equivalence relation ∼ k (or, more precisely, the set of its equivalence classes) can be computed in time n 2 · f (k) · n 3 for some function f thanks to Proposition 3, and this only needs to be done once before starting the algorithm. The following two lemmas show that Algorithm 1 is correct and runs in FPT time. For fixed F, let c F denote the maximum number of vertices of a graph in F.
Proof The time required to perform the steps on lines 2- Similarly, it holds that |V (D )| and hence also the number of times the procedure on lines 8-13 is called are bounded by c F . For the rest of the proof, we proceed by induction on k. First, if k = 0, then the algorithm is polynomial by the above. So assume that k ≥ 1 and the algorithm for k − 1 runs in time at most c k−1 F · n c F . Then the algorithm for k will run in polynomial time up to lines 8-13, where it will make at most c F calls to the algorithm for k − 1, which implies that the running time for k is bounded by O(c k F · n c F ).

Lemma 8 Let k ≥ 0, G be a graph and ∼ an equivalence relation over a superset of V . Then FindWSM F (k, G, ∼) outputs a set X of at most k equivalence classes of
Proof If G does not contain any D as an induced subgraph, then we correctly return the empty set. So, assume there exists an induced subgraph D of G isomorphic to D. We prove the lemma by induction on k.
Clearly, if k = 0 but there exists some obstruction, then the algorithm outputs False and this is correct; if k = 0 and no obstruction exists, then the algorithm correctly outputs ∅. Let k ≥ 1 and assume that the algorithm is correct for k − 1. If G does not contain any such X, then for any equivalence class [a] ∼ , FindWSM F (k − 1, G − [a] ∼ , ∼) will correctly output False.
On the other hand, assume G does contain some X with the desired properties. In particular, this implies that X must intersect V (D ). Let X i be an arbitrary equivalence class of X which intersects V (D ). Then X \{X i } is a set of at most k − 1 equivalence classes of ∼ in G − X i , and hence FindWSM F (k − 1, G − X i , ∼) will output some solution X for G − X i by our inductive assumption. Since any obstruction in G intersecting X i is removed by X i and G − X i is made F-free by X , we observe that X ∪ X i intersects every obstruction in G and hence the proof is complete.
From Lemma 8 and Corollary 2 we obtain the following. FindWSM F (k, G, ∼ k ) either outputs a k-well-structured modulator to H or correctly detects that no such modulator exists.

Corollary 3 Let k ∈ N, G be a graph of rank-width at least k + 2 and ∼ k be the equivalence relation computed by Proposition 3. Then
Proof of Theorem 6 Consider the following procedure. First, we test whether G has rank-width at most k + 1 [29], and if this is the case then one can find a k-wellstructured modulator to H by using standard techniques. For instance, one may use the extension of Courcelle's Theorem [11] to counting monadic second order logic (CMSO); see for instance the work of Courcelle and Oum [12]. CMSO extends MSO logic by adding atomic formulas which express that the cardinality of a set is divisible by a (fixed) number. The property of "having rank-width at most k" is known to be expressible in CMSO logic [12], the properties of "being a split-module" and "not containing any obstruction from a finite set" are easily verified to be expressible in CMSO and even MSO logic, and CMSO logic can be model checked in polynomial time on graphs of bounded rank-width [12,29].
On the other hand, assume that the input graph G has rank-width at least k + 2. Then the theorem follows by using Proposition 3 and then Algorithm 1 in conjunction with Lemma 7 and Corollary 3.

Examples of Algorithmic Applications
This section contains several examples of how the notion of k-well-structured modulators can be used to design fixed-parameter algorithms.

Results for Specific Problems
Our first examples deal with two classical NP-hard graph problems, specifically Minimum Vertex Cover (MinVC) and Maximum Clique (MaxClq). Given a graph G, a set X ⊆ V (G) is a vertex cover if every edge is incident to at least one v ∈ X and a clique if G[X ] is a complete graph.

MinVC, MaxClq
Instance: A graph G and an integer m. Task (MinVC): Find a vertex cover in G of cardinality at most m, or determine that it does not exist. Task (MaxClq): Find a clique in G of cardinality at least m, or determine that it does not exist.
Establishing the following theorem is the main objective of this subsection.

Theorem 8 Let P ∈ {MinVC, MaxClq} and H be a graph class characterized by a finite obstruction set. Then P is FPT parameterized by wsn H if and only if P is polynomial-time tractable on H.
Since wsn H (G) = 0 for any F-free graph G, the "only if" direction is immediate; in other words, being polynomial-time tractable on H is clearly a necessary condition for being fixed-parameter tractable when parameterized by wsn H (G). Below we prove that for the selected problems this condition is also sufficient.

Lemma 9 If MinVC is polynomial-time tractable on a graph class H characterized by a finite obstruction set, then MinVC parameterized by wsn H is FPT.
Proof Let G = (V, E) be a graph and let k = wsn H (G). If r w(G) ≤ k + 2, then we simply use known algorithms to solve the problem in FPT time [19]. Otherwise, we proceed by using Theorem 6 to compute a k-well-structured modulator X = {X 1 , . . . , X k } in FPT time. For each i ∈ [k], we let A i be the frontier of X i and we let B i = N (A i ).
Since for each i ∈ [k] the graph G[A i ∪ B i ] contains a complete bipartite graph, any vertex cover of G must be a superset of either A i or B i . We can branch over these options for each i in 2 k time; formally, we branch over all of the at most 2 k functions f : [i] → {A, B}, and refer to these as signatures. Each vertex cover Y of G can be associated with at least one signature f , constructed in the following way: for each i ∈ [k] such that A i ⊆ Y , we set f (i) = A, and otherwise we set f (i) = B.
Our algorithm then proceeds as follows. For a graph G and a signature f , we construct a partial vertex cover Z = i∈[k] f (i). We let G = G − Z . Consider any connected component C of G . If C intersects some X i , then by the construction of Z it must hold that C ⊆ X i . Hence it follows that C either has rank-width at most k (in the case C ⊆ X i for some i), or C is in H (if C does not intersect X), or both. Then we find a minimum vertex cover for each connected component of G independently, by either calling the known fixed-parameter algorithm (if C has bounded rank-width) or the polynomial algorithm (if C is in H) at most |C| times. Let Z be the union of the obtained minimum vertex covers over all the components of G , and let Y f = Z ∪ Z . After branching over all possible functions f , we compare the obtained cardinalities of Y f and choose any Y f of minimum cardinality. Finally, we compare |Y f | and the value of m provided in the input.
We argue correctness in two steps. First, assume for a contradiction that G contains an edge e which is not covered by Y f for some f . Then e cannot have both endpoints in G , since Y f contains a (minimum) vertex cover for each connected component of G , but e cannot have an endpoint outside of G , since Z ⊆ Y f . Hence each Y f is a vertex cover of G.
Second, assume for a contradiction that there exists a vertex cover Y of G which has a lower cardinality than the vertex cover found by the algorithm described above. Let f be the signature of Y . Then it follows that Z ⊆ Y , and since Z ⊆ Y f , there would exist a component C of G\Z such that |Y ∩ C| ≤ |Y f ∩ C|. However, this would contradict the minimality of Z ∩ C = Y f ∩ C. Hence we conclude that no such Y can exist, and the algorithm is correct.
We deal with the second problem below.

Lemma 10 If MaxClq is polynomial-time tractable on a graph class H characterized by a finite obstruction set, then MaxClq parameterized by wsn H is FPT.
Proof We begin in the same way as for MinVC: let G = (V, E) be a graph and let k = wsn H (G). If r w(G) ≤ k + 2, then we simply use known algorithms to solve the problem in FPT time [19]. Otherwise, we proceed by using Theorem 6 to compute a k-well-structured modulator X = {X 1 , . . . , X k } in FPT time. For each i ∈ [k], we let A i be the frontier of X i and we let B i = N (A i ).
Then any clique C in G can be uniquely associated with a signature s by letting i ∈ s if and only if X i ∩ C = ∅. The algorithm proceeds by branching over all of the at most 2 k+1 possible non-empty signatures s. If |s| = 1, then the algorithm simply computes a maximum-cardinality clique in X s (by calling the respective FPT or polynomial algorithm at most a linear number of times) and stores it as Y s . If |s| ≥ 2, then the algorithm makes two checks before proceeding. First, if 0 ∈ s then it constructs the set X 0 of all vertices x ∈ X 0 such that x is adjacent to every A i for i ∈ s\{0}. If X 0 = ∅ then the current choice of s is discarded and the algorithm proceeds to the next choice of s. Second, for every a = b such that a, b ∈ s\{0} it checks that X a = A a and X b = A b are adjacent; again, if this is not the case, then we discard this choice of s and proceed to the next choice of s. Finally, if the current choice of s passed both tests then for each i ∈ s we compute a maximum clique in each G[X i ] and save their union as Y s . In the end, we choose a maximum-cardinality set Y s and compare its cardinality to the value of m provided in the input.
We again argue correctness in two steps. First, assume for a contradiction that Y s is not a clique, i.e., there exist distinct non-adjacent a, b ∈ Y s . Since Y s consists of a union of cliques within subsets of X i∈s , it follows that there would have to exist distinct c, d ∈ s such that a ∈ X c and b ∈ X d . This can however be ruled out for c or d equal to 0 by the construction of X 0 . Similarly, if c and d are both non-zero, then this is impossible by the second check which tests adjacency of every pair of X c and X d for every c, d ∈ s.
Second, assume for a contradiction that there exists a clique Y in G which has a higher cardinality than the largest clique obtained by the above algorithm. Let s be the signature of Y . If |s| = 1 then |Y s | ≥ |Y | by the correctness of the respective FPT or polynomial algorithm used for each X s . If |s| ≥ 2 then Y may only intersect the sets X constructed above for s. Moreover, if there exists i ∈ [k] ∪ {0} such that |Y ∩ X i | > |Y s ∩ X i | then we again arrive at a contradiction with the correctness of the respective FPT or polynomial algorithms used for X i . Hence we conclude that no such Y can exist, and the algorithm is correct.
Finally, let us review some concrete graph classes for use in Theorem 8. We use K i , C i and P i to denote the i-vertex complete graph, cycle, and path, respectively. 2K 2 denotes the disjoint union of two K 2 graphs. The fork, K 3,3 -e, banner, twin-house and T 2,2,2 graphs are depicted in Fig. 4.
Proof For item 1, recall that split graphs are graphs whose vertex set can be partitioned into one clique and one independent set, and such a partitioning can be found in linear time. If each vertex in the clique is adjacent to at least one independent vertex, then the clique is a minimum vertex cover, otherwise the clique without a pendant-free vertex is a minimum vertex cover. Item 2 follows from [33]. Item 3 follows from [1]. Item 4 follows from [24] and [5].

Fact 3
MaxClq is polynomial-time tractable on the following graph classes: 1. Any complementary graph class to the classes listed in Fact 2 (such as cofork-free graphs and split graphs); 2. Graphs of bounded degree. Proof 1. It is well-known that each maximum clique corresponds to a maximum independent set (and vice-versa) in the complement graph. 2. The degree bounds the size of a maximum clique, again resulting in a simple folklore branching algorithm. The class of graphs of degree at most d is exactly the class of F-free graphs for F containing all (d + 1)-vertex supergraphs of the star having d leaves.

Results for Other Graph Classes
Next, we turn our attention to computing k-well-structured modulators to examples of graph classes which are not characterized by a finite obstruction set (i.e., by a finite set of forbidden induced subgraphs). In the following lemmas, n denotes the size of the vertex set of the input graph.

Lemma 11
It is possible to compute a k-well-structured modulator to the class of forests in time f (k) · n 5 for some computable function f .
Proof We begin by describing our algorithm A, and then proceed to argue correctness and runtime bounds. A begins by checking whether the rank-width of the input graph G is at least k + 2; if not, then a k-well-structured modulator can be computed using Courcelle's Theorem in time at most f (k) · n 3 for some computable function f . A then proceeds in four steps.  [7]. If no such feedback vertex set exists, then A terminates the given branch; otherwise it adds the feedback vertex set to S and outputs S.
It is easy to verify that the running time of A is upper-bounded by O( f (k) · n 5 ) for some computable function f . As for correctness, let us assume for a contradiction that A outputs a set S and the graph H obtained from G after deleting all vertices in elements of S contains a cycle C. Clearly, neither C nor any other cycle in H intersects less than 4 equivalence classes of ∼ k , since otherwise such a cycle would have been detected and removed in step 2 of A.
Moreover, assume |C ∩ X | > 1 for some equivalence class X of ∼ k . Since C spans at least 4 equivalence classes, H must contain at least two neighbors of X in C\X which are adjacent to at least two vertices in X (indeed, recall that X is a split-module and hence all vertices of X with a neighbor outside X have the same neighborhood outside X ); let us denote these vertices y, z, x 1 , x 2 , respectively. Since x 1 , x 2 are in the frontier of X , the vertices y, x 1 , z, x 2 must form a cycle in H which spans at most 3 equivalence classes, contradicting our previous conclusion that no such cycles are present in H . Hence we may conclude that |C ∩ X | ≤ 1 for every equivalence class X .
The only case we are left with now is that C intersects each equivalence class at most once. But then it must be the case that C also forms a cycle in G , which would have necessarily been removed in step 4 of A, a contradiction. So H must indeed be acyclic.
For the other direction, assume that G contains a minimal k-well-structured modulator X = {X 1 , . . . , X j } to the class of forests. Then consider the branch of step 2 of A which hits a maximal number of elements of X, and let us denote the elements removed by A in this way Y. By the same argument as above, each cycle remaining in G after deleting Y intersects each equivalence class at most once and hence corresponds to a cycle in the graph G constructed by A. In particular, the equivalence classes in X\Y form a feedback vertex set of size = |X\Y| in G . By the correctness of the feedback vertex set algorithm used in step 4, at least one branch of A is guaranteed to output a solution S ⊃ Y of size at most j.
For the next result, recall that a cycle is chordless if it is also an induced cycle of length at least 4, and a graph is chordal if it contains no chordless cycles.

Lemma 12 It is possible to compute a k-well-structured modulator to the class of chordal graphs in time f (k) · n O(1) .
Proof We once again first describe our algorithm A. A begins by checking whether the rank-width of the input graph G is at least k + 2; if not, then a k-well-structured modulator can be computed using Courcelle's Theorem in time at most f (k) · n 3 for some computable function f . A then proceeds in four steps.
-First, it uses Proposition 3 to partition V (G) into equivalence classes of ∼ k in time at most f (k) · n 5 , and sets j := k; S := ∅; ∼:=∼ k . -Second, for each tuple (X, Y, Z ) of equivalence classes of ∼, A checks whether G[X ∪ Y ∪ Z ] is chordal in linear time [36]. If this is not the case, then A chooses (by branching) one class out of {X, Y, Z } to delete from ∼, saves the deleted equivalence class in S, and restarts the second step with j := j − 1. If j = −1, then the algorithm terminates the given branch.
-Third, A constructs an auxiliary graph G = (V , E ) by setting V to be the set of equivalence classes of ∼ and E to contain an edge between A, B ∈ V iff there exist vertices a ∈ A, b ∈ B such that ab ∈ E(G). -Finally, A tries to find a modulator to chordal graphs of size at most j in G using the algorithm by Marx [8], which takes time at most 2 O(k log k) · |V | O (1) . If no such modulator exists, then A terminates the given branch; otherwise it adds the modulator to S and outputs S.
It is easy to verify that the running time of A is upper-bounded by f (k) · n O(1) for some computable function f . As for correctness, let us assume for a contradiction that A outputs a set S and the graph H obtained from G after deleting all vertices in elements of S contains a chordless cycle C; without loss of generality, let us assume C is such a chordless cycle of minimum length. Clearly, neither C nor any other chordless cycle in H intersects less than 4 equivalence classes of ∼ k , since otherwise such a cycle would have been detected and removed in step 2 of A.
We now claim that C contains at most one vertex from each equivalence class of ∼ k . To see this, assume for a contradiction that C contains two vertices in some equivalence class Z . Since C must also intersect other equivalence classes, it follows that C must in fact contain at least two vertices, say x, y, in the frontier of Z which have distinct neighbors, say x , y respectively, in C\Z . First, observe that x, y cannot occur consecutively along C, as that would violate the assumption that C is a minimumlength chordless cycle. Hence by the chordality of C we also see that x y cannot be an edge of G, and the same also applies for the non-edge of x y . But then x , x, y , y forms a chordless cycle which intersects at most 3 equivalence classes, contradicting our previous assumptions.
Let us now consider the set C of equivalence classes which intersect C; recall that |C | > 3. By the above claim, it follows that C would also be a chordless cycle in V (G ), contradicting the correctness of the chordal vertex deletion algorithm [8]. Hence we conclude that H must in fact be chordal.
For the other direction, assume that G contains a minimal k-well-structured modulator X = {X 1 , . . . , X j } to the class of chordal graphs. Then consider the branch of step 2 of A which hits a maximal number of elements of X, and let us denote the elements removed by A in this way Y. By the same argument as above, each chordless cycle remaining in G after deleting Y intersects each equivalence class at most once and hence corresponds to a chordless cycle in the graph G constructed by A. In particular, the equivalence classes in X\Y form a modulator to chordal graphs of size = |X\Y| in G . By the correctness of the chordal vertex deletion algorithm used in step 4, at least one branch of A is guaranteed to output a solution S ⊃ Y of size at most j.
to a potentially unbounded number of choices of the graph class H. Thus, the metatheorem supports two dimensions of generality. FPT parameterized by wsn H (G).

Theorem 9 Let φ be a MSO sentence and H be a graph class characterized by a finite obstruction set. If MSO-MC φ is FPT parameterized by mod H (G), then MSO-MC φ is also
The condition that MSO-MC φ is FPT parameterized by mod H (G) is a necessary condition for the theorem to hold by Proposition 1. However, it is natural to ask whether it is possible to use a weaker necessary condition instead, specifically that MSO-MC φ is polynomial-time tractable on H (as was done for specific problems in Sect. 5). Before proceeding towards a proof of Theorem 9, we make a digression and show that the weaker condition used in Theorem 8 is in fact not sufficient for the general case of MSO model checking.

Lemma 13
There exists an MSO sentence φ and a graph class H characterized by a finite obstruction set such that MSO-MC φ is polynomial-time tractable on H but NP-hard on the class of graphs having wsn H (G) ≤ 2 and even mod H (G) ≤ 2.
Proof Consider the sentence φ which describes the existence of a proper 5-coloring of the vertices of G, and let H be the class of graphs of degree at most 4 (in other words, let F contain all 6-vertex supergraphs of the star having 5 leaves). There exists a trivial greedy algorithm to obtain a proper 5-coloring of any graph of degree at most 4, hence MSO-MC φ is polynomial-time tractable on H. Now consider the class of graphs obtained from H by adding, to any graph in H, two adjacent vertices y, z which are both adjacent to every other vertex in the graph. By construction, any graph G from this new class satisfies mod H (G ) ≤ 2 and hence also wsn H (G ) ≤ 2. However, G admits a proper 5-coloring if and only if G − {y, z} admits a proper 3-coloring. Testing 3-colorability on graphs of degree at most 4 is known to be NP-hard [30], and hence the proof is complete.
Our strategy for proving Theorem 9 relies on a replacement technique, where each split-module in the well-structured modulator is replaced by a small representative. We use the notion of similarity defined below to prove that this procedure does not change the outcome of MSO-MC ϕ .

Definition 8 (Similarity)
Let q and k be non-negative integers, H be a graph class, and let G and G be graphs having k-well-structured modulators X = {X 1 , . . . , X k } and X = {X 1 , . . . , X k } to H, respectively. For 1 ≤ i ≤ k, let S i contain the frontier of split module X i and similarly let S i contain the frontier of split module X i . We say that (G, X) and (G , X ) are q-similar if all of the following conditions are met:

Lemma 14
Let q and k be non-negative integers, H be a graph class, and let G and G be graphs having k-well-structured modulators X = {X 1 , . . . , X k } and X = {X 1 , . . . , X k } to H, respectively. If (G, X) and (G , X ) are q-similar, then it holds that type q (G, ∅) = type q (G , ∅).
, Duplicator has a winning strategy π i in the q-round MSO game played on G i and G i starting from (S i , S i ). We construct a strategy witnessing (G, ∅) ≡ MSO q (G , ∅) in the following way: 1. Suppose Spoiler makes a set move W and assume without loss of generality that respectively, so that l + m = q and the moves made in the same round have the same index. We claim that (v, u) defines a partial isomorphism between (G, V) and (G , U).
-Let j 1 , j 2 ∈ [m] and let v j 1 , v j 2 ∈ X 0 . Since τ is an isomorphism as per Definition 8 item 1, it follows that v j 1 = v j 2 if and only if u j 1 = u j 2 and v j 1 v j 2 ∈ E(G) if and only if u j 1 u j 2 ∈ E(G ). -Let j 1 , j 2 ∈ [m] and let i ∈ [k] be such that v j 1 ∈ X 0 and v j 2 ∈ X i . Then clearly v j 1 = v j 2 and u j 1 = u j 2 . Consider the case v j 1 v j 2 ∈ E(G). Then v j 2 must lie in the frontier of X i , and hence v j 2 ∈ S i . Since Duplicator's strategy π i is winning for (G i , S i ) and (G i , S i ), it must hold that u j 2 ∈ S i . By Definition 8 item 2, it then follows that τ (v j 1 )u j 2 ∈ E(G ). So, consider the case v j 1 v j 2 / ∈ E(G). Then either v j 2 / ∈ S i , in which case it holds that u j 2 / ∈ S i because of the choice of π i and hence there cannot be an edge u j 2 u j 1 in G , or v j 2 ∈ S i , in which case it holds once again that u j 2 u j 1 / ∈ E(G ) by Definition 8 item 2. -Let j 1 , j 2 ∈ [m] and let i ∈ [k] be such that v j 1 , v j 2 ∈ X i . Since Duplicator plays according to a winning strategy π i in the game on G i and G i , the restriction and only if u j 1 = u j 2 . -Let j 1 , j 2 ∈ [m] and let i 1 , i 2 ∈ [k] be pairwise distinct numbers such that v j 1 ∈ X i 1 and v j 2 ∈ X i 2 .
Then v j 1 = v j 2 and also u j 1 = u j 2 since u j 1 ∈ X i 1 and u j 2 ∈ X i 2 by the Duplicator's strategy. Suppose v j 1 v j 2 ∈ E(G). Then v j 1 ∈ S i 1 , and v j 2 ∈ S i 2 , and S i 1 and S i 2 are adjacent in G. From the correctness of π i 1 and π i 2 it follows that u j 1 ∈ S i 1 and u j 2 ∈ S i 2 , and from Definition 8 item 3 it follows that S i 1 and S i 2 are adjacent in G , which together implies u j 1 u j 2 ∈ E(G ). On the other hand, suppose v j 1 v j 2 / ∈ E(G). Then either v j 1 / ∈ S i 1 , or v j 2 / ∈ S i 2 , or S i 1 and S i 2 are not adjacent in G. In the first case we have u j 1 / ∈ S i 1 , in the second case we have u j 2 / ∈ S i 2 , and in the third case it holds that S 1 and S 2 are not adjacent in G ; any of these three cases imply u j 1 u j 2 / ∈ E(G ). -Let j ∈ [m] such that v j ∈ X 0 . Then by the Duplicator's strategy on X 0 it follows that for any V q such that v j ∈ V q it holds that u j ∈ U q and for any V q such that v j / ∈ V q it holds that u j / ∈ U q . -Let j ∈ [m] and i ∈ [k] such that v j ∈ X k . Let V q be such that v j ∈ V q . Since π i is a winning strategy for Duplicator, it must be the case that u j ∈ U q . Similarly, if v j / ∈ V q then the correctness of π i guarantetes that u j / ∈ U q .
Next, we show that small representatives can be computed efficiently. Proof By Lemma 1 we can compute a formula Φ(Q) capturing the type T of (G, S) in can be computed as follows. We start enumerating all graphs (by brute force and in any order with a non-decreasing number of vertices), and check for each graph G * and every vertex-subset S * ⊆ V (G * ) whether G * | Φ(S * ). If this is the case, we stop and output (G * , S * ). Since G | Φ(S) this procedure must terminate eventually. Fixing the order in which graphs are enumerated, the number of graphs we have to check depends only on T . By Fact 1 the number of q-types is finite for each q, so we can think of the total number of checks and the size of each checked graph G * as bounded by a constant. Moreover the time spent on each check depends only on T and the size of the graph G * . Consequently, after we compute Φ(Q) it is possible to find a model for Φ(Q) in constant time.
Finally, in Lemma 16 below we use Lemma 15 to replace any well-structured modulator by a small but "equivalent" modulator. H such that (G, X) and (G , X ) are q-similar and for each i ∈ [k] it holds that |X i | is bounded by a constant.

Lemma 16 Let q be a non-negative integer constant and H be a graph class. Then given a graph G and a k-well-structured modulator
Proof For i ∈ [k], let S i ⊆ X i be the frontier of split-module X i , let G i = G[X i ] and let G 0 = G\G[X]. We compute a graph G i of constant size and a set S i ⊆ V (G i ) having the same MSO q-type as (G i , S i ). By Lemma 15, this can be done in time f (k) · |V (G)| O (1) for some function f . Now let G be the graph obtained by the following procedure: 1. We construct a disjoint union of G 0 and G i for each i ∈ [k]; 2. If k ≥ 2 then for each 1 ≤ i < j ≤ k such that S i and S k are adjacent in G, we add edges between every v ∈ S i and w ∈ S j .
3. for every v ∈ V (G 0 ) and i ∈ [k] such that S i and {v} are adjacent, we add edges between v and every w ∈ S i .
Proof of Theorem 9 Let G be a graph, k = wsn H (G) and q be the nesting depth of quantifiers in φ. By Theorem 6 it is possible to find a k-well-structured modulator to H in time f (k) · |V | O (1) . We proceed by constructing (G , X ) by Lemma 16. Since each X i ∈ X has size bounded by a constant and |X | ≤ k, it follows that X is a modulator to the class of F-free graphs of cardinality O(k). Hence MSO-MC φ can be decided in FPT time on G . Finally, since G and G are q-similar, it follows from Lemma 14 that G | φ if and only if G | φ.
For completeness, we remark that the same proof can be used to obtain analogues of Theorem 9 for any graph class H which admits a fixed-parameter algorithm for finding well-structured modulators (i.e., even if it is not characterized by a finite obstruction set; see for instance Lemma 11 and 12).
We conclude the section by showcasing an example application of Theorem 9. c-Coloring asks whether the vertices of an input graph G can be colored by c colors so that each pair of neighbors have distinct colors. From the connection between c-Coloring, its generalization List c-Coloring and modulators [6,Theorem 3.3] and tractability results for List c-Coloring [28, Page 5], we obtain the following.

Corollary 4
For each c ∈ N, c-Coloring parameterized by wsn P 5 -free is FPT.

Hardness of MSO Optimization
In the wake of Theorem 9 and the positive results for the two problems in Sect. 5, one would expect that it should be possible to strengthen Theorem 9 to also cover LinEMSO problems [11,19], which extend MSO model checking by allowing the minimization/maximization of linear expressions over free set variables. Surprisingly this is not possible if we wish to retain the same necessary conditions, as will be shown in this section. For our proof, it suffices to consider a simplified variant of LinEMSO, defined below. Let ϕ be an MSO formula with one free set variable.

MSO-Opt ≤ ϕ
Instance: A graph G and an integer r ∈ N. Question: Is there a set S ⊆ V (G) such that G | ϕ(S) and |S| ≤ r ?
We say that S ⊆ V (G) is a dominating set if every vertex in G either is in S or has a neighbor in S. We will need the following lemma before we proceed to the main result of this secton.

Lemma 17
The problem of finding a p-cardinality dominating set in a graph G having a k-cardinality modulator X ⊆ V (G) to the class of graphs of degree at most 3 is FPT when parameterized by p + k.
Proof Let L = V (G)\X and consider the following algorithm. We begin with D = ∅, and choose an arbitrary vertex v ∈ L which is not yet dominated by D. We branch over the at most k + 4 vertices q in {v} ∪ N (v), and add q to D. If |D| = p and there still exists an undominated vertex in G, we discard the current branch; hence this procedure produces a total of at most (k + 4) p branches. Now consider a branch where |D| < p but the only vertices left to dominate lie in X . For a, b ∈ L, we let a ≡ b if and only if N (a)∩ X = N (b)∩ X . Notice that ≡ has at most 2 k equivalence classes and that these may be computed in polynomial time. For each non-empty equivalence class of ≡, we choose an arbitrary representative and construct the set P of all such chosen representatives. We then branch over all subsets Q of P ∪ X of cardinality at most p − |D|, and add Q into D. Since |P ∪ X | ≤ 2 k + k, this can be done in time bounded by O(2 p·k ). Finally, we test whether this D is a dominating set, and output the minimum dominating set obtained in this manner.
It is easily observed from the description that the running time is FPT. For correctness, from the final check it follows that any set outputed by the algorithm will be a dominating set. It remains to show that if there exists a dominating set of cardinality p, then the algorithm will find such a set. So, assume there exists a p-cardinality dominating set D in G. Consider the branch arising from the first branching rule obtained as follows. Let v 1 be the first undominated vertex in L chosen by the algorithm, and consider the branch where an arbitrary q ∈ D ∩ N (v 1 ) is placed into D. Hence, after the first branching, there is a branch where D ⊆ D . Similarly, there exists a branch where D ⊆ D for each v i chosen in the i-th step of the first branching. If D = D after the first branching, then we are done; so, let D 1 = D \D be non-empty. Let D 1 be obtained from D 1 by replacing each w ∈ D 1 by the representative of [w] ≡ chosen to lie in P. Since D dominates all vertices in L and D 1 dominates the same vertices in X as D 1 , it follows that D * = (D \D 1 ) ∪ D 1 is also a dominating set of G. Furthermore, |D * | = |D |. However, since D 1 ⊆ P and |D 1 | ≤ p − |D|, there must exist a branch in the second branching which sets Q = D 1 . Hence there exists a branch in the algorithm which obtains and outputs the set D * = D ∪ D 1 .

Theorem 10
There exists an MSO formula ϕ and a graph class H characterized by a finite obstruction set such that MSO-Opt ≤ ϕ is FPT parameterized by mod H but paraNP-hard parameterized by wsn H .
Proof To prove Theorem 10, we let dom(S) express that S is a dominating set in G, and let cyc(S) express that S intersects every C 4 (cycle of length 4). Then we set ϕ(S) = dom(S) ∨ cyc(S) and let H be the class of C 4 -free graphs of degree at most 3 (obtained by letting the obstrucion set F contain C 4 and all 5-vertex supergraphs of K 1,4 ).
Claim MSO-Opt ≤ ϕ is FPT parameterized by the cardinality of a modulator to H.
To argue that the above claim holds, let (G = (V, E), r ) be the input of MSO-Opt ≤ ϕ and k be the cardinality of a modulator in G to H. We begin by computing some modulator X ⊆ V of cardinality k in G to H; this can be done in FPT time by a simple branching algorithm on any of the obstructions from F located in G. Let L = V \X .
Next, we compare r and k, and if r ≥ k then we output YES. This is correct, since each C 4 in G must intersect X and hence setting S = X satisfies ϕ(S). So, assume r < k. Then we check whether there exists a set A of cardinality at most r which intersects every C 4 ; this can be done in time O * (4 r ) by a simple FPT branching algorithm. Next, we check whether there exists a dominating set B in G of cardinality at most r ; this can also be done in FPT time by Lemma 17. Finally, if A or B exists, then we output YES and otherwise we output NO. Hence the claim is indeed true.
We proceed by arguing that this claim is also correct. It is known that the Dominating Set problem, which takes as input a graph G and an integer j and asks to find a dominating set of size at most j, is NP-hard on C 4 -free graphs of degree at most 3 [31] (see also subsequent work [2,Theorem 8]). We use this fact as the basis of our reduction. Let (G, j) be a C 4 -free instance of Dominating Set of degree at most 3. Then we construct G from G by adding (|G| + 2)-many copies of C 4 , a single vertex q adjacent to every vertex of every such C 4 , and a single vertex q adjacent to q and an arbitrary vertex of G. It is easy to check that wsn H (G ) ≤ 2.
We claim that (G, j) is a YES-instance of Dominating Set if and only if (G , j + 1) is a yes-instance of MSO-Opt ≤ ϕ . For the forward direction, assume there exists a dominating set D in G of cardinality j. Then the set D ∪ {q} is a dominating set in G , and hence satisfies ϕ.
On the other hand, assume there exists a set D of cardinality at most j + 1 which satisfies ϕ. If j + 1 ≥ |G| + 2 then clearly (G, j) is a YES-instance of Dominating Set, so assume this is not the case. But then D cannot intersect every C 4 , and hence D must be a dominating set of G of cardinality at most j +1. But this is only possible if q ∈ D . Furthermore, if q ∈ D , then replacing q with the neighbor of q in G is also a dominating set of G . Hence we may assume, w.l.o.g., that D ∩ V (G) is a dominating set of cardinality at most j in V (G). Consequently, (G, j) is a YESinstance of Dominating Set and the claim holds.
The theorem now follows from the two claims proved above.

Conclusion
We have introduced a family of structural parameters which push the frontiers of fixed-parameter tractability beyond rank-width and modulator size for a wide range of problems. In particular, the well-structure number can be computed efficiently (Theorem 6) and used to design fixed-parameter algorithms for Minimum Vertex Cover and Maximum Clique (Theorem 8) as well as any problem which can be described by a sentence in MSO logic (Theorem 9). We remark that while our results are of a theoretical nature, there is hope that some of the ideas behind the presented algorithms may be useful in practice once faster algorithms for computing rank-width become available. For future work, it would be interesting to see whether the notion of split-modules introduced in this work can be naturally generalized. In particular, a split-module X can be seen as a subgraph such that A G [X, G − X ] = 1, and in this sense splitdecompositions naturally correspond to rank-width 1. It is easy to define corresponding decompositions also for higher values of rank-width, however it is not at all clear how such decompositions could be computed. We believe this is an interesting question on its own; furthermore, obtaining such decompositions would allow an immediate extension of our framework to the arising more general notions of split-modules.
Finally, we remark that well-structured modulators have also found applications in the area of data reduction and kernelization [16]. In particular, since wsn H lowerbounds rank-width and rank-width is known not to admit polynomial kernels for nearly any NP-hard problems, one cannot hope to use wsn H for polynomial kernelization. However, a number of polynomial kernels have been developed for a restriction of wsn H where each split module induces a graph whose rank-width is bounded by a constant [17].