Elimination distance to bounded degree on planar graphs
EElimination distance to bounded degreeon planar graphs
Alexander Lindermayr
University of Bremen, [email protected]
Sebastian Siebertz
University of Bremen, [email protected]
Alexandre Vigny
University of Bremen, [email protected]
Abstract
We study the graph parameter elimination distance to bounded degree , which was introduced byBulian and Dawar in their study of the parameterized complexity of the graph isomorphism problem.We prove that the problem is fixed-parameter tractable on planar graphs, that is, there existsan algorithm that given a planar graph G and integers d and k decides in time f ( k, d ) · n c for acomputable function f and constant c whether the elimination distance of G to the class of degree d graphs is at most k . Theory of computation → Graph algorithms analysis; Theory ofcomputation → Fixed parameter tractability
Keywords and phrases
Elimination distance, parameterized complexity, structural graph theory.
Structural graph theory offers a wealth of parameters that measure the complexity of graphsor graph classes. Among the most prominent parameters are treedepth and treewidth , whichintuitively measure the resemblance of graphs with stars and trees, respectively. Othercommonly studied structurally restricted graph classes are the class of planar graphs , classesthat exclude a fixed graph as a minor or topological minor , classes of bounded expansion and nowhere dense classes.Once we have gained a good understanding of a graph class C , it is natural to studyclasses whose members are close to graphs in C . One of the simplest measures of distanceto a graph class C is the number of vertices or edges that one must delete (or add) to agraph G to obtain a graph from C . Guo et al. [11] formalized this concept under the name distance from triviality . For example, the size of a minimum vertex cover is the distance tothe class of edgeless graphs and the size of a minimum feedback vertex set is the distanceto the class of forests. More generally, for a graph G , a vertex set X is called a c -treewidthmodulator if the treewidth of G − X is at most c , hence, the size of a c -treewidth modulatorcorresponds to the distance to the class of graphs of treewidth at most c . This concept wasintroduced and studied by Gajarksý et al. in [9].The elimination distance to a class C of graphs measures the number of recursive deletionsof vertices needed for a graph G to become a member of C . More precisely, a graph G has elimination distance 0 to C if G ∈ C , and otherwise elimination distance k + 1, if inevery connected component of G we can delete a vertex such that the resulting graph haselimination distance k to C . Elimination distance was introduced by Bulian and Dawar [3]in their study of the parameterized complexity of the graph isomorphism problem. a r X i v : . [ c s . D M ] J u l Elimination distance to bounded degree on planar graphs
Elimination distance naturally generalizes the concept of treedepth, which corresponds tothe elimination distance to the class C of edgeless graphs. The parameter also has very nicealgorithmic applications. On the one hand, small elimination distance to a class C on whichefficient algorithms for certain problems are known to exist, may allow to lift the applicabilityof these algorithms to a larger class of graphs. For example, Bulian and Dawar [3] showedthat the graph isomorphism problem is fixed-parameter tractable when parameterized bythe elimination distance to the class C d of graphs with maximum degree bounded by d , forany fixed integer d . Recently, Hols et al. [12] proved the existence of polynomial kernels forthe vertex cover problem parameterized by the size of a deletion set to graphs of boundedelimination distance to different classes of graphs.On the other hand, it is an interesting algorithmic question by itself to determine theelimination distance of a given graph G to a class C of graphs. It is well known (seee.g. [1, 14, 15]) that computing treedepth, i.e. elimination distance to C , is fixed-parametertractable. More precisely, we can decide in time f ( k ) · n whether an n -vertex graph G has treedepth at most k . Bulian and Dawar proved in [4] that computing the eliminationdistance to any minor-closed class C is fixed-parameter tractable when parameterized bythe elimination distance. They also raised the question whether computing the eliminationdistance to the class C d of graphs with maximum degree at most d is fixed-parametertractable when parameterized by the elimination distance and d . Note that this questionis not answered by their result for minor-closed classes, since C d is not closed under takingminors.For k, d ∈ N , we denote by C k,d the class of all graphs that have elimination distance atmost k to C d . It is easy to see that for every fixed k and d we can formulate the propertythat a graph is in C k,d by a sentence in monadic second-order logic (MSO). By the famoustheorem of Courcelle [6] we can test every MSO-property ϕ in time f ( | ϕ | , t ) · n on every n -vertex graph of treewidth t for some computable function f . Hence, we can decide for every n -vertex graph G of treewidth t whether G ∈ C k,d in time f ( k, d, t ) · n for some computablefunction f . However, for d ≥ C d has unbounded treewidth, and so thesame holds for C k,d for all values of k . Thus, Courcelle’s Theorem cannot be applied toderive fixed-parameter tractability of the problem in full generality.On the other hand, it is easy to see that the graphs in C k,d exclude the complete graph K k + d +2 as a topological minor, and hence, for every fixed k and d , the class C k,d in particularhas bounded expansion and is nowhere dense. We can efficiently test first-order (FO)properties on bounded expansion and nowhere dense classes [8, 10], however, first-order logicis too weak to express the elimination distance problem. This follows from the fact thatfirst-order logic is too weak to express even connectivity of a graph or to define connectedcomponents.While we are unable to resolve the question of Bulian and Dawar in full generality, inthis work we initiate the quest of determining the parameterized complexity of eliminationdistance to bounded degree graphs for restricted classes of inputs. We prove that for every n -vertex graph G that excludes K as a minor (in particular for every planar graph) wecan test whether G ∈ C k,d in time f ( k, d ) · n c for a computable function f and constant c .Hence, the problem is fixed-parameter tractable with parameters k and d when restricted to K -minor-free graphs. (cid:73) Theorem 1.1 (Main result) . There is an algorithm that for a K -minor-free input graph G with n vertices and integers k and d , decides in time f ( k, d ) · n c whether G belongs to C k,d ,where f is a computable function and c is a constant. . Lindermayr, S. Siebertz, A. Vigny 3 Observe that the result is not implied by the result of Bulian and Dawar for minor-closedclasses, as the K -minor-free subclass of C d is not minor-closed. It is natural to consider asa next step classes that exclude some fixed graph as a minor or as a topological minor, andfinally to resolve the problem in full generality.To solve the problem on K -minor-free graphs we combine multiple techniques fromparameterized complexity theory and structural graph theory. First, we use the fact that theproperty of having elimination distance at most k for fixed k is MSO definable, and henceefficiently solvable by Courcelle’s Theorem on graphs of bounded treewidth. If the inputgraph G has small treewidth, we can hence solve the instance by Courcelle’s Theorem.If G has large treewidth, we distinguish two cases. In the first case, there exist no verticesof degree greater than k + d . In this case, we use the fact that G has large treewidth toconclude that it contains a large grid minor [16]. This in turn enables us to find an irrelevantvertex, that is, a vertex whose deletion does not change containment in C k,d . By iterativelyremoving irrelevant vertices until this is no longer possible we arrive at an instance of smalltreewidth. The irrelevant vertex technique was introduced in [17] and is by now a standardtechnique in parameterized algorithms, see [18] for a survey.In the second case, there exist vertices of degree larger than k + d . Denote by R the setof all these vertices. We show that by contracting all components of G − R we get a graph ofbounded treedepth (and hence of bounded treewidth). We furthermore show that for eachof the contracted components we can compute a connectivity pattern from a finite list ofpossible connectivity patterns that describes what happens if vertices from the componentare (recursively) deleted. To compute the connectivity pattern, we again apply an irrelevantvertex argument inside the components. This part of the reasoning is technically quiteinvolved. Once all connectivity patterns are computed, we can formulate containment in C k,d over a colored graph of bounded treedepth in MSO, which can again be efficiently evaluatedby Courcelle’s Theorem. After fixing our notation in Section 2, we provide the details of theproofs in Section 3 and Section 4. A graph G consists of a set of vertices V ( G ) and a set of edges E ( G ). We assume that graphsare finite, simple and undirected, and we write { u, v } for an edge between the vertices u and v . For a set of vertices S ⊆ V ( G ), we denote the subgraph of G induced by the vertices V ( G ) \ S by G − S . If S = { a } , we write G − a .A partial order on a set V is a binary relation ≤ on V that is reflexive, anti-symmetricand transitive. A set W ⊆ V is a chain if it is totally ordered by ≤ . If ≤ is a partial orderon V , and for every element v ∈ V the set V ≤ v := { u ∈ V | u ≤ v } is a chain, then ≤ is a treeorder . Note that the covering relation of a tree order is not necessarily a tree, but may be aforest. An elimination order on a graph G is a tree order ≤ on V ( G ) such that for everyedge { u, v } ∈ E ( G ) we have either u ≤ v or v ≤ u . The depth of a vertex v in an order ≤ isthe size of the set V A graph G has treedepth at most k if and only if there exists an elimination order on G ofdepth at most k . If the longest path in G has length k , then its treedepth is bounded by k andan elimination order of at most this depth can be found in linear time by a depth-first-search.Elimination distance to a class C naturally generalizes the concept of treedepth. Let C be a class of graphs. The elimination distance of G to C is defined recursively ased C ( G ) = G ∈ C ,1 + min { ed C ( G − v ) | v ∈ V ( G ) } if G C and G is connected,max { ed C ( H ) | H connected component of G } otherwise . We denote by C d the class of all graphs of maximum degree at most d and by C k,d the class of all graphs with elimination distance at most k to C d . Note for instance thattd( G ) = k if and only if G ∈ C k, . We write ed d ( G ) for ed C d ( G ). (cid:73) Definition 2.1 (Definition 4.2 of [3]) . A tree order ≤ on G is an elimination order todegree d for G if for every v ∈ V ( G ) the set S v := { u ∈ G | { u, v } ∈ E ( G ) , u v and v u } satisfies either: • S v = ∅ or • v is ≤ -maximal, | S v | ≤ d , and for all u ∈ S v , we have { w | w < u } = { w | w < v } . A more general notion of elimination order to a class C was given in the dissertationthesis of Bulian [2], which is however not needed in this generality for our purpose. (cid:73) Proposition 2.2 (Proposition 4.3 in [3]) . A graph G satisfies ed d ( G ) ≤ k if, and only if,there exists an elimination order to degree d of depth k for G . The following lemma is easily proved by induction on k . (cid:73) Lemma 2.3. For every graph G and elimination order ≤ to degree d for G , we can computein polynomial time an elimination order (cid:22) to degree d for G , with depth not larger than thedepth of ≤ , and with the additional property that for every v ∈ V ( G ) , if C, C are distinctconnected components of G − V (cid:22) v (or of G ), then the vertices of C and C are incomparablewith respect to (cid:22) . Let G be a graph. A graph H with vertex set { v , . . . , v n } is a minor of G , written H (cid:22) G , if there are connected and pairwise vertex disjoint subgraphs H , . . . , H n ⊆ G such that if { v i , v j } ∈ E ( H ), then there are w i ∈ V ( H i ) and w j ∈ V ( H j ) such that { w i , w j } ∈ E ( G ). We call the subgraph H i the branch set of the vertex v i in G . If G isa graph and H = { H , . . . , H n } is a set of pairwise vertex disjoint subgraphs of G , thenthe graph H with vertex set { v , . . . , v n } and edges { v i , v j } ∈ E ( H ) if and only if thereis an edge between a vertex of H i and a vertex of H j in G , the minor induced by H . If S ≤ i ≤ n V ( H i ) = V ( G ), then we call H a minor model of H that subsumes all vertices of G .We denote by K t the complete graph on t vertices. We denote by G m,n the grid with m rows and n columns, that is, the graph with vertex set { v i,j | ≤ i ≤ m, ≤ j ≤ n } andedges { v i,j , v i ,j } for | i − i | + | j − j | = 1.For our purpose we do not have to define the notion of treewidth formally. It is sufficientto note that if a graph G contains an n × n grid as a minor, then G has treewidth at least n and vice versa, that large treewidth forces a large grid minor, as stated in the next theorem. (cid:73) Theorem 2.4 (Excluded Grid Theorem) . There exists a function g such that for everyinteger n ≥ , every graph of treewidth at least g ( n ) contains the n × n grid as a minor.Furthermore, such a grid minor can be computed in polynomial time. . Lindermayr, S. Siebertz, A. Vigny 5 The theorem was first proved by Robertson and Seymour in [16]. Improved boundsand corresponding efficient algorithms were subsequently obtained. We refer to the workof Chuzhoy and Tan [5] for the currently best known bounds on the function g and furtherpointers to the literature concerning efficient algorithms.The second black-box we use is Courcelle’s Theorem, stating that we can test MSOproperties efficiently on graphs of bounded treewidth. We use standard notation from logicand refer to the literature for all undefined notation, see e.g. [13]. (cid:73) Theorem 2.5 (Coucelle’s Theorem [6]) . There exists a function f such that for everyMSO-sentence ϕ and every n -vertex graph G of treewidth t we can test whether G | = ϕ intime f ( | ϕ | , t ) · n . K -minor-free graphs of small degree. In this section we show how to handle the case of K -minor free graphs of small degree. Weprove the following theorem. (cid:73) Theorem 3.1. There exists a computable function f and constant c such that for allintegers k and d and every K -minor-free n -vertex graph G of maximum degree at most d + k ,we can test whether G ∈ C k,d in time f ( k, d ) · n c . (cid:73) Definition 3.2. Let G be a K -minor-free graph and let k, d ∈ N . Assume there exists aminor model G m,m = { H i,j | ≤ i, j ≤ m } (for m ≥ k + 5 ) that subsumes all vertices of G and that induces a supergraph of the grid G m,m . We call the branch set H i,j ( k, d )-safe if k + 3 ≤ i, j ≤ m − k − and if H i ,j contains no vertex of degree at least d + 1 (in G ) for | i − i | , | j − j | ≤ k + 2 . (cid:73) Lemma 3.3. Let G be a K -minor-free graph and let k, d ∈ N . Assume there exists aminor model G m,m = { H i,j | ≤ i, j ≤ m } (for m ≥ k + 5 ) that subsumes all vertices of G and that induces a supergraph of the grid G m,m . Assume H i,j is ( k, d ) -safe. Let a ∈ V ( H i,j ) ,let B ⊆ V ( G ) \ { a } with | B | ≤ k and let x, y ∈ V ( G ) \ ( B ∪ { a } ) be of degree at least d + 1 .Then x and y are connected in G − B if and only if x and y are connected in G − B − a . Proof. Assume that x and y are connected in G − B and let P be a path witnessing this.Assume that this path contains the vertex a .We define sets X ‘ for 0 ≤ ‘ ≤ k + 1 of branch sets as follows. Let X be the set consistingonly of H i,j and for ‘ ≥ X ‘ be the set of all H i ,j with 2 ‘ − ≤ | i − i | , | j − j | ≤ ‘ that do not already belong to X ‘ − . The sets X ‘ are the borders (of thickness 2) of the(4 ‘ + 1) × (4 ‘ + 1)-subgrid around H i,j . Observe that the vertices x and y do not belong toany of the X ‘ , as H i,j is ( k, d )-safe by assumption. For 0 ≤ ‘ ≤ k + 1 let Y ‘ be the subgraphof G induced by the vertices of X ‘ .We claim that for 1 ≤ ‘ ≤ k + 1, the sets Y ‘ are connected sets that separate a from x and analogously a from y . Clearly, the Y ‘ are connected. Now observe that there is noedge between a vertex of S ≤ i ≤ ‘ − Y i and a vertex of G − S ≤ i ≤ ‘ Y i . The existence of sucha connection would create a K minor, see [7, Figure 7.10] or Figure 1. Hence, any pathbetween a and x (or y ) must pass through Y ‘ .As | B | ≤ k , there is one Y ‘ with 1 ≤ ‘ ≤ k + 1 that does not intersect B . Let u be thefirst vertex that P visits on Y ‘ on its way from x to a and let v be the last vertex that P visits on Y ‘ on its way from a to y . As Y ‘ is connected, we can reroute the subpath between u and v through Y ‘ and thereby construct a path between x and y in G − B − a . (cid:74) Elimination distance to bounded degree on planar graphs H H Figure 1 Construction of a K minor as soon as a branch set (here H ) connected to a branchset (here H ) that is at distance more than 2 in the grid [7, Figure 7.10]. The blue part marks the“outer part” of the border of thickness 2, the “inner part” decomposes into a green, yellow and graypart. Note that in the proof it is important that all vertices belong to some branch set.Otherwise, we could have a vertex x in G that does not belong to any branch set while beingadjacent to H i,j and the whole argumentation would fail. (cid:73) Corollary 3.4. Let G be a K -minor-free graph and let k, d ∈ N . Assume there exists aminor model G m,m = { H i,j | ≤ i, j ≤ m } (for m ≥ k + 5 ) that subsumes all vertices of G and that induces a supergraph of the grid G m,m . Assume H i,j is ( k, d ) -safe. Then everyvertex a ∈ H i,j is irrelevant , i.e., G − a ∈ C k,d if and only if G ∈ C k,d . Proof. Let H := G − a . We have to prove that H ∈ C k,d implies G ∈ C k,d . Hence, assume H ∈ C k,d . Let ≤ H be an elimination order to degree d of height k for H . We also assumethat ≤ H satisfies the property of Lemma 2.3, that is, for every v ∈ V ( G ), if C, C are distinctconnected components of G − V ≤ H v , then the vertices of C and C are incomparable withrespect to ≤ H . Let A be the connected component of G containing a . Note that A maybreak into multiple connected components in H = G − a .For 1 ≤ i ≤ k , we define inductively: m i as the unique ≤ H -minimal element of A i − \ { a } (if it exists) such that there exists avertex v with m i ≤ H v and of degree at least d + 1 in H [ A i − \ { a } ]. If there is no suchelement m i , the process stops.Let us prove that there is at most one candidate for m i . Assume that there are in-comparable m and m satisfying these conditions. This means that there are vertices v and v of degree at least d + 1 in A i − \ { a } (hence of degree at least d + 1 in G ) with m ≤ H v and m ≤ H v . Note that we have m H v because ≤ H is a tree order. ByLemma 2.3, we have that v, v are both in A i − \ { a } , i.e. in the connected componentof a in G − { m , . . . , m i − } (it follows also by induction that { m , . . . , m i − } = V ≤ H m i − ,hence we may apply the lemma). Hence, v and v are connected in G − { m , . . . , m i − } .With Lemma 3.3, we also have that v and v are connected in G − { a, m , . . . , m i − } .We take a witness path from v to v . Since m ≤ H v and m H v , this path must containtwo adjacent vertices w , w with m ≤ H w and m H w . This contradicts the factthat ≤ H is an elimination order satisfying the property of Lemma 2.3. Therefore, thereis at most one possible such m i . . Lindermayr, S. Siebertz, A. Vigny 7 We define T i := { v ∈ A i − : m i H v } and A i as the connected component of a in G − { m , . . . , m i } . Note that again, A i − { a } maybe a union of connected components in H − { m , . . . , m i } .The processes stops after at most k rounds. When the process stops, we have defined m i , T i and A i up to i = ω , with ω ≤ k and every element in A ω has degree at most d in H [ A ω ].We then define the new order ≤ G as follows:for all x, y other than a and that are not in any of the T i nor in A ω , we have x ≤ G y ifand only if x ≤ H y ,for all x in A ω ∪ S i ≤ ω T i , we have m i ≤ G x for all i ≤ ω , andwe set m i ≤ G a for all i ≤ ω .Note that all the elements in A ω , and the T i ’s, together with a are ≤ G -maximal.We now prove that this new order is indeed an elimination order to degree d of depth k for G . We have that ≤ G is a tree order and that it has height at most k . Let us now take avertex b and study S b . Recall the definition of S b from Definition 2.1. As we have two orders,we distinct S Gb from S Hb .First, note that for b = m i , we have S Gm i = S Hm i = ∅ . So we don’t have to check anything.Then consider the case where b is a , or a neighbor of a different than m i for all i ≤ ω .Then, by definition of the ( A i ) i ≤ ω , we have that b ∈ A ω . We also have that there is novertex in A ω of degree at least d + 1 in H [ A ω ]. Hence | S Gb | ≤ d and for any v ∈ S Gb , we have { w : w < G v } = { w : w < G b } = ( m i ) i ≤ ω .We continue with the case where b is in one of the T i . The uniqueness of m i impliesthat b has degree at most d in H [ A i ]. Hence | S Gb | ≤ d and for any v ∈ S Gb , v also belongsto T i , we then have that { w : w < G v } = { w : w < G b } = ( m i ) i<ω .Finally, we look at the case where b is not in A ω , is not m i nor in T i for any i ≤ ω . In thiscase, we have that b cannot have neighbors in A ω nor any of the T i for i ≤ ω . To see this,assume that there is a v ∈ T i neighbor to b . This implies that b is in A i − , as it is connectedto v , the latter being in A i − , which is the connected component of a in G − { m , . . . , m i − } .As b T i , we have m i ≤ H b and m i H v which contradict that ≤ H is an elimination order.This contradiction also holds if b has a neighbor in A ω as this would imply that b ∈ A ω .Therefore, in this final case, S Gb = S Hb . This also holds for any neighbor of b . Hence forany vertex v in S Gb we have that { w : w < G b } = { w : w < H b } = { w : w < H v } = { w : w < G v } .To conclude, we have that ≤ G is indeed an elimination order to degree d of height k for G . This ends the proof that a is irrelevant. (cid:74) We can now prove the main theorem of this section. Proof of Theorem 3.1. Let k, d be two integers and G be a connected K -minor free graphof maximum degree at most k + d . We set h ( k, d ) := (4 k + 5) · ( k + d ) k + d ) + 4 k + 5. Let g be the function from Theorem 2.4. Case 1. There are more than ( k + d ) k + d ) vertices of degree at least d + 1. We can concludethat G C k,d . This is because the deletion of any vertex v can create at most k + d connected components, and in each of them there are at most k + d vertices whose degreecan decrease by the deletion of v . Therefore by performing k elimination rounds, therewill still be a vertex of degree at least d + 1. Elimination distance to bounded degree on planar graphs Case 2. The treewidth of G is bounded by g ( h ( k, d )). We use Courcelle’s Theorem (Theo-rem 2.5) to decide whether G ∈ C k,d . Case 3. We are neither in case C1) nor in case C2). Since we are not in C2), we can computein polynomial time a grid minor of size h ( k, d ). Furthermore we make sure that the set ofbranch sets subsumes all vertices. As we are not in C1), there are at most ( k + d ) k + d ) vertices of degree at least d + 1, and therefore, at most (4 k + 5) · ( k + d ) k + d ) branch setsthat are at distance at most 2 k + 3 to a vertex of degree at least d + 1. As h ( k, d ) is largeenough, there is a ( k, d )-safe branch set which, by Corollary 3.4, implies the existence ofan irrelevant vertex. We iteratively eliminate irrelevant vertices until we are in one of C1)or C2). (cid:74) We now do a quick complexity analysis of the algorithm. Case 1 can be solved in lineartime. Case 2 requires time f ( k, g ( h ( k, d ))) · n , where f is derived from the function ofTheorem 2.5 and the MSO formula defining membership in C k,d . The running time in Case 3is governed by the cost to compute a grid minor and takes time polynomial in n . Therefore,the overall complexity is f ( k, d ) · n c for a computable function f and constant c . K -minor free graphs This section is devoted to the proof of our main result: Theorem 1.1. We fix an instance( G, k ), where G is K -minor-free.We call a vertex v ∈ V ( G ) with d ( v ) ≤ d a blue vertex, a vertex v ∈ V ( G ) with d < d ( v ) ≤ k + d a white vertex and a vertex v ∈ V ( G ) with d ( v ) > k + d a red vertex. Wedenote the set of red vertices by R , the set of white vertices by W and the set of blue verticesby B . All red vertices have to be deleted in the elimination process, if this is not possible,then ( G, k ) is a negative instance. For all white vertices we have a choice of whether we wantto delete the vertex itself or some of its neighbors. Blue vertices already satisfy the degreecondition and will be only deleted if their deletion creates useful components. (cid:73) Lemma 4.1. If G ∈ C k,d , then every path in G contains at most k − red vertices. Proof. By deleting a red vertex we can only split the path into half. Hence, the number ofred vertices on a path is bounded by the function that is recursively defined by f (1) = 1 and f ( k + 1) = 2 f ( k ) + 1. This defines the function f ( k ) = 2 k − (cid:74)(cid:73) Lemma 4.2. Let C be a component of G − R . If G ∈ C k,d , then there are at most ( k + d ) k red vertices that are neighbors of a vertex of C in G . Proof. By induction on k , using the fact that the deletion of a white or blue vertex cancreate at most k + d components in G and all red vertices have to be deleted. (cid:74) Having these two lemmas, we can now develop our algorithm. We first merge everycomponent C of G − R into a single vertex v C to obtain a new graph G . If one of thenew vertices v C has degree larger than ( k + d ) k , then we may reject the instance due toLemma 4.2. We then compute a depth-first-search of G . Observe that no two vertices v C and v C for distinct components C, C of G − R are adjacent in G , as otherwise C and C would not be separate components. Hence, the search outputs and elimination order of G ofdepth at most 2 k +1 − 1, or we may reject the instance due to Lemma 4.1. We may henceassume in the following that G has treedepth at most 2 k +1 − . Lindermayr, S. Siebertz, A. Vigny 9 We can therefore test whether G belongs to C k,d via the evaluation of an MSO sentence.However, since this graph has been obtained by merging components of G − R , the deletionof a node v C in G might require the deletion of the entire component C of G − R , whichcan have an arbitrary size. Fortunately, we do not have to delete the entire component butonly to “separate” its red neighbors and to “fix” vertices of degree between d + 1 and d + k inside the component.To do that, every non-red vertex v C of G will be associated with a type that describesthe internal “connectivity pattern” of the G − R component C it corresponds to. This ispossible thanks to Lemma 4.2, which will help to bound the number of possible connectivitypatterns with the rest of the graph. Testing whether a G − R component satisfies someconnectivity pattern will be performed via an algorithm that resembles the one that provesTheorem 3.1.Let us now make this informal argumentation more concrete. (cid:73) Definition 4.3. Let k and d be two integers, and let p := ( k + d ) k . By a partition , wemean a partition of the set { , . . . , p } .A partition P = ( A i ) i ≤ ‘ refines another partition P = ( A i ) i ≤ ‘ if and only if for every i ≤ ‘ there is a j ≤ ‘ such that A i ⊆ A j .For a pair of integers ( j, j ) , we write ( j, j ) ∈ P if there is a set A i that contains both j and j . We refer to such a pair of integers as being grouped in P , as opposed to being split or separated in P . An integer j that is not grouped with any other integer is isolated in P . (cid:73) Definition 4.4. Let k and d be two integers, and let p := ( k + d ) k . A ( k, d )-sequence is asequence ( P i , L i , D i ) i ≤ ‘ for ‘ ≤ k , where P i and L i are partitions of { , . . . , p } and D i is asubset of { , . . . , p } . Note in particular that there are a bounded number of ( k, d )-sequences. Let us write H for some component of G − R , which according to Lemma 4.2 has at most p := ( k + d ) k red neighbors. We use p unary predicates C , . . . , C p to mark the vertices of H that areneighbors of a red vertex (the red vertices are not vertices of H ). A ( k, d )-sequence for H willdescribe the elimination process from the point of view of H . The partition P i will representhow the different unary predicates are linked inside of H at depth i of the elimination process.The partition L i will represent how the unary predicates are connected outside of H and thesubset D i is the list of predicates that correspond to red vertices that have been deleted. (cid:73) Definition 4.5. Given integers k, d , p := ( k + d ) k , and a graph H with maximum degree k + d with p unary predicates C , . . . C p , we say that H satisfies a ( k, d ) -sequence S = ( P i , L i , D i ) i ≤ ‘ ,for some ‘ ≤ k if there is an elimination order ≤ o to degree d of depth ‘ for H that satisfies:For every < i ≤ ‘ we have that P i (resp. L i ) refines P i − (resp. L i − ).For every < i ≤ ‘ we have D i − ⊆ D i .For every i ≤ ‘ and every j ∈ D i , j is isolated in L i .If two vertices b, b satisfy b, b ∈ C j for some j ≤ p and b, b are incomparable in ≤ o , theneither b and b are ≤ o -maximal and { w | w ≤ o b } = { w | w ≤ o b } , or there is no vertex v and integer i such that v ≤ o b , v o b , and v is at depth at most i − , where j D i .If two vertices b, b satisfy b ∈ C j , b ∈ C j for some j , j ≤ p and b, b are incomparablein ≤ o , then either b and b are ≤ o -maximal and { w : w ≤ o b } = { w : w ≤ o b } , orthere is no vertex v and integer i such that v ≤ o b , v o b , v is at depth at most i − and ( j , j ) ∈ L i .For every i ≤ ‘ , two integers ( j , j ) ∈ P i if and only if there is a path in H from avertex satisfying C j to a vertex satisfying C j using only maximal vertices, and verticesat depth at least i . (cid:73) Example 4.6. For example, fix d = 2, k > Figure 2 Example of graph and elimination orders to degree 2 ca d bH C C C abcd ≤ abc d ≤ Consider now the sequences: S := (cid:16) { , , } ; { , , } ; ∅ (cid:17) ; (cid:16)(cid:0) { } , { } , { } (cid:1) ; { , , } ; ∅ (cid:17) ;. (cid:16)(cid:0) { } , { } , { } (cid:1) ; { , , } ; ∅ (cid:17) ; (cid:16)(cid:0) { } , { } , { } (cid:1) ; { , , } ; ∅ (cid:17) ; S := (cid:16) { , , } ; { , , } ; ∅ (cid:17) ; (cid:16)(cid:0) { } , { } , { } (cid:1) ; { , , } ; ∅ (cid:17) ; (cid:16)(cid:0) { } , { } , { } (cid:1) ; { , , } ; ∅ (cid:17) ; S := (cid:16) { , , } ; { , , } ; ∅ (cid:17) ; (cid:16)(cid:0) { } , { } , { } (cid:1) ; { , , } ; ∅ (cid:17) ; (cid:18)(cid:0) { } , { } , { } (cid:1) ; (cid:0) { , } , { } (cid:1) ; { } (cid:17) Consider the graph in Figure 2. Sequence S can be satisfied if at depth 2, we are left withno internal path between the different predicates (1 , , P ). This is achievableby removing a and then b . Also, the order has to be an elimination order to degree 2 ofdepth at most 4. It is achieved by also removing c and d . This corresponds to the order ≤ ,which witnesses that H satisfies sequence S .Sequence S also asks for the deletion of all paths between the different predicates.However, we also need the order to be an elimination order to degree 2 of depth 3. So in oneround something must be done to c and d . This is impossible because (2 , 3) are still groupedin L . For example, the order ≤ is not a witness because there are vertices v ∈ C , u ∈ C with c ≤ v , c u , while (2 , 3) are still grouped in L , and c is at depth 2, strictly lessthan 3.The third sequence is satisfied by H , as witness by ≤ . This time, (2 , 3) are split in L . (cid:73) Lemma 4.7. For all integers k, d and ( k, d ) -sequence S , there is an MSO formula Φ S thatexpresses the fact that a graph H satisfies S . We simply have to redefine the notion of connectivity according to the ( k, d )-sequence S .Two vertices are considered adjacent at depth i if they share an edge, or if they are both insome unary predicate C j for some j that is not in D i , or if they are respectively in some C j , C j with j, j grouped in L i . With this modified notion of adjacency, which is expressibleby MSO, also connectivity can easily be expressed by an MSO formula. The precise MSOformula can be found in Appendix A.1. . Lindermayr, S. Siebertz, A. Vigny 11 (cid:73) Lemma 4.8. There is an algorithm that, given two integers k, d , a ( k, d ) -sequence S anda K -minor-free n -vertex graph H of degree at most k + d with p := ( k + d ) k many unarypredicates, tests whether H satisfies S in time f ( k, d ) · n c for some computable function f and constant c . The proof of this lemma technical, however, the mains ideas and techniques are alreadypresent in the proof of Theorem 3.1. The proof of the lemma can be found in Appendix A.2. (cid:73) Lemma 4.9. Let G be a graph and let G be the graph obtained by merging all componentsof G − R into single vertices, which are labeled by the set of ( k, d ) -sequences they satisfy.Then there exists an MSO-formula that is satisfied in G if and only if G ∈ C k,d . Note that we assume that G as already been computed, including all of the labels. Note alsothat at this point we do not require G to be K -minor-free. To prove Lemma 4.9 we againdefine an appropriate notion of connectivity, using for every non red vertex the different P i in the ( k, d )-sequences that this component satisfies. We then end up with a formula thatresembles the one witnessing that C k,d is MSO definable. Details and formulas are presentedin Appendix A.3.We are now ready to prove the main result. Proof of Theorem 1.1. Given integers k, d , and a K -minor free graph G , we replace it witha graph G , with unary predicates. More precisely, we define one unary predicate τ S per( k, d )-sequence S . Every component of G − R is replaced in G by a unique node that satisfiesthe predicate τ S for every sequence S satisfied by this component.By Lemma 4.8, we can test with an FPT algorithm whether a component satisfies a givensequence S . We can therefore compute G with an FPT algorithm. By Lemma 4.1, G hastree-depth at most 2 k +1 − 1. By Lemma 4.9, testing whether G is in C k,d can be tested withan MSO formula on G , which is therefore computed by an FPT algorithm. (cid:74) Our proofs show that all difficulties for elimination distance to bounded degree arise alreadyin bounded degree graphs. We were not able to solve these difficulties in general, but rely onthe additional assumption that the input graphs exclude K as a minor. Hence the followingproblem remains open. (cid:73) Open Problem 5.1. Is there an algorithm that, on input integers k, d, ∆ and an n -vertexgraph graph G of maximum degree at most ∆ , tests whether G belongs to C k,d in time f ( k, d, ∆) · n c for some computable function and constant c ? We conjecture that if such algorithm exists, it will also be possible to test whether agraph G satisfies some ( k, d )-sequence. Hence we would be able to remove assumption ofexcluding K as a minor from Lemma 4.8. If this can be done, then our proof of Theorem 1.1follows. This yields the following conjecture: (cid:73) Conjecture 5.2. The membership problem of C k,d is FPT if and only if it is FPT whenrestricted to classes of graphs with bounded degree. References Hans L Bodlaender, Jitender S Deogun, Klaus Jansen, Ton Kloks, Dieter Kratsch, Haiko Müller,and Zsolt Tuza. Rankings of graphs. SIAM Journal on Discrete Mathematics , 11(1):168–181,1998. Jannis Bulian. Parameterized complexity of distances to sparse graph classes. Technical report,University of Cambridge, Computer Laboratory, 2017. Jannis Bulian and Anuj Dawar. Graph isomorphism parameterized by elimination distance tobounded degree. Algorithmica , 75(2):363–382, 2016. Jannis Bulian and Anuj Dawar. Fixed-parameter tractable distances to sparse graph classes. Algorithmica , 79(1):139–158, 2017. Julia Chuzhoy and Zihan Tan. Towards tight (er) bounds for the excluded grid theorem. In Proceedings of the Thirtieth Annual ACM-SIAM Symposium on Discrete Algorithms , pages1445–1464. SIAM, 2019. Bruno Courcelle. The monadic second-order logic of graphs. I. recognizable sets of finitegraphs. Information and computation , 85(1):12–75, 1990. Marek Cygan, Fedor V. Fomin, Lukasz Kowalik, Daniel Lokshtanov, Dániel Marx, MarcinPilipczuk, Michal Pilipczuk, and Saket Saurabh. Parameterized Algorithms . Springer, 2015. Zdeněk Dvořák, Daniel Král, and Robin Thomas. Testing first-order properties for subclassesof sparse graphs. Journal of the ACM (JACM) , 60(5):36, 2013. Jakub Gajarský, Petr Hliněný, Jan Obdržálek, Sebastian Ordyniak, Felix Reidl, Peter Ross-manith, Fernando Sánchez Villaamil, and Somnath Sikdar. Kernelization using structuralparameters on sparse graph classes. Journal of Computer and System Sciences , 84:219–242,2017. Martin Grohe, Stephan Kreutzer, and Sebastian Siebertz. Deciding first-order properties ofnowhere dense graphs. Journal of the ACM (JACM) , 64(3):17, 2017. Jiong Guo, Falk Hüffner, and Rolf Niedermeier. A structural view on parameterizing problems:Distance from triviality. In International Workshop on Parameterized and Exact Computation ,pages 162–173. Springer, 2004. Eva-Maria C. Hols, Stefan Kratsch, and Astrid Pieterse. Elimination distances, blocking sets,and kernels for vertex cover. In STACS , 2020. Leonid Libkin. Elements of finite model theory . Springer Science & Business Media, 2013. Jaroslav Nešetřil and Patrice Ossona De Mendez. Sparsity: graphs, structures, and algorithms ,volume 28. Springer Science & Business Media, 2012. Felix Reidl, Peter Rossmanith, Fernando Sánchez Villaamil, and Somnath Sikdar. A fasterparameterized algorithm for treedepth. In International Colloquium on Automata, Languages,and Programming , pages 931–942. Springer, 2014. Neil Robertson and Paul D Seymour. Graph minors. V. excluding a planar graph. Journal ofCombinatorial Theory, Series B , 41(1):92–114, 1986. Neil Robertson and PD Seymour. Graph minors. XIII. the disjoint paths problem. J. Combin.Theory Ser. B , 63:65–110, 1995. Dimitrios M Thilikos. Graph minors and parameterized algorithm design. In The MultivariateAlgorithmic Revolution and Beyond , pages 228–256. Springer, 2012. . Lindermayr, S. Siebertz, A. Vigny 13 A Omitted proofs from Section 4A.1 Proof of Lemma 4.7 Fix k, d and a ( k, d )-sequence S = ( P i , L i , D i ) i ≤ ‘ . We write ( j, j ) ∈ P i (resp. in L i ) for apair of integers if in the partition P i (resp. L i ), we have that j and j are grouped.For every 0 ≤ i < ‘ , we define in MSO predicates Conn S,i − or arity at least 2 as follows:Conn S,i − ( x, y, ¯ z ) = ∀ X ^ z ∈ ¯ z ¬ X ( z ) ∧ ∀ w ∀ w , X ( w ) ∧ (cid:16) _ ( j,j ) ∈ L i (cid:0) C j ( w ) ∧ C j ( w ) (cid:1) ∨ _ j D i (cid:0) C j ( w ) ∧ C j ( w ) (cid:1) ∨ E ( w , w ) (cid:17) −→ w ∈ X ! −→ ( x ∈ X −→ y ∈ X )This means that y is in the connected component of x in G − { ¯ z } , where two vertices areconsidered adjacent if they share an edge, or if they are both in some unary predicate C j forsome j that is not in D i , or if they are respectively in some C j , C j with j, j grouped in L i .Then we have Φ S = Φ S, (), where for every i < ‘ we have:Φ S,i ( x , . . . , x i ,y , . . . y i ) = ∀ x i +1 (cid:0) x i +1 = y i ∧ Conn S,i − ( x i +1 , x i , y , . . . , y i − ) (cid:1) −→ ∃ y i +1 (cid:18)^ ( j,j ) P i +1 ¬ (cid:16) ∃ vv C j ( v ) ∧ C j ( v ) ∧ Conn S,i − ( x i +1 , v, y , . . . , y i − ) ∧ Conn S,i − ( x i +1 , v , y , . . . , y i − ) ∧ Conn i ( v, v , y , . . . , y i ) (cid:17) ∧ Φ i +1 ( x , . . . , x i , x i +1 , y , . . . y i , y i +1 ) (cid:19)! Remember that Conn i ( v, v , y , . . . , y i ) means that v, v are connected (using only edges) in G − { y , . . . , y i } . We then conclude with:Φ ‘ ( x , . . . , x ‘ , y , . . . y ‘ ) = ∀ w (cid:18)(cid:16) w = y ‘ ∧ Conn S,‘ − ( w, x ‘ , y , . . . , y ‘ − ) (cid:17) −→ d G −{ ¯ y } ( w ) ≤ d (cid:19) As we did not define Conn S, − ( x ), we make clear that: Φ ‘ () = ∀ v d G ( v ) ≤ d when ‘ = 0,Φ () = ∀ x ∃ y (cid:16) ^ ( j,j ) P ¬ (cid:0) ∃ vv C j ( v ) ∧ C j ( v ) ∧ Conn S, ( x , v ) ∧ Conn S, ( x , v ) ∧ Conn ( v, v , y ) (cid:1) ∧ Φ ( x , y ) (cid:17) when ‘ > A.2 Proof of Lemma 4.8 The whole section is devoted to the proof of Lemma 4.8. Fix integers k, d , a graph G ofdegree at most k + d and a ( k, d )-sequence S . Let C , . . . , C p be the unary predicates. Let h ( k, d ) := (cid:0) ( k + d ) k + d ) + pk (cid:1) (8 k + 5) . Let g be the function from Theorem 2.4. Case 1. There are more than ( k + d ) k + d ) vertices of degree at least d + 1.We can conclude that G C k,d and therefore that G does not satisfy S . This is becausethe deletion of a node can create at most k + d connected components, and in each of themthere are at most k + d nodes whose degree has decreased. Therefore by performing k elimination rounds, there will still be a node of degree at least d + 1. Case 2. The treewidth of G is bounded by g ( h ( k, d )).By Lemma 4.7, there is an MSO formula expressing that G satisfies S . We then useCourcelle’s Theorem (Theorem 2.5) to decide whether G satisfies S . Case 3. We are not in Case 1 and not in Case 2 .Since we are not in Case 2, we can compute in polynomial time a minor model G m,m = { H i,j | ≤ i, j ≤ m } (for m ≥ h ( k, d )) that subsumes all vertices of G and that induces asupergraph of the grid G m,m .As we are not in Case 1, there are at most ( k + d ) k + d ) nodes of degree at least d + 1. Wenow make a disjunction on the number of branch sets that contain a given unary predicate. Case 3.1. Every predicate appears in at most k branch sets.We call the branch set H i,j ( k, d ) -semi-safe if 2 k + 3 ≤ i, j ≤ m − k − H i ,j contains no vertex of degree at least d + 1 (in G ) nor a vertex satisfying any of the unarypredicates for | i − i | , | j − j | ≤ k + 2.As there are only ( k + d ) k + d ) branch sets that contain a vertex of degree greaterthan d + 1, only p unary predicates, each of them appearing in at most k branch sets, thereare at most (cid:0) ( k + d ) k + d ) + pk (cid:1) (4 k + 5) branch sets H i,j with 2 k + 3 ≤ i, j ≤ m − k − h ( k, d ) is big enough, there is a ( k, d )-semi-safe branch set. We claimthat any vertex in such branch set is irrelevant.This case is a straightforward adaptation of Lemma 3.3 and Corollary 3.4. Case 3.2. There are two predicates C j , C j that both appear in more than k branch setsand that are separated in P ‘ . Remember that we have a sequence S := ( P i , L i , D i ) i ≤ ‘ .In this case, G does not satisfy S . More precisely, after k elimination rounds, there is stilla path from a vertex in C j to a vertex in C j in G . It is because in k rounds, there are k lines and k columns that contain all of the deletions. Since C j (resp. C j ) appears in at least k + 1 branch sets, there is a branch set B (resp. B ) that contains a vertex of C j (resp. C j )and that is either in an untouched line, or an untouched column. We can then create a pathfrom B to B . Case 3.3. We are not in any of the cases above.This means that all unary predicates that appear in more than k branch sets are groupedin P ‘ . We denote by J the set of indices of these unary predicates. In this case, we loosenthe condition of safe branch set in order to find an irrelevant vertex that might be close toa C j for j ∈ J .We call the branch set H i ,i ( k, d ) -semi-safe if 4 k + 3 ≤ i , i ≤ m − k − H i ,i contains no vertex of degree at least d + 1 (in G ) nor vertex satisfying the predicate C j for | i − i | , | i − i | ≤ k + 2 and j J . . Lindermayr, S. Siebertz, A. Vigny 15 As there are only ( k + d ) k + d ) branch sets that contains a vertex of degree greaterthan d + 1, only p − | J | unary predicates are concerned, each of them appearing in at most k branch sets, there are at most (cid:0) ( k + d ) k + d ) + pk (cid:1) (8 k + 5) branch sets H i ,i satisfying4 k + 3 ≤ i , i ≤ m − k − h ( k, d ) is big enough, there is a( k, d )-semi-safe branch set. We claim that any vertex in such branch set is irrelevant.In this case, we also have to adapt Lemma 3.3 and Corollary 3.4. This case is however alittle bit trickier than Case 3.1. All of what remains of this section is devoted to this specificcase 3.3. (cid:73) Lemma A.1. [Adaptation of Lemma 3.3]Let G be a K -minor-free graph, let k, d ∈ N and S a ( k, d ) -sequence. Assume there existsa minor model G m,m = { H i ,i | ≤ i , i ≤ m } (for m ≥ k + 7 ) that subsumes all verticesof G and that induces a supergraph of the grid G m,m . Assume H i ,i is ( k, d ) -semi-safe.Let a ∈ V ( H i ,i ) , let ¯ b ⊆ V ( G ) \ { a } with | ¯ b | ≤ k , let j , j ≤ p with ( j , j ) P ‘ and j J , and let x, y ∈ V ( G ) \ ( B ∪ { a } ) with x ∈ C j and y ∈ C j .If G | = Conn k ( x, y, ¯ b ) , then there is a vertex y ∈ C j such that G | = Conn k +1 ( x, y , ¯ b, a ) .Furthermore, for any two vertices x , y of degree at least d + 1 , if G | = Conn k ( x, y, ¯ b ) then G | = Conn k +1 ( x, y, ¯ b, a ) . Proof. We only prove the first part of Lemma A.1, the second part being exactly Lemma 3.3.To prove the first part, we distinguish two casses.First, if j J . In this case, both x and y are at distance at least 4 k + 3 from a . Wethen use the same proof as for Lemma 3.3.The second case, is when j ∈ J . In this case, it is possible that y is close to a . It mighteven be possible that a is the only neighbor of y and that therefore x and y are no longerconnected in G − { ¯ b, a } . Fortunately, we can find another y ∈ C j that is unaffected by thedeletion of ¯ b and a .More formally, we define sets X s for 0 ≤ s ≤ k + 1 of branch sets as follows. Let X be the set consisting only of H i ,i and for s ≥ X s be the set of all H i − ,i with2 s − ≤ | i − i | , | i − i | ≤ s . For 0 ≤ ‘ ≤ k + 1 let Y ‘ be the subgraph of G induced bythe vertices of X ‘ .Similarly to the proof of Lemma 3.3, we have that each Y i is a connected separator of a and x . Furthermore, for every s > k , there is a branch set B s ∈ X s that is in a column ofthe grid where no branch set intersects ¯ b . We then pick a vertex y in C j that is either inan column or a line of the grid where no branch set intersects ¯ b . This is possible as thereare at least k + 1 branch sets that contains a vertex of C j . There is a path from y to anyvertex of any B s if s > k .Finally, there is an s with k < s ≤ k + 1 such that Y s does not intersect ¯ b . As Y s separates x from a , the path from x to a must go through X s . Let u be the first vertex ofthat path in Y s and let v a vertex of B S .As y can reach B s , and since Y s is connected, we can reroute the subpath between u and v through Y ‘ and thereby construct a path between x and y in G − B − a . Therefore, G | = Conn k +1 ( x, y , ¯ b, a ). (cid:74)(cid:73) Corollary A.2. [Adaptation of Corollary 3.4] Let G be K -minor free graph, k, d , be integers,and S a ( k, d ) -sequence. Assume there exists a minor model G m,m = { H i ,i | ≤ i , i ≤ m } (for m ≥ k + 7 ) that subsumes all vertices of G and that induces a supergraph of thegrid G m,m . Assume H i ,i is ( k, d ) -semi-safe. Then any vertex a from H i ,i is irrelevant ,meaning that G − a satisfies S iff G satisfies S . Proof. Fix k, d , S , G and an minor model G m,m of G . Let J the set of j ≤ p such that C j appears in at least k + 1 branch sets. Let a be a vertex from a ( k, d )-semi-safe branchset and H := G − { a } . We only prove that if H satisfies S then G satisfies S , the otherimplication being trivial. Assume that H satisfies S and take ≤ H , an elimination order todegree d of height k for H .Let A := { b ∈ V : G | = Conn S, ( a, b ) } the extended connected component of a in G .Note that A − { a } is a union of connected components in H (using only the edge relation).Therefore by Lemma 2.3, A is upward closed, i.e. for every b ∈ A − { a } and b ≤ H c , wehave c ∈ A . Then for every 1 ≤ i ≤ k , we define: m i as the only ≤ H -minimal element of A i − such that there exists either a vertex v with m i ≤ H v and v has degree at least d + 1 in H [ A i − ] or if there are ( j , j ) P ‘ and twovertices v ∈ C j , v ∈ C j with m i ≤ H v , and m i ≤ H v (note that this implies thateither j or j is not in J ). If there is no such element m i , the process stops.Let us prove that there is at most one candidate for m i . Assume that there are incom-parable m and m satisfying the conditions. It means that there is a vertex v (resp. v )either of degree at least d + 1 in H [ A i − ] (hence of degree at least d + 1 in G ) orin C j (resp. C j ) with j J (resp. j J ), and with m ≤ H v (resp. m ≤ H v ).Note that we have m H v because ≤ H is a tree order. As v, v are both in A i − ,we have G | = Conn i ( v, v , m , . . . , m i − ) Hence with Lemma A.1, we also have that G | = Conn i ( v, v , m , . . . , m i − , a ).We take a witness string ( u , . . . , u ω ) with v = u , v = u ω , and such that ( u i , u i +1 ) areeither connected by an edge, or both in some C j with j D i , or respectively in C j , C j with j, j ∈ L i . Since m ≤ H v and m H v , there must be an α with m ≤ H u α and m H u α +1 . As ( u α , u α +1 ) are either adjacent in G , both in some C j with j D i , orrespectively in C j , C j with ( j, j ) ∈ L i , this contradict the fact that ≤ H witness the factthat H satisfies S .Therefore, there is at most one possible such m i . T i := { v ∈ A i − : m i H v } . A i := { b ∈ A i − : G | = Conn S,i ( a, b, m , . . . , m i ) } . Note that again, A i − { a } is a unionof connected components in H − { m , . . . , m i } . Therefore by Lemma 2.3, we still havethat for every b ∈ A i − { a } and b ≤ H c , we have c ∈ A .The processes stops after at most ‘ rounds.When the process stops, we have then defined m i , T i and A i up to i = ω , with ω ≤ ‘ andevery element in A ω has degree at most d in H [ A ω ].We then define the new order ≤ G as follows:for all x, y other than a and that are not in any of the T i nor in A ω , we have x ≤ G y iff x ≤ H y ,for all x in A ω ∪ S i ≤ ω T i , we have m i ≤ G x for all i ≤ ω , andwe set m i ≤ G a for all i ≤ ω .Note that all the elements in the T i ’s together with a are ≤ G -maximal.We now prove that this new order witnesses that G satisfies S . Similarly to the proofof Corollary 3.4. The order is still an elimination order of height ‘ to degree d . We now lookat the other rules from Definition 4.5 that makes ≤ G a witness order. The two firsts rules donot depends on G , so they are satisfied. We move to the next ones. Rule 3: If two vertices b, b satisfy b ∈ C j , b ∈ C j for some j ≤ h and b, b are incomparablein ≤ o ; then either b and b are ≤ o -maximal and { w : w ≤ o b } = { w : w ≤ o b } , or thereare no vertex v and integer i such that v ≤ o b , v o b , and v is at depth less than i − where j D i . . Lindermayr, S. Siebertz, A. Vigny 17 Take two such b, b . If non of those are in A ω nor in one of the T , then neither theirmaximality status nor their predecessors in the order have been impacted. If both are in A ω or in one of the T , the they are both maximal and have the same predecessors. Finally, if b is in A ω or in one of the T and not b . We distinguish two case:First, if v ≤ G b , v G b and v is at depth i − 1. Note that also v H b and that v = m i .Then if b is in A ω or in one of the T i with i > i , then already v ≤ H b which contradicts that ≤ H witnesses that H satisfies S . The other possibility is that b ∈ T i with i ≤ i . This impliesthat b ∈ A i − which also implies that b ∈ A i − , since i − < i and j D i (rememberthe definition of Conn S,i ). As b ∈ T i , m i H b and since b T i , m i ≤ H b . This againcontradict that ≤ H witnesses that H satisfies S .Second case, v G b , v ≤ G b and v is at depth i − 1. This implies that m i G b as youcan only be bigger than one vertex of some fixed depth. We the conclude with the proof ofthe first case. Rule 4: Tf two vertices b, b satisfy b ∈ Cj , b ∈ Cj for some j , j ≤ h and b, b areincomparable in ≤ o ; then either b and b are ≤ o -maximal and { w : w ≤ o b } = { w : w ≤ o b } ,or there are no vertex v and integer i such that v ≤ o b, v o b , and v is at depth less than i − , where ( j , j ) L i . The proof that this rule is met in ≤ G is the exact same than the one for Rule 3. The onlyslight difference, is that when we say b ∈ A i − implies b ∈ A i − , we use another propertyof Conn S,i (the second line in the definition instead of the third). Rule 5: For every i ≤ ‘ , two integers ( j , j ) ∈ P i if and only if there is a path in G from avertex satisfying C j to a vertex satisfying C j using only maximal vertices, and vertices at depth at least i . Fix i , j , j , such that there is a path from a vertex x ∈ C j to a vertex y ∈ C j , usingonly maximal vertices and vertices at depth at least i . Therefore this path does not intersect { m , . . . m i } . Additionally, for any T i with i ≤ i , for two adjacent vertices ( v, v ) if v ∈ T i and v T i , then v is in { m , . . . m i } . Furthermore, by definition of m i , it is not possiblefor both x and y to be in T i . Therefore the path does not intersect any of the T i with i ≤ i .If the path does not intersect A ω , then this path already contradicts that ≤ H witnessesthat H satisfies S .We can therefore assume that the path is included in A i . We then apply Lemma A.1,which tels us that there is a y ∈ C j such that there is a path from x to y that does notcontains a . We then conclude that this path is also included in A i , and contradicts that ≤ H witnesses that H satisfies S .This ends the prof that a is irrelevant. (cid:74) A.3 Proof of Lemma 4.9 In Lemma 4.9, we already assume that G as been computed, including all of the labels.Note that we do note require G to be K -minor-free anymore. The proof of this lemma isquite technical although rather simple on a conceptual level. We simply need to carefullydefine the notion of connected component in G by looking at the type of the non red vertices(sometimes called white-blue component vertices)For every set { S , . . . , S i } where S j is either a k, d -sequence, or the predicate R , we definea predicate NEXT i, S . . . , S i ( X , X , y , . . . , y i ). It tests whether a set X suitably followsa set X , which intuitively means that X is a connected component in X . More formally, we need that the following statements hold:For every y j ∈ { y , . . . , y i } , G | = τ S j ( y j ) if S j is a ( k, d )-sequence.For every y j ∈ { y , . . . , y i } , G | = R ( y j ) if S j is the predicate R .For every j, j , if y j = y j , then S j = S j . X is connected. X ⊆ X .If S j is the predicate R , then y j X .Additionally, we also want that either: X is empty, or X is a singleton that only contains a white-blue component vertex, or X contain a red vertex and is the minimal set closed under the following operation:If x, x are both red, adjacent, x is in X , and x is not in { y , . . . , y i } then we add x to X .If x, x are adjacent, and x only is red, we then add x to X .If x, x are adjacent, x is not red, is in X , and is not in { y , . . . , y i } , we then add x to X .If x, x are adjacent, x is not red, is in X , and is { y , . . . , y i } . We then let s be thenumber of y that are equal to x . We then look at the sequence S that correspondto such y , and more precisely at it’s s th tuple: ( P s , L s , D s ). Then if there are ( j, j )that are grouped in P s , and if there is a vertex w in X , such that w is the j th redneighbor of x , and x is the j th red neighbor of x , we then add x to X .The last operation checks within the white-blue component represented by x in order toknow which red neighbor are actually connected once s many elimination rounds havebeen performed within white-blue the component.This is the end of the definition of NEXT i,S ...,S i ( X , X , y , . . . , y i ), which can be writtenin MSO, but would hardly be human readable. We now define the last MSO formulas, thatactually express over H , that G is in C k,d . We define for every 0 ≤ i < k and set { S , . . . , S i } the formulas Ψ i,S ,...,S i ( X, y , . . . , y i ). It expresses that in G [ X ] as elimination distance atmost k − i to degree d , after picking y , . . . , y i in the firsts i th rounds.More formally, we want that for every X such that G | = NEXT i,S ...,S i ( X, X , y , . . . , y i ),either X is empty, or contains a vertex y i +1 such that:Ψ i +1 ,S ,...,S i ,S i +1 ( X , y , . . . , y i , y i +1 ), where S i +1 is R if y i +1 is a red vertex.Ψ i +1 ,S ,...,S i ,S i +1 ( X , y , . . . , y i , y i +1 ), where S i +1 = S j if y i +1 = y j . W { S : G | = τ S ( y i +1 ) } Ψ i +1 ,S ,...,S i ,S ( X , y , . . . , y i , y i +1 ) otherwise.In addition, in the second ant third case we have the constraints that follow.Let S be the ( k, d )-sequence associated to y i +1 , let s be the number of appearances of y i +1 in { y , . . . , y i +1 } (at least one). And we look at the s th tuple ( P s , L s , D s ) of S . (Or thelast tuple if s exceed the length of S .) We check that: j D s implies that the j th red neighbors of y i +1 is not in X .( j, j ) L s implies that either the j th or the j th red neighbors of y i +1 is not in X ; orthat there are no path in X − { y i +1 } between these two red neighbors.This ends the definition of Ψ i,S ,...,S i ( X, y , . . . , y i ).We conclude with Ψ k,S ,...,S k ( X, y , . . . , y k ) that express that the only X such that G | = NEXT k,S ...,S k ( X, X , y , . . . , y k ) is either the empty set, or a singleton { y } , where y isnot a red vertex, and y appears at least ‘ many times in { y , . . . , y k } , where ‘ is the lengthof the sequence S i for y = y ii