Algorithmic Meta-Theorems

Algorithmic meta-theorems are general algorithmic results applying to a whole range of problems, rather than just to a single problem alone. They often have a "logical" and a "structural" component, that is they are results of the form: every computa…

Authors: Stephan Kreutzer

Algorithmic Meta-Theorems
Algorithmic Meta-Theorems Stephan Kreutzer Oxford Universit y Computing Lab oratory stephan.kr eutzer@comlab.o x.ac.uk Abstract. Alg orithmic meta-theorems a re general al gorithmic results applying to a whole range of problems , rather than j ust to a s ingle prob- lem alone. They often have a lo gic al and a structur al compon ent, that is t hey are results of the form: every c omputational pr oblem that c an b e formalise d in a given lo gic L c an b e solve d efficiently on every class C of structur es satisfying c ertain c onditions. This p aper gives a survey of algorithmic meta-theorems obtained in re- cent y ears and the methods used to prov e them. As man y meta-theorems use results from graph minor theory , we giv e a b rief in tro duction to the theory developed by Rob ertson and Seymour for th eir proof of th e graph minor theorem and s tate the main algori thmic consequences of this the- ory as far as they are needed in the th eory of algorithmic meta-theorems. 1 In tro duction Algorithmic meta - theorems are ge neral algor ithmic r esults applying to a whole range of pro blems, rather than just to a sing le problem alo ne. In this pap er we will c o ncen trate on meta-theorems that hav e a lo gic al and a structur al compo- nent , t hat is on r esults of the form: every c omputational pr oblem t hat c an b e formalise d in a given lo gic L c an b e solve d efficiently on every class C of stru c- tur es satisfying c ertain c onditions. The first such theorem is Cour celle’s well-known result [13] stating that every problem defina ble in monadic second-o rder lo gic can be so lv ed efficiently on any class of gra phs o f b ounded tr ee-width 1 . Another example is a m uch mor e r ecen t result stating tha t ev ery first-order definable optimisatio n problem admits a po lynomial-time approximation scheme on any cla s s C of graphs excluding at least one minor (see [2 2]). Algorithmic meta-theor ems lie somewhere b et ween computational logic and algorithm o r complexity theor y and in some se ns e form a bridge b etw een the tw o areas. In a lgorithm theory , an active resear ch ar ea is to find efficient solutions to otherwise intractable pr oblems by restricting the clas s of admissible inputs. F or instance, while the do minating set problem is NP - complete in gener al, it can b e solved in poly nomial time on a ny cla ss of gra phs of b o unded tree-width. In this line of r esearch, alg o rithmic meta - theorems pr ovide a simple and eas y wa y to show that a certain problem is tr actable on a given class of structures . 1 The definition of tree-width and the other graph parameters and logics mentioned in the introduction will be presented formally in the follo wing sections. F ormalising a problem in MSO yields a formal pro of fo r its tr actability on classe s of structure s of b ounded tree- width, avoiding the task o f working out the details of a solution using dynamic progr a mming – something that is not alwa ys trivial to do but o ften enough solved by hand-wa vy ar gumen ts such as “using standar d techn iques from dynamic prog ramming ...”. Another distinguishing feature of logic base d algor ithmic meta-theor ems is the observ ation that for a wide r ange of problems, such as cov ering or colouring problems, their precise mathematica l form ulation can often directly b e transla ted int o mo nadic s e cond-order logic. Hence, ideally , instead of having to design an explicit a lgorithm for so lving a pr oblem on b ounded tree-width gra phs, one can read off tra ctabilit y results directly from the problem description. Finally , alg orithmic meta-theo r ems yield trac ta bilit y r esults fo r a whole cla ss of problems providing v a lua ble insig h t into how far certa in algo rithmic tech- niques range. On the other hand, in their neg ative form of in tra c tabilit y r esults, they also ex hibit so me limits to applicatio ns of certain algor ithmic techniques. In logic, one of the core tasks is the ev aluation o f logical formulas in structures – a task underly ing problems in a wide v ar ie ty of ar e a s in computer scienc e fr om database theory , artificia l intelligence to verification a nd finite mo del theory . Among the impo rtant lo gics studied in this context is first-or der log ic and its v ario us fragments, suc h as its existential conjunctive frag ment known as conjunc- tive que r ies in da tabase theory . Whereas first-order mo del-chec king is Psp ace - complete in general, e v en on input structures with o nly tw o elements, it b ecomes po lynomial time for every fixed for mula. So what can w e p ossibly gain from re- stricting the class of admissible structures, if the problem is hard a s so on as we hav e tw o elemen ts and b ecomes easy if w e fix the for m ula? Not muc h, if the distinction is only be tw een taking the formula as full par t of the input or keeping it fixed. A finer a nalysis of first-order mo del-chec king can be obtained b y studying the problem in the framework of para meter ized complexity (see [36,46,67]). The idea is to iso late the dep endence o f the running time on a certa in pa rt o f the input, called the p ar ameter , fro m the dep endence on the res t. W e will treat parameterize d co mplexit y formally in Sectio n 2.4. The parameterized fir st-order ev aluatio n pr oblem is the problem, given a structure A and a se ntence ϕ ∈ FO , to decide whether A | = ϕ . The pa rameter is | ϕ | , the length of the formula. It is called fixe d p ar ameter tr actable (FPT ) if it ca n b e so lv ed in time f ( | ϕ | ) · | A | c , for some fixed constant c and a co mputable function f : N → N . While first- o rder mo del-ch ecking is unlikely to b e fixed-pa rameter tractable in general (unless unexp e cted r esults in pa rameterized complexity happ en), Courcelle’s theorem shows tha t even the muc h more expr essive monadic second- order logic beco mes FPT on g r aph classes of b ounded tree-width. Hence, algo rithmic meta-theore ms give us a muc h b etter insig h t into the structur e o f mo del-chec king problems taking structural information int o account. In this pap er we will give an ov erview o f algor ithmic meta-theo rems obtained so far and pr esent the main metho ds used in their pro ofs. As mentioned b e fore, these theo rems usually hav e a log ical and a structural comp onent . As for the 2 logic, we will primarily c o nsider fir st-order and mona dic second- order logic (see Section 2). As for the structural comp onent, most meta-theorems have b een prov ed relative to so me s tructure classe s ba sed on g raph theory , in particular on graph minor theor y , such a s clas ses of graphs of b ounded tree-width, plana r graphs, or H -minor fr ee graphs . W e will therefor e pr esent the relev ant parts of graph s tructure theory needed for the pro ofs of the theorems presented here. The pa per is orga nised as follows. In Section 2 , we pres en t basic notation used throughout the pa per. In Section 2.3 we present the rele v ant logics and give a brief ov erview o f their model- c hecking problem. Sectio n 2 .4 contains an int ro duction to para meterized complexity . In Section 3, we introduce the notion of the tre e -width of a gr aph and establish so me fundamental prop erties. W e then state and prove theo r ems by Sees e and Courcelle establishing trac tabilit y results for mona dic second-orde r logic on gr aph cla sses of b ounded tree-width. In Section 4 we present an extensio n of tr ee-width ca lled clique-width and a more recent, bro adly equiv alent no tion ca lle d ra nk-width. Aga in we will see tha t monadic second-o rder mo del chec king and satisfiability is tr actable on graph classes o f b ounded clique- width. Section 5 contains a brief int ro duction to the theory of graph minors to the extent neede d in la ter sections of the pape r. The results presented in this sectio n ar e then used in Section 7 to obtain tra ctabilit y results o n g r aph classes excluding a minor . In Section 7, we also consider the concept of lo calisation of gra ph in v a riants and use it to obtain further tractability results fo r first-o rder mo del checking. But b efore, in Section 6, we us e the r esults obtained in Section 5 to show limits to MSO -tra c tabilit y . Finally , we conclude the pape r in Section 8. R emark. An excellent s urvey covering similar topics as this pap er ha s re c en tly bee n written by Martin Grohe as a co n tribution to a bo ok celebrating W olfga ng Thomas’ 6 0th birthday [53]. While the t wo pap ers share a common co re o f results, they present the material in different w ays and with a different fo cus. 2 Preliminaries In this section we introduce basic concepts from logic and graph theory and fix the no ta tion used throughout the pap er. T he r eader may safely sk ip this s ection and c o me back to it whenever notation is unclear. 2.1 Sets By N := { 0 , 1 , 2 , . . . } we denote the set of non-negative integers and by Z the set o f integers. F or k ∈ N we wr ite [ k ] for the s e t [ k ] := { 0 , . . . , k − 1 } . F or a set [ k ] M and k ∈ N we denote b y [ M ] k and [ M ] ≤ k the se t of a ll subsets o f M of size [ M ] k , [ M ] ≤ k k and size ≤ k , resp ectively , and similarly for [ M ] 1 , the n × n -grid G n,n has tr e e-width n . In the remainder of this sectio n we will prese n t some basic pro per ties of tree-decomp ositions and tree-width. 16 Closur e Pr op erties and Conne ctivity. It is ea sily seen that tr ee-width is preserved under taking subgraphs. F or, if ( T , ( B t ) t ∈ V ( T ) ) is a tre e-decomp osition of width w of a graph G , then ( T , ( B t ∩ V ( H )) t ∈ V ( T ) ) is a tree- decompo sition of H of width at most w . F ur ther, if G and H ar e disjo in t gr a phs, we can co m bine tree- decomp ositions for G and H to a tre e -decomp o sition of the disjoint union G ˙ ∪ H by a dding one e dg e connecting the tw o decompo sitions. Lemma 3. 6 L et G b e a gr aph. If H ⊆ G , then tw( H ) ≤ tw( G ) . F u rther, if C 1 , . . . , C k ar e the c omp onents of G , then t w ( G ) = max { t w ( C i ) : 1 ≤ i ≤ l } . T o state the nex t r e s ults, we need further notation. Let G be a g raph and ( T , ( B t ) t ∈ V ( T ) ) be a tree-dec ompos ition of G . 1. If H ⊆ G we define B − 1 ( H ) := { t ∈ V ( T ) : B t ∩ V ( H ) 6 = ∅ } . B − 1 ( H ) 2. Conversely , for U ⊆ T we define B ( U ) := S t ∈ V ( U ) B t . B ( U ) Occasiona lly , we will abuse notation and use B , B − 1 for sets instead of sub- graphs. The next lemma is easily pr ov ed by induction on | H | using the fact that for each vertex v ∈ V ( G ) the s e t B − 1 ( v ) is connected in a n y tree-decomp osition T of G and that edg es { u, v } ∈ E ( G ) ar e cov ered by some bag B t for t ∈ V ( T ). Hence, B − 1 ( u ) ∪ B − 1 ( v ) is connected in T for all { u, v } ∈ E ( H ). Lemma 3. 7 L et G b e a gr aph and T := ( T , ( B t ) t ∈ V ( T ) ) b e a tr e e-de c omp osition of G . If H ⊆ G is c onne cte d, then so is B − 1 ( H ) in T . Smal l tr e e-de c omp ositions. A pr iori, by duplicating no des, tree-decomp ositions of a graph can b e a rbitrarily large (in terms of the n umber of no des in the underlying tr ee). How ever, this is not very use ful and w e can always av oid this from happ ening. W e will now co nsider tree-decomp ositions which are smal l and derive v a r ious useful prop erties from this. Definition 3. 8 A tr e e-de c omp osition ( T , ( B t ) t ∈ V ( T ) ) is small , if B t 6⊆ B u for smal l tr e e-de c omp ositions al l u, t ∈ V ( T ) with t 6 = u . The next le mma shows that w e can easily convert every tr ee-decomp osition to a small o ne in linear time. Lemma 3. 9 L et G b e a gr aph and T := ( T , ( B t ) t ∈ V ( T ) ) a tr e e-de c omp osition of G . Then ther e is a sm al l t r e e-de c omp osition T ′ :=  T ′ , ( B ′ t ) t ∈ V ( T ′ ) )  of G of the same width and with V ( T ′ ) ⊆ V ( T ) and B ′ t = B t for al l t ∈ V ( T ′ ) . Pro of. Supp o se B s ⊆ B t for some s 6 = t . Let s = t 1 . . . t n = t b e the no des o f the path from s to t in T . Then B s ⊆ B t 2 , by definitio n of tree-deco mpositio ns. But then, ( T ′ , ( B t ) t ∈ V ( T ′ ) ) with V ( T ′ ) := V ( T ) \ { s } and E ( T ′ ) :=  E ( T ) \ {{ v , s } : { v , s } ∈ E ( T ) }  ∪ {{ v , t 2 } : { v , s } ∈ E ( T ) and v 6 = t 2 } . is a tree-deco mpositio n of G with V ( T ) ′ ⊂ V ( T ). W e rep eat this unt il T is small.  17 A co nsequence of this is the following result, which implies that in measuring the r unning time of algor ithms on g raphs who se tree-w idth is b ounded by a constant k , it is sufficient to co nsider the order o f the graphs r ather than their size. Lemma 3. 10 Every ( n on-empty) gr aph of tr e e- width at most k c ontains a ver- tex of de gr e e at most k . Pro of. Le t G b e a gr aph a nd let T := ( T , ( B t ) t ∈ V ( T ) ) b e a small tree-decomp osi- tion o f G o f width k := tw( G ). If | T | = 1, then | G | ≤ k + 1 and ther e is nothing to s ho w. Otherwise let t be a leaf o f T and s b e its neighbour in T . As T is small, B t 6⊆ B s and hence there is a vertex v ∈ B t \ B s . By definition of tree- decomp ositions, v must hav e all its neig hbo urs in B t and hence has degree at most k .  Corollary 3. 11 Every gr aph G of tr e e-width tw( G ) ≤ k has at most k · | V ( G ) | e dges, i.e., for k > 0 , || G || ≤ k · | G | . Sep ar ators. W e clo se this section with a characterisation of gr aphs o f small tree-width in ter ms of separ ators. This separatio n prop erty allows for the afore- men tioned applications o f automata theory or F eferman- V aught style theo rems. Definition 3. 12 Le t G b e a gr aph. (i) L et X , Y ⊆ V ( G ) . A s et S ⊆ V ( G ) sepa rates X and Y , or is a separator for X and Y , if every p ath c ont aining a vertex of Y and a vertex of Z sep ar ator also c ontains a vertex of S . In other wor ds, X and Y ar e disc onne cte d in G − S . (ii) A separator of G is a set S ⊆ V ( G ) , so that G − S has mor e than one c omp onent, i.e. ther e ar e sets X , Y ⊆ V ( G ) su ch that S sep ar ates X and Y and X \ S 6 = ∅ and Y \ S 6 = ∅ . Lemma 3. 13 Le t ( T , ( B t ) t ∈ V ( T ) ) b e a smal l tr e e-de c omp osition of a gr aph G . (i) If e := { s, t } ∈ E ( T ) and T 1 , T 2 ar e t he c omp onent s of T − e , then B t ∩ B s sep ar ates B ( T 1 ) and B ( T 2 ) . (ii) If t ∈ V ( T ) is an inner vertex and T 1 , . . . , T k ar e the c omp onents of T − t then B t sep ar ates B ( T i ) and B ( T j ) , for al l i 6 = j . Pro of. Let e := { s, t } ∈ E ( T ) and let T 1 , T 2 be the comp onents of T − e . As T is small, X := B ( T 1 ) \ B ( T 2 ) 6 = ∅ and Y := B ( T 2 ) \ B ( T 1 ) 6 = ∅ . Suppos e there was an X − Y -pa th P in G not using any vertex fr om B t ∩ B s . By L e mma 3.7, B − 1 ( P ) is co nnected and hence there is a path in T from T 1 to T 2 not using the edge e (as V ( P ) ∩ B t ∩ B s = ∅ ), in cont ra diction to T b eing a tree. Part ( ii ) c an b e prov ed a nalogously .  Recall from the preliminaries tha t for an edge e := { s, t } ∈ E ( T ) we r efer to the set B s ∩ B t as the cut at the edge e . The previous lemma gives justification to this terminolo gy , as the cut at a n edg e separ ates the gra ph. A simple consequence of this lemma is the following obs erv ation, that will be useful later on. 18 Corollary 3. 14 Le t G b e a gr aph and T := ( T , ( B t ) t ∈ V ( T ) ) b e a t r e e-de c omp o- sition of G . If X ⊆ V ( G ) is the vertex set of a c omplete sub gr aph of G , t hen ther e is a t ∈ V ( T ) such that X ⊆ B t . Pro of. B y Lemma 3.9, there is a s mall tr e e-decomp osition T ′ := ( T ′ , ( B ′ t ) t ∈ V ( T ′ ) ) such that V ( T ′ ) ⊆ V ( T ) and B ′ t = B t for all t ∈ V ( T ′ ). Hence, w.l.o.g. we may assume that T is small. By Lemma 3.1 3, every cut at an edge e ∈ E ( T ) is a separ ator of the graph G . Hence, as G [ X ] is complete, if e ∈ E ( T ) and T 1 , T 2 are the tw o comp onent s of T − e , then either X ⊆ B ( T 1 ) or X ⊆ B ( T 2 ) but not bo th. W e orient every edge e ∈ E ( T ) so that it p oints tow a rds the comp onent o f T − e containing all o f X . As T is a c yclic, there is a node t ∈ V ( T ) with no outgo ing edge. By construction, X ⊆ B t .  Corollary 3. 15 tw( K k ) = k − 1 for al l k ≥ 1 . Algorithms and Complexity The notion o f tree-w idth has b een introduced by Rob ertson and Seymour as part of their pro of o f the gr aph minor theorem. Even b efore that, the notio n of p artial k -tr e es , br oadly equiv alent to tree - width, had b e en studied in the algor ithms co mm unity . The relev ance of tree-width for algorithm design stems from the fa ct that the tree-structure inherent in tree- decomp ositions can b e used to design bo ttom-up algorithms o n g raphs of small tree-width to s olve pr oblems efficiently which in g eneral a re NP -hard. A key step in designing these algo r ithms is to compute a tree- decompo sition of the input graph. Unfortunately , Ar n b org, Corneil, and Pros kurowski showed that deciding the tree-width of a gr aph is NP -complete itself. Theorem 3.16 ( Arnb or g, Corneil, Pr oskur owski [3] ) The fol lowing pr oblem is NP -c omplete. Tree-Width Input: Graph G , k ∈ N . Pr oblem: t w( G ) = k ? How e v er, the pro blem b ecomes tra ctable if the tree- width is no t a par t of the input, i.e . if we are g iv en a constant upp er bo und on the tree-width of graphs we are dealing with. A class C of gra phs has b ounde d tr e e-width , if there is a k ∈ N such that b ounde d tr e e-width t w ( G ) ≤ k fo r a ll G ∈ C . In [6] Bo dlaender pr oved that for any clas s of gr aphs of b ounded tree-width tree-decomp ositions of minimal width ca n be computed in linear time. Theorem 3.17 ( Bo d laender [6] ) Ther e is an algorithm which, given a gr aph G as input, c onstructs a tre e- de c omp osition of G of width k := tw( G ) in time 2 O ( k 3 ) · | G | . 19 The a lgorithm by Bo dlaender is primar ily of theor etical interest. W e will see later tha t many NP -c o mplete pr o blems can b e so lv ed efficiently on g raph classes of bo unded tree- width. F or these algorithms to work in linear time, it is essential to compute tr ee-decomp ositions in linear time as well. F rom a practical p oint of view, how ever, the c ubic dependence on the tree-width in the exp onent and the complexity of the algor ithm itself p oses a s erious problem. But there a r e other simpler a lgorithms with qua dratic o r cubic running time in the order of the gr aph but only linear exp onential dep e ndenc e on the tr ee-width which ar e practically feasible for small v alues of k . 3.2 T ree-Width and Structures So far we hav e only co nsidered graphs and their tree-decomp ositions. W e will do so for most o f the remainder , but at lea st wan t to c ommen t on tree-deco mpositio ns of g eneral structur e s. W e first present the g eneral definition of tree-deco mpos itio ns of str uctures a nd then give an alterna tiv e characteris a tion in terms of the Gaifman- or comparability graph. Definition 3. 18 Le t σ b e a signatur e. A tree-deco mpos ition of a σ -stru ctur e A is a p air T := ( T , ( B t ) t ∈ V ( T ) ) , wher e T is a tr e e and B t ⊆ V ( A ) for al l t ∈ V ( T ) , so that (i) for al l a ∈ V ( A ) the set B − 1 := { t ∈ V ( T ) : a ∈ B t } is non-empty and c onne cte d in T and (ii) for every R ∈ σ and al l ( a 1 , . . . , a ar( R ) ) ∈ R ( A ) ar( R ) ther e is a t ∈ V ( T ) such t hat { a 1 , . . . , a ar( R ) } ⊆ B t . The width w( T ) is define d as max {| B t | − 1 : t ∈ V ( T ) } and the tree-width of A is the minimal width of any of its t re e- de c omp ositions. The idea is the same as for graphs. W e wan t the tre e - decompo sition to contain all elements o f the structure and at the same time we wan t each tuple in a relation to b e covered by a ba g of the decomp osition. It is e asily seen that the tree-decomp ositions of a structure coincide with the tr e e-decomp ositions of its Gaifman graph, defined a s follows. Definition 3. 19 (Gaifm an-graph) L et σ b e a signatur e. The Gaifman-gr aph of a σ -struct u r e A is define d as the gr aph G ( A ) with vertex set V ( A ) and an G ( A ) e dge b etwe en a, b ∈ V ( A ) if, and only if, ther e is an R ∈ σ and a ∈ R ( A ) with a, b ∈ a . The following observ ation is easily seen. Prop osition 3.2 0 A st ructur e has the same tr e e-de c omp ositions as it s Gaifman- gr aph. So far we hav e treated the notion of gr aphs infor ma lly as ma thema tical s truc- tures. As a preparatio n to the next section, we consider tw o different w ays o f mo delling graphs b y lo g ical s tructures. The obvious wa y is to mo del a graph 20 G as a structure A over the signatur e σ Graph := { E } , where V ( A ) := V ( G ) σ Graph and E ( A ) := { ( a, b ) ∈ V ( A ) × V ( A ) : { a, b } ∈ E ( G ) } . W e write A ( G ) for this A ( G ) enco ding o f a gra ph as a structure and r efer to it as the standar d enc o ding . Alternatively , we can mo del the incidenc e gr aph of a gr aph G defined as the incidenc e gr aph graph G Inc with vertex se t V ( G ) ∪ E ( G ) and edges E ( G Inc ) := { ( v , e ) : v ∈ V ( G ) , e ∈ E ( G ) , v ∈ e } . The incidence graph gives rise to the following enco ding of a graph as a structure, which we refer to as the incidenc e enc o ding . Definition 3. 21 Le t G := ( V , E ) b e a gr aph. L et σ inc := { P V , P E , I ) , wher e P V , P E ar e un ary pr e dic ates and I is a binary pr e dic ate. The incidence struc- ture A I ( G ) is define d as the σ inc -structu r e A := A I ( G ) wher e V ( A ) := V ∪ E , P E ( A ) := E , P V ( A ) := V and I ( A ) := { ( v , e ) : v ∈ V , e ∈ E , v ∈ e } . The pr oo f of the following lemma is straightforward but may b e a go o d exercise. Theorem 3.22 tw( G ) = tw( A I ( G )) for al l gr aphs G . It may seem to b e a mere technicality how we e ncode a gra ph a s a s tructure. How e v er, the precise enco ding has a sig nifica n t impact on the ex pressive p ow er of logics o n graphs. F or instance, the following MSO [ σ inc ]-formula defines that a graph contains a Hamilton-cycle using the incidence enco ding, a prop erty that is not definable in MSO on the sta ndard enco ding (see e.g. [37, Cor ollary 6.3.5]). ∃ U ⊆ P E ∀ v “ v has degree 2 in G [ U ]” ∧ ϕ conn ( U ) , where ϕ conn is a formula saying that the subgraph G [ U ] induced b y U is con- nected. Clea rly , it is MSO -de fina ble tha t a v ertex v is incident to exactly tw o edges in U , i.e. ha s degree 2 in G [ U ]. T he formula s ays that ther e is a s et U of edges s o that G [ U ] is connected a nd that every vertex in G [ U ] has degree 2. But this means tha t U is a simple cycle P in G . F urther, as all vertices of G o ccur in P , this cyc le must b e Hamiltonian. Hence, MSO is more ex pressive over incidence gr aphs than ov er the standa rd enco ding of gr aphs. I t is clear that MSO interpreted ov er incidence gr aphs is the same as consider ing the extensio n of MSO by quantification over sets of edges (rather tha n just sets o f vertices) o n the standard enco ding. This logic is sometimes referred to as MSO 2 in the literature. A more gener al framework ar e MSO 2 guar de d lo gics , tha t allow quantification o nly over tuples that o ccur together in some relation in the structure. On gra phs, guar de d se c ond-or der lo gic ( GSO ) is GSO just MSO 2 . As we will not b e dealing with general structures in the rest of this survey , we re frain from introducing guarded logics formally and refer to [2,5 1] and r eferences therein instea d. 3.3 Co ding tree-decomp os itions i n trees The a im of the following sections is to show tha t mode l- c hecking a nd sa tis fia bil- it y testing for monadic second-order logic b ecomes tractable when res tricted to 21 graph classes o f small tree-width. The pr oo f of these results relies o n a r eduction from g raph classe s of b ounded tree-width to class e s of finite lab elled trees. As a first step tow ards this we show how gr aphs of tr ee-width b ounded by some constant k can b e enc o ded in Σ k -lab elled finite tr ees for a suitable alpha bet Σ k depe nding o n k . W e will also s ho w that the class of graphs o f tree-width k , for some k ∈ N , is MS O -in terpr e ta ble in the class of Σ k -lab elled trees. A tre e - decompo sition ( T , ( B t ) t ∈ V ( T ) ) o f a graph G is already a tree and we will take T as the underlying tree of the enco ding. Th us, all w e have to do is to define the labe lling . Note that we ca nno t simply take the bags B t as lab els, a s we need to work with a finite alphab et and there is no a priori bo und on the nu mber of vertices in the ba gs. Hence we hav e to enco de the vertices in the ba gs using a finite num be r of lab els. T o simplify the presentation we will b e using tree-decomp ositions of a s p ecial form. Definition 3. 23 A lea f-decompo sition of a gr aph G is a tr e e-de c omp osition leaf-decomp osition T := ( T , ( B t ) t ∈ V ( T ) ) of G such that al l le aves of V ( T ) c ontain exactly one vertex and every v ∈ V ( G ) is c ontaine d in exactly one le af of T . In other w or ds, in leaf-deco mpositio ns there is a bijection ρ b etw een the set of le a ves of the decomp osition a nd the s e t of vertices of the graph and the bag B t of a lea f t contains exactly its image ρ ( t ). It is ea sily s een that a n y tree- decomp osition can b e conv erted into a leaf-decomp osition of the same width. Lemma 3. 24 F or every tr e e-de c omp osition T of a gr aph G ther e is a le af- de c omp osition T ′ of G of the same width and t his c an b e c ompute d in line ar time, given T . T o define the alphab et Σ k , we will work with a slig h tly different form of tree- decomp ositions where the bag s are no long er s ets but o r dered tuples o f vertices. It will a lso b e useful to requir e that all these tuples hav e the same leng th a nd that the tree under lying a tree-dec ompos ition is a binary directed tree. 3 Definition 3. 25 An ordered tree-deco mpos itio n of width k of a gr aph G is a p air ( T , ( b t ) t ∈ V ( T ) ) , wher e T is a dir e cte d binary t r e e and b t ∈ V ( G ) k , so that ( T , ( B t ) t ∈ V ( T ) ) is a tre e- de c omp osition of G , with B t := { b 0 , . . . , b k } for b t := b 0 , . . . , b k . An order ed lea f-decompo sition is the ordered version of a leaf-deco mpos itio n. Example 3.2 6 Consider again the gr aph fr om Example 3.2. The fol lowing shows an or der e d le af-de c omp osition obtaine d fr om the tr e e-de c omp osition in Exam- ple 3.2 by first adding the ne c essary le aves c ontaining just one vertex and then c onverting every b ag into an or der e d tuple of lengt h 4 . 3 Note th at, strictly speaking, to apply the results on MSO on finite trees we h a ve to w ork with trees where an ordering on the c hildren of a no de is imp osed. Clearly w e can change all defin itions here to work with such trees. But as this would make t h e notation even more complicated, we refrain from doing so. 22 (1,3,11 ,1) (1,1,1, 1) (11,11, 11,11) (1,3,6, 11) (1,3,4, 11) (4,4,4, 4) (1,6,9, 11) (3,4,7, 11) (1,2,3, 4) (1,5,6, 9) (6,9,10 ,11) (4,7,8, 11) (2,2,2,2) (3,3,3,3 ) (5,5,5, 5) (6,6,6,6) (9,9,9, 9) (10,10,10, 10) (7,7,7,7) (8 ,8,8,8) The gr aph G to gether with t his le af-de c omp osition induc es the fol lowing Σ 3 - lab el le d t r e e: t 1 t 2 t 3 t 4 t 5 t 6 t 7 t 8 t 9 t 10 t 11 t 12 t 13 t 14 t 15 t 16 t 14 t 15 t 16 t 16 wher e, for inst anc e, λ ( t 4 ) :=  eq( t 4 ) , overlap ( t 4 ) , e dge( t 4 )  , with – eq( t 4 ) := ∅ , – ov erla p ( t 4 ) := { (0 , 0) , (0 , 3) , (1 , 1) } , and – edge( t 4 ) := { (0 , 1) , (1 , 2) , (1 , 3) , (2 , 3) } ∪ { (1 , 0 ) , (2 , 1) , (3 , 1) , (3 , 2) } . eq( t 4 ) := ∅ , as al l p ositions of b t 4 c orr esp ond t o differ ent vertic es in G . On the other hand, eq( t 15 ) := { ( i, j ) : i, j ∈ { 0 , . . . , 3 }} , as al l ent ries of b 15 r efer t o the same vertex 5 . ⊣ It is ea sily s een that every tree-decomp osition of width k ca n be conv erted in linea r time to an o rdered tree-decomp osition o f width k . Combining this with Bo dlaender’s a lgorithm (Theo rem 3.17) and Lemma 3.24 ab ov e yields the following lemma. Lemma 3. 27 Ther e is an algorithm that, given a gr aph G of tre e-width ≤ k , c onstr u cts an or der e d le af-de c omp osition of G of width tw( G ) in time 2 O ( k 3 ) · | G | . 23 Now le t G b e a gra ph and L := ( T ′ , ( b t ) t ∈ V ( T ′ ) ) be an o rdered leaf-deco mpos i- tion o f G o f width k . W e co de L in a lab elled tree T := ( T , λ ), so that L and G can b e reco nstructed from T , and this rec o nstruction can even be done by MSO formulas. The tre e T underly ing T is the tree T ′ of L . T o define the alphab et and the lab els of the no des let t ∈ V ( T ) and let b t := b 0 , . . . , b k . W e set λ ( t ) λ ( t ) := (eq( t ) , ov erlap( t ) , edge( t )) where eq( t ) , overlap ( t ) , edge( t ) are defined as follows: – eq( t ) := { ( i, j ) : 0 ≤ i, j ≤ k and b i = b j } . eq( t ) – If t is the ro ot of T , then ov erlap( t ) := ∅ . Otherwise let p b e the pr edecessor of t in T and let b p := a 0 , . . . , a k . W e set o verlap( t ) ov erlap( t ) := { ( i, j ) : 0 ≤ i, j ≤ k and b i = a j } . – Finally , edge( t ) := { ( i, j ) : 0 ≤ i, j ≤ k and { b i , b j } ∈ E ( G ) } . edge( t ) F or every fixed k , the labels come fro m the finite alphab et Σ k Σ k := 2 { 0 ,...,k } 2 × 2 { 0 ,...,k } 2 × 2 { 0 ,...,k } 2 . W e write T ( G, L ) for the la belled tree enc o ding a leaf-deco mpos itio n L of a T ( G, L ) graph G . Note that the s ignature dep ends on the ar it y k of the ordered leaf- decomp osition L , i.e. on the b ound on the tree-width of the class of graphs we are working with. The individual parts o f the lab elling hav e the following meaning . Recall that we require all tuples b t to b e of the same length k + 1 and therefore they may contain duplicate entries. e q ( t ) iden tifies those entries in a tuple relating to the same vertex of the graph G . The lab el overlap ( t ) takes ca re of the s ame vertex app earing in tuples of neig h b ouring no des of the tree. As w e are working with directed trees , every node other than the ro ot has a unique predecesso r. Hence we can record in the ov erlap-lab el of the c hild which vertices in its bag o ccur at which p ositions of its pr edecessor. Finally , edge enco des the edge r elation o f G . As every edge is covered b y a bag of the tree- decompo sition, it suffices to r ecord for each no de t ∈ V ( T ) the edges betw een elements of its bag b t . The la b els eq( t ) , ov erlap( t ) and edge( t ) sa tis fy so me o b vious consistency criteria, e.g. eq( t ) is an equiv alence rela tion for every t , eq( t ) is co nsisten t with edge( t ) in the s ense tha t if tw o p ositions i, i ′ refer to the sa me vertex, i.e. ( i, i ′ ) ∈ e q ( t ) and ( i, j ) ∈ edge( t ) then also ( i ′ , j ) ∈ edge( t ), and likewise for eq( t ) a nd ov erla p( t ). W e refra in from giving all necess ary details. Note, though, that any Σ k -lab elled finite tree that satisfies these consistency criteria do es en- co de a gr aph of tree-width at most k . F urthermore, the cr iteria as outlined a b ov e are easily seen to be definable in MSO , in fact even in first-or der log ic. Again we refra in from giving the exact formula as its definition is long and technical but absolutely straightforward. Let ϕ c ons be the MSO -sentence true in a Σ k - ϕ c ons lab elled tree if, and only if, it satisfies the consistency criter ia, i.e. e nc odes a tree-decomp osition of a gr aph o f tree-width at most k . 24 Of cours e, to talk ab out formulas de fining pro p erties o f Σ k -lab elled trees we first need to agr e e on how Σ k -lab elled trees a re enco ded as str uc tur es. F o r k ∈ N we define the signature σ k σ k := { E } ∪ { eq i,j , edge i,j , ov erlap i,j : 0 ≤ i , j ≤ k } , where eq i,j , ov erlap i,j , and edge i,j are unary relation sy mbo ls. The int ended meaning o f eq i,j is that in a σ k -structure A a n element t is contained in eq i,j ( A ) if ( i, j ) ∈ eq( t ) in the corres p onding tree. Likewise for ov erlap i,j and edge i,j . σ k -structures, then, enco de Σ k -lab elled trees in the natural way . In the sequel, we will not distinguish notationally b et ween a Σ k -lab elled tree T a nd the co r- resp onding σ k -structure A T . In particular, we will wr ite T | = ϕ , fo r an MSO - formula ϕ , instead of A T | = ϕ . Clearly , the information enco ded in the Σ k -lab elling is sufficient to reco n- struct the gra ph G from a tr e e T ( G, L ), for so me orde r ed leaf-decomp osition of G of width k . Note that different leaf-decomp ositions of G may yield no n- isomorphic trees. Hence, the enco ding o f a gr aph in a Σ k -lab elled tr e e is not unique but depends on the decomp osition chosen. F or our purp ose this do es not po se any pr oblem, though. The next step is to define an MSO -interpretation Γ := ( ϕ univ ( x ) , ϕ valid , ϕ E ( x, y ) ) Γ of the cla s s T k of g raphs of tree-width at mos t k in the clas s T Σ k of Σ k -lab elled finite tr ees. T o state the interpretation formally , we need to define the three formulas ϕ univ ( x ) , ϕ valid , and ϕ E ( x, y ) . Recall that in a leaf-deco mp osition L there is a bijection b etw ee n the leav es o f T and the vertices o f the graph that is being decomp osed. Hence, we ca n take ϕ univ ( x ) to b e the formula ϕ univ ( x ) := ∀ y ¬ E x y saying that x is a lea f in T . Let G be a gr aph and L := ( T , ( b t ) t ∈ V ( T ) ) be a n o rdered leaf-dec o mpos itio n of G of width k . Supp ose w e are given tw o le aves t u , t v of L containing u and v resp ectively and we wan t to decide whether there is an edge b etw een u and v . Clearly , if e := { u, v } ∈ E ( G ), then e must b e cov ered by so me bag, i.e. there are a no de t in L with ba g b t := b 0 . . . b k and i 6 = j such that b i = u and b j = v and ( i, j ) ∈ edg e( t ) in the tree T := T ( G, L ). F ur ther, u o ccur s in every bag on the path from t to t u and likewise for v . Hence, to define ϕ E ( x, y ) , where x, y are interpreted by leav es, we hav e to check whether ther e is such a no de t a nd paths fr om x and y to t as b efore. F o r this, we need an auxiliary formula which we define next. Recall that each p osition i in a ba g b t corres p onds to a vertex in G . Hence, we can asso ciate vertices with pairs ( t, i ). In g eneral, a vertex can o ccur at differ en t po sitions i a nd different no des t ∈ V ( T ). W e can, how ever, identify any v ertex v with the set X v := { ( t, i ) : t ∈ V ( T ) and v o ccurs at p osition i in b t } . X v 25 W e call X v the e quivalenc e set of v . If t ∈ V ( T ) and 0 ≤ i ≤ k , we define the e quivalenc e set of ( t, i ) as the equiv a le nce set of b i , where b t := b 0 , . . . , b k . Clearly , this iden tification of vertices with sets of pair s a nd the concept of equiv alent sets extends to the labe lled tree T := T ( G, L ), as T and L sha re the same underlying tree. T o define sets X v in MSO , we r epresent X v by a tuple X := ( X 0 , . . . , X k ) of sets X i ⊆ V ( T ), such that for all 0 ≤ i ≤ k a nd all t ∈ V ( T ), t ∈ X i if, and only if, ( t, i ) ∈ X v . W e are g o ing to describ e a n MSO -formula ϕ ( X 0 , . . . , X k ) that is satisfied by a tuple X if, and only if, X is the equiv a lence set of a pair ( t, i ), or equiv a len tly of a vertex v ∈ V ( G ). T o simplify notation, w e will say tha t a tuple X co n tains a pair ( t, i ) if t ∈ X i . Consider the for m ulas ψ eq ( X 0 , . . . , X k ) := ^ i ∀ t ∈ X i  ^ j 6 = i eq i,j ( t ) → t ∈ X j  and ψ ov e rlap ( X 0 , . . . , X k ) := ∀ s ∀ t ^ i,j  E ( s, t ) ∧ t ∈ X i ∧ ov erlap i,j ( t )  → s ∈ X j . ψ eq ( X ) s a ys of a tuple X that X is clo sed under the eq-lab els and ψ ov e rlap ( X ) says the same o f the ov erlap-lab els. Now let ψ ( X ) := ψ eq ∧ ψ ov e rlap . ψ is s atisfied by a tuple X if whenever X contains at a pair ( t, i ), then it co ntains the complete equiv alence set of ( t, i ). Now, c o nsider the for m ula ϕ vertex ϕ vertex ( X 0 , . . . , X k ) := ψ ( X ) ∧ X 6 = ∅ ∧ ∀ X ′ 6 = ∅  X ′ ( X → ¬ ψ ( X ′ )  where “ X 6 = ∅ ” defines that at least one X i is non-empty and “ X ′ ( X ” is a n abbreviation for a formula s a ying that X ′ i ⊆ X i , for all i , and fo r at least o ne i the inclusion is strict. ϕ vertex ( X ) is true for a tuple if X is no n-empt y , closed under eq a nd ov erlap, but no pro per non-empty subset of X is. Hence, X is the equiv alence set of a single vertex v ∈ V ( G ). The de finitio n of ϕ vertex ( X ) is the main technical part of the MSO -interpretation Γ := ( ϕ univ ( x ) , ϕ valid , ϕ E ( x, y ) ). W e hav e alr eady defined ϕ univ ( x ) := ∀ y ¬ E xy . F or ϕ valid , r ecall from ab ov e the formula ϕ c ons true in a Σ k -lab elled tre e T if, and only if, T enco des a tree- decomp osition o f a graph G of tree-w idth at most k . T o define ϕ valid we need a formula that not only requires T to enco de a tr e e-decomp osition of G but a leaf-decomp osition. T o force the enco ded tree-decomp osition to b e a leaf-deco mpositio n, we fur - ther require the following tw o conditions. 1 . F or all leaves t ∈ V ( T ) and all i 6 = j , ( i , j ) ∈ eq( t ). 2 . F or all t ∈ V ( T ) and all 0 ≤ i ≤ k the equiv a le nce set of ( t, i ) contains exactly one leaf. 26 Both conditions ca n easily b e defined by MSO - formulas ϕ 1 and ϕ 2 , resp ectively , where in the definitio n o f ϕ 2 we use the for m ula ϕ vertex defined ab o ve. Hence, the for mula ϕ valid := ϕ c ons ∧ ϕ 1 ∧ ϕ 2 ϕ valid is true in a Σ k -lab elled tree T (or the co r resp onding σ k -structure) if, and only if, T enco des a leaf-decomp osition o f width k . Finally , w e define the formula ϕ E ( x, y ) saying that there is an edge b etw een x a nd y in the graph G enc o ded by a Σ k -lab elled tree T := ( T , λ ). Note that there is an edge in G b etw een x and y if, and only if, there is a no de t ∈ V ( T ) and 0 ≤ i 6 = j ≤ k such that ( i, j ) ∈ edge( t ) and x is the unique leaf in the equiv alence set of ( t, i ) and y is the unique leaf in the equiv alence set of ( t, j ). This is fo rmalised b y ϕ E ( x, y ) := ∃ t _ i 6 = j  edge i,j ( t ) ∧ ∃ X ∃ Y ϕ vertex ( X ) ∧ ϕ vertex ( Y ) ∧ X 1 ( x ) ∧ Y 1 ( y ) ∧ X i ( t ) ∧ Y j ( t )  . This completes the definition o f Γ . Now, the pr oo f of the following lemma is immediate. Lemma 3. 28 Le t G b e a gr aph of tr e e-width ≤ k and L b e a le af-de c omp osition of G of width k . L et T := T ( G, L ) b e t he tr e e-enc o ding of L and G . Then G ∼ = Γ ( T ) . F u rther, by the interpr etation lemma, for al l MSO - formulas ϕ and al l Σ k - tr e es T | = ϕ valid , T | = Γ ( ϕ ) ⇐ ⇒ Γ ( T ) | = ϕ. 3.4 Courcelle’s Theorem In this sectio n a nd the next we consider computational problems for monadic second-or der lo gic on graph classes of small tree-width. The alg orithmic the- ory of MSO on g raph classes of small tree-width has, essentially indep enden tly , bee n developed by Courcelle, Seese a nd v arious co-a uthors. W e first co nsider the mo del-ch ecking problem for MSO and present Cour celle’s theorem. W e then state a similar theorem by Arnborg , Lagergr een and Seese concerning the evaluation pr oblem of MSO . In the next section, we c o nsider the satisfiability problem and prov e Seese’s theor e m. Theorem 3.29 ( Cour c el le [13] ) The pr oblem MC ( MSO , t w) Input: Graph G , ϕ ∈ MSO Par ameter: | ϕ | + tw( G ) Pr oblem: G | = ϕ ? 27 is fixe d p ar ameter tra ctable and c an b e solve d in t ime f ( | ϕ | ) + 2 p (tw( G )) · | G | , for a p olynomial p and a c omputable function f : N → N . That is, the mo del-che cking pr oblem for a fixe d formula ϕ ∈ MSO c an b e solve d in line ar time on any class of gr aphs of b ounde d tr e e-width. Pro of. Let C b e a class of b ounded tree-width and let k b e an upp er b ound for the tree-width of C . L e t ϕ ∈ MSO b e given. On input G ∈ C we first compute an order ed leaf-dec o mpos ition L of G of width k . F ro m this, w e c o mpute the tree T := T ( G, L ). W e then chec k whether T | = Γ ( ϕ ), w he r e Γ is the MSO - in terpreta tion of the previous section. Correctness of the algo rithm follows fro m Lemma 3 .28. The time b ounds follow from Lemma 3.24 and the fact tha t MS O mo del-checking is in linear time (for a fix e d for m ula) on the class of trees (see e.g. [6 1, Chapter 7 ] or [46, Chapter 10]).  W e will s ee a different pro of of this theor em using lo gical types later when we prov e Lemma 7.13. The result immediately implies that par ametrized proble ms such as the independence set o r do minating set problem or proble ms such as 3-colour abilit y and Hamiltonicity a re solv a ble in linear time on classes o f graphs of bo unded tr ee-width. Without pro of we state the following extensio n of Courcelle’s theorem which essentially follows fro m [4 ]. The pro of uses the sa me metho ds as descr ibed ab ov e and the co rresp onding res ult for trees. Theorem 3.30 ( Arnb or g, L ager gr e en, Se ese [4] ) The pr oblem Input: Graph G , ϕ ( X ) ∈ MSO , k ∈ N . Par ameter: | ϕ | + tw( G ). Pr oblem: Determine whether there is a set S ⊆ V ( G ) such that G | = ϕ ( S ) and | S | ≤ k a nd co mpute one if it exists. is fix e d-p ar ameter tr actable and c an b e solve d by an algorithm with run ning time f ( | ϕ | ) + 2 p (tw( G )) · | G | , for a p olynomial p and a c omputable function f : N → N . Recall that by the res ults discussed in Section 3.2 the previous re sults also hold for MSO on incidence gra phs, i.e. MSO 2 where quantifi catio n ov er s ets of edges is a llo wed also . Corollary 3. 31 The r esults in The or em 3.29 and 3.30 extend to MSO 2 . 3.5 Seese’s Theorem W e close this section with another application of the int erpr etation defined in Section 3.3. Recall that MSO 2 has set quant ificatio n ov er sets of vertices as w ell as sets o f edges and cor resp onds to MSO interpreted over the incidence enco ding of graphs. 28 Theorem 3.32 ( Se ese [79] ) L et k ∈ N b e fixe d. The MSO 2 -the ory of the class of gra phs of t re e- width at most k is de cidable. Pro of. Let Γ := ( ϕ univ , ϕ valid , ϕ E ) b e the int erpr etation defined in Sectio n 3.3. On input ϕ we first construc t the formula ϕ ∗ := Γ ( ϕ ). Using the de c idabilit y of the MSO -theory of finite lab elled trees, we then test whether ther e is a Σ k - lab elled tree T suc h that T | = ϕ valid ∧ ϕ ∗ . If ther e is such a tr ee T , then, as T | = ϕ valid , ther e is a gr aph G of tree-width at most k enco ded by T whic h satisfies ϕ . O therwise, ϕ is not satisfiable by any graph o f tr ee-width at most k .  Again without pro of, we remar k that the following v aria n t of Seese’s theorem is also tr ue. Theorem 3.33 ( A d ler, Gr ohe, Kr eutz er [1] ) F or every k it is de cidable whether a given MSO -formula is satisfie d by a gr aph of tre e- width exactly k . W e remark that there is a kind of conv erse to Seese’s theorem which we will prov e in Section 6 b elow. Theorem 3.34 ( Se ese [79] ) If C is a class of gr aphs with a de cidable MSO 2 - the ory, then C has b oun de d tr e e-width. The pro of o f this theorem r elies on a result prov ed b y Ro bertso n a nd Seymour as part o f their pro of of the gr aph mino r theorem. W e will present the graph theory needed for this in Section 5 and a pro of of Theor em 3.3 4 in Section 6. 4 F rom T rees to Cliques In the previo us section we considered g raphs that a re sufficiently tree-like s o that efficient mo del-chec king algorithms for monadic second-o rder log ic can b e devised fo llo wing the tr e e -structure of the decomp o sition. On a technical level these results rely on F eferman- V aught style results allowing to infer the truth of an MSO sentence in a g raph from the MSO t yp es of the smaller subgraphs it can be decomp osed into. In this section we will see a different prop erty of graphs that also a llo ws for efficie nt MSO mo del-chec king. It is not based on the ide a of decomp osing the gr aph in to smaller parts o f low er complexity , but ins tead it is based on the idea of the graphs being uniform in some wa y , i.e. not having too many t yp es of its vertices. As a first exa mple let us conside r the class { K n : n ∈ N } of cliques. O b vi- ously , these gr a phs have as many edges as p ossible and canno t b e dec o mpos ed in any meaningful way into parts o f low er complexity . Howev er, mo del-chec king for first-order logic or mona dic s econd-order logic is simple, as a ll vertices lo ok the same. In a wa y , a clique is no more complex than a set: the edges do not imp ose any meaningful s tructure o n the gr a ph. This intuition is gener alised by the notion of clique-width of a graph. It was origina lly defined in terms of g raph grammar s by Courc elle, Eng elfriet and Rozenberg [17]. Independently , W anke introduce d 29 k -NLC g raphs, a notion that is equiv a len t to Courcelle et al.’s definition up to a factor of 2. The ter m clique-width was introduced in [19]. Clique-decomp ositions (or k -expressio ns as they ar e ca lled) a re useful for the desig n of a lgorithms, as they aga in provide a tree-structure along which algorithms can work. Ho wev er, un til rece n tly algorithms using clique-decomp ositions had to b e given the de- comp osition as input, a s no fix ed-parameter algor ithms were k no wn to co mpute the decomp osition. In 200 6, Oum a nd Seymour [69] intro duced the notion of r ank-width and corres p onding r ank-de c omp ositions , a no tion that is br oadly eq uiv alent to c lique- width in the s e nse that for every class of graphs, one is b ounded if, and only if, the other is b ounded. Rank-deco mpositio ns ca n b e computed by fpt-algorithms parametrized by the width and fro m a rank- decompo sition a clique- decompo sition can b e generated. In this wa y , the requirement of alg orithms be ing g iven the de- comp osition as input has b een remov ed. But rank-deco mpositio ns are a ls o in many other wa ys the more elegant notion. W e fir st recall the definition of clique-width in Se c tion 4.1. In Se c tion 4.2, we then introduce general rank - decompo sitions of submo dular functions, of which the r ank-width of a gra ph is a s pecia l case. As a side effect, we a lso obtain the notion of branch-width, which is another ele gant characterisatio n of tree-width. Mo del-chec k ing a lgorithms for MSO on graph classes o f bo unded ra nk-width are presented in Section 4 .3, where w e also consider the satisfia bilit y pro blem for MSO a nd a conjectur e by Sees e. 4.1 Clique-Wi dth Definition 4. 1 ( k -expression) L et k ∈ N b e fixe d. The set of k - expressions is k -expr ession inductively define d as fol lows: (i) i is a k -expr ession for al l i ∈ [ k ] . (ii) If i 6 = j ∈ [ k ] and ϕ is a k -expr ession, t hen so ar e edge i − j ( ϕ ) and rename i → j ( ϕ ) . (iii) If ϕ 1 , ϕ 2 ar e k -expr essions, then so is ( ϕ 1 ⊕ ϕ 2 ) . A k -expre s sion ϕ genera tes a g raph G ( ϕ ) co loured by co lours from [ k ] as follows: The k -express io n i g enerates a gr aph with one vertex colour ed b y the i colour i and no edges. The expres sion edg e i − j is used to add edges. If ϕ is a k -express ion generat- edge i − j ing the coloured gr aph G := G ( ϕ ) then edge i − j ( ϕ ) de fines the g raph H with V ( H ) := V ( G ) and E ( H ) := E ( G ) ∪  { u, v } : u has colo ur i and v has colour j  . Hence, edge i − j ( ϕ ) adds edges b etw e en a ll vertices with colour i and all vertices with colour j . The op eration re name i → j ( ϕ ) reco lours the graph. Given the g raph G gen- rename i → j ( ϕ ) erated b y ϕ , the k -e xpression r ename i → j ( ϕ ) generates the gra ph obtained from 30 G b y giving all vertices which hav e colour i in G the colour j in H . All other vertices keep their colour. Finally , if ϕ 1 , ϕ 2 are k -expr essions genera ting colour ed gra phs G 1 , G 2 resp ec- tively , then ( ϕ 1 ⊕ ϕ 2 ) defines the disjoint union of G 1 and G 2 . W e illustrate the definition by an example. Example 4.2 Consider again t he gr aph fr om Example 3.2 depicte d in Figur e 3. F or c onvenienc e, t he gr aph is r ep e ate d b elow. We wil l show how this gr aph c an 1 2 3 4 5 6 7 8 9 10 11 Fig. 4. Graph from Example 3.2 b e obtaine d by a 6 -expr ession. Consider the expr ess ion ϕ 0 in Figur e 5 , which gener ates t he gr aph in Figur e 6 a ) . The lab els in the gr aph r epr esent t he c olours. Her e we use obvious abbr evia- tions s u ch as edge i − j,s − t to cr e ate e dges b etwe en i and j as wel l as e dges b etwe en s and t in one step. edge 2 − 3 4 − 5 2 − 4 ⊕ edge 2 − 5 edge 3 − 4 ⊕ ⊕ 2 5 3 4 Fig. 5 . The 6-expr ession ϕ 0 generating the graph in Fig. 6 a) 31 The vertic es gener ate d so far c orr esp ond to the vertic es 5 , 6 , 9 , 10 of t he gr aph in Figur e 4. Note that we have alr e ady cr e ate d al l e dges incident to vertex 9 . Henc e, in the c onstru ct ion of the r est of the gr aph, the vertex 9 (having c olour 2 ) do es not have t o b e c onsider e d any mor e. We wil l use t he c olour 0 to mark vertic es t hat wil l not b e c onsider e d in further steps of the k -expr ession. L et ϕ 1 := rename 2 → 0 ( ϕ 0 ) b e the 6 - expr ession that gener ates the gr aph in Figur e 6 a), but wher e the vert ex with c olour 2 now has c olour 0 . The nex t step is to gener ate the vertex 11 of the gr aph. This is done by the expr ession ϕ 2 := rename 5 → 0  edge 1 − 5 , 1 − 4  1 ⊕ ϕ 1   . We pr o c e e d by adding the vertic es 1 and 3 and the appr opriate e dges. L et ϕ 3 := re name 3 → 0 , 4 → 0 edge 2 − 3 , 4 − 5 , 1 − 5  ϕ 2 ⊕  edge 2 − 5 ( 2 ⊕ 5 )   This gener ates the gr aph depicte d in Figur e 6 b ) . The next step is to add the vertic es 7 and 8 . L et ϕ 4 := rename 1 → 0 edge 1 − 3 , 1 − 4 , 3 − 5  ϕ 3 ⊕ edge 3 − 4 ( 3 ⊕ 4 )  Final ly, we add the vertex 2 and r ename the c olour of the vert ex 2 to 0 , i.e. es- sential ly r emove the c olour, and r ename al l other c olours to 1 . ϕ 5 := re name 2 → 0 , 5 → 1 , 3 → 1 , 4 → 1 edge 1 − 2 , 1 − 5 ( 1 ⊕ ϕ 4 ) This gener ates the gr aph in Figur e 6 c ) . 3 4 2 5 2 5 0 0 0 0 1 0 1 1 0 0 1 1 0 0 0 a ) G ( ϕ 1 ) b ) G ( ϕ 3 ) c ) G ( ϕ 5 ) Fig. 6 . Gra phs gener ated by the 6-ex pressions in Example 4.2 Final ly, we add the vertex 4 and e dges to al l other vertic es marke d by the c olour 1 . The c omplete expr ession gener ating the gr aph is ther efor e edg e 1 − 2 ( 2 ⊕ ϕ 5 ) . ⊣ It is ea sily seen that every finite gr a ph can b e generated by a k -expr ession for so me k ∈ N . Jus t cho ose a colour for each vertex a nd add e dg es accor dingly . 32 Lemma 4. 3 Every fi nite gr aph c an b e gener ate d 4 by a k -expr ession for some k ∈ N . Hence, the following concepts a re well defined. Definition 4. 4 The clique-width cw ( G ) of a gr aph G is define d as the le ast clique-width k ∈ N su ch that G c an b e gener ate d by a k - ex pr ession. A class C of gr aphs has bo unded c liq ue-width if ther e is a k ∈ N su ch that cw ( G ) ≤ k for al l G ∈ C . W e give a few more examples. Example 4.5 1. The class of cliques has clique-width 2 . (Clique-width 2 , as the edg e i,j op er ator r e quir es i 6 = j to avoid self-lo ops). 2. The class of al l tr e es has clique-width 3 . By induction on the height of the tr e es we show that for e ach tr e e T ther e is a 3 -expr ess ion gener ating t his tre e so that the r o ot is c olour e d by the c olour 1 and al l other no des ar e c olour e d by 0 . This is trivial for t r e es of height 0 . Supp ose T is a tr e e of height n + 1 with r o ot r and suc c essors v 1 , . . . , v k of r . F or 1 ≤ i ≤ k let ϕ i b e a 3 - expr ession gener ating the subtr e e of T r o ote d at v i . Then T is gener ate d by the ex pr ession rename 2 → 1 rename 1 → 0 edge 2 − 1 ( 2 ⊕ ϕ 1 ⊕ · · · ⊕ ϕ k ) . 3. It c an b e shown t hat t he clique-width of the ( n × n ) -grid is Ω ( n ) . (This fol lows, for instanc e, fr om The or em 4.7 b elow). ⊣ The next theorem due to W anke a nd also Co ur celle and Olariu r elates clique- width to tree-width. Theorem 4.6 ( [89,19] ) Every gr aph of tr e e-width at most k has clique-width at most 2 k +1 + 1 . As the examples a b ov e show, there is no hop e to b ound the tree- width of a g raph in terms of its clique-w idth. Hence, clique-width is mor e gener al than tree-width in the sens e that more graph classes hav e b ounded clique-width than bo unded tree-w idth. Gurski and W anke [55] established the following r elation betw een clique- width and tree-width in terms of complete bipartite subgraphs. Theorem 4.7 ( Gurski, W anke [55] ) L et G b e a gr aph of clique-width 5 k s u ch that for some n > 1 the c omplete bip artite gr aph K n,n is not a sub gr aph of G . Then tw( G ) ≤ 3 k ( n − 1) − 1 . 4 By “generating” w e alw ays mean up to isomorphism. That is, a graph G is generated by an expression ϕ if ϕ defin es a graph isomorphic to G . 5 In [89] W anke in tro duced the notion of k -nod e lab el controll ed graphs ( k -NLC). They are d efi ned by similar op erations as in k - expressions and for every graph G we hav e cw ( G ) ≤ nlc( G ) ≤ 2 · cw ( G ), where nlc( G ) denotes the NLC-width. The result in [55] is actually stated and p ro ved in terms of N LC-width . 33 Another interesting r e la tion b etw een clique- width a nd tree- width follows from a connec tion, due to Oum [68], b etw een the br anch-width o f a graph and the rank-width of its incidence gr aph which we will present at the end of Section 4.2. As seen in the previo us sectio n, the notion of tree-width is preserved by taking subgraphs, induced subgr aphs, minors , and other transformatio ns. Clique- width is less ro bust. It is easily seen that clique-width is preserved under taking induced subgraphs. But it is no t preserved under taking ar bitrary subgraphs and hence not preserved under taking minors. F o r instance, cliques hav e clique-width 2 but every graph is a subg raph of a c lique and we k now that there are graphs o f arbitrar ily high clique-width. Prop osition 4.8 (i) If G is a gr aph and H is an induc e d sub gr aph of G , then c w( H ) ≤ cw( G ) . (ii) Clique-width is not pr eserve d u nder taking su b gr aphs and henc e not pr e- serve d under taking m inors. That is, t her e ar e gra phs G and H ⊆ G with cw( H ) > cw ( G ) and the differ enc e c an b e arbitr arily lar ge. W e close this section with a negative result concerning the complexity of deciding clique-w idth and rela ted measur es. Gur s ki and W anke show ed that deciding the NLC-width of a gra ph is NP-co mplete. F or clique-width, this was shown by F ellows, Ros amond, Ro tics and Szeider. Theorem 4.9 1. Given a gr aph G and an inte ger k , the pr oblem to de cide whether G has NLC-width at most k is NP-c omplete (se e [56]). 2. Given a gr aph G and an inte ger k , the pr oblem to de cide whether G has clique-width at most k is NP-c omplete (se e [42]). How e v er, as we will see in the next section, ther e are FPT-a lgorithms, para- metrized b y the clique- width, to compute an a pproximate clique-deco mpositio n of a given graph. Finally , we mention a result by Esp elage, Gurs k i and W anke [41], that the clique-width of a graph can b e computed in linear time on gra ph classes of bo unded tr ee-width. 4.2 Rank-Width In this section we co nsider an alterna tiv e characterisation of graph clas ses o f bo unded c liq ue-width – the ra nk-width of a graph. Ra nk-width is a spec ial cas e of abstract br anch-de c omp ositions of connectivity functions which we pr e sen t first. Another sp ecial case o f this abstract notion is the br anch-width of gr aphs , a notion that is equiv alent up to a small constant factor to tr e e-width. Branc h-de comp ositions of connectivity functions Let M b e a finite no n- empt y set a nd f : 2 M → R b e a function. A br anch-de c omp osition of the pair abstr act br anch-de c omp osition ( M , f ) is a pa ir ( T , β ) co ns isting of a binary tree T and a bijection β : L ( T ) → M 34 from the set L ( T ) of leaves o f T to M . W e inductively define a map β ∗ : V ( T ) → 2 M by s etting β ∗ ( t ) := ( { β ( t ) } if t is a lea f β ∗ ( t 1 ) ∪ β ∗ ( t 2 ) if t is an inner no de with successor s t 1 ∪ t 2 . The width of ( T , β ) is defined as max { f ( β ∗ ( t )) : t ∈ V ( T ) } a nd the br anch-width wi dth of ( T , β ) of ( M , f ) is defined as the minimal width of any of its br a nc h-deco mp ositions . abstr act br anch-width If M is empty , we define the bra nc h-width of M to b e f ( ∅ ). Note that in this case, ( M , f ) do es not have a br anc h-deco mpositio n, as a tr ee, being connected, cannot be empty . Of particular interest are branch-decomp o sitions of co nnectivit y functions f which are integer v alued, symmetric and submo dular. A function f : 2 M → R is symmetric if f ( A ) = f ( M \ A ) for all A ⊆ M and it is submo dular if symmetric submo dular f ( A ) + f ( B ) ≥ f ( A ∩ B ) + f ( A ∪ B ) for all A, B ⊆ M . Submo dular a nd symmetric connectivity functions ar e alg orithmically particular ly well-behaved. Note that if f is s ymmetric we can take the tree T of a branch-decomp osition of ( M , f ) to b e undirected and cubic (i.e. every v ertex ha s degree 1 or 3 ). W e will o ccas io nally do s o, for instance in Figur e 7 b elow. In [6 9], Oum and Seymour show ed that optimal branch-decomp ositions of submo dular, symmetric, and int eger v alued connectivity functions ca n b e ap- proximated up to a fa ctor 3 by an fpt-algorithm. Before w e can state the re s ult we need to define how the input to s uch a n algo rithm is r epresented. Let M b e a clas s of pairs ( M , f ), wher e f : 2 M → N is symmetric and submo dular. M is a tr actable class of c onne ctivity fun ct ions if ther e is a repr esen tation o f the pairs tr actable class ( M , f ) ∈ M such that, given the repr esen tation of a pair ( M , f ), the underly ing set M and the v alues f ( A ) can b e computed in p olynomial time for all A ⊆ M . W e are primarily in terested in certain connectivity functions naturally asso- ciated with graphs and in this cas e the gra ph itself will be the repr esent atio n. Theorem 4.10 ( Oum, Seymour [69] ) L et M b e a tr actable class of c onne ctivity functions. Then ther e is an fpt-algorithm t hat, on input (the r epr esentation of ) ( M , f ) and a p ar ameter k , c omputes a br anch-de c omp osition of ( M , f ) of width at most 3 k pr ovide d t hat the br anch-width of ( M , f ) is at most k . If the br anch- width of ( M , f ) is gr e ater than k , then the algorithm may halt without output or stil l c omput e a br anch-de c omp osition of ( M , f ) of width ≤ 3 k . As a fir st exa mple of abstra ct branch-decomp ositions we consider the branch- width of graphs. Branc h-W idth of Graphs Let G b e a gra ph. The b oundary ∂ F of a set b oundary, ∂ F F ⊆ E ( G ) is defined as the s e t o f vertices incident to an edge in F a nd a lso a n edge in E ( G ) \ F . W e define a function b G : 2 E ( G ) → N by b G ( F ) := | ∂ F | for all F ⊆ E ( G ). The function b G is symmetric and submo dular. A br anch-de c omp osition of G is a br anch-de c omp osition branch-decompo sition o f ( E ( G ) , b G ) and the br anch-width bw( G ) of G is defined br anch-width as the branch-width of ( E ( G ) , b G ). 35 Example 4.1 1 Figur e 7 shows a gr aph and its br anch-de c omp osition of width 2 . F or example, β ∗ ( d ) =  { 1 , 5 } , { 3 , 5 }  and ∂ β ∗ ( d ) = { 1 , 3 } , as the vertex 5 has no e dge to a vertex other t han 1 , 3 . Similarly, ∂ β ∗ ( b ) = ∂ β ∗ ( e ) = ∂ β ∗ ( e ) = { 1 , 3 } and ∂ β ∗ ( f ) = { 3 , 4 } . 4 1 6 3 2 5 a b c d e f { 1 , 4 } { 3 , 5 } { 1 , 5 } { 3 , 2 } { 2 , 1 } { 6 , 4 } { 3 , 6 } a) Graph G b) Branch-decomp osition of G of width 2. Fig. 7 . Br anc h-deco mpositio n of width 2 ⊣ Example 4.1 2 ( R ob ertson, Seymour [7 3 ] ) 1. F or every n ≥ 3 , the n -clique K n has br anch-width 2 3 · n . 2. F or al l n ≥ 2 , the n × n -grid has br anch-width n . 3. A gr aph has br anch-width 0 if, and only if, it has maximal de gre e at most 1 . 4. T r e es and cycles have br anch-width at most 2 . ⊣ As the following theor em shows, the branch-width of a gr aph is equiv ale nt to its tr ee-width up to a small consta nt factor. Theorem 4.13 ( R ob ertson, Seymour [73] ) F or al l gr aphs G bw( G ) ≤ t w ( G ) + 1 ≤ max { 2 , 3 2 bw( G ) } . Pro of. T o s ho w bw( G ) ≤ t w ( G )+ 1, le t T := ( T , ( B t ) t ∈ V ( T ) ) b e a tr ee-decomp osi- tion of G of width k := tw( G ), s uc h that T is a bina ry tree and every edge of G is cov ered by exactly o ne leaf o f T . Clear ly , given a tre e -decomp o sition of G w e can easily find one of the same width with this a dditio na l prop erty . W e define a branch-decompo sition B := ( T ′ , β ) of G a s follows: T ′ = T and fo r a leaf t ∈ L ( T ) of T we se t β ( t ) := e , where e is the (unique) edge cov e red by B t . W e define β ∗ : V ( T ) → 2 E ( G ) as b e fo re. It is easily seen that for all t ∈ V ( T ), ∂ β ∗ ( t ) ⊆ B t and hence the width of B is at most k + 1. Conv ersely , let B := ( T , β ) b e a br a nc h-deco mp osition of G o f width bw( G ). F or each t ∈ V ( T ) we define B t ⊆ V ( G ) as follows. If t is a leaf of T define B t := β ( t ). Now let t b e an inner no de with children t 1 , t 2 . F or i = 1 , 2 let F i := β ∗ ( t i ) a nd let F 3 :=  E ( G ) \ β ∗ ( t )  =  E ( G ) \ ( F 1 ∪ F 2 )  . W e define B t := ∂ F 1 ∪ ∂ F 2 ∪ ∂ F 3 . By construction, | F i | ≤ bw( G ). W e claim that for all v ∈ V ( G ), if v o ccurs in some ∂ F i then it also o ccurs in ∂ F j for some j 6 = i . F or, if v ∈ ∂ F i then there m ust be edges e ∈ F i and e ′ ∈ E ( G ) \ F i with v ∈ e and v ∈ e ′ . Hence, e ′ ∈ F j for some j 6 = i a nd therefor e v ∈ ∂ F j . If follows that | B t | ≤ max { 2 , 3 2 bw( G ) } . 36 Now let T := ( T , ( B t ) t ∈ V ( T ) ). It is easily verified that T is indeed a tr e e- decomp osition of G . 6 Hence, we obta in a tree-decomp osition of G of w idth ≤ max { 2 , 3 2 bw( G ) } − 1.  In principle one can use the gener al algorithm fro m Theorem 4 .1 0 to co mpute approximate branch-decomp ositions of gr aphs. How ever, a s for the cas e of tree- width, better a lgorithms are known. Theorem 4.14 ( Bo d laender, Thiliko s [7] ) Ther e is an algorithm that, given a gr aph G and k ∈ N , c omputes a br anch-de c omp osition of G of width at most k , if it exists, in t ime f ( k ) · | G | , for some c omputable function f : N → N . Clique- and R ank-Width W e now turn back to the orig inal goa l of giving a different characterisation of clique-width o f a gr aph in terms of its r ank-width . Recall that the branch-width of a graph is base d on a dec ompos ition of its edg e set. F or rank -width we decomp ose its vertex set. Let G b e a gra ph. F or U, W ⊆ V ( G ) we define a | U | × | W | -ma trix M G ( U, W ) with en tries m u,w for u ∈ U and w ∈ W , where M G ( U, W ) m u,w := ( 1 if { u, w } ∈ E ( G ) 0 otherwise . Note that M G ( V ( G ) , V ( G )) is the adjacency matrix of G . F o r a ll U, W ⊆ V ( G ) let rk  M G ( U, W )  be its row rank when viewed as a matrix ov er GF(2). This rk ` M G ( U, W ) ´ induces the following c o nnectivit y function r G : 2 V ( G ) → N defined a s r G ( U ) := r k  M G ( U, V ( G ) \ U )  for U ⊆ V ( G ). O b viously , r G is symmetric, as the row and column rank of the matrix coincide. It is le ft as an exercise to show that it is a lso s ubmodular . Definition 4. 15 A rank-deco mpos itio n of a gr aph G is a br anch-de c omp osition of t he p air ( V ( G ) , r G ) . The rank- width of G , in terms r w( G ) , is t he minimal r ank-width, rw ( G ) width of any of its r ank-de c omp ositions. Example 4.1 6 Consider again the gr aph G fr om Ex ample 3.2 depicte d in Fig- ur e 3. The fol lowing is a r ank-de c omp osition of G of width 3 . • a b c d • • • • • 9 10 5 6 1 3 7 8 11 4 2 6 At least if G h as no isolated vertices. If it do es, add a bag for eac h isolated vertex. 37 The r elevant matric es determining t he width of the de c omp osition ar e the matri- c es M a , . . . , M d at t he no des a, . . . , d . M c := M G  { 5 , 6 , 9 , 10 } , { 1 , 2 , 3 , 4 , 7 , 8 , 11 }  =     1 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1     M d := M G  { 7 , 8 , 11 } , { 1 , 2 , 3 , 4 , 5 , 6 , 9 , 10 }  =   0 0 1 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 1 0 1   M a := M G  { 1 , 3 , 5 , 6 , 9 , 10 } , { 2 , 4 , 7 , 8 , 11 }  =         1 0 0 0 0 1 1 1 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1         M b := M G  { 2 , 4 , 7 , 8 , 11 } , { 1 , 3 , 5 , 6 , 9 , 1 0 }  =       1 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 1       Obviously, rk( M a ) = rk( M b ) = rk( M c ) = 3 and t his is t he max imal r ank o c cur- ring in the de c omp osition. H enc e, the de c omp osition has width 3 . ⊣ It is not to o hard to se e that the rank-width of a g raph can b e bo unded in terms of its branch-width and hence its tr e e -width. The following theorem due to Oum g iv es an exact bound. Theorem 4.17 ( Oum [68 ] ) r w( G ) ≤ max { 1 , bw( G ) } for al l gr aphs G . It is eas ily seen that the rank of width a co mplete gr aph is 1 (all entries in all matrices ar e 1 ). Hence, there can b e an arbitrarily larg e difference b etw e en the rank- width and the br a nc h-width of a gr aph. On the other hand, Oum [68] prov ed that if I ( K n ) denotes the incidenc e g raph of the n -clique K n , then for all n ≥ 3 with n = 0 , 1 mo d 3 we have rw( I ( K n )) = bw( I ( K n )) = ⌈ 2 3 · n ⌉ . Another exa mple of gr aphs of high tre e - and high r ank-width ar e n × n -grids, whose rank-width has been shown by Je l ´ ınek [58] to b e n . An fpt-algorithm for co mputing rank -decomp o sitions follows fro m Theo- rem 4.10 but mo re efficient alg orithms are known. Theorem 4.18 ( Hlineny, Oum [40] ) Ther e is an algorithm that, given a gr aph G and k ∈ N , c omputes a r ank-de c omp osition of G of width at most k , pr ovide d rw( G ) ≤ k , in t ime f ( k ) · | G | 3 , for some c omputable funct ion f : N → N . 38 Oum a nd Seymour [69] es tablished the following c o nnection b etw een ra nk- width and clique-width: rw( G ) ≤ cw ( G ) ≤ 2 rw( G )+1 − 1 . In particular , a class of graphs has b ounded clique-width if, and only if, it has bo unded rank-width (see [69]). T ogether with Theorem 4.1 8 this yields a par am- eterized algorithm for computing a pproximate cliq ue - decompo sitions o f gra phs. W e have alre a dy seen that clique-width and tree-width and hence br a nc h- width o f g raphs can differ arbitra rily a nd this clea rly extends to ra nk -width. How e v er, Oum [68] established the following rela tion b etw een the branch-width of a graph and the ra nk-width of the incidence graph. bw( G ) − 1 ≤ rw ( I ( G )) ≤ bw( G ) 4.3 Monadic Second-Order Logic and Bounded Cli que-Width In this section w e aim at e xtending Courcelle’s a nd Seese’s theo r ems from tree- width to clique-width. As in Section 3, we will do s o by a reduction to MSO mo del-ch ecking and satisfia bilit y on trees. In particular, we show next that for each k the cla ss of gr aphs of clique-width k can b e interpreted in the class of coloured trees for a suitable set o f colo urs dep ending on k . The idea is simple: the class of graphs o f clique-width k is the clas s o f graphs g enerated by k -expr e ssions whose syntax trees will b e the class of trees we are loo king for . Hence, let Σ k := { 0 , . . . , k − 1 , ⊕ , edge i,j , rename i → j : 0 ≤ i 6 = j < k } be the sy m b ols used in k -expressio ns and let T Σ k be the cla ss of all Σ k -lab elled directed trees. Obviously , not every Σ k -lab elled tree is the syntax tree of a k - expression. How ever, every Σ k -lab elled directed tree such that the symbol ⊕ o ccurs precise ly at the no des with t wo successor s, no no de has mo re than tw o successor s a nd the leaves are pr ecisely the no des lab elled by a symbol from { 0 , . . . , k − 1 } a re sy n tax trees o f k -ex pressions. These conditions are easily ex- pressed by an MS O -sentence ϕ valid . Hence, for all T ∈ T Σ k , T | = ϕ valid if, and only if, T is the syntax tr ee of a k -e x pression. The formula ϕ valid is one part of an interpretation Γ k :=  ϕ univ , ϕ valid , ϕ E ( x, y )  from Σ k -lab elled trees to g raphs of clique-width at most k . The formula ϕ univ ( x ) defining the universe of a gra ph generated by a k - expression co ded in a tree T is tr ivial: ϕ univ ( x ) just defines the set of leaves. Finally , we have to define the for m ula ϕ E ( x, y ) such tha t for all T ∈ T Σ with T | = ϕ valid and all leav es u, v ∈ V ( T ) we have T | = ϕ E ( u, v ) if, and only if, ther e is an edge b etw ee n u and v in the graph G g enerated by T . Note that such an edge exists if, and only if, there is a common ancesto r t of u a nd v in T lab elled by e dge i − j , for some 0 ≤ i 6 = j < k , so that a t the node t , one o f u, v has co lour i and the other the colour j . T o chec k this, we only need to lo ok a t the unique path from t to u (a nd v resp ectively) and keep track of how the colour of u (resp. v ) changes alo ng this path. This can easily b e forma lis ed in MSO by a 39 formula ϕ E ( x, y ) a s req uir ed. Hence, the triple Γ k := ( ϕ univ ( x ) , ϕ valid , ϕ E ( x, y ) ) is an int erpr etation from σ k -structures to graphs, wher e σ k := { E } ∪ Σ k is the signature of Σ k -lab elled tre e s. The interpretation is the key to tractability results for MSO mo del-chec k ing and satisfiability . W e co nsider mo del-chec king first and pr ove the following ex- tension of Cour c elle’s theor em. It was firs t pr ov e d by Co ur celle in ter ms of certa in graph gra mmars (see [12,14]) and then by Co urcelle, Mako wski a nd Rotics for graph c la sses of b ounded clique-width. Theorem 4.19 ( Cour c el le, Makowski, R otics [1 8] ) L et C b e a class of gr aphs of b ounde d clique-width. Then the mo del-che cking pr oblem for MSO on C is fixe d- p ar ameter tr actable. Pro of. Le t ϕ ∈ MSO b e fixed and let k b e an upp e r b ound for the clique-width of the g raphs in C . Given a g r aph G we fir st compute a k -express ion ϑ gene r ating G . This can be do ne in p olynomial time (see Se c tio n 4.2). Let T b e the Σ k -lab elled syntax tree of ϑ . W e can now test whether T | = Γ k ( ϕ ).  W e now consider the satisfiability problem for monadic second-or der lo gic. Theorem 4.20 F or every k , t he MSO - the ory of t he class C W k of gr aphs of clique-width at most k is de cidable. Pro of. Let ϕ ∈ MSO [ { E } ] b e given. By the interpretation lemma, ϕ is v alid in C W k if, and only if, Γ k ( ϕ ) ∈ MSO [ σ k ] is v alid in the class { T ∈ T Σ : T | = ϕ valid } if, and only if, Γ k ( ϕ ) ∧ ϕ valid is v a lid in the class of finite Σ k -trees. The latter is well known to b e de c ida ble [31,83].  Seese co njectur ed a kind of co n verse to the theorem, the famous Sees e con- jecture [79]. Conjecture 4. 2 1 (Seese’s conjecture) Every class C of st ru ctur es with de- cidable MSO 1 -the ory has b oun de d clique-width. This co njecture ca n b e rephra sed in terms of MSO -interpretations us ing the following result due to Engelfriet and V. v an Oos trom and also Courcelle and Engelfriet. Lemma 4. 22 ( [39,16] ) A class of gr aphs has b ounde d clique-width if, and only if, it is int erpr etable in the class of c olour e d tr e es for some suitable set of c olours. Note that these pap ers use so -called MSO -transductio ns ins tead o f int erpr eta- tions. An MSO - transduction is essentially the same as an interpretation exce pt that the formulas a re allow ed to have free se cond-order v a riables, the parameters . A graph is then in terpreta ble in a tree if ther e is an interpretation of the pa- rameters b y sets of tree- nodes satisfying the formulas in the MSO -tra nsduction. Hence, the para meters play ex a ctly the s ame role as the colours of the trees we use here . As the co lours/par ameters in our co n text ar e the symbols of k - expressions , we prefer to hav e them as lab els of the syntax trees ra ther than as free v ariables in the interpretation. Using the pr evious lemma we can rephras e Seese’s conjecture as follows: 40 Conjecture 4. 2 3 (Seese’s conjecture) Every class C of st ru ctur es with de- cidable MSO 1 -the ory is MSO -interpr etable in the class of c olour e d tr e es for some set of c olours. In [20], Courcelle and Oum prov e the following weakening of the conjectur e . Let C 2 MSO b e the ex tension of MSO by ato ms Even ( X ), wher e X is a mona dic second-or der v aria ble, stating that the in terpr etation of X has even ca rdinality . Hence, C 2 MSO extends MSO b y counting mo dulo 2. Theorem 4.24 ( Cour c el le, Oum [20] ) Every class of gr aphs with a de cidable C 2 MSO the ory has b ounde d clique-width, i.e. is interpr et able in a class of c olour e d tr e es. Note tha t the theor em is weaker than Sees e ’s conjecture as there are less classes of graphs who se C 2 MSO theory is decida ble than there are classes of g raphs with a decidable MSO -theory . 4.4 MSO Mo de l-Chec king Bey ond T ree- and Clique-Wi d th In the previous section we showed that the mo del-checking problem for monadic second-or der log ic is fixed-para meter tra ctable on classes of graphs with bo unded tree- or c lique-width. There is no t muc h ho pe for extending these results to other or large r class e s of g raphs such as planar gr aphs o r g raphs of b ounded degree. This follows immediately from the following theo r em by Garey , Johnson a nd Sto c kmeyer and the fact that 3-coloura bilit y is MSO -definable. Theorem 4.25 ( Gar ey,Johnson, Sto ckmeyer [49] ) 3 -c olour ability is NP -c omple- te on the class of planar gr aphs of de gr e e at most 4 . How e v er, first-o r der logic is tractable on many mo r e class e s of gr aphs. F or in- stance, Seese [80] showed tha t first-o r der logic admits linear time mo del-checking (for a fixed formula) o n any clas s of graphs of b ounded degree. The sa me com- plexity b ound was la ter o btained by F rick a nd Grohe [47] for plana r g raphs a nd classes of g raphs o f b ounded lo c al tre e- width , a notion that pr oper ly extends b oth planarity and b ounded degree (see b elow). The mos t general r esults in this resp ect a re fixed-para meter a lgorithms for first-order mo del-chec king on H -mino r fr ee gr aphs and an extension thereof, called lo cally excluded minors. These results ma k e heavy use of concepts and results developed by Rober tson a nd Sey mour in their celebrated pro of of the graph minor theo rem. In the next section, we will therefore g ive a br ief ov erview of the relev ant concepts o f the gr a ph minor theory used in the pr oo fs. One such theorem, the excluded grid theore m, will b e used later to prov e the conv erse of Seese’s theorem ment ioned ab ov e. This will b e the topic of Section 6. W e retur n to first-or der model- c hecking in Section 7. 41 5 Graph Minors In this s e ction we pres en t relev a nt terminolog y and results from graph minor theory use d later in the pap er. Mos t of the results w ere develop ed in Ro ber tso n and Seymo ur’s celebrated pr o o f o f the gr aph minor theor em (Theo rem 5.2 b elow) presented in a series [7 4] o f 23 pap ers, with additions and improv ements by o ther authors. 5.1 Minors and Minor Ideals Let G be a graph and e := { v , w } ∈ E ( G ) b e an edge. The graph G/e obtained G/e from G by c ontr acting the edg e e is the gra ph obtained from G by removing c ontr action e , identifying its tw o endp oints, and p ossibly r emo ving para lle l edg es. F or mally , G/e is defined b y V ( G/e ) := V ( G ) \ { v , w } ∪ { x e } , where x e is a new vertex, and E ( G/e ) :=  E ( G ) \  { u, u ′ } : { u, u ′ } ∩ e 6 = ∅  ∪  { u, x e } : u ∈ V ( G/e ) and { u, v } ∈ E ( G ) o r { u, w } ∈ E ( G )  . Figure 8 illus trates edg e contraction. Fig. 8. Contracting a n edge A g r aph H is a minor of a gra ph G if H can be obtained fro m G by deleting minor vertices and edges and contracting edges. W e write H 4 G to deno te tha t H is isomorphic to a minor of G . An alter nativ e definitio n of minors is in terms of mino r maps. A minor map from H to G is a function µ that ass o cia tes with every vertex v ∈ V ( H ) a connected subgraph µ ( v ) ⊆ G and with every edge e ∈ E ( H ) an edge µ ( e ) ∈ E ( G ) s uc h that – if u, v ∈ V ( H ) and u 6 = v then µ ( v ) a nd µ ( u ) a re vertex disjoint and – if e := { u , v } ∈ E ( H ) then µ ( e ) := { u ′ , v ′ } for some u ′ ∈ V ( µ ( u )) a nd v ′ ∈ V ( µ ( v )). 42 The subg raph G µ ⊆ G with V ( G µ ) := [  V ( µ ( v )) : v ∈ V ( H )  and E ( G µ ) := [  E ( µ ( v )) : v ∈ V ( H ) } ∪ { µ ( e ) : e ∈ E ( H )  is called a mo del or image of H in G . In gra ph theo r y liter ature, the ter m mo del mo del, image is commonly used. W e prefer the name image here to avoid co nfusion with lo gical mo dels. Figure 9 illustr a tes an image of K 5 in a g raph G . Fig. 9 . Imag e of K 5 in a g raph G It is easily seen that we can always cho ose an imag e of H in G so that each vertex is represented by a tree in G . Let G, H b e gra phs. G is a s u b division o f H if H can b e obtained from G by sub division replacing some edges in G by paths which are pa irwise internally vertex disjoint, i.e. H can b e constructed fr om G b y rep eatedly su b dividing edg e s. If a subgr aph of G is iso morphic to a sub division of H , then H is called a top olo gic al minor of G . No w s upp ose H 4 G and H has maximal deg r ee 3. Let µ b e a minor ma p top olo gi c al m inor from H into G so that the image of a ll v ertices of H are trees in G . Then each of these trees has at most 3 leav es and hence at mo s t one vertex of degr ee more than tw o. It follows that every graph H of maximal degr ee ≤ 3 that is a minor of G also is a top ologica l minor of G . Lemma 5. 1 L et H , G b e gr aphs. If ∆ ( H ) ≤ 3 and H 4 G , then H is a top olo g- ic al minor of G . If H 6 4 G , we say that H is a forbidden minor of G , or that G excludes H . F or exclude d mi nor any graph H let Excl ( H ) := { G : H 6 4 G } b e the cla ss o f g r aphs not containing Exc l ( H ) H as a minor. Analogo usly , if H is a set of gr aphs, then Excl ( H ) := T  Excl ( H ) : Excl ( H ) H ∈ H } is the cla ss of graphs not containing any member of H as a minor. A class C of graphs is a minor ide al if for all G ∈ C and H 4 G also H ∈ C . minor i de al It is pr op er if it is not the class of all g raphs. pr op er minor ide al A class C is char acterise d by a class F of gr a phs if C = Excl ( F ). No te that a n y minor ideal C can b e characterise d by a class o f excluded minors, 43 e.g. C = Excl ( Graphs \ C ). As the main r esult of their fundamental w or k o n graph minors , Ro ber ts o n and Seymour prov ed that any minor idea l ca n in fact be character is ed by a fin ite set o f for bidden minors. Theorem 5.2 ( R ob ertson, Seymour [78] ) F or every minor ide al C ther e is a fi- nite s et F of gr aphs such that C = Ex cl ( F ) . There are many natur al exa mples of minor ideals. – Every cycle can b e contracted to a triangle. Hence, Excl ( K 3 ) is the cla ss of acyclic graphs. – Kura to wski’s theo rem [59] (or r ather a v ariant established b y W a gner [88]) implies that planar g raphs are characterised b y excluding K 3 , 3 and K 5 . – Series-p ar al lel graphs a nd out erplanar gr aphs ex c lude K 4 . It ca n b e s ho wn that Excl ( K 4 ) is the class of subgr a phs of ser ies-parallel gra phs and the class of o uterplanar g raphs is characterised by Excl ( K 4 , K 2 , 3 ). (See e.g. [3 0, Exercises 7.32 and 4.20].) – The class of g raphs not having k vertex disjoint cycles, for any fixed k ∈ N . F or k ∈ N let T k be the graph consis ting of k disjoin t copies of a triang le. Clearly , every graph containing k vertex disjo in t cycles c on tains T k as a minor. Conv ersely , every gr aph containing T k as a minor also contains k vertex disjo in t cyc les. Hence the class C k of gr aphs not having k disjoint cycles is characterised by T k . It is easily seen that for each k ∈ N the cla ss T k of gra phs of tree-w idth a t most k and the class B k of gra phs of branch-width at mo st k are minor ideals and s o is the class of gra phs of genus at most k . Finally , let us mention another famous example o f a minor ideal: the class of knotlessly embedda ble g raphs. On the other ha nd, the c la ss of graphs of cliq ue - width at most k is no t minor closed and hence not a mino r ideal. Also , the class of gr aphs of cros s ing num ber k ≥ 1 is not minor closed. Rob ertson and Seymour also prov ed tha t for any fixed graph H , testing if a graph G contains H as a minor c an b e done in cubic time (we will say more a b out this later in this section). Hence, combining this minor test with Theore m 5.2 implies that every minor-ideal can be dec ided in cubic time. Corollary 5. 3 Every minor ide al c an b e de cide d in cubic t ime. The v a rious concepts and results developed in the course of the pro of o f Theorem 5.2 hav e sparked of a rich algo rithmic theo ry of g raphs based on struc- tural restrictions of instances. W e hav e a lready hinted at the algorithmic theory of graphs o f b ounded tree-width. How ever, the alg orithmic applications of the graph minor theory developed by Rob ertso n and Seymour extend far b eyond tree-like gr aphs. In the following tw o sections we present s ome o f the r esults a nd metho ds with implica tio ns for algo rithms and mo del-chec king o n gra phs. How e v er, the following can only give a glimpse int o the deep results under - lying the pro of o f the g raph minor theorem – we will not even be able to sta te the relev ant res ults in full detail let alo ne attempt to prov e them. While we are 44 trying to g iv e an intuitiv e a ccount o f the results a nd pro of metho ds, we will nec- essarily hav e to b e br ief a nd the pr esen tation may not always re flec t the actual pro ofs. 5.2 Disjoint Pa ths and the T rinit y Lemma Let us try to prov e Theorem 5.2. Clearly , the statement o f the theorem is e q uiv- alent to the s ta temen t that in every infinite class of finite graphs one graph is a minor of another. Let C := { H , G 1 , G 2 , . . . } b e an infinite class of finite gra phs . If H is a minor of s ome G i , then the claim is trivially satisfied by H . Hence, the only in teresting case is when no G i ∈ C contains H as a minor . F or this reaso n, m uch of the theor y developed by Rob ertson and Seymour deals with graphs not containing another fix ed graph H as a minor . W e refer to such gr aphs as H - minor fr e e . Clea r ly , if G is H -minor free, then G also ex c ludes a clique K k as a H -minor fr e e minor, for ins tance taking k := | V ( H ) | . Let us fix k for the rest o f the section. The key to studying the structure of K k -minor free graphs is the following theorem, proved by Rob ertson and Seymour in [72]. Recall fr o m Se c tion 2 that G k × k denotes the k × k -grid. Theorem 5.4 (Excluded Grid Theorem [7 2]) Ther e is a c omputable func- tion f : N → N such that every gr aph of tr e e-width at le ast f ( k ) c ontains G k × k as a minor. W e r efer to [3 0] for a pro of o f this theo rem. As every planar graph is a minor of a s uitably larg e grid, the theo r em implies – is eq uiv alent, in fact – to the following statement. Corollary 5. 5 F or al l H , the class Excl ( H ) of H -minor fr e e gr aphs has b ounde d tr e e-width if, and only if, H is planar. The function f in the original pro of of Theo rem 5.4 was huge. In [71], Rob ert- son, Seymour and Thomas sig nifican tly improved the b ounds on f to 20 2 k 5 . How e v er, no matching lower b ounds hav e b een established and it is co njectured that the a ctual b ound may b e as sma ll as p olynomial in k . F or plana r g raphs G a m uch b etter b ound can b e obtained. Theorem 5.6 ( R ob ertson, Seymour, Thomas [71] ) Every planar gr aph with no k × k -grid minor has t r e e-width ≤ 6 k − 5 . F or branch-width a slig h tly tig h ter bo und has b een esta blis hed: every plana r graph of branch-width at least 4 k − 3 contains a k × k -grid minor (see [71]). Whereas it is still op en whether optimal tree-decomp ositions of planar gr aphs can be computed in p olynomial time, in [82] Seymour and Tho ma s prov ed that optimal br anc h-deco mpositio ns of planar g raphs can b e computed in time O ( n 4 ). This has later b een improv ed to O ( n 3 ) by Gu and T amak i [54]. It should b e noted that these algor ithms do not c on tain any large hidden constants and p erfor m reasona bly well in pra ctise. Optimal branch-decompo sitions of planar graphs 45 with up to 5 0.000 edges hav e be e n computed b y actual implementations of the algorithms (see e.g. [5]). T o give an applicatio n of the gr id-theorem on planar gr aphs, we note that it implies an 2 O ( √ k ) · n c algorithm, for some c ∈ N , for deciding whether a planar gr aph has a path of leng th k . F or this, use a n O ( n 3 ) algo r ithm for tes ting whether a given planar graph G has branch-width a t most 4 √ k − 3. If so, then one can compute a suitable branch-decompo s ition and use dynamic pro gramming to decide w hether a path of length k exis ts . Otherw is e, the pla nar gr id theorem tells us that the graph co n tains a √ k × √ k g r id as a minor and hence a pa th of length at lea st k following the gr id structure. A similar algorithmic idea has found numerous applications , for instance on H -minor free graphs, in the form of bidimensionality the ory . See e.g . [25 ,3 2,27,33,24,26,28] a nd refer ences therein. F or the res t of this section we will work with a so mewhat simpler s tructure than grids, ca lled wal ls . wal l b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b Fig. 10. Elementary walls o f height 1– 4 An elementary wal l is a graph as display ed in Figure 10. A w all of height h is a sub division o f an elementary w all of height h . See Figure 1 1 for a wall of height 4. The induced cycles of a wall, i.e. the cycle s of leng th 6 in an ele men tary wall or their s ubdivisions in ge ne r al walls, ar e called the bricks of the wall. W e brick assign co ordinates ( i, j ) = ( r ow , c ol ) to the br ic ks of a wall. The brick in the low er left cor ne r is assigned (1 , 1), its neighbour to the rig h t (1 , 2), the br ick just ab ov e it (2 , 1) a nd so o n. The c entr al brick of H is the br ic k with co ordinates c entr al brick ( ⌈ h/ 2 ⌉ , ⌈ h/ 2 ⌉ ). A c entr al vertex of a wall is a vertex contained in the c e ntral c entr al vertex brick but not in its neig hbo urs to the left or right. The o utermost (non- induced) cyc le of a wall W is c a lled its p erimeter . p erimeter Clearly , every large g rid contains a large w all as a subgra ph and conversely every large wall co n tains a la rge grid as a minor. The main adv a ntage of working with walls rather than grids is tha t if G contains a n elementary wall as a mino r then, b y Lemma 5.1, it contains a wall of the same height as a subgra ph. 46 b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b Fig. 11. A wall of height 4 Let us c ome ba c k to the a nalysis of the structure o f graphs. Let t b e a b ound on the tree-width we w ant to conside r . If G has tree-width at most t , then it is sufficiently tree- lik e and its s tructure is well understo o d. So s uppose G has larg e tree-width. By the E xcluded Gr id Theorem 5.4, we know that G contains a large wall W as a subgra ph. W e can use W a s a drawing b oard on which we dr aw the rest o f the gr aph G . Cle a rly , as G is no t r equired to b e planar, this “drawing” will not nece s sarily b e plane, i.e. edg e s may cr oss. In pa rticular, edges o r paths may span over different bricks of the wall. This is called a “cro ssing”. Mo re formally , a cross ing consists of tw o pairwise vertex-disjoint paths with endp oint s v 1 , v 3 and v 2 , v 4 such that v 1 , v 2 , v 3 , v 4 o ccur clo ckwise in this o rder on some c y cle of the grid. Figure 12 illus trates the co ncept of cro ssings. Fig. 12. Cros sings in a graph Crossings are imp o rtant for our purp ose. F or , if G contains many crossing s which, in additio n, are sufficiently far apart from each o ther o n the wall used to draw G , then we can use the cros sings to find a large clique mino r o f the gr aph. T o see this, ta k e a lar ge clique and dr aw it “flat” o n the wall W . Necessa rily 47 (unless your cliq ue ha s le ss than fiv e vertices) so me o f the edges in the clique will cr oss each other. Howev er, if the wall W is larg e e nough and there are sufficiently many cross ings fa r apa r t from each other, then w e can replace the edges o f the clique by disjoint paths in G so that edg e s that cro ss ar e replaced by disjoint paths tha t c r oss each other using a “cr ossing” in the drawing of G . The following Figure 13 illustrates this with K 5 and one cro ssing. The gr ey a reas are (essentially) the parts that are be ing contracted for e a c h vertex in the clique. Fig. 1 3. A K 5 -minor in a wall with o ne c rossing Hence, if W is large enoug h and ther e ar e many cr o ssings pairwise far apar t in W , then G contains a lar ge clique minor. So, how do es a gra ph G drawn on a large wall lo ok like if it do es not co n tain a large clique minor? As explained befor e, all but a sma ll num b er of cross ings m ust b e group ed together in a bo unded n umber of small parts of the wall. These reg ions with many cr ossings ar e called vortic es . F urther, there can b e some vertices which vortex are very well co nnec ted to the rest of the gr aph, i.e. a set X of vertices that hav e edges to arbitrar y v ertices in the gr aph, wher e edge s can b e replaced by paths of arbitrar y leng th. The vertices in X are ca lled apic es (see Fig ure 1 4). ap ex How e v er, any such well-connected vertex in X ca n b e used as a cr ossing a nd hence, if G excludes K k , there a re either at most | X | ≤  k 2  such elements, or their connections to the wall ar e concentrated on a small part of the wall W (and henc e they are part o f the vortices) s o that the cros sings ca nno t be use d to route the e dg es of a K k -minor. In this case, we will find a subw all of W which is still “larg e” and is connected only to a subset of X of size ≤  k 2  . Hence, we can cont inue the discus s ion with the s ub wall W ′ where w e do not hav e vortices and o nly a b ounded num be r of apice s. Besides the apices, there can b e other pa rts of the g r aph with direct c o n- nections to the interior of the w all, 7 which do not induce a n y further cross ings. 7 There may also b e p arts of the graph connected to the wa ll only through its p erime- ter. These parts are not relev ant here but we come back to t his in th e next section. 48 Fig. 1 4. V ortic es and apic es in a graph drawn o n a wall W e call these ext ensions . Essentially , an e x tension is a s ubgraph D of G that is co nnected to the wall only within a brick and only with at most 3 vertices. This is imp ortant as with three v ertices the extensions cannot induce further crossing s in the wall. F urthermo r e, we c a n assume that the tree-width o f any such extensio n is bo unded, as o therwise we could forg et ab out the rest o f the g r aph a nd do the same analy sis within the extensio n, either pr o ducing a la rge clique minor or a large w all with vortices, apices and extensions. Note, thoug h, that the apices may hav e connectio ns to the extensions . See Figure 15 for an illustra tion. The discussion so far presents the ma in ideas in the pro of of the next lemma, one of the imp ortant res ults in the Graph Minor Series. T o state it pr ecisely , we need some further no tation. F or a subgr aph D o f a g raph G , we let ∂ G D be the set of all vertices of D that are inc ide nt with an edge in E ( G ) \ E ( D ). In the following, let W be a wall of height at least 2 in a gra ph G and let P b e the p erimeter of W , i.e. the bo undary cycle of W . Let K ′ be the unique connected comp onent of G \ P that contains W \ P . The graph K = K ′ ∪ P is called the c omp ass of W in G . A layout of K (with r esp e ct to the wal l W in G ) is a family ( C, D 1 , . . . , D m ) of connected subgraphs of K such that: 1. K = C ∪ D 1 ∪ . . . ∪ D m , 2. W ⊆ C a nd there is no separ ation ( X, Y ) of C of or der ≤ 3 with V ( W ) ⊆ X and Y \ X 6 = ∅ , 3. ∂ G D i ⊆ V ( C ) for all i ∈ { 1 , . . . , m } , 4. | ∂ G D i | ≤ 3 for a ll i ∈ { 1 , . . . , m } , 5. ∂ G D i 6 = ∂ G D j for all i 6 = j ∈ { 1 , . . . , m } . 49 Fig. 15. Apices, extensions and connections within the subw a ll W ′ W e let C b e the gra ph obtaine d from C by adding new vertices d 1 , . . . , d m and, for 1 ≤ i ≤ m , edge s b etw een d i to the vertices in ∂ G D i and edges b etw een all vertices in ∂ G D i . Hence, for ea c h i ∈ { 1 , . . . , m } , the vertex d i together with the (at most 3) vertices in ∂ G D i form a clique. W e call C the c or e of the lay out and D 1 , . . . , D m its extensions . The layout ( C , D 1 , . . . , D m ) is flat if its c o re C is planar. Note that this implies that the core has a n embedding in the plane that extends the “s tandard plana r embedding” o f the wall W (a s s ho wn in Figure 10), bec ause the wall W ha s a unique embedding into the sphere. W e call the wall W flat (in G ) if the c o mpass o f W has a fla t layout. The following lemma, which we re fer to as the tr init y lemma, is (es s en tially) Lemma 9.8 of [76]. Concerning the unifor mity , s ee the rema rks at the end o f [76] (on page 1 09). Lemma 5. 7 (T rini t y Lemm a [76]) Ther e ar e c omputable functions f , g : N 2 → N and an algorithm A that, given a gr aph G and n on-ne gative inte gers k , h , c om- putes either 1. a tr e e-de c omp osition of G of width f ( k , h ) , 2. a K k -minor of G , or 3. a su bset X ⊆ V ( G ) with | X | <  k 2  , a wal l W of height h in G \ X , and a flat layout ( C, D 1 , . . . , D m ) of the c omp ass of W in G \ X such that the tr e e-width of e ach of t he extensions D 1 , . . . , D m is at most f ( k , h ) . F u rthermor e, the ru n ning time of the algorithm is b ounde d by g ( k , h ) · | V ( G ) | 2 . 50 Using the trinity lemma , we can now sketch the pro of of the following theorem due to Ro b ertso n and Seymour [76]. Theorem 5.8 ( R ob ertson, Seymour [76] ) The fol lowing pr oblem is fixe d-p ar a- meter tr actable with a cubic fpt algorithm. p -Disjoint-P a ths Input: Graph G , s 1 , . . . , s k , t 1 , . . . , t k ∈ V ( G ). Par ameter: k. Pr oblem: Are there k vertex disjo in t paths connecting s i and t i , 1 ≤ i ≤ k ? The idea of the algor ithm is as follows. Apply the trinity lemma on G for suitable v alues of k and h . If G has tree-width ≤ f ( k , h ), then the disjoint paths problem can b e solved by s tandard tec hniques using dyna mic programming (or by formalis ing the problem in MSO and using Co urcelle’s theorem). Otherwis e, if G contains a larg e clique minor (say at least K 3 k ), then w e can do the fol- lowing. T o simplify the pr esen tation, let us ass ume that G actually co n tains the 3 k -clique as a subgraph. If there are 2 k vertex disjoint paths connecting { s 1 , . . . , s k , t 1 , . . . , t k } to the cliq ue , then these paths together with the edg es of the clique yield the k vertex-disjoint paths connecting s i , t i as desired. Other- wise, by Menge r ’s theor em, there is a separ ator X ⊆ V ( G ) of size at most 2 k separating the clique a nd (part of ) the { s i , t i : 1 ≤ i ≤ k } . But now, the prob- lem can b e reduced to a consta nt num b er o f disjoint paths problems on s ma ller subgraphs, trying to connec t s i , t i with all p ossible co m binations of elements in the separator . If G do es not contain the clique as a subgraph but as a minor , then the argument b ecomes considerably mo re complicated, but can still b e done. Hence, the ca s e where G contains a large enoug h clique minor ca n b e s olved efficiently . Finally , co nsider the third cas e of the tr init y lemma, where G contains a lar ge wall W and we are given a flat lay out of W , its extensions and the apices . This is the tricky bit. Howev er, one can show that if W is large enough, then it must contain a subw all W ′ , which is still la rge, do es not contain any of the s i ’s o r t i ’s and is “homogeneous ” with resp ect to the a pices. Informally , ho mogeneous means that every type o f a small pa rt of the wall with resp ect to the apices is rea lised sufficiently often all over the subw all W ′ . In [76], Rob ertson and Seymour s ho w how such a ho mogeneous subw all c an b e constructed efficiently . T o simplify the pr esent ation, assume that W ′ has actually no direct connection to the apices (o ther than those using vertices of W \ W ′ ). No w supp ose there are k vertex-disjoint paths connecting s i and t i , 1 ≤ i ≤ k . So me o f these paths may use parts of W ′ . As none of the endpo in ts s i , t i is in W ′ , the paths merely cross W ′ , altho ug h they may do so in a r ather irregular a nd complicated wa y . How e v er, it can b e shown that if W ′ is homogeneo us and lar ge enough, then any such set of pa ths can b e rero uted so as to av oid a central vertex v of the wall (recall fro m ab ov e that the central vertices a re those in the middle of the wall). This implies, that k vertex-disjoint paths co nnec ting s i , t i exist in G if, and only 51 if, such pa ths exis t in G − v . Hence, we can r e move the central vertex v and start the whole pr oc e dure ag ain on the smaller graph. It seems intuitiv ely obvious that on a very la r ge wall, everything that can be r outed throug h the wall can b e routed without using the central vertex. A formal pr o o f of this is extremely complicated and uses a ma jor part of the deep structure theory developed in the g raph minor series . As mentioned ab ov e, the so lution to the dis join t paths problem was g iv en by Rob ertson a nd Seymour in [7 6]. In fact, they solve the following more gener al problem. A r o ote d gr aph ( G, v 1 , . . . , v k ) is a graph G together with v ertices v i ∈ V ( G ). A ro oted graph ( H , t 1 , . . . , t k ) is a minor of ( G, v 1 , . . . , v k ), if there is a minor map µ fro m H to G such that v i ∈ µ ( t i ) for a ll 1 ≤ i ≤ k . Theorem 5.9 ( R ob ertson, Seymour [76] ) The fol lowing pr oblem is fixe d-p ar a- meter tr actable with a cubic fpt algorithm. p -R ooted-Minor Input: Roo ted g raphs ( G, v 1 , . . . , v k ), ( H, t 1 , . . . , t k ). Par ameter: k. Pr oblem: Is ( H , t 1 , . . . , t k ) a minor of ( G, v 1 , . . . , v k )? Clearly , this implies Theo rem 5 .8 and also Coro llary 5.3. This is a truly remark able c o nsequence of the pro of of the g raph minor theor e m. Note, how ever, that the statement is purely existential. F o r every minor ideal there is a finite set of excluded minors and for each member H of the set we can decide in cubic time, whether a gr aph G contains H as a minor . The theor y do es no t yield an algorithm to compute a s et of excluded minors and hence it only states the existence o f a p olynomia l time mem b ership test but not an actual a lgorithm. W e come back to this in Section 5.4 where we consider wa ys in whic h to ov ercome this non-constructive element in the theory . 5.3 The Structure of H -Mi nor F ree Graphs The pro of of the gr a ph minor theor em relie s on a structure theor y for gr aphs G excluding a fixed gra ph H as a minor. W e hav e already se e n some of the r esults developed in the pr o o f. In this section w e fo c us o n describing the structure of graphs in terms of simple building blo cks into which they can b e decompo sed. The key to the decomp osition theo r em we are going to describ e is once again the grid theorem, or in this case the trinity lemma a s descr ibed in the previo us section. Clearly , as G excludes a fixed gr aph H as a minor, it is obvious that, if we cho ose the v alues for k and h cor rectly , of the thre e cases of the trinity lemma, the se cond is imp ossible: if G excludes H it c annot contain a large clique minor. F urther, if G has small tree-width, then it can b e decomp osed into subg raphs of constant size. Hence, we pr imarily have to dea l with the third case, where G has large tr ee-width but do es not contain a large clique minor. Recall o ur explo ration of the trinity lemma in the previous section. Let us assume that G is highly connected. If not, we first decomp ose it into parts that are highly connected. W e will come bac k to this later. 52 As G has high tree-width it must contain a large wall as a sub division. This wall ma y contain “cr ossings”, in particular ther e may be a b ounded num b er of apices a nd vortices. As expla ine d b efore, apa r t from the vortices and the apices, the rest o f the gr a ph, the extensions, must fit nicely into the planar structure of the w all, i.e. they fit into the individual bricks. So far, how ever, we o nly hav e discussed the int erio r o f the wall. There may be mo re to the graph, whic h is connected to the wall only throug h the p erimeter. These connections ca nnot b e to o wild, though, a s other w is e we would aga in find a la rge clique minor . W e can now subdivide the exter ior cycle of the w all into a bounded num b er of r egions and glue some of them together. In this wa y we obtain a gr aph that can b e embedded into a surfa c e of bo unded genus: any such surface can b e obtained fro m a conv ex p olygon in the plane by g luing some edg es together. Hence, after r emo ving a b ounded num b er o f apices and vortices we obtain a graph that can b e e mbedded into a surface of bo unded ge nus. W e say that G has almost b ounde d genus . Reca ll tha t we a ssumed that G is hig hly connected. If it is not, then we can decomp ose it into pieces with this pr oper t y . This realisa tion is the main str uctural theorem in Rob ertson and Seymour’s pro of of the graph minor theorem: if C is a class of gr aphs excluding a fixe d minor H , then every gr aph G ∈ C c an b e de c omp ose d into gr aphs t hat have almost b ounde d genu s . W e still have to ma k e precis e what we mea n by “ decompo sing a g raph”. Int uitively , we r ecursively find a small separ ator in the gr aph and split the graph along the se parator until the r emaining gra ph is highly connected, and hence no such sepa rators can be fo und. How ever, by doing s o so me information is lo st. Let G b e a gr a ph and X b e a s ma ll sepa rator. W e wan t to decomp ose the g raph into subgraphs each containing X and a co mponent o f G − X . Clea rly , in a graph obtained from X and a co mponent C of G \ X , we lose the connections b etw een elements of X through the other comp onents of G \ X . In particular , elemen ts of X which ar e far a part in X ∪ C can b e close tog e ther in other comp onents and hence in G . This lo ss o f infor mation in the decomp osition pro cess needs to be avoided. A ra ther drastic approa c h, which we ta k e here, is to add all p ossible edges betw een elements of the separato r X , i.e. to turn X int o a clique. Let T := ( T , ( B t ) t ∈ V ( T ) ) b e a tree-decomp osition of a gra ph G and let t ∈ V ( T ) b e a no de with neighbours t 1 , . . . , t k . The torso [ B t ] of the bag B t is defined torso, [ B t ] as G [ B t ] ∪ S k i =1 K  B t i  , where K  B t i  is the complete g raph on the vertex set B t i . The tree- decompo sition T of G is over a class C o f graphs if the tors i of a ll tr e e-de c omp osition over C bag s in T b elong to C . Example 5.1 0 Figur e 5.10 shows a tr e e-de c omp osition of a gr aph over the class of triangles. Part b ) shows the tr e e-de c omp osition and Part c ) the c orr esp onding torsi. A g raph G is called de c omp osable ov er a clas s C if it has a tree-decomp osition ov er C . F or every cla ss C we denote the cla s s of gr aphs deco mposa ble over C by D ( C ) . It is not hard to s e e tha t if C is minor c losed then so is D ( C ). D ( C ) Example 5.1 1 L et C k +1 b e the class of gr aphs of or der at m ost k + 1 and let T k b e the class of gr aphs of tr e e-width at most k . Then T k = D ( C k +1 ) . ⊣ 53 4 1 6 3 2 5 1 3 2 4 1 3 1 3 5 4 6 3 1 3 2 4 1 3 1 3 5 4 6 3 a ) Graph G b ) T ree-Decom. of G c ) T orsi of the bags Fig. 1 6. T ree-Deco mp osition ov er the class of triangles Rob ertson and Seymour’s structure theo rem for classes of gra phs excluding a minor ca n now b e reformulated as follows. Theorem 5.12 ( R ob ertson, Seymour [77] ) F or every m inor ide al D ther e is a class C of gr aphs of almost b ounde d genu s such that D ⊆ D ( C ) . W e will not make the no tion of “almos t bo unded genus” precise here and instead refer to [77] o r to [3 0, Chapter 1 2 ] which co n tains a mor e e labo rate int ro duction to the theor y . F o r the a pplications we have in mind, w e do not hav e to work with almost b ounded g en us gr aphs, vortices a nd apices directly but can use a simpler version o f the s tr ucture theorem. This relies on the following lemma, prov ed by Gro he in [52]. The lo c al tr e e-width is the function ltw : Gra phs × N → N defined as lo c al tr e e-width lt w ( G, r ) := max  t w  G  N r ( v )  : v ∈ V ( G )  , where N r ( v ) is the r neig h b ourho o d o f v , i.e. the set o f vertices o f distance a t most r from v . That is, the lo cal tree-width of a graph ass igns to every ra dius r ∈ N the max imal tree-width of an r -neighbourho o d in the graph G . See Sec tio n 7.3 for more on lo cal tree-width. Lemma 5. 13 ( Gr ohe [52] ) L et S b e a surfac e. Then the class of al l minors of gr aphs almost emb e ddable into S has line ar lo c al tr e e-width. F or all λ, µ ≥ 1 define L ( λ ) := { G : ltw( H, r ) ≤ λ · r for all H 4 G } and L ( λ, µ ) := { G : there is X ⊆ V ( G ) , | X | ≤ µ s.th. G \ X ∈ L ( λ ) } . Then, the previous lemma implies the following simpler str uc tur e theore m that will be us e d in later sections. 54 Theorem 5.14 F or every minor ide al D ther e exist λ, µ ≥ 1 such that D ⊆ D ( L ( λ, µ )) . F urthermo r e, Gro he prov es the ex istence of an algo rithm for c o mputing the decomp ositions ov er L ( λ, µ ), based on the following lemma. Lemma 5. 15 ( Gr ohe [52] ) L et C b e a minor close d class of gr aphs. Then ther e is a p olynomial-time algorithm that, given a gr aph G , either c omputes a tr e e- de c omp osition of G over C or r eje cts G , if no such de c omp osition exists. T aking C to b e L ( λ, µ ), the lemma implies the existence o f an a lgorithm for computing tree- decompo sitions over L ( λ, µ ). How ever, the a lgorithm outlined in [52] uses non-constr uctiv e elements of the graph minor theory and hence, while proving the existence of an a lgorithm, do es not actually state one. In [29], Demaine, Ha jiaghayi and Kawarabay ashi proved that the dec ompo- sitions as guar ant eed by Theorem 5 .1 2 c a n b e c o mputed in poly nomial time for every fixed class of g raphs excluding a t least one minor H . Theorem 5.16 ( Demaine, H ajia ghayi, Kawar ab ayashi [29] ) F or every fi xe d H , ther e is a p olynomial-time algorithm for c omputing the de c omp ositions of H - minor fr e e gr aphs as st ate d in The or em 5.12. F rom this, for each fixe d H , a po lynomial time a lgorithm whic h computes a tree-decomp osition of a n H -minor free graph G over L ( λ, µ ), for suitable v a lues of λ, µ , ca n easily b e derived. One may wonder why we o nly consider ed classes L ( λ ) of line ar lo cal tree- width instead o f clas ses of graphs where the lo cal tree-width is b ounded by a po lynomial p ( r ) or even worse. In [24], Demaine and Ha jiagha yi showed that minor closed class e s of bo unded lo cal tree-width a lw ays have linear lo cal tree- width. Hence, ther e is no need to consider non-linear loc al tree- w idth here, as all classes L ( λ ) are minor -closed. 5.4 Computing Excluded Minor Characterisations Recall from Section 5.1 that every minor idea l ca n b e characterised by a finite set of excluded minors (Theorem 5 .2) and that for each fixed H it is dec idable in cubic time whether a g raph G contains H as a mino r (Theorem 5.9). As a consequence we o btain Corollar y 5.3 sta ting that every minor ideal can b e decided in cubic time. Note that the res ult contains a non-cons tructiv e e le men t as it do es not give a w ay to compute the excluded minors for a minor ideal. F o r instance, while we know that the class of knotlessly em b eddable graphs ca n b e decided in cubic time, no a lgorithm for doing so is actually known. This natura lly r aises the question whether this non- constructive element ca n be r emo ved from the pro of, i.e. whether characterisations of minor ideals in terms of their excluded minors can be computed. Cle a rly , to state this precisely , we hav e to sp ecify how we wan t to repr esent a minor ideal as an input to a n algorithms and also what ex actly we want to unders tand by a characterisa tion of a minor idea l in terms of excluded minors. 55 Let C be a minor ideal. A g raph H is a n obstruct ion fo r C if H is an ex cluded obstruct ion minor o f C but fo r all H ′ 4 H with H ′ 6 = H we hav e H ′ ∈ C . Hence, obstr uc tio ns are minimal excluded mino r s. W e denote the s et of o bstructions of C by O ( C ). O ( C ) It is easily s e en that for a ll minor idea ls C , O ( C ) is unique up to isomorphism and it is finite by the Graph Minor Theor em. W e will ther e fore take O ( C ) as the characterisation of minor ideals we wan t to compute. This leav es us with the questio n how to s p ecify a mino r idea l as an input fo r algorithms. A natural choice is to pr ovide a T uring- machin e deciding the ideal and use this as input. How ever, F ellows and Langsto n [44] observed that there is no algorithm which, given a T uring-machine deciding a mino r ideal C , computes the set O ( C ) . Later, Courcelle, F ellows and La ng ston [15] show ed that there is no algor ithm which, given an MSO -sentence defining a minor ideal C , computes O ( C ). On the other hand, it is k no wn that obstructions can b e computed for a nu mber of natural minor ideals. F or instance, for all k ≥ 1 the obstructions can be computed for the class T k of a ll graphs of tree-width ≤ k (see [60]), for the class B k of all gra phs of branch-width ≤ k (see [5 0]) and for the cla ss G k of graphs of genus ≤ k (this follows from [81] or a combination of [85] and [43]). F ellows and Lang ston were the first to study algor ithmic issues related to the g raph minor theorem and wa ys to ov ercome its non- constructiveness. In [43], they pro pos e a gener al method for computing obstruction sets base d on a generalisa tion of the Myhill-Nero de theo rem o f formal lang uage theory to “g raph languages ”. Adler, Cource lle , Grohe and Kreutzer 8 present a similar metho d for computing obs tr uction sets based on defina bilit y in mona dic second-o r der logic (see [1]). W e will give a brief presentation o f this metho d a nd illustrate it by an example. F or all minor ideals C and D , their unio n C ∪ D is minor closed a nd hence a minor idea l. W e will show b elow that the set of obstructio ns for C ∪ D can b e computed from O ( C ) and O ( D ). 9 The pr oo f of this r e sult also con tains a nice application of the T rinity Lemma 5.7. W e firs t establish some lemmas which are all ea s ily proved using well-known results fr om a utomata theory and the connectio n b et ween mona dic second-o rder logic on tr ees a nd tr e e-automata (see e.g. [84,10]). Lemma 5. 17 Ther e is an algorithm which, given a formula ϕ ∈ MSO defining a minor ide al C , c omputes a formula ψ ∈ MSO defining O ( C ) . Pro of. A gr a ph H is a n obstruction for C if H 6∈ C but H − v ∈ C , H − e ∈ C and H/ e ∈ C for all v ∈ V ( H ) and e ∈ E ( H ). Given the formula ϕ defining C , this can be eas ily b e formalised in MSO .  The next lemma is based on a pumping lemma for tr ee-automata (se e [10]). 8 The pro of presented here follo ws a suggestion by Bru n o Courcelle simplifying the original pro of of the result in [1]. 9 Note that the analogous problem for C ∩ D is trivial. 56 Lemma 5. 18 Ther e is an algorithm which, given a formula ϕ ∈ MSO so that the class Mo d( ϕ ) := { H : H | = ϕ } is finite (up t o isomorphi sm) and a k ∈ N such t hat tw( H ) ≤ k for al l H ∈ Mo d( ϕ ) , c omputes Mo d( ϕ ) . Pro of (sketc h). Supp ose ϕ has only finitely many mo dels each o f tree-width ≤ k . As we a re given k explicitly , we ca n use the interpretation defined in Section 3.3 to enco de the mo dels of ϕ as colo ur ed tree s over a suitable alphab et and reduce the pr oblem of computing the mo dels of ϕ to the problem o f computing the corres p onding tree-enco dings. An upp er b ound for the size of these mo dels can then b e der iv ed fr om a version of the pumping le mma o f formal langua ge theo ry for classes of trees definable by tree-automata . F ro m this bo und on the size, the actual mode ls of ϕ can easily b e computed.  The previous lemmas tog ether with the Gr a ph Minor Theorem immediatly imply the following corolla ry which is the ba s is of the metho d for computing obstruction sets prop osed in [1]. Corollary 5. 19 Ther e is an algorithm which, given a formula ϕ ∈ MSO defining a minor ide al C and a k ∈ N such that tw( H ) ≤ k for al l H ∈ O ( C ) , c omputes the set O ( C ) . As an application of the result w e show that the obstructions for the union C ∪ D of minor ideals C , D c a n be computed from the sets O ( C ) a nd O ( D ). F or this, we hav e to s how that C ∪ D is MSO - definable and to establish a n upper bo und o n the tree-width of its obstructions. It is easily seen that for any fixed graph H there is an MSO -formula ϕ H which is true in a graph G if, and only if, H 4 G . This follows immedia tely from the definition of minors in terms of minor maps and images as presented in Section 5.1. T o define C ∪ D in MSO note that G ∈ C ∪ D if, and only if, G either excludes a minor fro m O ( C ) or a minor from O ( D ). As we hav e seen, this is MSO - definable and a corr espo nding for mula ca n easily b e computed. It remains to e s tablish a b ound on the tree-width of the obstructions. Lemma 5. 20 Le t C and D b e m inor ide als and let U := C ∪ D . Ther e is an algorithm which, given O ( C ) and O ( D ) as input, c omputes a num b er k ∈ N s uch that tw( H ) ≤ k for al l H ∈ O ( U ) . Pro of (sk etch) . Suppo se G ∈ O ( U ). Hence, G 6∈ U but G − v ∈ U for a ll v ∈ V ( G ). It follows that ther e ar e H ∈ O ( C ) and I ∈ O ( D ) such that H 4 G and I 4 G . Let k := ma x {| H | , | I |} + 1 a nd cho ose h “lar g e enough”, wher e the meaning of large e nough will b ecome clear later. By the T rinity Lemma 5.7, either a ) tw( G ) ≤ f ( k , h ) for some computable function f , or b) K k 4 G or c ) there is a subset X ⊆ V ( G ) with | X | <  k 2  , a wall W o f height h in G \ X , a nd a flat lay out of the compa s s of W in G \ X . Suppo se c) applies. I t follows from a result b y Ro bertso n and Seymour in [76] that if h is chosen la rge enoug h then there is a v ertex v in the wall W (the middle vertex) such that G − v still co n tains H and I as minors, contradicting the minimality of the obstructio n G . Hence, case c ) is imp ossible. The idea to 57 choose the middle vertex is sa me a s in the pr oo f of Theor em 5 .8 describ ed in Section 5.2. F or b), if G contains a K k minor then there is a strict subgraph G ′ ( G containing a K k − 1 minor. Hence, by the choice of k , G ′ contains H and I as minors, contradicting the minimalit y of G . Thus, case b ) is impo ssible a s well. Finally , in a) the tree width of G is b ounded by a computable function in h and k and we hav e found a uniform upper b ound for the tree-width o f G which concludes the pro of.  Corollary 5. 21 ( [1 ] ) F or al l m inor ide als C , D the set O ( C ∪ D ) is c omputable fr om the sets O ( C ) and O ( D ) . Using a similar approach it was shown in [1] that obstructions can b e com- puted for other natur a l minor ideals. In pa rticular, if C is a minor ideal whose obstructions are k no wn, then the obstructions ca n b e computed for the class C ap ex of ap ex gr aphs over C , defined as C ap ex := { G : there is v ∈ V ( G ) such that G − v ∈ C } . How e v er, there r emain interesting o pen pro blems. Op en Problem 5.22 1. Is t her e an algorithm which, given λ ≥ 0 , c omputes the obstructions O ( L ( λ )) ? Se e Se ction 5.3 for a definition of L ( λ ) and L ( λ, µ ) . Note that, by using t he c omputability of O ( C ap ex ) fr om O ( C ) , the set O ( L ( λ, µ )) c an b e c ompute d fr om O ( L ( λ )) , for al l µ ≥ 0 . 2. If C is a minor ide al whose obstructions ar e given, c an we c ompute the ob- structions of the class D ( C ) of gr aphs tr e e-de c omp osable over C ? A solution for b oth op en pr oblems would b e par ticularly interesting a s every minor ideal is a sub class of a class D ( L ( λ, µ )) for s ome λ, µ ≥ 0. 6 Monadic Second-Order Logic Revisited Recall fr o m Sectio n 3 .5 that for each k , the MSO 2 -theory of the class T k of gr aphs of tr ee-width at most k is decidable. The a im of this s e ction is to prove a kind of conv erse, also due to Seese. Theorem 6.1 ( Se ese [79] ) If C is a class of gr aphs with de cidable MSO 2 -the ory, then C has b ounde d tr e e-width. The pro of of the theorem crucially relies o n the e xcluded grid theorem (The- orem 5 .4) and the fact that the MSO -theor y of g rids is undecidable. The latter can eas ily be established using tiling sys tems or by a direct e ncoding of the run of T uring - mach ines using MSO -formulas (see e.g. [8]). Suppo se C has a decidable MSO 2 -theory but unbounded tree-width. Then, by the excluded grid theorem, for all n ≥ 1, there is a graph G n ∈ C containing G n × n as a minor . The k ey to the theo r em is to s how tha t grid minors can be 58 defined in MSO 2 . Hence, the (undecidable) MSO -theo ry of grids ca n be reduced to the MSO -theo ry of C contradicting the assumption that the latter is decida ble. W e start by showing how walls can b e forma lised in MSO 2 . The extension to grids follows easily . Let G b e a graph and consider a n MSO 2 -formula forma lising the following. 1. There are tw o sets H and V of edges , each of which induces a set of pa irwise vertex disjoint paths (which we will think o f as horizo n tal a nd vertical pa ths in a wall). 2. F or all P ∈ H and Q ∈ V , P ∩ Q is a subpa th o f bo th, P a nd Q . F urther, V ( P ∩ Q ) ∩ V ( H ) = ∅ for all H ∈ ( V ∪ H ) \ { P , Q } . 3. There is a path L ∈ V such that the intersection of L with each Q ∈ H contains an endp oint o f Q ( L is the left-most vertical path in the wall). Once we hav e L , w e can give the horizontal paths P ∈ H a direc tio n, where we say that p ∈ V ( P ) is to t he left of p ′ ∈ V ( P ), if the subpath of P containing p ′ and a v ertex in L also cont ains p . 4. There is a path T ∈ H such that the intersection of T with each P ∈ V contains an endp oint o f P ( T is the to p- most horizontal path in the wall). As with horizontal paths, we can now use T to give the vertical pa ths P ∈ V a direction and say that p ∈ V ( P ) is ab ove p ′ ∈ V ( P ). 5. F or each path P ∈ V except L there is a path P ′ ∈ V (the path immediately to the left of P ) such that for all Q ∈ H : if p ∈ V ( P ∩ Q ) and p ′ ∈ V ( P ′ ∩ Q ) are vertices in the intersection o f Q and P , P ′ , then p ′ is to the left of p in Q and there is no S ∈ H such that any s ∈ V ( S ∩ Q ) lies in the subpath of Q b etw een p and p ′ . 6. The ana lo gue condition for horizontal paths. Clearly , the v arious conditions ar e MSO 2 -definable. Now, if V and H satisfy the co nditions ab ov e, then they genera te a wall in G and co n versely , the dis join t horizontal a nd vertical paths in a wall sa tisfy the conditions. Fina lly , it is easily seen that the class of gr ids ca n b e defined in the class of w alls and hence g rid minors are MSO 2 -definable in graphs . Note that here we crucially us e the fact the we ar e working with MSO 2 - formulas and hence c a n quantify ov er the edg e sets of disjoint paths. In MSO 1 we could only try to quantify ov er the vertex set of disjoint paths. Howev er, if there are s ufficien tly ma ny edges b et ween these vertices, there is no w ay we can give the paths an orientation, e.g. define paths b eing to the left of o thers. And clear ly , we cannot exp ect clique-minors to b e defina ble in MSO 1 as, by Theorem 4.20, the MS O 1 -theory of gra ph classes of b ounded clique-width is decida ble and hence there are classes with decidable MSO 1 -theory but un b ounded tree-width. 7 First-Order Mo del-Chec king In Section 3.4 and 4 .3 we showed that the mo del-chec king problem for monadic second-or der lo gic is solv able in linear time for any fixed formula on clas ses o f graphs of b ounded tree- or clique-width. There is not muc h hop e for extending 59 these results to other or lar ger clas ses o f gr aphs such a s plana r g raphs or graphs of bo unded degree. This follows immediately from the following theorem by Garey , Johnson and Stockmeyer a nd the fact that 3-colo urability is MSO -definable. Theorem 7.1 ( Gar ey, Johnson, Sto ckmeyer [49] ) 3 -c olour ability is NP -c omple- te on the class of planar gr aphs of de gr e e at most 4 . How e v er, first-o rder logic is tractable o n muc h la rger classes of graphs. F or in- stance, Seese [80] showed tha t first-o r der logic admits linear time mo del-checking (for a fixed formula) o n any clas s of graphs of b ounded degree. The sa me com- plexity b ound was la ter o btained by F rick a nd Grohe [47] for plana r g raphs a nd classes of g raphs o f b ounded lo c al tre e- width , a notion that pr oper ly extends b oth planarity and b ounded de g ree (see b elow). The impo rtant pro perty of first-o rder logic that makes these r esults p ossible is lo c ality . The section is structur ed as follows. In Section 7.1 we introduce the concept of lo cality a nd pr esen t Gaifman’s theorem. In Sectio n 7 .2 we a pply lo cality to o b- tain fixed-parameter a lgorithms for first-o rder mo del-chec king on graph cla sses of b ounded deg ree. The algorithms develope d in this sectio n ca n b e applied in a m uch more genera l co n text using the conce pt of lo ca lis ation of gra ph inv ariants. This will b e for mally defined in Section 7.3. In Section 7.4 we present fixed- parameter algo rithms for firs t- order mo del-chec king on H -minor free g raphs. Fi- nally , in Sectio n 7.5 we discuss fixed-par ameter tra ctabilit y for first-o rder mo del- chec king in a broader context and exhibit some limits to tractability . 7.1 Lo calit y of First-Order Logi c Let G be a gra ph. Recall that the distanc e d G ( u, v ) betw een tw o vertices u, v ∈ V ( G ) is the length of the s hortest path fro m u to v or ∞ if there is no such pa th. F urther, for every v ∈ V ( G ) and r ∈ N we define the r -neighb ourho o d of v in G as the set N G r ( v ) := { w ∈ V ( G ) : d G ( v , w ) ≤ r } of vertices of distance at mo st r fro m v . F or a set W ⊆ V ( G ) we set N G r ( W ) := S v ∈ W N G r ( v ). W e omit the index · G whenever G is cle a r from the context. If σ is a signature and A is a σ -str uctur e, we define the distance d A ( a, b ) and the r -neig h b ourho o d N A r ( a ) in terms o f the Gaifman-gra ph G ( A ) of A , 10 i.e. N A r ( a ) is the s et of elements of distance a t most r from a in the Gaifman- graph. It is easily seen that for any fixed r ∈ N “distance at most r ” is first-o r der definable, that is, for every r ∈ N ther e is a formula dist ≤ r ( x, y ) such that for all structures A a nd a ll u, v ∈ V ( A ) A | = dist ≤ r ( u, v ) iff d A ( u, v ) ≤ r . Similarly , there ar e fo rm ulas dist >r ( x, y ) and dist r and < r r espectively . T o improve reada bilit y we will write dist( x, y ) ≤ r instea d of dist ≤ r ( x, y ) and likewise for the other formulas. 10 See Section 2 for a d efinition of Gaifman-graphs. 60 A first-or der formula ϕ ( x ) is r -lo c al if for every structure A and all a ∈ V ( A ) A | = ϕ ( a ) iff A  N A r ( a )  | = ϕ, where A  N A r ( a )  denotes the substructure of A induced b y N A r ( a ). Hence, truth of a n r -lo cal for mula at an element a in a s tructure o nly dep ends on its r - neighbourho o d. A for m ula ϕ ( x ) is lo c al if it is r -lo cal for some r ∈ N . A b asic lo c al sentenc e is a fir st-order sentence of the form ∃ x 1 . . . ∃ x k  ^ 1 ≤ i 2 r ∧ k ^ i =1 ϑ ( x i )  where ϑ ( x ) is lo ca l. In 198 1, Gaifman s ho wed that every first-order sent ence is equiv alent to a Bo olean combin atio n of basic lo cal sent ences. Theorem 7.2 ( Gaifman [48] ) Every first-or der s en tenc e is e quivalent to a Bo ol- e an c ombination of b asic lo c al sentenc es. F urthermor e, ther e is an algorithm that, given a first- or der formula as input, c omputes an e quivalent Bo ole an c ombination of b asic lo c al sentenc es. A first-or der for m ula is in Gaifman Normal F orm (GNF), if it is a Bo olean combination of basic lo cal sentences. Gaifman’s o riginal pr oo f is by an ex plic it translation of first-or der for m ulas into formulas in GNF. A pro of sketc h alo ng this lines can a lso b e found in the s ur v ey pap er [53]. A different, mo del-theor e tical pro of ca n b e found in [37, Section 2 .5]. The translatio n of for m ulas into Gaifman normal form is effective. How ever, it has r e cen tly b een shown [23] that this translatio n may inv olve a non- e le men tary blow-up in the size o f the se ntence. Theorem 7.3 ( Dawar, Gr ohe, Kr eutzer, S chweik ar dt [23] ) L et σ := { E } b e t he signatur e of gr aphs. F or every h ≥ 1 t her e is an FO [ σ ] -senten c e ϕ h of s ize O ( h 4 ) such that every FO [ σ ] -sentenc e in Gaifman normal form that is e quivalent to ϕ h on the class of finite t r e es has size at le ast tower ( h ) , wher e tower ( h ) denotes a tower of 2 s of height h . F rom a practical p oint of v ie w, this renders a lgorithms using Gaifman’s the- orem useless, no ma tter what their theor etical complexity might b e. Example 7.4 R e c al l that a dominating set X in a gr aph G is a set X ⊆ V ( G ) such that for al l v ∈ V ( G ) , v ∈ X or ther e is a u ∈ X and { u, v } ∈ E ( G ) . F or k ∈ N , the formula ϕ k := ∃ x 1 . . . ∃ x k ∀ y  _ 1 ≤ i ≤ k  x i = y ∨ E yx i   is tr u e in a gr aph G if, and only if, G has a dominating s et of size at most k . T o c onvert this into an e quivalent sentenc e in Gaifman normal form, we first observe that no c onne ct e d gr aph of diameter at le ast 3 k + 1 c an have a 61 dominating set of s ize at most k . Her e, the diameter of a gr aph is t he maximu m of t he distanc e b etwe en any two vert ic es. Henc e, on c onne ct e d gr aphs, the formula ϕ k ab ove is e quivalent to the c on- junction of the b asic lo c al sentenc e ψ := ¬∃ x 1 ∃ x 2 dist( x 1 , x 2 ) > 3 k + 1 , saying t hat the diameter of G is gr e ater t han 3 k + 1 , and the b asic lo c al sentenc e ∃ xχ ( x ) , wher e χ ( x ) is the 3 k + 1 -lo c al formula ∃ y 1 ∈ N 3 k +1 ( x ) . . . ∃ y k ∈ N 3 k +1 ( x ) ∀ z ∈ N 3 k +1 ( x ) _ 1 ≤ i ≤ k  y i = z ∨ E z y i  . Note that this formula c orr e ctly defines the exist en c e of a dominating s et of size k only in c onne cte d gr aphs, as in gr aphs with mor e than one c omp onent ther e may exist a dominating set of s ize k even t hough ther e ar e vertic es x 1 , x 2 of distanc e gr e ater than 3 k + 1 . A dapting the formula to this c ase r e quir es a little mor e effort. ⊣ 7.2 First-Order Logic on Graphs of Bounded Degree As a first application of the use of Gaifman’s lo cality theorem for algor ithmic meta theorems we consider g raph classes o f b ounded degre e . Definition 7. 5 A class C of gr aphs has b ounded degree if ther e is a d ∈ N such that ∆ ( G ) ≤ d for al l G ∈ C . In 1996, Seese [80] show ed that mo del-chec k ing for a fixed first-or der sentence can be done in linear time on graph classes o f b ounded degr ee. Theorem 7.6 ( Se ese [80] ) F or any class C of gr aphs of b ounde d de gr e e and any fixe d first-or der sent enc e it c an b e de cide d in line ar time whether G | = ϕ for a gr aph G ∈ C . In other wor ds, first -or der mo del-che cking on C is fixe d-p ar ameter tr actable by a line ar fpt algorithm. Pro of. The pro of metho d w e use here is essentially the metho d used by F rick and Gr ohe to s how a simila r re s ult for planar graphs. Let ϕ and G ∈ C b e given. W e fir st co n vert ϕ in to Gaifman normal form, i.e. into a Bo olea n combination of bas ic lo cal sentences. As Bo olea n combinations are easy to deal with, we only need to c onsider basic lo cal sentences of the form ψ := ∃ x 1 . . . ∃ x k  ^ 1 ≤ i 2 r ∧ k ^ i =1 ϑ ( x i )  where ϑ ( x ) is r -lo cal for some r ∈ N . T o chec k whether ψ is tr ue in G we pro ceed in tw o steps. First, we test for all v ∈ V ( G ) if G  N G r ( v )  | = ϑ . As G has degree b ounded by some constant d , the size of N G r ( v ) is constant and hence this ca n b e decided in consta nt time. 62 Colour a ll vertices v r e d for which G  N G r ( v )  | = ϑ and let Q b e the s et of r e d vertices. Now, G | = ψ if Q contains k vertices of pairwise distance > 2 r . In the seco nd step we se arch for k such vertices. F o r this, we use the gr eedy algorithm shown in Figure 17. The algo rithm pro ceeds as follows. In lines 2–6 of 1: L := ∅ 2: whil e Q 6 = ∅ do 3: choose v ∈ Q arbitrarily 4: L := L ∪ { v } 5: Q := Q \ N 2 r ( v ) 6: end whil e 7: if | L | ≥ k then 8: accept G 9: el se 10: if G ˆ N 2 r ( L ) ˜ | = ∃ x 1 . . . x k ( V i 6 = j dist( x i , x j ) > 2 r ∧ V i “ x i is r e d ” ´ then 11: accept G 12: else 13: reject G 14: end i f 15: end if Fig. 1 7. Algo rithm to find k vertices of pairwise distance > 2 r the a lgorithm, we try to choose k r e d vertices of pairwise distance > 2 r greedily . If we succeed, i.e. if the set L contains k elements, then we are done and a ccept G . Otherwise, we know that L co ntains fewer than k vertices which are a ll r e d and of pa irwise distance > 2 r and als o that a ny other r e d vertex is within distance ≤ 2 r o f an element of L (otherwis e we could a dd the vertex to L ). Hence, all r e d vertices of G are contained in the 2 r -neighbourho o d N := N 2 r [ L ] o f L . Again, N is of co nstan t size a nd hence we can chec k in consta n t time whether N contains k r e d vertices o f pairwise distance > 2 r . This is do ne in line 12 by testing whether the graph induced by the neighbourho o d satisfies the first-o rder formula stating that there a re k distinct re d vertices of pair wise dista nce > 2 r .  The previo us theo rem gives a s imple example how lo cality can b e used to obtain efficient mo del-c hecking algo rithms for first-order logic. As it turns out, a similar sc heme can be employed in many cases. Theorem 7.7 L et C b e a class of gr aphs s u ch that the fol lowing pr oblem is fixe d-p ar ameter tr actable: Input: ϕ ∈ FO , gr aph G ∈ C , v 1 , . . . , v k ∈ V ( G ) a nd r ∈ N . Par ameter: r + k + | ϕ | . Pr oblem: Decide G  N G r ( v 1 , . . . , v k )  | = ϕ . Then mo del-che cking for first -or der lo gic is fix e d-p ar ameter tr actable on C . 63 Pro of. W e pro ceed a s in the pro of of Theorem 7.6. By Gaifman’s theorem, we may a s sume that ϕ is a bas ic lo cal sentence ∃ x 1 . . . ∃ x k  V i 6 = j dist( x i , x j ) > 2 r ∧ V i ϑ ( x i )  , wher e ϑ ( x ) is an r -lo c al formula fo r so me r ∈ N . In the first step, we compute the set Q o f vertices v ∈ V ( G ) such that G  N r ( v )  | = ϑ ( v ). By assumption, for each v ∈ V ( G ) this can b e done in time f ( r + 1 + | ϑ | ) · | G | O (1) , for some computable function f : N → N , and hence the total running time is f ( r + 1 + | ϑ | ) · | G | O (1) . In the second step w e aim to find k vertices in Q whose distance is pairwis e > 2 r . Using the alg orithm of Figure 1 7 this can b e done in time f (2 r · k + O ( k )) · | G | O (1) . Hence, the total r unning time is f (2 r · k + O ( k )) · | G | O (1) .  While this theorem may app ear so mewhat artificial, w e will see a n umber of interesting applications of it b y c o nsidering lo calisations of g raph inv aria n ts such as tree-width or r ank-width. 7.3 Lo calisation of graph inv ariants Let Graph deno te the cla ss of all finite graphs. Definition 7. 8 A g raph inv a riant is a fu n ction f : Graph → N . F or every gr aph invariant f we define its lo calis ation lo c f : Graph × N → N as lo c f ( G, r ) lo c f ( G, r ) := max n f  G  N r ( v )   : v ∈ V ( G ) o . A class C of gr aphs has b ounded lo ca l f , if ther e is a c omputable 11 function h : N → N such that lo c f ( G, r ) ≤ h ( r ) for al l G ∈ C and r ∈ N . That is, to compute lo c f ( G, r ) we co mpute the r -neighbourho o ds N := N r ( v ) of all vertices v ∈ V ( G ) and for each such N the v alue f ( N ). lo c f ( G, r ) is then the maximum o f these v a lues. In particular, if the pro ble m: given G a nd k , where k is the parameter , to decide whether f ( G ) ≤ k is fixed-parameter tractable, then so is the problem: g iv en G, r, k , where r + k is the parameter, to decide if lo c f ( G, r ) ≤ k . Example 7.9 Of p articular int er est is the lo c alisation of tr e e-width, c al le d lo cal tree-width (se e also the discussion at the end of Se ction 5.3). Ther e ar e a n u mb er of int er esting examples for gr aph classes with b oun de d lo c al tr e e-width. 1. Every gr aph class of b ounde d tre e- width also has b ounde d lo c al tr e e-width (b oun de d by a c onstant). 2. The class of planar gr aphs has b ounde d lo c al tr e e-width. Mor e pr e cisely, R ob ertson and Seymour [75] showe d that every planar gr aph of r adius r has tr e e-width ≤ 3 r + 1 . 11 As we are asking for h to b e computable, we should call this effe ctively b ounde d lo c al f . But this w ould make the notation even more clumsy and we therefore refrain from mentio ning effectiv eness in the sequ el. 64 3. Any class of gr aphs of b ounde d de gr e e. This is e asily se en as the r -neighb our- ho o ds of gr aphs of de gr e e at most d c ontain < d r +1 vertic es. ⊣ Similar to lo cal tree-width we can define lo cal rank-width o r clique-width, where w e take f : Graph → N to b e the function a ssigning to ea c h graph its rank- or clique-width. Another int ere s ting exa mple is the lo calisation o f the following gr aph inv a ri- ant. Let me c : Graph → N ( minimal exclude d clique ) b e the function assigning me c ( G ) to each g raph G the minimal or der of a clique tha t is not a minor of G , i.e. me c ( G ) := min { k : K k 6 4 G } . Graph classes with lo cally bo unded me c ar e called graph classes with lo c al ly exclude d minors and hav e b een studied by Daw ar, Gro he and Kreutzer in [2 1]. Clearly , every g raph clas s C with an excluded minor H also lo cally excludes H , i.e. has b ounded lo cal me c . The conv erse fails, though, as is witnessed by the following class of g raphs. F or k ∈ N let S k be the g raph obtained from K k by r eplacing all edges b y in ternally vertex disjoint paths of length k . Now take C := { S k : k ∈ N } . Obviously , the minor clo sure of C is the class of all graphs, i.e. C do es not exc lude a minor. Howev er, it lo cally excludes minors, as every k -neighbourho o d of graphs G ∈ C excludes K k . Hence, f : Graph × N → N defined as f ( G, r ) := r dominates the loca l me c of C . Note, that C has b ounded lo cal tree-width and hence also provides an example separating pr oper minor idea ls and gra ph clas s es o f bo unded lo cal tree-width. It is easily s een that every c la ss of gra phs of b ounded loc a l tree- width also lo cally excludes mino rs. The converse fails ag a in, as not even every minor ideal has bo unded lo ca l tree-width. This is witness ed by the cla ss of ap ex graphs defined as C ap ex := { G : there is v ∈ V ( G ) such tha t G − v is planar } . In particular , this c la ss contains all g rids with one additional vertex adjacent to every vertex in the grid. Hence, C ap ex has unbounded lo cal tr ee-width but clearly excludes K 6 . Lemma 7. 10 The c onc ept of lo c al ly ex clude d minors s t rictly gener alises b oth exclude d minors and b ounde d lo c al tr e e-width. That is, every class of gr aphs that excludes a minor or has b ounde d lo c al tr e e-width, also lo c al ly excludes minors. The c onverse fails in b oth c ases. The a im o f this section is to prov e the following theor em. Theorem 7.11 L et f b e a gr aph invariant su ch that the fol lowing is fi xe d- p ar ameter tr actable. MC(F O, f ) Input: Graph G and ϕ ∈ FO . Par ameter: f ( G ) + | ϕ | . Pr oblem: Decide whether G | = ϕ . 65 Then for every class C of lo c al ly b ounde d f , the pr oblem MC( FO , C ) is fixe d- p ar ameter tr actable. Pro of. Let g : N → N be a bo und fo r lo c f ( G, · ) for a ll G ∈ C . W e first suppo se that f is induc e d sub gr aph monotone , i.e. f ( H ) ≤ f ( G ) for a ll H , G such that H is an induced subgra ph of G , and further ha s the prop erty that if G 1 , G 2 are vertex disjo in t gra phs, then f ( G 1 ∪ G 2 ) ≤ max { f ( G i ) : i = 1 , 2 } . Note that graph inv ariants such as tree-width, branch-width, clique-width and rank-width all ha ve these prop erties. Then the r esult fo llo ws fro m Theorem 7.7 a s follows. Given ϕ ∈ F O , G ∈ C , v 1 , . . . , v k ∈ V ( G ) and r ∈ N , we fir st compute H := G  N G r ( v 1 , . . . , v k )  in po lynomial time. Clea rly , every comp onent of H has radius at most k · r and hence f ( H ) ≤ lo c f ( G, k · r ) ≤ g ( k · r ). The assumptions of this lemma then imply that the assumptions o f Theorem 7.7 ar e s atisfied a nd thus we can decide H | = ϕ by fpt-a lgorithms. If f do es not have the pr ope r ties a bove, we ca n no long er apply Theo r em 7.7 directly . Instea d, we hav e to r epea t its pr oo f. W e leav e the deta ils to the reader.  Corollary 7. 12 First - or der mo del-che cking is fixe d-p ar ameter tra ctable on gr aph classes of – b ounde d lo c al tr e e-width – b ounde d lo c al r ank- or clique-width. In the next sectio n we w ill show that first-o rder mo del-checking is fix ed- parameter tractable on graph classes excluding at least one minor. W e will later consider lo calisation in this co n text and show an ana logous result for gra ph classes loc a lly excluding a minor . 7.4 First-Order Logic on H -Mi nor F ree Graphs The a im of this section is to show that first-o rder mo del-chec k ing is fixed- parameter tractable o n every class C of gr aphs excluding at lea st o ne minor H . If we take | ϕ | as the parameter, this was first shown by Flum and Grohe [45] in 20 01. That is, for every fixed H , the pro blem is trac ta ble under the parametriza tion | ϕ | . Ho wev er, the exp onential of the po lynomials oc curring in the r unning time analysis can depend on H . As it turns out, this pa rametriza- tion is not str ong eno ugh to apply our metho d o f lo calisation to the pr oblem. In [21], therefore, Daw ar, Grohe and Kreutzer consider the pr oblem under the parametriza tion | ϕ | + | H | and show fixed-pa r ameter trac tabilit y for this case. Let us first cons ide r the c ase where H is fixed and | ϕ | is the pa r ameter. In the light of the previous sections, the pro of of the theor em seems rather straightforward: given G ∈ C , Theorem 5.14 tells us that there are λ, µ ≥ 1 such that G ha s a tree-decomp osition over L ( λ, µ ), i.e. a tree-decomp osition such that the torsi of its bags have b ounded lo cal tree-width after remov al of a few elements, and Theorem 5.16 tells us how to co mpute the decomp osition 66 in p olynomia l time. F ur thermore, we already know how to deal with graphs in L ( λ ) of b ounded lo cal tree-width and extending this to gra phs in L ( λ, µ ) po ses no real problem. And indeed, this is the g eneral idea to show that FO mo del-ch ecking is FP T on H -minor free g raphs, a ltho ugh for mally implement ing the idea requir es some care and additiona l lemma s. T o make this precise it is conv enient to introduce further nota tio n. A graph G is the clique sum of gr a phs G 1 and G 2 , denoted G = G 1 ⊕ G 2 , clique sum, ⊕ if G 1 ∩ G 2 is a complete g r aph a nd G is obtained fro m G 1 ∪ G 2 by po ssibly deleting some edges from E ( G 1 ∩ G 2 ). F o rmally , V ( G ) = V ( G 1 ) ∪ V ( G 2 ), G 1 ∩ G 2 is a clique and there is a (p ossibly empty) s et X ⊆ E ( G 1 ∩ G 2 ) such that E ( G ) = E ( G 1 ∪ G 2 ) − X . W e write G = G 1 ⊕ v G 2 to indicate that G is the ⊕ v clique-sum of G 1 and G 2 and tha t V ( G 1 ∩ G 2 ) = v . Recall that a tree-decomp osition of a g raph G is over a class C of g r aphs if the torsi [ B t ] o f all its ba g s b elong to C , wher e the tor so of a ba g B t is obtained from G [ B t ] by turning the intersections of B t with neig h b ouring ba gs B s int o cliques. Hence, the gra ph G is obtained a s the clique-sum of its bags, an observ ation that we will use in the following pr o o fs. W e b egin b y pr o ving an extension of Cour celle’s theorem, this time not by a reduction to trees but by computing MS O -t yp es directly . Recall the definition of MSO a nd FO q - t yp es a nd the F eferman-V aught theor em from Section 2.3. Lemma 7. 13 Le t tp q b e one of tp FO q and tp MSO q . The fol lowing pr oblem is fi xe d- p ar ameter tr actable: given – a lab el le d gr aph G of tr e e- width ≤ k , – tuples v i ∈ V ( G ) r i , 0 ≤ i ≤ m for some m , such that G  v i  is a clique, and – q -typ es Θ 1 , . . . , Θ m , c ompute tp q ( G, v 0 ) for al l gr aphs G ′ = G ⊕ v 1 H 1 ⊕ v 2 · · · ⊕ v m H m such t hat tp q ( H i , v i ) = Θ i . The p ar ameter is q + k . Pro of. Giv en G , we first compute an order ed tree-dec ompos ition ( T , ( b t ) t ∈ V ( T ) ) of G of width a t most k (see Definition 3.25). Note that, as the v i induce cliques in G , for each i there is at least one t i such that v i ⊆ b t i . Hence, w e ca n assume that for each 0 ≤ i ≤ m there is a lea f t ∈ V ( T ) such that v i = b t and that no other leaf contains a vertex fr om any of the v i for 1 ≤ i ≤ m . F or each t ∈ V ( T ), let T t be the subtree of T ro oted a t t and let B t be the set B t := S s ∈ V ( T t ) b s . Beginning fro m the leav es w e inductively compute tp q ( G  B t  , b t v 0 ) fo r each no de t ∈ V ( T ). Here, the notation tp q ( G  B t  , b t v 0 ) indicates that in G  B t  we compute the type of b t and all vertices of v 0 contained in B t . F or leav es t with b t = v i , for some 1 ≤ i ≤ m , we c a n infer the type tp q ( G  b t  , b t v 0 ) from Θ i . F or other leaves w e can compute their types directly , as they only contain at most k + 1 elements. F or inner no des t with children t 1 , t 2 we apply Lemma 2.3.  As the pr evious lemma a pplies to MSO -type s , Courcelle’s theor e m is clearly a sp ecial case of it. Hence, the pro of here pr o vides a n alternative wa y of establish- ing Co urcelle’s theorem. While the tw o a pproaches may seem to b e somewhat 67 different, the underlying principle is the same. Reca ll tha t in our o riginal pro of of Courcelle ’s theor em, we enco ded graphs G of tree-width ≤ k in lab elled trees T and then rewr ote the formula ϕ on G to a new formula ϕ ′ on T suc h that G | = ϕ if, and o nly , if T | = ϕ ′ . On the tree- enco ding , we then a pplied results from automata theory which es tablish that MSO mo de l- c hecking is fixed-par ameter tractable on trees. More spe c ifically , the MSO -formula ϕ ′ is translated int o an automaton A ϕ which accepts T if, and only if, T | = ϕ ′ . Although it is not usua lly prov ed this wa y , essentially the automa ton has a state for each p o ssible q -t yp e and its transitio n rela tion combines types similar to what is done in Lemma 2.3. But back to first-order mo del-chec king on gr aph cla sses excluding a minor. Essentially the pr evious lemma allows us to de a l with tree-decomp ositions ov er graphs of bounded tre e-width, which clea rly is not enough for our purpo ses. Lemma 7. 14 Le t tp q denote tp FO q . The fol lowing pr oblem is fixe d-p ar ameter tr actable for al l λ, µ : given – a lab el le d gr aph G ∈ L ( λ, µ ) , – tuples v i ∈ V ( G ) r i , 0 ≤ i ≤ m for some m , such that G  v i  is a clique, and – q -typ es Θ 1 , . . . , Θ m , c ompute tp q ( G, v 0 ) for al l gr aphs G ′ = G ⊕ v 1 H 1 ⊕ v 2 · · · ⊕ v m H m such t hat tp q ( H i , v i ) = Θ i . The p ar ameter is q . Pro of. The pro of is by induction on µ . F or µ = 0, we adapt the pro of of Theo- rem 7 .7 using Lemma 7.13 lo cally . Now let µ > 0 a nd let G ∈ L ( λ, µ ), v i , Θ i be an instance of the problem. By definition, G contains a vertex v ∈ V ( G ) such that G \ v ∈ L ( λ, µ − 1). Note that for all λ ′ , µ ′ , L ( λ ′ , µ ′ ) is a mino r ideal a nd hence has a cubic time membership test by Co rollary 5.3. Thus, in time O ( | G | 4 ) we can find such a vertex v . Let G 2 be the coloure d gra ph obtained from G by introduc- ing a new colo ur C by which we lab el all neig hbo urs of v and then eliminating v from G . By cons truction, G 2 ∈ L ( λ, µ − 1 ). F urther mo re, it is a n ea sy exerc is e to translate fir st-order formulas ϕ over G to formulas ϕ ′ ov er G 2 such that G | = ϕ if, a nd only if, G 2 | = ϕ ′ . Hence, the q -type of G ′ = G ⊕ v 1 H 1 ⊕ v 2 · · · ⊕ v m H m can be re c overed from the q -type of G ′ 2 = G 2 ⊕ v 1 H 1 ⊕ v 2 · · · ⊕ v m H m , a nd the latter is computable b y the induction h yp othesis.  The previous tw o lemmas a re the main ingredients for the pro of of the fol- lowing theorem. Theorem 7.15 ( Flum, Gr ohe [45] ) L et C b e a class of gr aphs excluding at le ast one minor. Then the fol lowing pr oblem is fixe d-p ar ameter tr actable. MC( F O , C ) Input: G ∈ C , ϕ ∈ FO . Par ameter: | ϕ | . Pr oblem: Decide G | = ϕ . 68 Pro of. Let G and ϕ b e g iv en and let q b e the q uan tifier-r ank of ϕ . Using T he- orem 5.16, we first compute a tree-decomp osition ( T , γ ) of G ov e r L ( λ, µ ), for some λ, µ . W e view T as a directed tree with ro ot r . F or e ach t ∈ V ( T ), t 6 = r , with parent s ∈ V ( T ), let v t := B t ∩ B s . Recall that in the torsi of B t and B s , v t induces a clique. F or the ro ot r we define v r as the empt y tuple. F urthermo r e, for each t ∈ V ( T ) let T t be the subtr ee of T ro oted at t and let B t := S s ∈ V ( T t ) B s . Finally , for t ∈ V ( T ) let G t := G  B t  ∪ K [ v t ]. Note tha t fo r all t ∈ V ( T ), v t ≤ k , where k := λ + µ , as v t induces a clique in the tors o [ B t ] of B t . As [ B t ] ∈ L ( λ, µ ) and graphs in L ( λ, µ ) cannot contain a clique of order > λ + µ we o btain | v t | ≤ k . Hence, as λ, µ only dep end on the excluded minor of C and therefore are fixed, w e obtain a fixed upper b ound for the size o f v t , t ∈ V ( T ). T o decide G | = ϕ , we aim at computing the type tp q ( G, v r ). W e can then simply chec k whether ϕ ∈ tp q ( G, v r ). T ow ards this aim, starting a t the leaves and pro ceeding bo ttom-up, w e apply Lemma 7.14 at e a c h no de to compute the t yp e tp q ( G t , v t ).  The pr evious theorem shows that for every fixed graph H , first-o rder mo del- chec king is fixe d- parameter tr actable, with parameter | ϕ | , on every clas s of graphs excluding H . How ever, the algorithm as describ ed ab ov e is no t fixe d- parameter tr actable in the par ameter | H | + | ϕ | as we use a no n-constructive approach in Lemma 7.1 4 and also the a lgorithm desc r ibed in [29] seems to us e the minor H in an inappropria te wa y for para meter ized complexity . W e therefore turn to a different par ametrization o f the problem, wher e we take the parameter to b e | ϕ | + | H | . This pro blem was s tudied by Dawar, Gr ohe and Kr eutzer in [21]. T he appro ach taken ther e is s imilar to the metho d outlined ab ov e . How ever, instead of using tree-de c o mpos itions ov er L ( λ, µ ), [21] us es a slightly weak er form of decomp ositions, ca lled we ak decomp ositions ov er L ( λ, µ ). The main result in [21] is that fo r every H , every g raph exc luding H has a weak deco mpositio n ov e r so me L ( λ, µ ) (which is rela tiv ely straightforward to show) and that these decomp ositions can b e computed by an fpt-algor ithm with parameter H (whic h requir es co nsiderably more w or k). O nce this is shown, the pro of metho d outlined ab ov e can be a dapted to weak decomp ositions yie lding the following result. Theorem 7.16 ( Dawar, Gr ohe, Kr eutzer [2 1] ) The fol lowing pr oblem is fix e d- p ar ameter tr actable. p -MC( F O ) Input: G, H such that H 6 4 G , ϕ ∈ F O . Par ameter: | ϕ | + | H | . Pr oblem: Decide G | = ϕ. An immediate consequence of the theorem is the following. Reca ll from Sec- tion 7.3 the definition of the minimum exclude d clique n umber me c ( G ) of a graph G and o f lo cally excluded minors. F or any function f : N → N let C f be the clas s of graphs G s uc h that me c ( G ) ≤ f ( | G | ). 69 Corollary 7. 17 Ther e is an unb ounde d function f : N → N such that MC( F O , C f ) is fix e d-p ar ameter tr actable. Another consequence of the theorem is tha t it allows us to apply the fra me- work of lo calisation a s develop ed in Section 7.3 to obtain the fo llo wing result. Corollary 7. 18 Le t C b e a class of gr aphs lo c al ly excluding a minor. Then the pr oblem MC( F O , C ) Input: G ∈ C , ϕ ∈ FO . Par ameter: | ϕ | . Pr oblem: Decide G | = ϕ . is fix e d-p ar ameter tr actable. The pr evious r esult has a num b er of algor ithmic applicatio ns . Corollary 7. 19 1. The fol lowing pr oblem is fixe d-p ar ameter tr actable. p -Domina ting Set Input: Given graphs G, H such that H 6 4 G a nd k ∈ N . Par ameter: k + | H | . Pr oblem: Decide whether G contains a dominating set of size ≤ k . Analo gous r esu lts hold for al l ot her first- or der definable p ar ameterize d pr ob- lems, such as Independent Set and Clique and also for pr oblems su ch as de ciding for a fixe d gr aph G ′ whether G ′ has a homomorp hism into G , or G ′ is an (induc e d) sub gr aph of G , wher e her e t he p ar ameter c an b e taken to b e | H | + | G ′ | . 2. L et C b e a class of gr aphs lo c al ly excluding a minor. Then pr oblem su ch as Domina ting S et , Independent Set etc. ar e fixe d-p ar ameter tr actable on C . F u rthermor e, t he pr oblem, given gr aphs H and G such t hat G ∈ C , to de cide whether H is homomorphi c to G or H is an (induc e d) sub gr aph of G c an b e de cide d by fpt algorithms with p ar ameter | H | . 7.5 Limits to First-Order Mo del -Chec king In the previo us sections we hav e seen v arious exa mples for classes of g raphs or structures tha t allow efficient mo del-c hecking for first- or monadic seco nd-order logic, wher e efficient means fixe d-parameter tra c ta ble. The picture descr ibed there (and illustrated in Figure 1 8 b elow) is as yet far fro m b eing complete with a nu mber of incompar able gra ph inv a riants which allow par a meterized algor ithms for first-order mo del-chec king. It is an interesting and imp ortant challenge to explore the b oundary of para metrized tractability for first-orde r mo del-chec king. In an ideal situation, we would be able to completely classify the cla sses C of structures into those where MC( FO , C ) is FPT and wher e it is not. So fa r , work in 70 this dir ection has mainly fo cussed on establishing parameter ized mo del-checking algorithms for v arious cla sses o f graphs defined in terms of graph pr oper ties. It is unlikely that in this wa y , or a t least with the prop erties s tudied so far, we can fully explo re tr actability for fir st-order mo del-chec king. F or , F O - or MSO mo del-ch ecking is prese r ved under interpretations. Lemma 7. 20 If C is a class of gr aphs such that MC ( F O , C ) is fixe d-p ar ameter tr actable on C and D is a class of gr aphs firs t -or der int erpr etable in C as describ e d in Se ction 2.3, then first -or der mo del-che cking is fixe d-p ar ameter tra ctable on D . Corollary 7. 21 If MC( FO , C ) is fi x e d-p ar ameter tra ctable then so is MC( F O , D ) for the class D := { G := ( V , V 2 \ E ) : ( V , E ) ∈ C } of gr aphs whose c omplements ar e in C . Hence, if there is a graph prop erty tha t pr ecisely describ es when FO mo del- chec king is tra ctable, it has to b e closed under edge-complementation or more generally under first-or der interpretations. Clearly , none of the g raph structur e classes considered in this pape r ar e closed under edge-co mplemen tation. In addition to studying further classes of gr a phs obtained from graph in- v aria n ts it may therefore b e b eneficial to consider constr uctions that allow us to constr uct new cla sses C of g raphs w ith tractable mo del-chec king from o ther, known clas ses of g r aphs. F or instance, one co uld tr y to generalise the construc- tions using tre e -decomp o sitions ov er classes of graphs. It is ea sily seen that if C is a class of graphs for which the appropriate version of Lemma 7.14 holds, then first-order mo del-chec k ing is also tractable on the class of graphs that can efficiently be tree- de c ompos ed ov er C . W e refra in from g iv ing a formal defini- tion of this a s, so fa r, its o nly applicatio n seems to b e Theor em 7.15. T ree- decomp ositions a re a sp ecial case wher e F eferma n-V aught style theor ems ca n b e applied. It may b e worth while to co nsider further constructions that allow us to define new tractable mo del-chec king intances from the classes we already know. The pr evious lemma also has interesting consequences in its neg ative for m, that is , it ca n be use d to show intractability res ults as demonstrated in the next lemma. Lemma 7. 22 F or k ∈ N let AD k b e the class of gr aphs of maximu m aver age de gr e e at most k , wher e t he max im um av era ge degr ee of a gr aph G is the maxi- mum of the aver age de gr e es of al l sub gr aphs of G . F or k ≥ 4 , MC( FO , AD k ) is A W[ ∗ ] -har d, i.e. fix e d-p ar ameter intr actable. Pro of. Reca ll from Section 2.4 that MC( F O , Graph ), the model- checking pr ob- lem for FO on the class of all finite g raphs, is A W[ ∗ ]-complete. F urther, FO mo del-ch ecking on the class of all gra phs G can easily b e reduced to FO mo del- chec king on the class of incidence graphs I ( G ). As incidence graphs hav e maxi- m um av era ge deg ree at most 4, the result follows immediately .  Hence, graph clas ses of b ounded maximum av erage degre e provide a first non-trivial upp er b ound for parameterized tracta bilit y of FO mo del-checking. Complementing the efforts to esta blish fixed-para meter tra c ta bilit y results for 71 first-order mo del-chec king o n v arious classes of graphs and structures, it would be interesting to prov e stronger int ra ctabilit y res ults. F or MSO ther e is hop e that a clean characterisation of tractable cases might b e achiev a ble essentially using existing machinery . F or first-or der logic we are still very far from a go o d understanding of its tractable a nd intractable case s and muc h more work is needed approaching the tractabilitiy frontier from bo th s ide s . T ow ar ds another graph prop erty that may yield fixed-para meter algo r ithms for first-or der logic, co nsider a gain the pro of of the previo us lemma. E ssent ially , given a gr aph G we s ubdivide every edg e once to obtain the incidence g raph. F or first-order log ic, this do es not p ose muc h of a proble m as we can ea s ily rewrite the for m ula to deal with the sub division. Similar ly , if we re pla ce every edge by a path of length k , i.e. sub divide a b ounded num ber of times, then ag a in we obtain small maximum av erage deg ree but we can easily r ewrite first-order formulas to deal with these pa ths of fixed length. Note that this essentially mea ns that we replace every vertex by a gr aph of fixed r adius, e.g. in the c ase of k = 3 we repla c e every vertex by a star. Hence, if we ar e interested in pa ramaterized tra c tabilit y , then we should require our graphs to have bounded ma xim um av erage degree even after we contract neighbourho o ds of fixed ra dius. This idea is formalised in the notion o f b ounded expansion introduced b y Ne ˇ set ˇ ril a nd Oss o na de Mendez in [64,65,66]. Let H , G be gr aphs such tha t H 4 G a nd let µ b e a minor map from H to G . The r adius of µ is defined as the maxima l ra dius of any o f the subgraphs µ ( v ), for v ∈ V ( H ). W e write H 4 r G if ther e is a minor map µ o f ra dius ≤ r from H to G . The gr e atest r e duc e d aver age density (gr ad) ∇ r ( G ) of r ank r of G is defined a s ∇ r ( G ) := max  | E ( H ) | | V ( H ) | : H 4 r G  . A cla s s C of g r aphs ha s b oun de d exp ans ion if there is some function f : N → N such that ∇ r ( G ) ≤ f ( r ) for a ll r ∈ N and G ∈ C . As shown by Ne ˇ set ˇ ril and Os sona de Mendez [63], every class excluding a minor also has b ounded expansion. O n the other hand, there a re classe s of g raphs which lo ca lly exclude a minor, in fact ev en classes o f graphs of b ounded lo cal tree- w idth, which do not have b ounded expansion. (See [53, Example 4.7] for an example of a cla ss of b ounded lo cal tr ee-width but unbounded expansion.) The co n verse is true as well, i.e. there are class es of graphs of b ounded e xpansion that do not lo cally exclude a minor. Classes of b ounded expansion ov ercome the problem with first-order model- chec king outlined ab ov e: the graphs in the clas s must have small av erag e deg ree even after we contract neig hbo urho ods o f fix e d radius. Hence our interpretation from the class of a ll graphs in to the cla ss of graphs of maximum average degr ee at most 4 do es not yield a class with bo unded e xpansion. Op en Problem 7.23 Is MC( FO , C ) fi x e d-p ar ameter tr actable on every class C of b ounde d exp ansion? 72 8 Conclusion This pap er g iv es an ov erview o f algo r ithmic meta-theor ems developed in recent years. See Fig ure 18 for a diagrammatic s ummary of the res ults presented in this pap er. bd. tree−width trees bd. average degree bd. degree H−Minor Free bd. local tree−w. bd. local rank−w. loc. excl. minors slow grow ex min Apex Minor Free bd. clique−width planar bd. expansion Courcelle [13] Kreutze r 08 Dawar , Grohe, Kreutze r [21] Dawar , Grohe, Kreutze r [ 21] Flum, Grohe [45] F rick, Grohe [47] closure un der FO interpre tations closure un der MSO interpretations FO MSO Courcelle [12] F rick, Grohe [47] Seese [80] intrac table classes tractable classes closure un der FO interpre tations Grohe [53] de Mendez [63] Ne ˇ set ˇ ril, Fig. 1 8. Summar y of results As we hav e se e n, first-order mo del-chec king is fixed- parameter tr actable on a wide r ange of graph classes defined b y standar d gr aph inv ariants s uc h as tre e- width or excluded minor s. By lo calis ing these inv ariants we obtained even further tractable classes. How ever, we ar e still very far from a clear picture of where first-order mo del-c hecking is tractable a nd where it is no t. F urther res earch, in 73 particular into in tra ctabilit y results is needed be fore we can ho pe for a clea n and smo oth theor y . Ac kno wledgem en ts I wan t to take this opp ortunity to express my gra titude tow a rds Ma rtin Grohe for the long discussio ns we had on graph minors and for his advise, patience and inspiration during the time I worked with him a t the Hum b oldt Universit y in Berlin. Many thank s to J avier Espa rza for pro ofrea ding this manuscript and for his patience as an editor. Also, many thanks for pro ofrea ding this manuscript to Martin Gro he, Paul Hun ter, Michael K reiken baum, Andra s Salamon, Marc Thu rley , Mark W eyer. References 1. I. Adler, M. Grohe, and S. Kreutzer. Computing excluded minors. In Pr o c. of the 19th ACM-S IAM Symp osium on Discr ete Algorithms (SODA) , pages 641–650, 2008. 2. H. Andr´ ek a, J. v an Benthem, and I. N´ emeti. Modal languages and b ounded frag- ments of predicate logic. Journal of Phil osophic al L o gic , 27:217–274, 1998. 3. S. Arnb org, D. Corneil, and A. Proskurow ski. Complexity of finding embeddings in a k -t ree. SIAM Journal on Algebr aic Discr ete Metho ds , 8:277 – 284, 1987. 4. S. A rn b org, J. Lagergren, and D. Seese. Easy problems for tree-d ecomposable graphs. Journal of Algor ithms , 12(2):308 –340, 1991. 5. Z. Bian and Q.-P . Gu. Computing branch decomp osition of large planar graphs. In Exp erim ental Algor ithms , volume 5038 of L e ctur e Notes in Computer Scienc e , pages 87–100. Springer, 2008. 6. H. Bo dlaender. A linear-time algorithm for fin ding tree-decomp ositions of small tree-width. SIAM Journal on Computing , 25:1305 – 1317, 1996. 7. H. Bo dlaender and D. M. Thilik os. Constructive linear time algorithms for branch- width. In Pr o c. of the 24th Int. Col. on Auto mata, L anguages and Pr o gr ammi ng (ICALP) , volume 1256 of L e ctur e Notes in Computer Sci enc e (LNCS) , pages 627 – 637. Springer, 1997. 8. E. B¨ orger, E. Gr¨ adel, and Y. Gurev ic h. The Classic al De cisi on Pr oblem . Springer- V erlag, 2001. 9. J. R. B¨ uchi. W eak second-order arithmetic and finite automata. Zeitschrift f ¨ ur Mathematische Lo gi k und Grund lagen der Mathematik , 6:66–9 2, 1960. 10. H . Comon, M. Dauchet, R . Gilleron, C. L¨ oding, F. Jacquemard, D. Lugiez, S. Ti- son, and M. T ommasi. T ree automata tec hn iq ues and applications. Avai lable on: http://tat a.gforge.inria. fr/ , 2007. Release 12 O ct ob er 2007. 11. T. Cormen, C. Leiserson, R. Rivest, and C. Stein. Intr o duction to Algorithms . MIT Press, 2nd edition, 2001. 12. B. Courcelle. An axiomatic definition of context-free graph grammars an d appli- cations to NLC grammars. The or etic al Computer Scienc e , 55:141–181, 1987. 13. B. Courcelle. Graph rewriting: An algebraic and logic approac h. In J. van Leeuw en, editor, Handb o ok of The or etic al Computer Scienc e , volume 2, pages 194 – 242. Elsevier, 1990. 74 14. B. Courcelle. The monadic second-order theory of graphs VI I: Graphs as relational structures. The or etic al Computer Scienc e , 101:3–33, 1992. 15. B. Courcelle, R.G. Downey , and M.R. F ello ws. A note on the computabilit y of graph minor obstruction sets for monadic second order ideals. Journal of Universal Computer Scienc e , 3:1194–1198, 1997. 16. B. Courcelle and J. Engelfriet. A logical characterization of the sets of hyper- graphs defi n ed by hyperedge replacement grammars. Mathematic al Systems The- ory , 28:515–552, 1995. 17. B. Courcelle, J. Engelfriet, and G. Rozenb erg. Handle-rewriting hyp ergraphs gram- mars. Journal of Computer and System Scienc es , 46:218 – 270, 1993. 18. B. Courcelle, J. Mako wski, and U . Rotics. Linear time solv able optimization prob- lems on graphs of b ounded clique-width. The ory of Computing Systems , 33(2):125– 150, 2000. 19. B. Courcelle and S. Olariu. Upp er b ounds t o the clique width of graphs. Discr ete Applie d Mathematics , 101:77 –114, 2000. 20. B. Courcelle and S.-I. Ou m. V ertex-minors, monadic second-order logic, and a conjecture by Seese. Journal of Combinatorial The ory, Series B , 97(1):91– 126, 2007. 21. A . Daw ar, M. Grohe, and S. Kreutzer. Lo cally excluding a minor. In L o gic in Computer Scienc e (LICS) , pages 270–27 9, 2007. 22. A . Daw ar, M. Grohe, S. Kreutzer, and N. Schw eik ardt. A ppro ximation sc hemes for first-order defi nable optimisation problems. In L o gic in C omputer Scienc e (LICS) , pages 411–420 , 2006. 23. A . Daw ar, M. Grohe, S. Kreutzer, and N . Sch wei k ardt. Mod el theory makes formu- las large. In Pr o c. of the 34th International Col lo quium on Automat a, L anguages and Pr o gr am m ing (ICALP) , volume 4596 of L e ctur e Notes i n Computer Scienc e , pages 913–924 , 2007. 24. E. D emaine and M. Ha jiaghayi. Graphs excluding a fixed minor ha ve grids as large as treewidth, with combinatorial an d algorithmic app lications through b idi- mensionalit y . In Pr o c. of the 16th ACM-SIAM Symp osium on Discr ete A lgorithms (SOD A) , pages 682–68 9, 2005. 25. E. Demaine and M. Ha jia ghayi. The bidimensionality th eory and its algori thmic applications. The Computer Journal , pages 332–337, 2008. 26. E. Demaine and M. Ha jiaghayi. Linearit y of grid minors in treewidth with appli- cations through bidimensionality . Combi natoric a , 28(1):19–36, 2008. 27. E. Demaine, M. Ha j iaghayi, F. F omin, and D. Thilikos. Bidimensional parameters and local tree-width. SI A M Journal of Discr ete Mathematics , 2004. 28. E. Demaine, M. Ha ji aghayi, an d D. Thilik os. The bidimensional theory of b ounded - genus graphs. SIAM Journal of Discr ete M athemat ics , 20(2):357– 371, 2006. 29. E. D. D emaine, M. Ha jiagha yi, and K. Kaw arabay ashi. Algorithmic graph minor theory: D ecomposition, app ro ximation, and coloring. In 46th Annual Symp osium on F oundations of Computer Scienc e (F OCS) , p ages 637–646, 2005. 30. R . Diestel. Gr aph The ory . Springer-V erlag, 3rd edition, 2005. 31. J. Doner. T ree acceptors and some of their applications. Journal of Computer and System Scienc es , 4:406– 451, 1970. 32. F. Dorn, F. F omin, and D. Thiliko s. Catalan structures and dyn amic programming in H -minor-free graphs. In Pr o c. of the 19th A CM-SIAM Symp osium on Discr ete Algor ithms (SODA) , pages 631–6 40, 2008. 33. F. Dorn, F. F omin, and D. Thilikos. Sub exp onential p arameterized algorithms. Computer Scienc e R eview , 2:29–39, 2008. 75 34. R . Downey and M. F ellow s. Fixed- p arameter tractability and completeness I: Basic results. SIAM Journal on Computing , 24:873–921, 1995. 35. R . Downey and M. F ellows. Fixed- parameter tractabilit y and completeness I I: On completeness for W[1]. The or etic al Computer Scienc e , 141:109–131, 1995. 36. R . Downey and M. F ellows . Par ameterize d Complexity . Sprin ger, 1998. 37. H .-D. Ebbinghaus and J. Flum. Finite Mo del The ory . S pringer, 2nd edition, 1999. 38. H .-D. Ebbinghaus, J. Flum, and W. Thomas. Mathematic al L o gic . Sp ringer, 2nd edition, 1994. 39. J. Engelfriet and V. van Oostrom. Logical description of context-free graph lan- guages. Journal of Computer and System Scienc es , 3:489–503, 1997. 40. P . Hlin ˇ en´ y and S.-I. Oum. Finding branc h-d ecompositions a nd rank- decomp ositions. Av ailable at http://www.mat h.uwaterloo.ca/ ∼ sangil/ , 2007. 41. W. Esp elage, F. Gursk i, and E. W anke. Deciding clique-width for graphs of b ounded tree-width. In Pr o c. of the 7th International Workshop on Algorithms and Data Structur es (W ADS) , volume 2125 of L e ctur e Notes in Computer Scienc e , pages 87–98, 2001. 42. M. R. F ello ws, F. A. Rosamond, U. Rotics, and S. Szeider. Clique-width minimiza- tion is np -hard. In 38th ACM Symp osium on The ory of Computing (STOC) , pages 354–362 , 2006. 43. M.R. F ellow s an d M.A. Langston. An analogue of the Myhill-Nero de theorem and its use in computingfinite-b asis characterizations. In Pr o c e e dings of the 30th Ann ual IEEE Symp osium on F oundations of Com puter Scienc e , pages 520–525, 1989. 44. M.R. F ellows and M.A. Langston. On search, d ecision and the efficiency of p olynomial-time algorithms. I n Pr o c. of the 21st ACM Symp osi um on The ory of C omputing (STOC) , pages 501–51 2, 1989. 45. J. Flum and M. Grohe. Fixed-parameter tractabilit y , definability , and mo del- chec k ing. SIAM Journal of Computing , 31(1):113–145, 2001. 46. J. Flum and M. Grohe. Par ameterize d Complexity The ory . Sp ringer, 2006. ISBN 3-54-029952 -1. 47. M. F ric k and M. Grohe. D eciding first-order p roperties of lo cally tree-decomp osable structures. Journal of the A CM , 48:1148 – 1206, 2001. 48. H . Gaifman. On local and non- local prop erties. In J. Stern , ed itor, Herbr and Symp osium, L o gic Col lo quium ’81 , pages 105 – 135. North Holland, 1982. 49. M. R. Garey , D. S. Johnson, and L. S t ockmey er. Some simplified NP-complete problems. In Pr o c. of the 6th ACM Symp osium on The ory of Computing (STOC) , pages 47–63, 1974. 50. J.F. Geelen, A.M.H. Gerards, N. R obertson, an d G. Whittle. O n the excluded minors for the matroids of branch-width k . Journal of Combinatorial The ory, Series B , 88:261 –265, 2003. 51. E. Gr¨ adel, C. Hirsch, and M. Ott o. Bac k and forth b etw een guarded and mo dal logics. ACM T r ansactions on Computational L o gics , 3(3):418–463, 2002. 52. M. Grohe. Lo cal tree-width, excluded minors, and approximation algorithms. Com- binatoric a , 23(4):613 –632, 2003. 53. M. Grohe. Logic, graphs, and algorithms. In T.Wilk e J.Flum, E.Gr¨ adel, edi- tor, L o gic and Aut omata – History and Persp e ctives . Am sterd am Universit y Press, 2007. 54. Q- P . Gu and H. T amaki. Optimal b ranc h-d ecomposition of planar graphs in O( n 3 ) time. In Pr o c. of the 32nd International Col lo quium on Automata, L anguages and Pr o gr am m ing (ICALP) , pages 373–384, 2005. 76 55. F. Gurski an d E. W anke. The tree-width of clique-width b ounded graphs without k n , n . In Pr o c. of the 27th International W orkshop on Gr aph-The or etic Conc epts in Computer Scienc e (WG) , volume 1928 of L e ctur e Notes in Computer Scienc e , pages 196–205 , 2001. 56. F. Gu rski and E. W anke. Minimizing NLC-width is NP-complete. In Pr o c. of the 31st International Workshop on Gr aph-The or etic Conc epts in Computer Scienc e (WG) , p ages 69–80, 2005. 57. W. Hodges. A shorter mod el the ory . Cam bridge Universit y Press, 1997. 58. V . Jel ´ ınek . The rank-width of the square grid. In Pr o c. of the 34th International Workshop on Gr aph-The or etic Conc epts i n Computer Scienc e (WG) , 2008. 59. K. Ku rato wski. Su r le probl´ eme des courb es gauches en top ologie. F undamentae Mathematic ae , 15:271 – 283, 1930. 60. J. Lagergren. Upp er boun ds on the size of obstructions and intertw ines. Journal of C ombinatorial T he ory, Series B , 73:7–40, 1998. 61. L. Libkin. Elements of Fi nite Mo del The ory . Springer, 2004. 62. J. Mak owski. Algorithmic uses of th e Feferman-Vaught theorem. An nals of Pur e and Applie d L o gic , 126:159 –213, 2004. 63. J. N e ˇ set ˇ ril and P . Ossona de Mendez. Grad and classes with b ounded expansion I–I II . Eur op e an Journal of Combinatorics , 29, 2008. Series of 3 pap ers app earing in volumes (3) and (4). 64. J. N e ˇ set ˇ ril and P . Ossona de Mendez. Grad and classes with b ounded expansion I. D ecompositions. Eur op e an Journal of Combinatorics , 29(3):760–7 76, 2008. 65. J. N e ˇ set ˇ ril and P . Ossona de Mendez. Grad and classes with b ounded expansion I I. Algorithmic asp ects. Eur op e an Journal of Combinatorics , 29(3):777–791, 2008. 66. J. Ne ˇ set ˇ ril and P . Ossona de Mendez. Grad and classes with b ounded expansion I II . Restricted graph homomorphism dualities. Eur op e an Journal of Combinatorics , 29(4):1012 –1024, 2008. 67. R . Niedermeier. Invitation to Fixe d-Par ameter Algorithms . Ox ford Universit y Press, 2006. IS BN 0-19-856607-7. 68. S .-I. Oum. Rank-width is less than or equal to branch-width. Journal of Gr aph The ory , 57(3):23 9–244, 2008. 69. S .-I. Oum and P .D. Seymour. Approximating clique-width and branch-width. Jour- nal of Combinatorial The ory, Series B , 96:514 – 528, 2006. 70. C. Papadimitriou. Computational Complexity . Addison-W esley , 1994. 71. N . Rob ertson, P . Seymour, and R. Thomas. Quickly excluding a planar graph . Journal of Combinatorial The ory, Series B , 1994. 72. N . Rob ertson and P . D. S eymour. Graph minors V. Ex cluding a planar graph. Journal of Combinatorial The ory, Series B , 41(1):92–1 14, 1986. 73. N . Rob ertson and P . D. Seymour. Graph minors X. Obstructions to tree- decomp ositions. Journal of C ombinatorial T he ory B , 52:153–190, 1991. 74. N . R obertson an d P .D. Seymou r. Graph minors I – XXI I I. App earing in Journal of Com binatorial Theory , S eries B since 1982. 75. N . Rob ertson and P .D. S eymour. Graph minors I I I. Planar tree-width . Journal of Combinatorial The ory, Series B , 36:49 – 64, 1984. 76. N . Rob ertson and P .D. S eymour. Graph minors XI I I. The disjoint paths problem. Journal of Combinatorial The ory, Series B , 63:65–1 10, 1995. 77. N . R obertson and P .D. Sey mour. Graph minors XVI. Excluding a n on - planar graph. Journal of Combinatorial The ory, Series B , 77:1–27, 1999. 78. N . Rob ertson and P .D. Seymour. Graph minors XX. Wagner’s conjecture. Journal of C ombinatorial T he ory, Series B , 92:325–3 57, 2004. 77 79. D . Seese. The structure of mod els of decidable monad ic th eories of graphs. Annals of Pur e Applie d L o gic , 53(2):169–195, 1991. 80. D . Seese. Lin ear time comput able problems and first- order descriptions. Mathe- matic al Structur es in Computer Scienc e , 5:505–526, 1996. 81. P . Sey mour. A b ou n d on the excluded minors for a surface, 1995. U npublished manuscri pt. 82. P . Seymour and R. Thomas. Call routing and the ratcatcher. Combinatoric a , 14(2):217– 241, 1994. 83. J. W. Thatcher and J. B. W righ t. Generalise d fi nite aut omata theory with an application to a decision problem of second-order logic. Mathemat ic al Systems The ory , 2:57– 81, 1968. 84. W. Thomas. Lan gu ages, automata, and logic. In G. R ozen b erg and A. Salomaa, editors, Handb o ok of F ormal L anguages , volume I II , pages 389–455. Sp rin ger, 1997. 85. C. Thomassen. A simpler pro of of the excluded minor t h eorem for higher surfaces. Journal of Combinatorial The ory, Series B , 70:306– 311, 1997. 86. M. V ardi. On th e complexity of relational qu ery languages. In Pr o c. of the 14th Symp osium on The ory of Computing (STOC) , pages 137–146, 1982. 87. M. V ardi. On the complexity of b ounded v ariable queries. In Pr o c. of the 14th ACM Symp osium on Principles of Datab ase Systems (PODS) , pages 266–276, 1995. 88. K. W agner. ¨ Ub er eine Eigenschaft der eb enen Komplexe. Mathematische Annalen , 114:570 –590, 1937. 89. E. W anke. k -NLC graphs and p olynomial algorithms. Discr ete Appli e d Mathemat- ics , 54:251–2 66, 1994. 78

Original Paper

Loading high-quality paper...

Comments & Academic Discussion

Loading comments...

Leave a Comment