*Manuscript Click here to download Manuscript: CourcelleGROW17.pdf

1 2 3 4 5 6 7 8 Grammars and -width bounds 9 10 from split decompositions 11 12 13 Bruno Courcelle 14 Labri, CNRS and Bordeaux University∗ 15 33405 Talence, France 16 email: [email protected] 17 18 December 28, 2018 19 20 21 22 Abstract 23 24 Graph decompositions are important for algorithmic purposes and for 25 graph structure theory. We relate the split decomposition introduced by 26 Cunnigham to vertex substitution, graph grammars and clique-width. 27 For this purpose, we extend the usual notion of substitution, upon 28 which is based, by considering graphs with dead 29 (or non-boundary) vertices. We obtain a simple grammar for distance- 30 hereditary graphs. We also bound the clique-width of a graph in terms 31 of those of the components of a split decomposition that need not be canonical. 32 For extending these results to directed graphs and their split decompo- 33 sitions (that we handle formally as graph-labelled trees), we need another 34 extension of substitution : instead of two types of vertices, dead or alive as 35 for undirected graphs, we need four types, in order to encode edge direc- 36 tions. We bound linearly the clique-width of a directed graph G in terms 37 of the maximal clique-width of a component arising in a graph-labelled 38 that defines G. This result concerns all directed graphs, not only the 39 strongly connected ones considered by Cunningham. 40 41 42 43 44 Introduction 45 46 47 Hierarchical graph decompositions and the associated graph complexity mea- 48 sures such as tree-width and clique-width are important for algorithmic purposes 49 and graph structure theory. Tree-width and clique-width occur as parameters 50 ∗This work has been supported by the French National Research Agency (ANR) within 51 the IdEx Bordeaux program "Investments for the future", CPU, ANR-10-IDEX-03-02, and 52 also within the project GraphEn started in October 2015. 53 54 55 1 56 57 58 59 60 61 62 63 64 65 1 2 3 4 in many fixed-parameter tractable (FPT) algorithms [15, 18, 21, 25], in particu- 5 6 lar for the verification of monadic second-order properties of graphs. They are 7 actually linearly related in many interesting cases [10, 11, ?]. 8 These algorithms are based on the construction of finite automata that run 9 on algebraic terms representing tree-decompositions, or on clique-width terms 10 in the case where the parameter is clique-width (see Definition 1.2). However, 11 these automata cannot be implemented in the classical way because their sets 12 of states are much to large. The notion of fly-automaton [13, 14] can overcome 13 this difficulty in many cases1: these automata compute their transitions instead 14 of looking into transition tables. 15 Even for checking properties of graphs of bounded tree-width, it is convenient 16 to input graphs by clique-width terms, and we develop the theory and practice 17 of fly-automata for graphs defined in this way in [13, 14]. As for tree-width, 18 computing the exact clique-width of a graph is an NP-complete problem [24]. 19 However, clique-width terms witnessing "good" approximations of clique-width 20 can be used with fly-automata. Such terms can be constructed by different 21 algorithms, and with help of modular or split decomposition2, in preliminary 22 steps. Let us point a difference between the two : modular decomposition is 23 based on a rooted tree, and is clearly hierachical. Split decomposition is based 24 25 on trees without root ; by choosing a root for such a tree, one can turn the 26 decomposition into a hierachical one, but one needs an appropriate notion of 27 graph substitution : we define one in this article. Rank-width, in a similar way, 28 is based on unrooted trees. However, by choosing a root and using appropriate 29 graph operations, derived from those upon which clique-width is defined, one 30 obtains also a hierachical decomposition [17]. 31 Modular decomposition is related to clique-width as follows. Each undirected 32 graph has a canonical (i.e., unique up to isomorphism) modular decomposition. 33 Its clique-width is the maximal clique-width of a prime module of the modular 34 decomposition (Proposition 2.112 of [15]). It has also a canonical split decom- 35 position. Theorem 4.14 establishes that its clique-width is linearly bounded in 36 terms of the maximal clique-width of a prime component of this decomposi- 37 tion3, the other components being stars and cliques. Theorem 5.14 shows the 38 same for directed graphs. These theorems improve boundings based on logic or 39 rank-width (cf. Sections 4.4 and 5.3). 40 Our initial motivating example was the class of distance-hereditary graphs 41 (DH graphs in short). They are the undirected graphs G in which the distance in 42 any connected induced subgraph is the same as in G. They are known to have 43 44 clique-width at most 3 [29, 36, 37]. However, recognizing the clique-width terms 45 that define them is not easy. For the purpose of testing fly-automata, one may 46 wish to generate large "random" DH graphs together with the algebraic terms 47 of clique-width 3 that denote them. A good tool consists in using a context- 48 1 A software is developped by Irène Durand [22]. Some parts of it are accessible online [23]. 49 2 See [31] and the references in that article for modular decomposition. Split decomposition 50 defined by Cunnigham [19] is studied in [7, 27, 28]. We give definitions in Sections 4 and 5. 51 Modular and split decomposition can both be computed in linear time for undirected graphs. 3 52 Prime components cannot be split, cf. Section 4.1. 53 54 55 2 56 57 58 59 60 61 62 63 64 65 1 2 3 4 free graph grammar, built from clique-width operations that use three labels4. 5 6 The characterization of DH graphs from [1], based on the addition of pendant 7 edges and twins (see Definition 1.1), uses rewriting rules that are not those of 8 a context-free graph grammar appropriate for using fly-automata intended to 9 run on their derivation trees or on the equivalent clique-width terms. However, 10 from this characterization, we can construct such a context-free grammar based 11 on vertex-replacement, a notion developped in [15] (also [6] for an axiomatic 12 definition of context-free graph grammars). 13 This construction uses a generalization of the standard notion of substitution 14 of a graph for a vertex, that underlies the theory of modular decomposition. 15 We distinguish in a graph H some vertices as alive and the others as dead. 16 Dead vertices will not be linked to any others in case H is substituted into 17 another graph5. We use this notion of substitution to define an associated 18 notion of context-free vertex-replacement grammar (see [6, 15] for these graph 19 grammars defined in a more general setting). We obtain a very simple grammar 20 for DH graphs. Distance-hereditary graphs are also easily characterized in terms 21 of their canonical split decompositions, and our grammar is based on these 22 decompositions. 23 Generalizing this observation, we use grammars to generate the graphs whose 24 25 components relative to split decomposition belong (up to isomorphism) to a fixed 26 finite set M. We bound their clique-width in terms of the maximal clique-width 27 of a graph in M, in a better way than what is known from [7]. 6 28 Split decomposition for strongly connected (directed) graphs has also been 29 studied in [7, 19]. We extend to directed graphs our results for undirected 30 graphs. For expressing split decompositions in terms of graph substitution, we 31 need a more involved notion of substitution. Whereas for undirected graphs, we 32 distinguish dead vertices from live ones (the others), for directed graphs, we 33 need three types of live vertices, in order to encode three types of connections 34 between two vertices u and v : from u to v (only), from v to u (only) or in both 35 directions. 36 We consider split decompositions of directed graphs that need not be strongly 37 connected, and we handle them formally as graph-labelled trees, a notion used 38 in [7, 27]. We prove that the clique-width of a directed graph G is bounded by 39 8k+1, where k is the maximum clique-width of a component of a graph-labelled 40 tree that defines G. 41 Some properties of undirected graphs do not extend immediately to directed 42 ones. It is well-known that each component of a graph-labelled tree that de- 43 44 fines an undirected graph G is isomorphic to an induced subgraphs of G, hence 45 4 But we do not get an equal probability for two DH graphs of same size. See Section 4.5 46 for an unambigous grammar. 47 5 In [36], dead vertices are defined in clique-width terms by inactive labels. We will use 48 ⊥ as an inactive label. Dead vertices may be called non-boundary by analogy with the case of graphs of bounded tree-width, built by gluing small graphs at boundary vertices [21], also 49 called sources in [15]. 50 6 A different notion of split decomposition for directed graphs, that generalizes also the one 51 for undirected graphs, has been defined in [34]. We will say a few words about it in Section 52 5.4. 53 54 55 3 56 57 58 59 60 61 62 63 64 65 1 2 3 4 has no larger clique-width. For strongly connected directed graphs, each such 5 6 component H is isomorphic to an induced minor of the considered graph G. 7 An induced minor of G is obtained from an induced subgraph by edge contrac- 8 tions. Here, we contract edges having particular degree constraints. We obtain a 9 bounding of the form cwd(H) ≤ f(cwd(G)) where f is an exponential function. 10 Improving this bound is an open problem. 11 12 To summarize, the purpose of this article is to clarify the close relation- 13 ships between split decomposition, clique-width and vertex-replacement graph 14 grammars based on vertex substitutions. In particular, we translate split de- 15 compositions of undirected graphs into graph grammars and we bound linearly 16 the clique-width of a decomposed graph, either directed or not, in terms of those 17 of the components. Our graph grammars can be used for counting graphs of 18 special types and for random generation, along the lines of, e.g., [4, 26, 38]. 19 20 Section 1 is devoted to basic definitions. In particular, we present our view of 21 context-free graph grammars in terms of equation systems by using the example 22 of . Section 2 introduces vertex substitutions for undirected graphs with 23 dead vertices, and the corresponding grammars. Section 3 relates clique-width 24 25 and substitutions. Section 4 studies split decomposition of undirected graphs in 26 this perspective, with the help of graph-labelled trees. Section 5 develops the 27 case of directed graphs. 28 29 Acknowledgement: I thank M. Bousquet-Mélou, I. Durand, E. Gioan, M. 30 Kanté, S. Oum, C. Paul and the referees for their useful comments and sug- 31 gestions (in particular the reference to [4]). I also thank the editors of the 32 special issue of Discrete Applied Mathematics relative to the GROW meeting 33 in Toronto, in 2017 for wellcoming this submission, and the Fields Institute for 34 supporting this excellent workshop. 35 36 37 38 1 Graphs and clique-width 39 40 Most definitions are well-known, we mainly review notation. We state a few 41 facts that are either well-known or easy to prove. 42 The union of two sets is denoted by ⊎ in cases where we stress they are 43 disjoint. The cardinality of a set X is denoted by |X| and its powerset by 44 P(X). The set of integers {1, ..., n} is denoted by [n]. 45 All trees and graphs are nonempty and finite. 46 47 Trees 48 The set of nodes of a tree T is denoted by NT , and its set of leaves, i.e., of 49 nodes of degree 1, by L . A node that is not a leaf is internal. 50 T If T has a root, then < denotes the corresponding ancestor relation, a strict 51 T partial order on N (a node is not an ancestor of itself). The root, denoted by 52 T 53 54 55 4 56 57 58 59 60 61 62 63 64 65 1 2 3 4 root , is the unique maximal element and the leaves different from the root are 5 T 6 the minimal ones. A Sn is a tree with n − 1 leaves, n ≥ 3, linked to a single 7 node called its center. 8 9 Graphs 10 We consider finite simple graphs, i.e., that are loop-free and without parallel 11 edges. Graphs7 are directed or not. Directed edges are called arcs. A graph 12 G has a vertex set VG included in a fixed countably infinite set V. Its set of 13 edges or arcs is denoted by EG. The corresponding binary adjacency relation 14 is denoted by edgG (even if G is directed). If G is undirected, we denote by uv, 15 equvalently by vu, an edge linking vertices u and v. If G is directed, we denote 16 by uv an arc from u to v. 17 We denote by H ⊆i G that H is an induced subgraph of G, by G[X] the 18 induced subgraph of G with vertex set X ⊆ VG, by G − X the graph G[VG − X] 19 and by G − x the graph G[VG − {x}] where x ∈ VG. 20 21 Definition 1.1 : Distance-hereditary graph 22 An undirected graph G is distance-hereditary (DH in short) if the distance 23 of two vertices in every connected induced subgraph is the same as in G. For 24 an example, the cycle C4 (with 4 vertices) is DH whereas C5 is not. The DH 25 8 26 graphs are characterized as follows : a DH graph is an isolated vertex, or the 27 disjoint union of two DH graphs or is obtained from a DH graph by the addition 28 of a pendant edge to a vertex x, or of a true or false twin to x. Adding to x 29 a true twin is adding a new vertex y linked to x and to the neighbours of x. 30 Adding a false twin is similar with y not linked to x. 31 32 Clique-width 33 Clique-width is based on operations that modify or combine vertex-labelled 34 graphs. There will be some restrictions regarding the special label ⊥ to be used 35 in Section 3. 36 37 Definition 1.2 : Labelled graphs and clique-width 38 (a) Let C be a finite set of labels. A C-labelled graph, or simply, a C-graph, 39 is a triple G = (VG,EG, πG) where πG is a mapping : VG → C. Its type, denoted 40 by τ(G), is π (V ), i.e., the finite set of labels from C that label some vertex 41 G G of G. 42 We denote by ≃ the isomorphism of C-graphs up to vertex labels, i.e., the 43 44 isomorphism of the underlying unlabelled graphs, and by ≡ the existence of an 45 isomorphism that respects labels. An abstract C-graph (resp. abstract graph) is 46 an equivalence class of ≡ (resp. of ≃). 47 (b) We define operations on C-graphs : 48 7 Undefined notions are as in [20]. 49 8 This characterization is from [1]. The DH graphs are also the graphs of rank-width 1 [37]. 50 They have clique-width at most 3, as we will prove in detail. 51 52 53 54 55 5 56 57 58 59 60 61 62 63 64 65 1 2 3 4 - the union of two disjoint C-graphs ; it is denoted by the binary 5 9 6 infix function symbol ⊕, 7 - the unary operation adda,b for a, b ∈ C, a = b adds an undirected 8 edge between each a-labelled vertex x and each b-labelled vertex y 9 (unless there is already an edge xy), 10 −−→ 11 - for building directed graphs, we use similarly adda,b to add arcs 12 from a-labelled to b-labelled vertices, 10 13 - the unary operation relabh changes every vertex label a into h(a) 14 where h is a partial mapping : C → C (a label a is not modified if 15 h(a) is undefined). 16 - for each a ∈ C, the nullary symbol a(x) denotes the isolated vertex 17 x (x ∈ V) labelled by a. 18 19 20 −−→ Hence, τ(G ⊕ H) = τ(G) ∪ τ(H), τ(adda,b(G)) = τ(adda,b(G)) = τ(G), 21 ′ ′ ′ τ(relabh(G)) = h (τ(G)) where h is the total mapping such that h (a) :=if 22 h(a) is undefined then a else h(a), and τ(a(x)) = {a}. 23 24 (c) We denote by FC the countable set of these operations. A term over FC is 25 well-formed if no two occurrences of nullary symbols denote the same vertex; in 26 particular, the graphs defined by the two arguments of ⊕ are disjoint. We denote 27 by T (F ) the set of well-formed terms, that we will call the clique-width terms. 28 C val 29 Each such term t denotes a C-graph (t) whose vertices are those specified 30 by the nullary symbols of t. Its width is the number of labels that occur in t. 31 Using a standard convention, we will denote in the same way a function 32 symbol and the graph operation it defines. Hence, relabh(t) is a term if t is a 33 term in T (FC ), and relabh(G) denotes a C-graph if G denotes a C-graph. 34 11 35 (d) The clique-width of a C-graph G, denoted by cwd(G), is the least width ∗ 36 of a term t such that G ≃ val(t). We denote by cwd (G) the least width of a term 37 t such that G ≡ val(t). Hence, cwd(G) ≤ cwd∗(G). Clearly, cwd(G) = cwd∗(G′) 38 where G′ is obtained from G by relabelling all its vertices in the same way. 39 40 (e) If G and H are not disjoint, we define G ⊕ H as the union of two disjoint 41 isomorphic copies of G and H. The resulting C-graph is well-defined up to 42 isomorphism, hence as an abstract C-graph. # 43 44 Here are some examples (cf. [15]). The clique-width of a tree is at most 3, 45 that of the clique Kn is 2 for n ≥ 2. The undirected cycles C3,C4 have clique- 46 width 2, C ,C have clique-width 3, and C has clique-width 4 for n ≥ 7. For 5 6−→ −→ n −→ 47 directed cycles C n, we have cwd(C 3) = 3 and cwd(C n) = 4 if n ≥ 4. 48 9 49 As ⊕ is associative, we will write t = t1 ⊕ t2 ⊕ ... ⊕ tn instead of t1 ⊕ (t2 ⊕ (... ⊕ tn)...) or any equivalent writing. It is also comutative. 50 10 If h modifies only one label, we call relabh an elementary relabelling. By using only 51 elementary relabellings, one obtains the same notion of clique-width ([15], Proposition 2.118). 11 52 In [15], we denote cwd∗ by cwd. 53 54 55 6 56 57 58 59 60 61 62 63 64 65 1 2 3 4 Lemma 1.3 : For every C-graph G, we have : 5 ∗ 6 max{|τ(G)| , cwd(G)} ≤ cwd (G) ≤ |τ(G)| · cwd(G). 7 Proof: 8 The first inequality is clear from definitions. To prove the second 9 one, we assume without loss of generality, that the type of G is [p]. Let H be 10 G with all vertices labelled in the same way. Let C be the set of k labels of a 11 term t that defines H. For each a in C and i ∈ [p], we define a new label (a, i) 12 that will only label the vertices x such that πG(x) = i. 13 Consider in t a nullary symbol a(x). If πG(x) = i, we replace it by (a, i)(x). ′ 14 Each relabelling relabh is replaced by relabh′ where h maps (a, i) to (b, i) 15 whenever h maps a to b. Similarly, we replace adda,b by the composition of 12 ′ 16 the operations add(a,i),(b,j) for i, j ∈ [p]. We obtain in this way a term t over 17 the set of labels [p] ⊎ (C × [p]). We let h′′ : C ×[p] → [p] map (a, i) to i for ′ ′ 18 a ∈ C and i ∈ [p]. Then G = relabh′′ (val(t )) = val(relabh′′ (t )). The term ′ 19 relabh′′ (t ) uses at most p(1 + k) labels. However, we can fix some a ∈ C and 20 replace everywhere (a, i) by i, for each i. We obtain a term of width at most pk 21 that defines G. # 22 23 Hence if the type of G consists of p labels and k is the clique-width of the 24 corresponding unlabelled graph, then one can define G, with its labelling, by a 25 term with at most pk labels. This lemma implies that cwd(G) ≤ 2cwd(G − x) 26 if x is a vertex of G. This bound is proved in [30]. 27 28 Questions 1.4 : Can one improve the bounds13 cwd(G) ≤ 2cwd(G−x) and 29 30 |τ(G)| · cwd(G) (of Lemma 1.3) ? 31 32 Definition 1.5 : Abstract graphs 33 We will also use nullary "generic" symbols a that do not denote any partic- 14 34 ular vertex. The vertex defined by an occurrence u of a in a term t is u itself. 35 We will also consider that a term written with such nullary symbols denotes an 36 abstract C-graph (cf. Definition 1.2(a,e)). See [15], Section 2.52. 37 We will denote by F C the signature FC where each symbol a(x) is replaced 38 by a, and by t the term in T (F C ) obtained from a term t ∈ T (FC ) by replacing 39 each a(x) by a. Then val(t) ≡ val(t). 40 41 Example 1.6 : The grammar for cographs. 42 We present context-free graph grammars, defined as equation systems whose 43 unknowns are sets of abstract graphs, by using the example of cographs. 44 (1) One characterization of cographs is the following recursive one. Graphs 45 are simple and undirected. The product of two disjoint graphs G and H, denoted 46 by G ⊗ H is defined as their union augmented with all edges between G and H. 47 48 12 The construction is similar for directed graphs and it needs no more labels. 13 49 It not hard to prove that lcwd(G) ≤ lcwd(G−x)+2 where lcwd denotes the linear clique- width. This variant is defined by requiring that at least one of the two arguments of ⊕ is a 50 nullary symbol. See e.g., [15, 32]. 51 14 Occurrences in terms can be designated by Dewey words or by integers, cf. Definition 2.3 52 in [15], 53 54 55 7 56 57 58 59 60 61 62 63 64 65 1 2 3 4 A is either an isolated vertex, G⊕H or G⊗H for disjoint cographs G 5 6 and H. Hence, the set C of abstract cographs is the least set (least for inclusion) 7 that satisfies the recurive equation : 8 C = {∗} ∪ (C ⊕ C) ∪ (C ⊗ C) 9 10 where ∗ denotes an isolated vertex (up to isomorphism), D ⊕ E := {G ⊕ H | 11 G ∈ D,H ∈ E} and similarly for ⊗. 12 We call such a description a (context-free) graph grammar. 13 Each cograph has thus a hierchical description, in terms of smaller cographs 14 and the two operations ⊕ and ⊗. Hence, it is defined by, or more formally, is 15 the value of a term in T ({⊕, ⊗, ∗}), i.e., a term written with ⊕, ⊗ and ∗. For 16 ∗ ∗ ∗ ∗ ⊕ ∗ 17 example the term t := (( ⊕ ) ⊕ ) ⊗ ( ) defines the complete bipartite 18 graph K3,2. 19 A fundamental property ([15], Proposition 3.23) states that the same recur- 20 sive equation in sets of terms X ⊆ T ({⊕, ⊗, ∗}), hence : 21 X = {∗} ∪ (X ⊕ X) ∪ (X ⊗ X) 22 23 defines (by taking the least solution) the terms representing cographs. (If 24 Y,Z ⊆ T ({⊕, ⊗, ∗}), then Y ⊕ Z denotes the set of terms t ⊕ t′ such that t ∈ Y 25 and t′ ∈ Z.) 26 Actually, this equation defines the full set T ({⊕, ⊗, ∗}). Cographs are the 27 ∗ 28 graphs defined by all terms in T ({⊕, ⊗, }). A cograph can be defined by several 29 different terms, hence, this grammar is ambigous, which makes difficult its use 30 for counting. However, an unambigous grammar can be used (See Section 4.5). 31 32 The general notion of a grammar allows systems of mutually recursive equa- 33 tions that define sets of graphs or sets of terms. An example is : 34 D = {∗ ⊗ ∗} ∪ (D ⊕ E) ∪ (E ⊗ E), 35 36 E = {∗} ∪ (D ⊕ ∗) ∪ (E ⊗ E). 37 38 The least sets D and E satisfying these equations are particular sets of 39 cographs. The two sets of terms that form the least solution in T ({⊕, ⊗, ∗}) 40 of the (identical) system : 41 ∗ ∗ 42 Y = { ⊗ } ∪ (Y ⊕ Z) ∪ (Z ⊗ Z), 43 Z = {∗} ∪ (Y ⊕ ∗) ∪ (Z ⊗ Z). 44 45 define the sets D and E. 46 47 To simplify notation, we will write ∗ instead of {∗} and ∗ ⊗ ∗ instead of 48 {∗⊗∗} in such equations, and similarly for terms without unknowns. The same 49 letters X, Y, Z... will be used for sets of terms and the sets of graphs they denote. 50 51 (2) Systems of recursive set equations, written with set union and the ex- 52 tensions of functions to sets, make sense in any F -algebra M = (M, (fM)f∈F ) 53 54 55 8 56 57 58 59 60 61 62 63 64 65 1 2 3 4 where M is a set equipped with functions fM indexed by a functional signature 5 6 F . Take for example F consisting of a, b, f, g, h of respective arities 0,0,1,2,3. 7 Then a system of equations like : 8 D = a ∪ f(b) ∪ f(D) ∪ g(E, E), 9 10 E = b ∪ h(D, E, E) ∪ g(E, D), 11 12 where D, E ⊆ M has a least solution. Its least solution in subsets of M 13 T (a, b, f, g, h) consists of two sets whose sets of values in are D and E. M 14 Such sets are the equational sets . This notion is relative to the algebraic 15 structure specified by the operations (fM)f∈F , cf. [15], Chapter 3. 16 17 18 19 2 Substitution to vertices 20 21 In this section, we consider undirected graphs. We will adapt the definitions to 22 23 directed graphs in Section 5. Let C be a set of labels containing ⊥ . The vertices of a graph G labelled by 24 dead 25 ⊥ will be said to be dead ; they form the set VG . The others, said to be alive live 26 form the set VG . The unary operation κ, read kill, relabels all vertices by ⊥, 27 hence makes them dead. 28 29 Definition 2.1 : Substitution. 30 Let K be a C-graph and x1, . . . , xp be pairwise distinct vertices. Let H1,..., 15 31 Hp be pairwise disjoint C-graphs, that are disjoint from K. We define a C- 16 32 graph G := K[x1 ← H1, . . . , xp ← Hp] as follows : 33 34 VG := (VK − {x1, . . . , xp}) ⊎ VH1 ⊎ ... ⊎ VHp ,

35 πG(v) := πK(v) if v ∈ VK − {x1, . . . , xp}, 36 live πG(v) := πK(xi) if v ∈ V , 37 Hi 38 dead πG(v) := ⊥ if v ∈ VHi . 39 40 Its edges are as follows, for u, v in VG : 41 42 uv ∈ EG if and only if : 43 either uv ∈ EK and neither u nor v is in {x1, . . . , xp}, 44 or uv ∈ E for some i, 45 Hi live 46 or u ∈ VK, uxi ∈ EK and v ∈ VHi (or vice-versa by exchanging u 47 and v since we define undirected graphs, so that uv and vu designate 48 the same edge), 49 live live or u ∈ V , v ∈ V and xixj ∈ EK (so that i = j). 50 Hi Hj 15 51 It is actually enough to assume that (VH1 ⊎ ... ⊎ VHp ) ∩ (VK − {x1, . . . , xp}) = ∅. 16 52 Read "Hi is substituted to xi in K". 53 54 55 9 56 57 58 59 60 61 62 63 64 65 1 2 3 4 The type of G is thus that of K, possibly augmented with ⊥ if some H has 5 i 6 dead vertices : these vertices are dead in G. The labels of K have no influence 7 on the definition of the edges of G, they only specify, together with the labels of 8 the graphs Hi, those of the resulting graph G. The labels of the Hi’s other than 9 ⊥ do not contribute to the labelling of G : if for each i, a mapping hi : C → C 10 satisfies hi(a) = ⊥ if and only if a = ⊥, then : 11 12 K[x1 ← H1, . . . , xp ← Hp] = K[x1 ← relabh1 (H1), . . . , xp ← relabhp (Hp)]. 13 If all vertices of H are dead, then 14 p 15 K[x ← H , . . . , x ← H ] = (K − x )[x ← H , . . . , x ← H ] 16 1 1 p p p 1 1 p−1 p−1 ⊕H . 17 p 18 Because of dead vertices, this notion of substitution differs from the classical 19 one, used in particular in the theory of modular decomposition (see the survey 20 [31]). If K,H ,...,H have no dead vertices, then K[x ← H , . . . , x ← H ] 21 1 p 1 1 p p is the usual substitution, as in [15], Section 2.5. 22 23 Proposition 2.2 24 : Let K,H1,H2 be pairwise disjoint C-graphs and x1 ∈ 25 VK. 26 (1) If x2 is another vertex of K, then K[x1 ← H1][x2 ← H2] = K[x1 ← 27 H1, x2 ← H2]. 28 (2) If x2 ∈ VH1 , then K[x1 ← H1][x2 ← H2] = K[x1 ← H1[x2 ← H2]]. 29 30 Proof : (1) Straightforward verification from the definitions. ′ 31 (2) Let G := K[x1 ← H1][x2 ← H2] and G := K[x1 ← H1[x2 ← H2]].Clearly, 32 VG = VG′ . 33 (2.1) We now compare edges. Let u, v belong to VG. If u and v are both, ′ 34 either in VK, or in VH1 or in VH2 , then uv ∈ EG if and only if uv ∈ EG . 35 Otherwise we distinguish three cases. 36 (i) u ∈ VK and v ∈ VH1 ; then, uv ∈ EG if and only if ux1 ∈ EK and v is live 37 in H1, if and only if uv ∈ EG′ . 38 (ii) u ∈ VK and v ∈ VH2 ; then, uv ∈ EG if and only if ux2 ∈ EK[x ←H ] and 39 1 1 v is live in H2. The condition ux2 ∈ EK[x1←H1] is equivalent to : ux1 ∈ EK and 40 x is live in H . 41 2 1 Now uv ∈ E ′ if and only if ux ∈ E and v is live in H [x ← H ] which 42 G 1 K 1 2 2 is true if and only if v is live in H and x is live in H . Hence, uv ∈ E if and 43 2 2 1 G ′ 44 only if uv ∈ EG . (iii) u ∈ V − {x } and v ∈ V ; then uv ∈ E if and only if ux ∈ E 45 H1 2 H2 G 2 H1 and v is live in H , if and only if uv ∈ E , if and only if uv ∈ E ′ . 46 2 H1[x2←H2] G ′ 47 Hence, G and G have the same edges. 48 (2.2) It remains to verify that πG = πG′ . ′ 49 If u ∈ (VK − {x1}) ⊎ (VH1 − {x2}), then πG(u) = πG (u) because u is not 50 affected by the substitutions to x2.

51 If u ∈ VH2 , then πG(u) = ⊥ if u is dead in H2; it is πK[x1←H1](x2) otherwise.

52 We have πK[x1←H1](x2) = ⊥ if x2 is dead in H1, and otherwise, it is πK(x1). 53 54 55 10 56 57 58 59 60 61 62 63 64 65 1 2 3 4 Now, π ′ (u) = ⊥ if u is dead in H [x ← H ] and it is π (x ) otherwise; 5 G 1 2 2 K 1 6 observe that u is dead in H1[x2 ← H2] if and only if it is dead in H2 or x2 is 7 dead in H1. We obtain πG(u) = πG′ (u) in this case; this value is either πK(x1) 8 or ⊥ (if u is dead in H2 or x2 is dead in H1). 9 This completes the proof. # 10 11 Properties (1) and (2) are called respectively commutativity and associativity 12 of substitution in [6]. They are axioms for the definition of context-free graph 13 grammars based on an abstract notion of substitution and on equation systems, 14 as explained in Example 1.6. These grammars are particular vertex replacement 15 grammars [15]. 16 17 Definition 2.3 : Graph operations based on substitution. 18 (a) For each C-graph K with vertex set enumerated as {x1, . . . , xp}, we define 17 19 as follows a p-ary graph operation on C-graphs denoted by σ[K, x1, . . . , xp] : 20 σ[K, x1, . . . , xp](H1,...,Hp) := K[x1 ← H1, . . . , xp ← Hp] (1) 21 where H1,...,Hp are pairwise disjoint C-graphs that are disjoint from K. 22 Note that the vertex set of σ[K, x1, . . . , xp](H1,...,Hp) is VH1 ⊎ ... ⊎ VHp . 23 If H ,...,H are not pairwise disjoint, we replace them by isomorphic copies 24 1 p in a standard way (cf. Definitions 1.2(e) and 1.5, and Chapter 2 of [15]), so that 25 σ[K, x , . . . , x ] becomes a p-ary operation on abstract C-graphs. 26 1 p 27 (b) We denote by ΣC the countable set of these operations together with 28 the nullary symbols a(x) (this symbol denote the a-labelled vertex x ∈ V, as in 29 Definition 1.2(b)). A term t ∈ T (ΣC ) is well-formed if each vertex x occurs at 30 most once in some symbol a(x). It defines a C-graph val(t) where (1) is used 31 to evaluate σ[K, x1, . . . , xp](H1,...,Hp). 32 (c) The signature ΣC is obtained from ΣC by replacing, for each a, each 33 symbol a(x) by a. As for clique-width terms in T (F C ), each term in T (ΣC ) 34 denotes an abstract C-graph. 35 36 We denote by relaba the relabelling relabh such that h(⊥) := ⊥ and h(b) := a 37 if b = ⊥. 38 ′ 39 Proposition 2.4 : Let t, t ∈ T (ΣC ) and x be a vertex in the C-graph val(t) 40 ′ defined in t by a(x). Let t be a term such that Vval(t′) ∩ (Vval(t) − {x}) = ∅. ′ ′ 41 We have : val(t)[x ← val(t )] = val(t[relaba(t )/a(x)]). 42 43 The C-graph val(t)[x ← val(t′)] is obtained by substituting in val(t) the 44 C-graph val(t′) to the vertex x. The term t[relab (t′)/a(x)] is obtained by 45 a substituting in t the term relab (t′) to the unique occurrence of a(x). It is well- 46 a defined because V ′ ∩ (V − {x}) = ∅ (cf. the first footnote in Definition 47 val(t ) val(t) 48 2.1). 49 50 Proof : By induction on the structure of t. 17 51 We use the same notation σ[K, v1, . . . , vp] for the p-ary function symbol and the corre- 52 sponding operation. Cf. Definition 1.2(c). 53 54 55 11 56 57 58 59 60 61 62 63 64 65 1 2 3 4 If t = a(x), then val(t)[x ←− val(t′)] = a(x)[x ←− val(t′)] = relab (val(t′)) 5 a val ′ val ′ a 6 = (relaba(t )) = (t[relaba(t )/ (x)]). 7 Let now t = σ[K, v1, . . . , vp](t1, . . . , tp). Without loss of generality and to 8 simplify notation, we assume that a(x) occurs in t1. Then, for every term s : 9 10 t[s/a(x)] = σ[K, v1, . . . , vp](t1[s/a(x)], t2, . . . , tp) and so 11 val(t[s/a(x)]) = 12 K[v ← val(t [s/a(x)]), v ← val(t ), . . . , v ← val(t )]. (2) 13 1 1 2 2 p p 14 By induction : 15 16 ′ ′ val(t1[relaba(t )/a(x)]) = val(t1)[x ← val(t )], 17 ′ 18 hence, Equality (2) where s = relaba(t ) yields 19 ′ ′ 20 val(t[relaba(t )/a(x)]) = K[v1 ← val(t1)[x ← val(t )], . . . , vp ← 21 val(tp)] 22 ′ 23 = K[v1 ← val(t1), . . . , vp ← val(tp)][x ← val(t )] by Propoposition 24 2.2(2), ′ 25 = val(t)[x ← val(t )]. # 26 27 28 By using these operations, one can define graph grammars, formalized by 29 systems of recursive equations in sets of abstract C-graphs, of which one takes 30 least solutions (cf. Example 1.6 and [15], Chapters 3 and 4). 31 32 33 Definitions 2.5 : Some useful operations. 34 Here are some operations on D-graphs, where D := {⊥, ⊤} and ⊤ labels the 35 live vertices. The first two equalities are mere observations. 36 37 κ(H) = σ[K, x ](H) where K consists of the dead vertex x . 38 1 1 39 H1 ⊕H2 = σ[K, x1, x2](H1,H2) where K consists of two isolated live 40 vertices x1 and x2. 41 42 We define : 43 44 H1 ⊗ H2 := σ[K, x1, x2](H1,H2) where K is the edge x1x2 where x1 45 and x2 are alive.

46 Λ(H1,H2) := σ[K, x1, x2](H1,H2) where K is the edge x1x2, x1 is 47 alive and x2 is dead. 48 49 The operations ⊕ and ⊗ are associative and commutative. Here are some 50 other algebraic properties18 : 51 52 18 We leave as an open problem to find a complete set of equational axioms for ⊕, ⊗, Λ, κ, ⊤. 53 54 55 12 56 57 58 59 60 61 62 63 64 65 1 2 3 4 κ(G⊗H) = κ(Λ(G, H)), (3) 5 6 κ(G⊕H) = κ(G)⊕κ(H) = Λ(κ(G),H) = Λ(κ(G), κ(H)), (4) 7 Λ(G, H1⊕H2) = Λ(Λ(G, H1),H2). (5) 8 9 10 We let Σdh be the signature {⊕, ⊗, Λ, κ, ⊤} ⊆ ΣD. For every vertex x, we 11 have ⊥(x) = κ(⊤(x)). Hence, we need not put the nullary symbol ⊥ in Σdh. 12 Actually, a vertex introduced by ⊥(x) is dead from the very beginning and is 13 isolated in the defined graph. 14 15 Examples 2.6 16 : Some grammars over Σdh. 17 Grammars are defined as equation systems that define sets of abstract D- 18 graphs. 19 (1) The following equation for cographs that we have already seen in Example 20 1.6, can be solved in sets of abstract D-graphs : 21 22 X = ⊤ ∪ (X ⊕ X) ∪ (X ⊗ X). 23 24 All vertices of the generated D-graphs are labelled by ⊤ because ⊕ and ⊗ 25 do not introduce dead vertices. We recall that X ⊕ X := {G ⊕ H | G, H ∈ X} 26 if X is a set of labelled graphs and similarly for ⊗ and the other operations 27 considered below. 28 As observed in Example 1.6, this equation can also be solved in T ({⊕, ⊗, ⊤}). 29 Its solution is a set of terms19 that we will denote by L(X). More generally, 30 for a system of set equations over a functional signature F that has unknowns 31 X, Y, Z..., we will denote by L(X),L(Y ),L(Z)... the associated sets of terms 32 in T (F ). If the system is solved in an F -algebra M, the corresponding sets of 33 objects X, Y, Z... are the sets of values in M of the terms in L(X),L(Y ),L(Z).... 34 35 (2) The rooted trees are defined recursively as follows : a unique node x is 36 a tree with root x; if A and B are disjoint rooted trees with respective roots a 37 and b, than one obtains a rooted tree C by taking the union of A and B, linked 38 by an edge ab, and a is taken as root of C. 39 We turn a rooted tree into a {⊤, ⊥}-graph such that the root is the only live 40 41 node. Then, C = Λ(A, B) if A, B, C are as above. The equation that defines the 42 set R of rooted trees is thus : 43 ⊤ 44 R = ∪ Λ(R, R). 45 Another grammar for trees is : 46 47 Y = ⊤ ∪ Λ(⊤,Z), Z = Y ∪ (Z ⊕ Z). 48 49 19 We call language a set of terms, whence the notation L(X). A set of graphs is not called 50 a language, in order to have a coherent terminology. 51 52 53 54 55 13 56 57 58 59 60 61 62 63 64 65 1 2 3 4 Here, Z defines the nonempty disjoint unions of rooted trees. 5 6 7 (3) Unrooted trees are defined by T and the additional equation T = κ(R) 8 or T = κ(Y ), with R, Y, Z as in (2). For an example, the tree with nodes 9 u,v,w,x,y,z, root x and edges xy, xz, xv, zu and vw is defined by the term : 10 11 Λ(Λ(Λ(⊤(x), ⊤(y)), Λ(⊤(z), ⊤(u))), Λ(⊤(v), ⊤(w))) 12 13 belonging to L(R) or by the term : 14 Λ(⊤(x), ⊤(y) ⊕ Λ(⊤(z), ⊤(u)) ⊕ Λ(⊤(v), ⊤(w))) 15 16 that belongs to L(Y ). 17 18 19 The paths with one live vertex at one end are defined by the equation 20 P = ⊤ ∪ Λ(⊤,P ). 21 22 23 (4) We will prove in the next proposition that the equation 24 25 W = ⊤ ∪ (W ⊕ W) ∪ (W ⊗ W) ∪ Λ(W, W) 26 27 defines, up to vertex labels, the distance-hereditary graphs (cf. Definition 28 1.1). 29 30 From these equations, we obtain that the rooted trees are defined by all 31 ⊤ ⊤ 32 terms in T ({Λ, }) or by certain terms in T ({⊕, Λ, }), and that the distance- ⊤ 33 hereditary graphs are defined by terms in T ({⊕, ⊗, Λ, }). In these equations 34 and the generated terms, the label ⊥ for dead vertices does not appear explicily, 35 but it is introduced by the operations Λ and κ. # 36 37 In the following description of distance-hereditary (DH) graphs, all vertices 38 are defined as dead, equivalently, unlabelled. The following recursive definition 39 of DH graphs has been established in [3], but we think interesting to prove it 40 by using the concepts of the present article. We recall that equation systems 41 always define abstract graphs. 42 43 Proposition 2.7 : (1) The distance-hereditary graphs form the set X de- 44 fined by the two equations : 45 46 X = κ(W) and W = ⊤ ∪ (W ⊕ W) ∪ (W ⊗ W) ∪ Λ(W, W). 47 48 (2) The connected distance-hereditary graphs form the set Y defined by the 49 equation : 50 51 Y = κ(⊤) ∪ κ(W ⊗ W) 52 53 54 55 14 56 57 58 59 60 61 62 63 64 65 1 2 3 4 and the equation of (1) that defines W. 5 6 20 ⊤ 7 Proof : (1) Note that L(W) = T ({⊕, ⊗, Λ, }). For both directions we 8 will use the characterization of DH graphs recalled in Definition 1.1. 9 Claim 1 : Every DH graph G is in the set val(X) = val(κ(W)). 10 Proof : We use induction on the number n of vertices of G. 11 If n = 1, then G is a single dead vertex, hence G ≡ κ(⊤) ∈ κ(W). 12 Otherwise there are four cases. 13 (i) G is the disjoint union of two DH graphs H,H′. Then, H ≡ κ(t),H′ ≡ 14 κ(t′) for some t, t′ ∈ W = T ({⊕, ⊗, Λ, ⊤}). Hence, G ≡ κ(t ⊕ t′) where t ⊕ t′ ∈ 15 L(W) because κ(t ⊕ t′) ≡ κ(t) ⊕ κ(t′). 16 (ii) If G is obtained from a DH graph G′ by adding a pendant vertex y to a 17 vertex x of G′, we have G = G′[x ← H] where H is the edge xy, with x alive 18 and y dead21; hence H = val(Λ(⊤(x), ⊤(y))). 19 We have G′ = κ(val(t′)) where t′ is a well-formed term over ⊕, ⊗, Λ and the 20 nullaries that define vertices. It has one occurrence of ⊤(x). 21 We let t := t′[Λ(⊤(x), ⊤(y))/⊤(x)]. By Proposition 2.4, we have val(t) = 22 val(t′[Λ(⊤(x), ⊤(y))/⊤(x)]) = val(t′[relab (Λ(⊤(x), ⊤(y)))/⊤(x)]) 23 ⊤ val(t′[x ← val(relab (Λ(⊤(x), ⊤(y))))] = val(t′[x ← H]). 24 ⊤ Hence G = κ(t), so that G ≡ κ(t) where t ∈ L(W) is obtained from t by 25 replacing by ⊤ the symbols ⊤(z) that define vertices. 26 ′ 27 (iii) Let G be obtained from a DH graph G by adding a false twin y to a ′ 28 vertex x. We have G = G [x ← H] where H consists of two isolated live vertices 29 x and y. Hence H = val(⊤(x) ⊕ ⊤(y)). The proof continues as in (ii) with 30 ⊤(x) ⊕ ⊤(y) instead of Λ(⊤(x), ⊤(y)). 31 (iv) Let G be obtained from a DH graph G′ by adding a true twin y to a 32 vertex x. Here G = G′[x ← H] where H consists of two live vertices x and y 33 linked by an edge, hence H = val(⊤(x) ⊗ ⊤(y)). The proof continues as in (iii) 34 with ⊤(x) ⊗ ⊤(y) instead of ⊤(x) ⊕ ⊤(y).# 35 36 Claim 2 : If G = val(t) for some well-formed term t over ⊕, ⊗, Λ and the 37 nullaries that define vertices, then κ(G) is DH. 38 Proof : By induction on the size of t. 39 If t = ⊤(x), the result holds because an isolated vertex is DH. Otherwise, we 40 can find a position u in t such that t/u, the subterm of t issued from position u, 41 is either Λ(⊤(x), ⊤(y)), ⊤(x) ⊕⊤(y), or ⊤(x)⊗⊤(y). Then t = t′[(t/u)/⊤(x)] 42 for some well-formed term t′ (t′ is obtained by replacing in t the subterm t/u 43 by ⊤(x)). By induction, κ(val(t′)) is a DH graph G′ and G = G′[x ← H] by 44 45 Proposition 2.6, where H is respectively as in cases (ii), (iii) or (iv).# 46 47 (2) It is clear that a term t in L(X) defines a connected graph if and only if 48 it is not of the form κ(t1 ⊕ t2). Hence, the connected DH graphs can be defined 49 by the equation : 50 20 See Example 1.6 for the solution of equations in sets of terms. If t is a term, we will write 51 G ≡ t to indicate that G ≡ val(t). 52 21 We use here the footnote in Definition 2.1. 53 54 55 15 56 57 58 59 60 61 62 63 64 65 1 2 3 4 Y = κ(⊤) ∪ κ(W ⊗ W) ∪ κ(Λ(W, W)) 5 6 where W is as in (1). However, we observed in Definition 2.5 that κ(Λ(G, H)) = 7 κ(G ⊗ H) for all D-graphs G and H. Hence, the term κ(Λ(W, W)) can be re- 8 9 moved. # 10 11 The bipartite DH graphs are built from isolated vertices by the addition of 12 pendant edges and of false twins [1]. Hence, they form the set B defined by the ′ ′ ′ ′ ′ ′ 13 two equations B = κ(W ) and W = ⊤ ∪ (W ⊕ W ) ∪ Λ(W ,W ). 14 15 16 3 Clique-width and substitution operations. 17 18 22 M 19 A derived operation relative to an F -algebra is defined by a term t in 20 T (F, {u1, ..., up}), i.e., a term over F with variables (or indeterminates, i.e, 21 nullary symbols to which values or terms can be substituted) u1, ..., up. The 22 corresponding p-ary function tM is defined by evaluating t with p arguments 23 from the domain of M as values of u1, ..., up. 24 For an example using clique-width operations, the operation ⊗ on graphs 25 of type {⊤} (cf. Definitions 1.6 and 2.5) satisfies the following equality for all 26 D-graphs G, H : 27 28 G ⊗ H = relaba→⊤(add⊤,a(G ⊕ relab⊤→a(H))). 29 23 30 Hence, ⊗ is a derived operation defined by the term relaba→⊤(add⊥,a(u1 ⊕ 31 relab⊤→a(u2))). 32 33 Our objective is to express the operations σ[K, x1, . . . , xp] as derived opera- 34 tions over FC , the signature upon which clique-width is based. 35 We let Lin(FC , {uq, ..., up}) be the set of terms in T (FC , {uq, ..., up}), q ≤ p, 36 where each variable ui has a unique occurrence and no other nullary symbol 37 occurs. Every such term defines a (p −q +1)-ary mapping on C-graphs denoted 38 by tG. For pairwise disjoint graphs Hq,...,Hp, the vertex set of tG(Hq,...,Hp) 39 is VHq ⊎ ... ⊎ VHp . 40 24 We define T (FC) as the set of terms that use none of the operations 41 ⊥−−→ −−→ 42 adda,⊥, add⊥,a, adda,⊥, add⊥,a, relabh if h(⊥) = ⊥, and no nullary symbol ⊥ 25 43 ⊥(x). We denote by cwd (G) the minimal cardinality of C − {⊥} such that ⊥ 44 G ≡ val(t) for some term t ∈ T⊥(FC ). Clearly, cwd(G) ≤ cwd (G) + 1. We 45 have cwd(T ) = 3 and cwd⊥(T ) = 2 for any tree T that is not a star. 46 Let K be a C-graph with vertex set {xq, . . . , xp} defined by a term t in 47 T⊥(FC ). Each vertex xi occurs in a nullary symbol ai(xi) in t such that ai = ⊥.

48 22 49 See, e.g. [15], Section 2.1. 23 This term uses an auxiliary label a = ⊥, ⊤. However, it defines graphs of type {⊤} from 50 graphs of same type. The label a can be replaced by any other label different from ⊤ or ⊥. 51 24 These limitations on the use of ⊥ make it an inactive label in [36]. 52 25 The equivalence ≡ respects vertex labels, cf. Definition 1.2(a). 53 54 55 16 56 57 58 59 60 61 62 63 64 65 1 2 3 4 We define t := t[u /a (x ), . . . , u /a (x )] ∈ Lin(F , {u , ..., u }). We recall 5 É q q q p p p C q p 6 that relaba is the relabelling that replaces by a every label except ⊥. 7 8 Lemma 3.1 : Let K be a C-graph with vertex set {x1, . . . , xp} defined 9 by t ∈ T⊥(FC ). Let Ét := t[u1/a1(x1), . . . , up/ap(xp)]. For pairwise disjoint 10 C-graphs H1,...,Hp, we have: 11 G 12 σ[K, x1, . . . , xp](H1,...,Hp) = Ét (relaba1 (H1), . . . , relabap (Hp)). 13 14 Proof: By induction on the structure of t. 15 If t = a1(x1), then Ét = u1, K only has the a1-vertex x1 and σ[K, x1](H1) = G 16 relaba1 (H1) = Ét (relaba1 (H1)) (by the behaviour of labels in substitution). 17 If t = t1 ⊕ t2, then, without loss of generality, we assume that the vertices 18 of K1 := val(t1) are x1, . . . , xi and those of K2 := val(t2) are xi+1, . . . , xp. We 26 19 have Ét = tÉ1 ⊕ tÉ2. Then, since substitution distributes over disjoint union and 20 by induction : 21 22 σ[K, x1, . . . , xp](H1,...,Hp) = 23 σ[K1, x1, . . . , xi](H1,...,Hi) ⊕ σ[K2, xi+1, . . . , xp](Hi+1,...,Hp) = 24 25 tÉ1G(relaba1 (H1), . . . , relabai (Hi))⊕tÉ2G(relabai (Hi), . . . , relabap (Hp)) = 26 ÉtG(relaba1 (H1), . . . , relabap (Hp)). 27

28 If t = f(t1) where f is relabh or adda,b, then the result holds because, for 29 every C-graph K with vertices x1, . . . , xp, we have : 30

31 σ[f(K), x1, . . . , xp](H1,...,Hp) = f(σ[K, x1, . . . , xp](H1,...,Hp)). 32 33 The equality to be proved follows then by induction. # 34 35 We will denote by tK and tÑK terms associated with K as above. We say 36 ⊥ that an operation σ[K, x1, . . . , xp] has width k if cwd (K) = k. The operations 37 ⊕, ⊗, Λ and κ have respective widths 2,2,2 and 1. 38 39 Proposition 3.2 : If G ≡ val(s) for some term s in T (Σ ) whose operations 40 C have width at most k, then cwd⊥(G) ≤ k and cwd(G) ≤ k + 1. 41 Proof : 42 By induction on the structure of s, we define a term sÜ in T (FC ) 43 such that val(sÜ) ≡ val(s). 44 If s = a(w), then sÜ := s. 45 If s = σ[K, x1, . . . , xp](s1, . . . , sp), then we define : 46 sÜ := tÑK[relaba1 (sÜ1)/u1, . . . , relabap (sÜp)/up]. 47 It is clear that val(sÜ) ≡ val(s). 48 The set of labels used in sÜ is the set of all those used in the terms tÑK ⊥ 49 where σ[K, x1, . . . , xp] occurs in s. We now bound cwd (G). Without loss of 50 generality, we can assume that all labels of the terms tK for K occurring in s 51 26 52 This is clear from Definition 2.1. 53 54 55 17 56 57 58 59 60 61 62 63 64 65 1 2 3 4 (via some σ[K, x1, . . . , xp]) are in a set C such that C − {⊥} has cardinality k. 5 ⊥ 6 Hence cwd (G) ≤ k and cwd(G) ≤ k + 1. # 7 8 If in s, all the operations of maximal width k do not use ⊥ in their definitions ⊥ 9 by terms, then cwd(G) = cwd (G) ≤ k. 10 11 Corollary 3.3 : Distance-hereditary graphs have clique-width at most 3 12 Proof : Distance-hereditary graphs are defined by means of the operations 13 κ, Λ, ⊕ and ⊗ of width at most 2. # 14 15 This result is known from [29, 37] with different proofs. As the operation Λ of 16 width 2 needs ⊥ in its defining term, we do not have cwd(G) = cwd⊥(G) ≤ 2. 17 Proposition 4.9 of [36] establishes that conversely, G is distance-hereditary if 18 cwd⊥(G) ≤ 2. 19 20 21 22 4 Split decomposition 23 24 25 The split decomposition of directed and undirected graphs has been defined and 26 studied by Cunnigham in [19]. We will formulate it in terms of graph-labelled 27 trees as in [27, 28] (also called split-decomposition graphs in [7]). We only 28 consider undirected graphs in this section. 29 30 31 32 4.1 Definitions and basic facts 33 Definition 4.1 : Graph-labelled trees and the graphs they describe. 34 We denote by L the set of leaves of a tree T and by Inc (v) the set of 35 T T 36 edges incident to a node v. 37 (a) A graph-labelled tree, denoted by T , is a tree T with at least three nodes 38 that is equipped, for each node v ∈ NT , with a connected graph Hv, called a 39 component, and a bijection ρv:IncT (v) → VHv . The components are pairwise 40 disjoint. We identify u and the unique vertex of Hu if u is a leaf. 41 Figure 1 shows a graph-labelled tree with leaves 1, ..., 8 and internal nodes 42 u, v, w, x. The components are surrounded by elipses. The dotted lines are the 43 edges of the tree T . Each of them links two vertices of two different components, 44 and each vertex x in a component Hv is incident to one and only one "dotted −1 45 edge", namely, ρv (x). 46 (b) The corresponding split-graph S(T ) is the union of the components to- 47 gether with the edges ρu(e)ρv(e) for e = uv, (the "dotted edges" of Figure 1). 48 A path in S(T ) is alternating if no two consecutive edges are in a same compo- 49 nent27. Between any two vertices x, y of S(T ), there is at most one alternating 50 path. If there is one, we say that x is accessible from y, and we precise through 51 52 27 Because of definitions, no two consecutive edges in a path can be tree-edges. 53 54 55 18 56 57 58 59 60 61 62 63 64 65 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 Figure 1: A graph-labelled tree T (cf. Definition 4.1(a). 17 18 19 20 z (or e) to indicate that this path goes through a particular vertex z (or edge 21 e). For a vertex w of S(T ) belonging to a component Hu, we denote by A(w) 22 (respectively by P (w)) the set of vertices accessible from w by a nonempty al- 23 ternating path whose first edge is not in Hu (respectively, reachable from w by 24 a nonempty path in S(T ) whose first edge is not in Hu). 25 (c) The graph described by T , denoted by G(T ), has vertex set LT and an 26 edge uv if and only if u is accessible from v. It is connected ([27], Lemma 2.3) 27 because the components are defined as connected28. 28 We continue to examine the graph-labelled tree T of Figure 1 and the asso- 29 30 ciated graph G(T ) in Figure 2. There is an alternating path between leaf 7 and 31 leaf 1. Hence, they are adjacent vertices in G(T ). On any path between 3 and 32 7, there are two consecutive edges of Hu, hence, 7 is not adjacent to 3. 33 (d) Let e = uv be an edge of T between two internal nodes. The node-joining 34 operation (cf. [27]) contracts this edge, hence fuses u and v into a single new ′ ′ 35 node say w, giving tree T ; the new component Hw is defined as Hu ⊎ Hv minus 36 the two vertices ρu(e), ρv(e) and augmented with an edge between any vertex x

37 in Hu and any vertex y in Hv such that xρu(e) ∈ EHu and ρv(e)y ∈ EHv . This 38 graph is connected. We obtain a graph-labelled tree T ′ (nothing else is modified 39 from T ) that describes the same graph. If ρu(e) has degree r in Hu and ρv(e) ′ 40 has degree s in Hs, the resulting component Hw has a subgraph isomorphic to 41 the complete Kr,s. 42 The opposite transformation is called node-splitting. It preserves also the 43 defined graph. # 44 45 Remark 4.2 : A graph G consisting of a single edge is defined by a graph- 46 labelled tree one component of which is an edge. Otherwise, a single edge compo- 47 nent H can be eliminated by a node-joining of u with one of its two neighbours. 48 u 49 28 If some components are not connected, the graph defined in this way is not connected. 50 Actually, a disconnected graph is best described as the union of its connected components. 51 Hence, we can require that components are connected. 52 53 54 55 19 56 57 58 59 60 61 62 63 64 65 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Figure 2: The graph G(T ) for T in Figure 1. 16 17 18 This elimination being done as much as possible, the resulting tree has no node 19 of degree 2. 20 21 However in a graph-labelled tree T that defines a graph with at least 2 22 vertices, it may be useful to insert a component consisting of a single edge (cf. 23 Section 4.5 below) : consider an edge uv of T , replace it by two edges uw and 24 wv where w is new node, and define the new component corresponding to w as 25 consisting of a single edge. 26 27 The following lemma is implicit in [15, 27]. We will generalize it for directed 28 graphs. 29 If uv is an edge of a tree T , we denote by NT,u\v the set of nodes of the 30 connected component of T − u that contains v. Notation is in Definition 4.1(b). 31 32 Lemma 4.3 : Let T be a graph labelled tree and G = G(T ). 33 (1) For each vertex x of S(T ), the set A(x) ∩ LT is not empty. 34 (2) Let x, y be distinct vertices of some component H. If xy is an edge of 35 H, there is an alternating path between any leaf in A(x) and any leaf of A(y). 36 Conversely, if an alternating path links a leaf in A(x) and a leaf of A(y), then 37 this path goes through H, and more precisely, through x and y, and xy ∈ E . 38 H Each component is isomorphic to an induced subgraph of G. 39 40 (3) Let uv be an edge of T . There is an alternating path between any leaf in 41 A(x) where x is a neighbour of ρu(uv) in Hu and any leaf in A(y) where y is a 42 neighbour of ρv(uv) in Hv. Any such path goes through the edge ρu(uv)ρv(uv). 43 44 Proof: (1) Let x belong to Hu. Then x = ρu(uv) for some (unique) edge uv 45 of T . We use induction on the cardinality of NT,u\v. , , 46 If ,NT,u\v , = 1, then v is a leaf in A(x) as A(x) = {v} = {ρv(uv)}. 47 Otherwise, Hv has an edge ρv(uv)y and y = ρv(vw) for some edge vw of T . 48 Then NT,v\w ⊂ NT,u\v and A(y) ∩ LT ⊆ A(x) ∩ LT . The set A(y) ∩ LT is not 49 empty by induction, so is A(x) ∩ LT . 50 (2) Let xy = ρu(uv)ρu(uw) be an edge of component Hu. Let z ∈ A(x) ∩ LT ′ ′ 51 and z ∈ A(y) ∩ LT . By connecting alternating paths between z and x, and z 52 53 54 55 20 56 57 58 59 60 61 62 63 64 65 1 2 3 4 and y with the edge xy, we get an alternating path between z and z′. Any such 5 6 path must through xy as one checks from the definitions. 7 For each vertex x of Hu, let us choose a vertex xÉ of G in A(x) ∩ LT . By the 8 previous observations, the induced subgraph of G whose vertices are the xÉ’s is 9 isomorphic to Hu. 10 (3) The proof is similar to that of (2). # 11 12 The following corollary illustrates these notions in the basic case of trees. 13 14 Corollary 4.4 : Let T be a graph-labelled tree. The graph G(T ) is a tree 15 if and only if : 16 17 (1) each component of T is a tree, and 18 (2) if e = uv ∈ E is not a pendant edge, then at least one of ρ (e) 19 T u and/or ρ (e) is a leaf of, respectively, H and/or H . 20 v u v 21 22 Proof : Assume G(T ) is a tree. By Lemma 4.3(2), each component of T is 23 isomorphic to an induced subgraph of G(T ), hence is a tree since components are 24 25 connected. For Property (2), if none of ρu(e) and ρv(e) is a leaf, then the node- 26 joining of u and v (Definition 4.1(d)) merges Hu and Hv into a component that 27 contains a Kr,s such that r, s ≥ 2. This component 28 has a cycle and G(T ) is not a tree by (1). 29 Conversely, let T satisfy (1) and (2). Consider e = uv satisfying Property ′ 30 (2) : if we apply to it the node-joining operation, the component Hw created 31 in this way is still a tree. The obtained graph-labelled tree T ′ satisfies (1) and 32 (2) and describes G(T ). By repeating this operation until all edges are pendant, 33 we obtain a graph-labelled tree that defines G(T ) and that has one component 34 that is a tree, all others being leaves. Hence G(T ) is a tree. # 35 36 A tree may be defined from several nonisomorphic graph-labelled trees. A 37 stronger condition than (2) of Corollary 4.4, namely Condition (2) of Theorem 38 4.6, yields unicity, up to isomorphism, of the graph-labelled trees that define 39 connected graphs. 40 41 Definition 4.5 : Split decompositions. 42 (1) A split of a graph G is a bipartition of V into two sets V and V having 43 G 1 2 44 each at least 2 vertices, such that the edges between V1 and V2 induce a complete 45 bipartite graph with at least one edge. These edges link any vertex of some set 46 A1 ⊆ V1 and any vertex of some A2 ⊆ V2. Hence, G is κ(G1 ⊗ G2) where the 47 induced subgraphs G1 := G[V1] and G2 := G[V1] have labels in D := {⊤, ⊥} in 48 such a way that the vertices in A1 ∪ A2 are labelled by ⊤ and the others by ⊥. 49 (2) A graph is defined as prime29 if it has at least 4 vertices and no split. 50 The connected graphs with 3 vertices are the stars S3 and the triangles, i.e., 51 29 A different notion of prime graph is used in the theory of modular decomposition, cf. [31]. 52 53 54 55 21 56 57 58 59 60 61 62 63 64 65 1 2 3 4 the graphs isomorphic to K .A star S , n ≥ 3, has a center and n − 1 adjacent 5 3 n 6 vertices that are leaves: Sn is a tree. Stars and cliques are not prime. No prime 7 graph has less than 5 vertices. The cycles Cn for n ≥ 5 are prime. # 8 9 Theorem 3 of [19], also proved as Theorem 2.9 in [27], states the following 10 existence and unicity theorem. 11 Theorem 4.6 12 : Every connected graph with at least 3 vertices is G(T ) for 13 a unique graph-labelled tree T such that : 14 (1) each component Hv is singleton, or prime, or is a clique Kn or a star Sn, 15 for some n ≥ 3, 16 (2) if e = uv ∈ ET , then Hu and Hv are not both cliques, and, if they are 17 both stars, then ρu(e) and ρv(e) are both centers or both leaves. 18 Unicity is understood up to isomorphism. # 19 20 Such a graph-labelled tree is called ïâÜ split decomposition of G. It is 21 canonical because of its unicity, up to isomorphism. It can be obtained from 22 an arbitrary graph-labelled tree that defines G by the node-splittings and the 23 node-joinings of Definition 4.1(d) (see [27] for details). The resulting tree has 24 no node of degree 2 (cf. Remark 4.2). We will also consider graph-labelled trees 25 that need not be canonical. 26 27 Remarks 4.7 : (1) The split decomposition of a clique Kn, n ≥ 3, has a 28 unique component that is a clique. But any graph-labelled tree all components 29 of which are cliques defines a clique. A clique Kn, n ≥ 3 can be defined by a 30 graph labelled tree all components of which are triangles or isolated vertices. 31 By using node splitting, we can replace a component Kr+s+2 where r, s > 1 by 32 two components K and K . 33 r+1 s+1 (2) In the split decomposition of a tree, all components are stars, and if 34 e = uv ∈ E , then ρ (e) and ρ (e) are both leaves of H and H by Corollary 35 T u v u v 36 4.5 and Theorem 4.7. Every tree with at least 3 nodes can be defined by a 37 graph-labelled tree all components of which are stars S3 or isolated vertices. As 38 above, this can be achieved by node-splitting. 39 40 Examples 4.8 : Distance-hereditary graphs and 3-leaf powers. 41 42 A graph-labelled tree defines a DH graph if and only if all its components 43 are stars and cliques as proved in [27], Section 3.1. 44 45 This article also studies particular DH graphs called 3-leaf powers. A 3-leaf 46 power is a graph G defined as follows from a tree R : VG := LR and two vertices 47 are adjacent if and only if they are at distance at most 3 in R. A graph is a 48 3-leaf power if and only if it is obtained from a tree by substitutions of cliques 49 to its vertices [2]. It follows that a graph G is a 3-leaf power if and only if it is a 50 clique or is G(T ) for some graph-labelled tree T having one component, say H0, 51 that is a tree whereas all others are cliques (an isolated vertex is a clique K1). 52 Hence, the set L of 3-leaf powers is defined, up to labels, by the two equations: 53 54 55 22 56 57 58 59 60 61 62 63 64 65 1 2 3 4 L = K ∪ Λ(L, L),K = ⊤ ∪ (K ⊗ K). 5 6 The set K is that of cliques where all vertices are alive. The equation for 7 L is derived from the first equation for rooted trees in Example 2.6(2). In 8 the characterization of 3-leaf powers of [27], the component H0 that is a tree is 9 decomposed in the canonical way of Theorem 4.7. 10 # 11 12 13 4.2 Graph-labelled trees and substitution operations. 14 15 We will use D-graphs, where D := {⊤, ⊥}. 16 17 Definitions 4.9 : Rooted graph-labelled trees and related notions. 18 (a) Let T be a graph-labelled tree, with underlying tree T , not reduced to a 19 single node. Let us select a node r ∈ NT and make it a root for T . We call then 20 T a rooted graph-labelled tree. If r is a leaf, we call it a leaf-rooted graph-labelled 21 tree, and otherwise, a non-leaf-rooted graph-labelled tree. 22 30 (b) If u ∈ NT , we let Nu := {x ∈ NT | x ≤T u} and Vu := {x ∈ LT | 23 x ≤ u}. Hence, V = L = V and V = {u} if u ∈ L − {r}. 24 T r T G u T (c) If u ∈ N − L has father w, we say that ρ (uw) is the leader of 25 T T u H , denoted by u, and we define H \u as the D-graph H − u (possibly not 26 u u u 27 connected) where a vertex x is alive (labelled by ⊤) if it is adjacent to u in 28 Hu and is dead (labelled by ⊥) otherwise. We define also Hr\r := Hr, all its 29 vertices being defined as dead. If r is a leaf, then Hr\r is undefined. 30 (d) If u ∈ NT , we define Gu as G[Vu] labelled as follows : 31 (d.1) if u = r, then every vertex of G = G is labelled by ⊥, 32 u 33 (d.2) if u = r, a vertex y of Gu is labelled by ⊤ if it is in A(z) 34 for some neighbour z (in Hu) of the leader of Hu; otherwise, it is 35 labelled by ⊥. 36 37 Note that if r is a leaf and u is its neighbour in T , then G = G = 38 r ⊤ 39 κ(Λ( (r),Gu). # 40 For an example, consider the graph-labelled tree of Figure 1 in Section 4.1 41 with root x. The vertices 4 and 5 are alive in G , but not in G . The vertices 42 v u 43 2,6,7 are alive in Gu. 44 The following lemma relates graph-labelled trees and substitution opera- 45 46 tions. Note that the graphs Hr\r depend on the root that is chosen. 47 Lemma 4.10 : Let T be a rooted graph-labelled tree that defines G. If u 48 49 in NT − LT has sons u1, ..., up, and the corresponding p vertices of Hu\u are 50 x1, ..., xp (that is, xi := ρu(uui) ), then we have : 30 51 T will denote the rooted tree, without explicit mention of r ; in particular, ≤T depends 52 on the choice of r. 53 54 55 23 56 57 58 59 60 61 62 63 64 65 1 2 3 4 G = (H \u)[x ← G , ..., x ← G ]. 5 u u 1 u1 p up 6 Proof : Let K := (Hu\u)[x1 ← Gu1 , ..., xp ← Gup ]. 7 1) The vertex set of G is V := {x ∈ V | x ≤ u} (V = L ) hence, is 8 u u G T G T the union the sets V := {x ∈ V | x ≤ u } that are the vertex sets of the 9 ui G T i graphs G . Hence, G and K have the same vertices. 10 ui u 2) As the graphs G are induced subgraphs of G, two vertices of G are 11 w ui 12 adjacent in Gu if and only if they are in G as well as in Gui , hence also in K. 13 Consider vertices x of Gui and y of Guj , j = i. If they are adjacent in Gu, 14 hence in G, they are linked by an alternating path, that must go through Hu, 15 and not through its leader u, and use its edge ρu(uiu)ρu(uju) = xixj, an edge

16 of Hu\u. This path goes through the leader ρui (uiu) of Hui . Hence, x is alive

17 in Gui . Similarly, y is alive in Guj . Hence xy is an edge of K. 18 Conversely, if xy ∈ EK, then xixj is an edge of Hu\u, the vertex x is alive

19 in Gui and y is alive in Guj . Going back to definitions, we have an alternating 20 path between x and y. Hence, xy is a edge of G hence of Gu. 21 3) If u is the root r and is not a leaf, then all vertices of Hu\u are dead, 22 hence, so are those of K, as well as those of G = Gr. 23 Otherwise, let x be a vertex of Gu that is alive. Hence, there an alterning 24 i path P between x and the leader ρu (uiu) of Hu . If ρu(uiu) = xi is a neighbour 25 i i of the leader u of Hu, then x is alive in K. It is also in Gu because P can be 26 extended into an alterning path from x to u. If ρ (u u) = x is not a neighbour 27 u i i of u, then x is dead in K. It is also in G because P cannot be extended into 28 u an alterning path from x to u. 29 If x is dead in G , then it is also in K and in G , because otherwise, the 30 ui u 31 alternating path between x and u would give a path P as above. # 32 33 34 4.3 From graph-labelled trees to grammars 35 36 37 If M is a finite set of connected (unlabelled) graphs having at least 2 vertices, 38 we define G(M) as the set of graphs described by graph-labelled trees whose 39 components are in M. These graphs are connected (Definition 4.1(c)). 40 As before, D := {⊤, ⊥}. For each H ∈ M, we define H⊥ as H with all 41 vertices labelled by ⊥. We denote by ΣM the set of operations σ[H⊥, x1, ..., xp] ′ 42 for H ∈ M and by ΣM the set of operations σ[H\x, x1, ..., xp] for H ∈ M and 43 x ∈ VH (cf. Definition 4.9(c) for the notation H\x). 44 45 Theorem 4.11 : If M is a finite set of connected graphs having at least 2 46 vertices, then G(M) is the set S defined by the two equations : 47 ⊤ ⊤ ′ 48 S = κ( ) ∪ ∪σ∈ΣM σ(U, ..., U) and U = ∪ ∪σ∈ΣM σ(U, ..., U). 49 50 Another grammar for G(M) is : 51 T = κ(⊤) ∪ κ(Λ(⊤,U)) 52 together with the above quation that defines U. 53 54 55 24 56 57 58 59 60 61 62 63 64 65 1 2 3 4 Proof : Let G belong to S. If it is a dead isolated vertex κ(⊤), it is in 5 6 G(M). Otherwise, it is defined by a finite term t = σ(t1, ..., tp) where σ ∈ ΣM ′ ⊤ 7 and t1, ..., tp are terms in T (ΣM ∪ { }). By Lemma 4.10, this term represents a 8 non-leaf-rooted graph-labelled tree T . The component at the root is isomorphic 9 to H such that σ = σ[H, x1, ..., xp]. The terms t1, ..., tp represent the subtrees 10 of T issued from the p sons of the root. Hence, G is described by a rooted 11 graph-labelled tree with components in M, and so, G ∈ G(M). 12 Let conversely G ∈ G(M). If it is a dead isolated vertex, then it is in S, 13 defined by κ(⊤). Otherwise it is defined by a non-leaf rooted graph-labelled 14 tree T , hence, by a term t = σ(t1, ..., tp) as above. The subtrees of T issued from 15 the sons of the root are defined by the terms t1, ..., tp. 16 The second grammar is based on leaf-rooted graph-labelled trees. The proof 17 is similar, by the remark in Definition 4.9(d). # 18 19 The equation W = ⊤ ∪ Λ(⊤,U) with U as above defines the rooted graphs 20 in G(M) defined as those having exactly one live vertex (labelled by ⊤). We 21 will apply this remark to DH graphs in Section 4.5. 22 23 24 25 4.4 Clique-width bounds from graph-labelled trees 26 27 Theorem 4.12 : Let G be a connected graph defined by a rooted graph-labelled 28 tree T such that each operation σ[Hu\u, x1, ..., xp] has width at most k ≥ 2. 29 Then cwd⊥(G) ≤ k and cwd(G) ≤ k + 1. 30 Proof: Immediate consequence of Proposition 3.2 and Theorem 4.11. # 31 32 The next lemma gives an upper-bound to the widths of the terms in T⊥(FC ) 33 that define the D-graphs Hu\u. 34 35 Lemma 4.13 : Let H be a D-graph such that cwd(H) = k. Then cwd⊥(H) ≤ 36 , live, , dead, k + min{k, ,VH , , ,VH ,}. 37 Proof: We have cwd⊥(H) ≤ cwd∗(H) ≤ 2k by Lemma 1.3 (with |τ(G)| ≤ 38 2). 39 ⊥ , live, For proving that cwd (H) ≤ k + ,VH ,, we consider a term that defines 40 ′ live H with a set C of k labels different from ⊥. Assume that VH = {x1, ..., xp}. 41 ′ We add new labels c1, ..., cp to C so that ci will only label xi. We transform t 42 ′ 43 into t accordingly. In particular, to take a typical case, if at some position in t 44 the operation adda,b adds edges between xi, labelled at this point by a (there 45 may be other a-labelled vertices) and b-labelled vertices, then we replace it by 46 addci,b ◦ adda,b. 47 Hence, we can use p + k labels different from ⊥. dead 48 If VH = {x1, ..., xp}. We do a similar construction. # 49 50 Theorem 4.14 : Let G be defined by a graph-labelled tree T whose compo- 51 nents have maximal clique-width m and maximal degree d, then m ≤ cwd(G) ≤ 52 m + min{m, d} + 1 ≤ 2m + 1. 53 54 55 25 56 57 58 59 60 61 62 63 64 65 1 2 3 4 Proof : The inequality m ≤ cwd(G) follows from Lemma 4.3(2) since clique- 5 width is monotone with respect to the induced subgraph relation. 6 31 We now prove the other inequality . For each component Hu, the number 7 ⊥ 8 of live vertices in Hu\u is at most d. Hence, Lemma 4.13 gives cwd (Hu\u) ≤ ⊥ 9 m + min{m, d} and Theorem 4.12 gives cwd (G) ≤ m + min{m, d}, so that 10 cwd(G) ≤ m + min{m, d} + 1 ≤ 2m + 1. # 11 12 For an example, if G is a tree that is not a star and is defined by T whose 13 components are stars with three nodes, hence of clique-width 2, we have m = 2 14 and cwd(G) = 3. 15 16 Remark 4.15 : A bound based on rank-width. 17 Rank-width is another graph complexity measure initially defined for undi- 18 rected graphs32, denoted by rwd. It is based on ternary trees (without root) that 19 define layouts of the considered graphs. The DH graphs are those of rank-width 20 1 [37]. 21 Rank-width is related to clique-width by the inequalities rwd(G) ≤ cwd(G) ≤ 22 2rwd(G)+1 − 1, cf. [37]. Furthermore, if G = G(T ) for some graph-labelled tree 23 T , and m is the maximal rank-width of a component H , then rwd(G) = m 24 u (Theorem 4.3 of [33]). Hence, if cwd(Hu) ≤ m for all u, we get rwd(G) ≤ m 25 m+1 26 and cwd(G) ≤ 2 − 1. 27 28 Example 4.16 : Parity graphs. 29 A graph is a if for any two vertices, the induced paths joining 30 them have the same parity. Bipartite graphs and DH graphs are parity graphs. 31 The article [5] establishes that the parity graphs are the graphs having a split 32 decomposition whose components are cliques and bipartite graphs. We do not 33 obtain a finite grammar as bipartite graphs, whence also parity graphs, have 34 unbounded clique-width. 35 36 37 38 4.5 Unambigous grammars for cographs and distance-hereditary 39 graphs 40 41 We first examine some of the operations σ[H, x , ..., x ] that arise in split de- 42 1 p compositions. 43 44 45 Observation 4.17 : Substitution operations related to split decompositions. 46 Case 1: H is a clique Kp, p ≥ 2 whose vertices x1, ..., xp are all alive. We 47 have : 48 49 σ[Kp, x1, ..., xp](G1, ...., Gp) = G1 ⊗ ... ⊗ Gp. 50 31 By using monadic second-order transductions [7] proves that cwd(G) is bounded in terms 51 of m by a superexponential function. 52 32 The extension to directed graphs is in [34]. 53 54 55 26 56 57 58 59 60 61 62 63 64 65 1 2 3 4 Case 2 : H = S \x where p ≥ 3 and S has center x that is alive, all other 5 p p p 1 6 vertices being dead. We have : 7 σ[S \x , x , ..., x ](G , ...., G ) = Λ(Λ(...Λ(G ,G ),G ), ..., G ))...)) 8 p p 1 p−1 1 p−1 1 2 3 p−1 9 = Λ(G1,G2 ⊕ G3 ⊕ ... ⊕ Gp−1) by Equality (5) of Definition 2.5. 10 11 Case 3 : H = Sp\xp where p ≥ 3, Sp has center xp and all vertices of Sp\xp 12 are alive. Then we have : 13 14 σ[Sp\xp, x1, ..., xp−1](G1, ...., Gp−1) = G1 ⊕ ... ⊕ Gp−1. 15 16 Constructions 4.18 : Grammars for DH graphs revisited. 17 18 A connected DH graph without live vertices is defined by a graph-labelled 19 tree T whose components are stars, cliques and single vertices. By rooting T at 20 a leaf, we obtain from Theorem 4.11 the following grammar, where S defines 21 the connected DH graphs : 22 S = κ(⊤) ∪ κ(Λ(⊤,U)),U = ⊤ ∪ (U ⊕ U) ∪ (U ⊗ U) ∪ Λ(U, U). 23 Here is an alternative construction, where the chosen root is not a leaf. By 24 means of node splittings (Definition 4.1(d)), we can transform T as above into a 25 graph-labelled tree whose components are stars S3, triangles K3, together with 33 26 one component K2 : for n ≥ 4, a component (isomorphic to) Kn can be split 27 into K3 and Kn−1, and a component Sn can be split into S3 and Sn−1 where 28 the center of S3 is linked to a leaf of Sn−1. 29 Let us take as root the component K2. We obtain from Theorem 4.11 the 30 following equations : 31 S = κ(⊤) ∪ κ(U ⊗ U),U = ⊤ ∪ (U ⊕ U) ∪ (U ⊗ U) ∪ Λ(U, U), 32 that are the two equations of Proposition 2.7(2). 33 The equations of Proposition 2.7 can be used to generate DH graphs having a 34 given number n of vertices, but not, at least immediately, with equal probability 35 for each fixed n. The reason is that because of the associativity and commuttivity 36 of ⊕ and ⊗, and also because of Equality (5) of Definition 2.5, this grammar 37 34 38 is ambigous. For the same reason, it cannot be used for counting the number 39 of DH graphs having n vertices. However, it can be transformed so as to allow 40 that. 41 42 Construction 4.19 : An unambigous grammar for cographs. 43 Cographs are DH and defined by the equation : 44 45 C = ⊤ ∪ (C ⊕ C) ∪ C ⊗ C. 46 47 They have a canonical description as follows, where C⊗ (resp. C⊕) denotes 48 the set of connected (resp. disconnected) cographs with at least two vertices. A 49 (⊤-labelled, abstract) cograph G is : 50 33 By Remark 4.2. 51 34 The term enumerating creates confusion with the problem of listing graphs or configura- 52 tions in graphs. 53 54 55 27 56 57 58 59 60 61 62 63 64 65 1 2 3 4 a single vertex ⊤, 5 6 or it is connected and of the form G1 ⊗ ... ⊗ Gp, p ≥ 2, where G1, ..., Gp ∈ ⊤ 7 C⊕ ⊎ { }, 8 or it is disconnected and of the form G1 ⊕ ... ⊕ Gp, p ≥ 2, where G1, ..., Gp ∈ 9 C⊗ ⊎ {⊤}. 10 The corresponding term is (or represents) the (canonical) modular decom- 11 position of G [31]. For a set H of labelled graphs, we define : 12 13 ⊕≥2(H) as the set of labelled graphs G1 ⊕ ... ⊕ Gp and 14 ⊗≥2(H) as the set of labelled graphs G1 ⊗ ... ⊗ Gp, 15 where, in both cases, p ≥ 2 and G , ..., G ∈ H. 16 1 p 17 With these metaoperations, we can define cographs by the three equations: 18 19 C = ⊤ ∪ C⊕ ∪ C⊗, 20 ⊤ 21 C⊕ = ⊕≥2( ∪ C⊗), 22 C⊗ = ⊗≥2(⊤ ∪ C⊕). 23 24 These three equations form an unambigous grammar because of the unicity 25 of the decomposition recalled above, and because G1 ⊕ ... ⊕ Gp = Gπ(1) ⊕ ... ⊕ 26 Gπ(p) for any permutation π of the indices, and similarly for ⊗. Hence, ⊕≥2 27 is an operation of variable arity. One obtains a bijection of the set connected 28 (abstract) cographs with the rooted trees whose internal nodes have at least 29 two sons. The sons of a node form a set and not a sequence. These trees, called 30 hierarchies, have been used in [38] to evaluate the number of cographs of a given 31 size. 32 33 Construction 4.20 : An unambigous grammar for DH graphs. 34 For distance-hereditary graphs, the situation is similar, by using canonical 35 split decompositions. The grammars given in Construction 4.18 are ambigous. 36 We can obtain an unambigous one for rooted and connected DH graphs. Rooted 37 means that one vertex is distinguished as alive and all others are dead. We only 38 generate such graphs having at least 3 vertices. 39 40 Theorem 4.6 and Example 4.8 yield the following description that we give 41 as a grammar written with the two above metaoperations: 42 D = Λ(⊤,D ∪ D ∪ D ), 43 ⊗ ⊕ Λ 44 D⊗ = ⊗≥2(⊤ ∪ D⊕ ∪ DΛ), 45 D⊕ = ⊕≥2(⊤ ∪ D⊗ ∪ DΛ), 46 ⊤ 47 DΛ = Λ(J, D⊕) ∪ Λ(J, ∪ D⊗ ∪ DΛ), 48 J = ⊤ ∪ D⊕ ∪ D⊗. 49 50 The equation D = Λ(⊤,D⊗ ∪D⊕ ∪DΛ) defines the root by ⊤ and D⊗ ∪D⊕ ∪ 51 DΛ correspond to the three types of components Hu of its son u, respectively 52 Cases 1,3 and 2 in Observations 4.17. 53 54 55 28 56 57 58 59 60 61 62 63 64 65 1 2 3 4 The equation D = ⊗ (⊤ ∪ D ∪ D ) corresponds to a component that 5 ⊗ ≥2 ⊕ Λ 6 is a clique (cf. Case 1). The righthand side does not include D⊗ because two 7 clique components cannot be neighbour in a canonical split decomposition. 8 The equation D⊕ = ⊕≥2(⊤ ∪ D⊗ ∪ DΛ) corresponds to a star component 9 whose center is the leader. The righthand side does not include D⊕ because two 10 star components cannot be linked by their centers. 11 The rules for DΛ correspond a star component Hu whose center is not the 12 leader. The set J corresponds to the son of u linked to the center. It does 13 not does not include DΛ because two star components cannot be linked by two 14 leaves. The term Λ(J, ⊤ ∪ D⊗ ∪ DΛ) corresponds to a star S3 = Hu, and the 15 term Λ(J, D⊕) to larger stars. 16 In this grammar, an equation like D⊗ = ⊗≥2(⊤∪D⊕ ∪DΛ) creates no ambi- 17 guity because the three sets {⊤},D⊕ and DΛ are disjoint and the metaoperation 18 ⊗≥2 avoids the ambiguities created by the associativity and commutativity of ⊗. 19 That the full grammar is unambigous follows from the unicity part of Theorem 20 4.6. 21 These rules appear in Appendix A of [4], written so as to yield correspond- 22 ing generating functions. We recall that unambiguity is essential for counting 23 purposes, and also for random generation (cf. [26]). 24 25 DH graphs without root (distinguished as the unique live vertex) are ob- 26 tained by adding the rule E = κ(D), but the resulting grammar becomes am- 27 bigous because the derivation trees corresponding to different roots are different. 28 A more complex grammar that is appropriate for counting the DH graphs with- 29 out root is given in [4]. It uses rules with substractions so as to avoid double 30 counting. (They apply the equality |A ∪ B| = |A| + |B| − |A ∩ B| .) This article 31 also handles 3-leaf powers (cf. Example 4.8) in a similar way. 32 33 34 35 5 Directed graphs 36 37 38 We now extend our results to directed graphs. Cunnigham defines a canonical 39 split decomposition for the directed graphs that are strongly connected (Theo- 40 rem 1 in [19]). An undirected graph can be seen as a directed one where each 41 arc (directed edge) has an opposite one. It is connected if and only if the corre- 42 sponding directed graph is strongly connected. Hence, Theorem 4.7 is a special 43 case of a more general one for directed graphs35. 44 We will use graph-labelled trees and split decomposition graphs as in [7]. 45 In order to extend to directed graphs the results of Section 4, we will revise 46 the notion of substitution of Section 2 for graphs with labels that encode the 47 directions of the arcs. The set of live vertices is partitioned into three sets, 48 designated by the tags ⊤, +, − , attached to the labels of the sets C used to 49 construct graphs with the "clique-width" operations of Definition 1.2. 50 51 35 We thought better to begin with undirected graphs, because the formal setting is much 52 simpler and most of graph structure theory and graph algorithmics concern undirected graphs. 53 54 55 29 56 57 58 59 60 61 62 63 64 65 1 2 3 4 We study directed graphs. However, the graphs representing graph-labelled 5 6 trees will have undirected edges as well as arcs. 7 8 9 5.1 Substitution 10 11 Definition 5.1 : Substitutions of directed graphs to vertices 12 We let D := {⊥, +, −, ⊤} be ordered in such a way that ⊥ < + < ⊤, 13 ⊥ < − < ⊤, and + and − are incomparable. Let K be a D-graph with vertex 14 set {x1, . . . , xp} and H1,...,Hp be pairwise disjoint D-graphs, that are disjoint 15 from K. We define a D-graph G := K[x1 ← H1, . . . , xp ← Hp] : 16

17 VG := VH1 ⊎ ... ⊎ VHp ,

18 πG(v) := inf{πH (v), πK(xi)} if v ∈ VH . 19 i i 20 Its arcs are as follows, for u, v ∈ VG (they do not depend on πK): 21 22 uv ∈ EG if and only if : 23 uv ∈ E for some i, 24 Hi

25 or πHi (u) ∈ {⊤, +}, πHj (v) ∈ {⊤, −} and xixj ∈ EK (and so i = j). 26 27 28 Lemma 5.13 below motivates this definition. If we consider an undirected 29 graph as a directed graph where each arc has an opposite one, and whose vertices 30 are labelled by ⊥ or ⊤, then, Definition 5.1 gives the same notion of substitution 31 as Definition 2.1. 32 33 Example 5.2 : Let K have vertices x, y and z, respectively labelled by +, − 34 and ⊤, and arcs xy, yz and zy. Let X be the edgeless graph with vertices 0,1,2,3 35 labelled respectively by ⊥, +, −, ⊤. Let similarly Y have vertices 4,5,6 labelled 36 by +, −, ⊤ and Z, vertices 7,8,9 labelled by +, −, ⊤. The graphs K,X,Y,Z 37 and G := K[x ← X, y ← Y, z ← Z] are shown in Figures 3 and 4. The 38 labels of vertices 0,1,5,7,8 and 9 are as in X,Y and Z. Those of 2,3,4 and 6 are 39 respectively ⊥ = inf{+, −}, + = inf{+, ⊤}, ⊥ = inf{+, −} and − = inf{−, ⊤}, 40 41 cf. Definition 5.1(a). # 42 43 44 We obtain graph operations, as in Section 2, that we will use to describe the 45 directed graphs defined by graph-labelled trees. 46 47 Definition 5.3 : Graph operations based on substitution. 48 For each D-graph K with vertex set enumerated as {x1, . . . , xp}, we define 49 as follows a p-ary operation on D-graphs denoted by σ[K, x1, . . . , xp] : 50 51 σ[K, x1, . . . , xp](H1,...,Hp) := K[x1 ← H1, . . . , xp ← Hp] 52 53 54 55 30 56 57 58 59 60 61 62 63 64 65 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Figure 3: Graphs from Example 5.2 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 Figure 4: Graph G of Example 5.2. 46 47 48 49 50 51 52 53 54 55 31 56 57 58 59 60 61 62 63 64 65 1 2 3 4 where H ,...,H are pairwise disjoint and disjoint from K. If they are not, 5 1 p 6 we replace them by isomorphic copies, so that σ[K, x1, . . . , xp] becomes a p-ary 7 operation on abstract D-graphs. # 8 9 If we extend Definition 5.1, so that K can have other vertices than x1, . . . , xp, 10 then Proposition 2.2 is still valid. 11 12 We will express substitutions in terms of clique-width operations. For di- −−→ 13 rected graphs, we use the operations adda,b that create arcs from a-labelled 14 vertices to b-labelled ones. Our objective is to bound the clique-width of G := 15 K[x1 ← H1, . . . , xp ← Hp] as O(max{cwd(K), cwd(H1), . . . , cwd(Hp)}). 16 17 Definitions 5.4 : Clique-width operations and substitution. 18 The set D := {⊥, ⊤, +, −} is ordered by Definition 5.1. Let K,H1,...,Hp 19 be D-graphs and G := K[x ← H , . . . , x ← H ]. 20 1 1 p p We assume that the graphs K,H ,...,H are defined, up to their labels in 21 1 p D, by terms in T (F ) where C ∩ D = ∅. We define C# := {(a, α, β) | a ∈ 22 C C, α, β ∈ D, β ≤ α} and f : C# → D such that f((a, α, β)) := β for all (a, α, β) 23 # 24 in C . 25 We will define the D-graph G by a term tG in T (FC# ) in such a way that 26 G = relabf (val(tG)). 27 Assume that K = val(tK) for tK ∈ T (FC). Let x1, . . . , xp be the vertices of 28 K. Each vertex xi is defined by a nullary symbol ai(xi) in tK. We construct a 29 term tÑK in T (FC# , {u1, . . . , up}) as follows : 30 - we replace each ai(xi) by the variable ui, 31 - we replace each operation relabh by relabh where Éh((a, α, β)) := (h(a), α, β) 32 for all (a, α, β) ∈ C#, 33 −−→ É - we replace each operation add by the composition (in any order) of the 34 a,b −−→ ′ ′ 35 operations add(a,α,β),(b,α′,β′) such that α ∈ {⊤, +}, α ∈ {⊤, −} and β, β ∈ D, ′ ′ 36 β ≤ α, β ≤ α . # # 37 Furthermore, for each i := 1, ..., p, we define hi : C → C by hi((a, α, β)) := # 38 (ai, β, inf{β, πK(xi)}) for (a, α, β) ∈ C .# 39 40 Lemma 5.5 : Let K,H1,...,Hp,G, tK and tÑK be as in Definition 5.4. As- 41 sume that for each i, we have a term ti ∈ T (FC# ) such that Hi = relabf (val(ti)). 42 Then : 43 K[x1 ← H1, . . . , xp ← Hp] = relabf (val(tÑK[relabh1 (t1)/u1, ..., relabhp (tp)/up])). 44 45 Proof : Let 46

47 G := K[x1 ← H1, . . . , xp ← Hp] and 48 ′ 49 G := relabf (val(tÑK[relabh1 (t1)/u1, ..., relabhp (tp)/up])). 50 51 These two graphs have the same vertex set, VH1 ⊎ ... ⊎ VHp . We compare 52 their labels. 53 54 55 32 56 57 58 59 60 61 62 63 64 65 1 2 3 4 Let u ∈ V and (a, α, β) be its label in val(t ). Its label is β in H , and 5 Hi i i it is (a , β, inf{β, π (x )}) in relab (t ). Its label in G′ is thus inf{β, π (x )} 6 i K i hi i K i 7 because the relabellings in tÑK do not modify the third components of labels. It 8 is the same in G by Definition 5.1. ′ 9 We now compare the arcs of G and G . ′ 10 Case 1 : u, v ∈ VHi . If uv ∈ EHi , it is also an arc of G and of G . If ′ 11 uv∈ / EHi , it is not an arc of G either. And it is not an arc of G because the

12 labels of u and v have the same first components, namely ai, in relabhi (ti) and 13 the relabellings in tK maintain this equality. Hence, no arc between u and v is Ñ −−→ 14 created by the operations add(a,α,β),(b,α′,β′) of tÑK (where we must have a = b). 15 Hence, uv∈ / EG′ . 16 Case 2 : u ∈ VHi , v ∈ VHj , i = j. If uv ∈ EG, then xixj is an arc of K and 17 ′ the labels of u and v in Hi and Hj are respectively α ∈ {⊤, +} and α ∈ {⊤, −} 18 ′ by Definition 5.1. Let us now consider G . At some position p in tK the arc 19 −−→ 20 xixj is created by an operation adda,b. In val(relabhi (ti)) and val(relabhj (tj)), the labels of u and v are respec- 21 ′ ′ ′ 22 tively (ai, α, β) and (aj, α , β ) for some β and β , and ai and aj are relabelled 23 in tK into a and b at position p. The labels of u and v are thus (a, α, β) and ′ ′ (b, α , β ) in tÑK at the place corresponding to p in the construction of tÑK from 24 −−→ 25 tK (adda,b is replaced by a composition of arc additions). Hence, uv is an arc of 26 ′ −−→ G , created by add(a,α,β),(b,α′,β′). 27 Hence every arc of G is one of G′. The proof is similar in the other direction. 28 Hence, G = G′. 29 # 30 No label (a, ⊥, ⊥) occurs in an arc addition operation of t . Furthermore, 31 ÑK 32 f((a, ⊥, ⊥)) = ⊥ for each a ∈ C. Hence, all labels (a, ⊥, ⊥) can be replaced 33 by the unique label (c, ⊥, ⊥) for some fixed c ∈ C. It follows that tÑK and the 34 relabellings hi only use the following 8 |C| + 1 labels : 35 36 (c, ⊥, ⊥) and (a, ⊤, ⊤), (a, ⊤, +), (a, ⊤, −), (a, ⊤, ⊥), 37 (a, +, +), (a, +, ⊥), (a, −, −), (a, −, ⊥) for all a ∈ C. 38 39 By using this remark, we obtain: 40 41 Proposition 5.6 : If a graph G is defined up to vertex labels by a composi- 42 tion of operations σ[K, x1, . . . , xp] such that each graph K has clique-width at 43 most k, then, cwd(G) ≤ 8k + 1. 44 Proof: Let G be defined by a term over nullary symbols and operations 45 σ[K, x1, . . . , xp] such that cwd(K) ≤ k. The terms tK can be written with the 46 labels of a set C of k labels. By composing the terms t and the relabellings h 47 ÑK i according to Lemma 5.5, we obtain a term in T (F # ) that defines G by using 48 C 49 at most 8k + 1 labels. Hence, cwd(G) ≤ 8k + 1. # 50 51 52 53 54 55 33 56 57 58 59 60 61 62 63 64 65 1 2 3 4 5.2 Directed graph-labelled trees. 5 6 7 Definition 5.7 : Graph-labelled trees describing directed graphs. 8 In the following definition, unspecified notions and notation are as in Def- 9 inition 4.1. Graph labelled-trees will be represented by graphs with (directed) 10 arcs and (undireceted) edges. Let us consider an edge as a pair of opposite arcs. 11 Then a directed path or walk36 can go through an edge, that is, through one of 12 the two arcs of this edge. 13 (a) A directed graph-labelled tree, denoted by T is an undirected tree T with 14 15 at least 3 nodes, that is equipped, for each node v ∈ NT , with a directed graph H , called a component, and a bijection ρ : Inc (v) → V . Components are 16 v v T Hv 17 pairwise disjoint and need not be connected, see Example 5.8(2) below. If v is 18 a leaf, then Hv has a single vertex that we identify with v. 19 (b) We define S(T ) as the graph consisting of the union of the components 20 augmented with the (undirected) edges ρu(e)ρv(e) for e = uv, (cf. Figure 5, 21 where the edges ρu(e)ρv(e) are shown by dotted lines). The arcs are inside the 22 components. A directed path or walk in S(T ) is alternating if no two consecutive 23 arcs are in a same component. Hence, in a directed path, arcs alternate with 24 edges. In a directed walk, an edge can be traversed consecutively several times. 25 There is at most one alternating path from a vertex x to a vertex y, but 26 there may also exist one from y to x. This is the case if and only if each arc 27 zz′ on this path inside a component has an opposite arc z′z (we are considering 28 paths, not walks). 29 In view of Proposition 5.9, for a vertex x in a component Hu, we define 30 A−(x) as the set of vertices y of S(T ) accessible from x by an alternating path 31 (from x to y) whose first edge or arc is not in H , and A+(x) as the set of 32 u vertices w of S(T ) such that there is an alternating path from w to x whose 33 34 last edge or arc is not in Hu. 35 (c) The graph described by T , denoted by G(T ), has vertex set LT (the set 36 of leaves of T ) and an arc uv if and only if there is an alternating path from u 37 to v. If there is a directed path u1 → u2... → up in G(T ), the concatenation 38 of the alternating paths corresponding to the arcs uiui+1 forms an alternating 39 walk from u1 to up. 40 (d) The node-joining operation37 (called elimination of an edge e of T in [7]) 41 is defined as follows. If e = uv is an edge between two internal nodes of T , its 42 contraction fuses u and v into a single node say w, giving tree T ′, and replaces ′ 43 the graphs Hu and Hv by Hw := (Hu ⊎ Hv) − {ρu(e), ρv(e)} augmented with 44 an arc from any vertex x in Hu to any vertex y in Hv such that xρu(e) ∈ EHu 45 ′ and ρv(e)y ∈ EHv . We obtain a directed graph-labelled tree T that describes 46 the same graph : this is easy to check by considering alternating paths. By 47 iterating as much as possible this elimination step, we obtain a star whose 48 central component is isomorphic to G(T ). 49 50 36 A walk is like a path but it can go several times through a vertex or an arc. 51 37 Similar to that in Definition 4.1(d). 52 53 54 55 34 56 57 58 59 60 61 62 63 64 65 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 Figure 5: The directed graph-labelled tree T of Example 5.8(1). 18 19 20 21 22 23 24 25 26 27 28 29 Figure 6: The graph defined by T of Figure 5. 30 31 32 33 The opposite transformation called node-splitting also preserves the defined 34 graph. # 35 36 Theorem 2 of [19] defines canonical decompositions for strongly connected 37 graphs whose components are cliques, stars and particular graphs called cycles 38 of transitive tournaments that have clique-width at most 4 by Proposition 4.16 39 of [7]. We will not use this difficult notion. We will describe directed, possibly 40 disconnected graphs by directed graph-labelled trees, either canonical or not. 41 42 43 Examples 5.8 : 44 (1) Figures 5 shows a directed graph-labelled tree T and 45 Figure 6 the graph G(T ). The double arrows in the components Hx and Hu 46 indicate pairs of opposite arcs. For a comparison with Figure 1, there is here no 47 alternating path between 2 and 7, in either direction. Hence, these two vertices 48 are not adjacent in G(T ). 49 (2) A directed graph-labelled tree may define a disconnected graph although 50 its components are connected. As a small example, consider S(T ) defined as 51 x − z′ −→ z − u ←− u′ − y, whose internal components are z′ −→ z and 52 u ←− u′. (The undirected edges between components are x − z′, z − u and 53 54 55 35 56 57 58 59 60 61 62 63 64 65 1 2 3 4 u′ − y). Then G(T ) consists of the two isolated vertices x and y. Eliminating 5 the edge z − u yields a component consisting of two isolated vertices u′ and 6 ′ 7 z . Because of this observation, it is pointless to require that components be 8 connected. # 9 10 Proposition 5.9 : Let G be defined by a directed graph-labelled tree T 11 whose components are strongly connected. + − 12 (1) For each vertex x of S(T ), we have A (x) ∩ LT = ∅ and A (x) ∩ LT 13 = ∅. ′ + 14 (2) If xy is an arc of Hu, then zz ∈ EG for all z ∈ A (x) ∩ LT and ′ _ 15 z ∈ A (y) ∩ LT . Conversely, if x = ρu(uv) and y = ρu(uw) are distinct vertices ′ ′ + 16 of Hu, if z ∈ LT ∩NT,u\v, z ∈ LT ∩NT,u\w and zz ∈ EG, then z ∈ A (x)∩LT , ′ − 17 z ∈ A (y) ∩ LT and xy is an arc of Hu. 18 (3) G is strongly connected. 19 20 Note that T has at least two leaves and so, that G has at least two vertices. 21 22 Proof : (1) Let x be a vertex of a component H . Hence, x = ρ (uv) for 23 u u some node v. We use induction on the cardinality of N (the set nodes of T 24 T,u\v reachable from by a path going through v; cf. Lemma 4.3). If it is 1, then v is 25 + − 26 a leaf and A (x) ∩ LT = A (x) ∩ LT = {v}. Otherwise, we have in Hv an arc zy such that y = ρv(uv) and z = ρv(vw) for 27 + 28 some edge vw of T . We have NT,v\w ⊂ NT,u\v, hence, by induction, A (z)∩ LT + + + 29 = ∅. As A (z) ∩ LT ⊆ A (x) ∩ LT we have A (x) ∩ LT = ∅. The proof that − 38 30 A (x) ∩ LT = ∅ is similar . 31 (2) Just consider alternating paths, as in the proof of Lemma 4.3. 32 (3) The node-joining operation preserves the strong connectedness of the 33 components as one checks from Definition 5.7(d). By repeating this operation, 34 one obtains a directed graph-labelled tree that defines G and consists of one 35 "central" strongly connected component and leaves. This component is isomor- 36 phic to G, hence G is strongly connected. # 37 38 Proposition 5.10 : Let G be defined by a directed graph-labelled tree T . 39 Then G is strongly connected if and only if all components of T are strongly 40 connected. 41 42 Proof : The "if" direction is proved in the previous proposition. For the 43 + converse, let x and y be distinct vertices of a component Hu. Let s ∈ A (x)∩LT 44 _ and t ∈ A (y) ∩ L . There is a path in G from s to t. Each arc of this path 45 T corresponds to an alternating path in S(T ). The concatenation of these paths 46 39 47 is an alternating walk in S(T ). It is not necessarly a path because some edges 48 of the tree may be traversed twice. (In the example of Figure 6 the path 2 −→ 49 6 −→ 7 −→ 4 corresponds to a walk in S(T ) (Figure 5) that traverses twice the 50 38 + The sets A−(x) ∩ LT and A (x) ∩ LT may be different. In the example of Figure 7, we + 51 have A−(a) ∩ LT = {1} and A (x) ∩ LT = {0, 1}. 52 39 A vertex may occur several times on a walk. 53 54 55 36 56 57 58 59 60 61 62 63 64 65 1 2 3 4 edge between H and H ). This walk must enter H first via x and exit it last 5 u w u 6 via y. Its arcs belonging to Hu form a directed path from x to y. Hence, Hu is 7 strongly connected. # 8 9 Remark 5.11 : Even if G(T ) is strongly connected, some components of 10 T may not be isomorphic to induced subgraphs of G(T ) (by contrast with 11 Lemma 4.3(2)). Consider for an example a directed graph-labelled tree having −→ −→ 12 two internal components isomorphic to the directed cycles C 3. It defines C 4 13 −→ that does not contain C 3 as an induced subgaph. We will compare below the 14 clique-widths of a graph and its components. 15 16 17 18 5.3 Evaluating graph-labelled trees by means of substitu- 19 tions. 20 21 22 We will use the set of labels D := {⊥, +, −, ⊤}. 23 24 Definitions 5.12 : Rooted graph-labelled trees and related notions. 25 (a) Let T be a directed graph-labelled tree with underlying tree T and 26 G := G(T ). Let us select a node r ∈ NT and make it a root for T . As in 27 Definition 4.9(a,b), for u in NT , we define Nu := {x ∈ NT | x ≤T u} and 28 Vu := {x ∈ LT | x ≤T u} ⊆ VG. Hence, Vr = LT = VG and Vu = {u} if 29 u ∈ LT − {r}. 30

31 (b) Let u ∈ NT . The leader of a component Hu such that u = r is the vertex 32 ρu(wu) denoted by u, where w is the father of u. We define a D-graph Hu\\u 33 as the follows : 34 35 if u = r and u not leaf, we define Hu\\u := Hu− u where a vertex 36 x is labelled as follows : its label is ⊤ if xu and ux are in EHu , it is 37 + if xu ∈ E and ux∈ / E , it is − if ux ∈ E and xu∈ / E , 38 Hu Hu Hu Hu and it is ⊥ if xu and ux are not in E ; 39 Hu 40 if u = r and u is a leaf, then Hu\\u is undefined (or is empty).

41 if u = r, we define Hu\\u := Hr, and all its vertices as dead (we use 42 the notation Hu\\u for uniformity, although u is not defined). 43

44 As in Definition 4.9, the graphs Hu\\u depend on the chosen root r. 45 46 (c) If u ∈ NT , we define Gu := G[Vu] labelled as follows: 47 If u = r, all vertices of G = G are dead. Otherwise, a vertex x has label 48 u ⊤ if there are alternating paths from x to u and from u to x; it has label + if 49 there is an alternating path from x to u and no such path from u to x; it has 50 51 label − if there is an alternating path from u to x and no such path from x to 52 u and label ⊥ if there are no alternating paths between x and u. # 53 54 55 37 56 57 58 59 60 61 62 63 64 65 1 2 3 4 The following lemma, stated for the objects of the previous definition, gen- 5 6 eralizes Lemma 4.10. 7 8 Lemma 5.13 : If u ∈ NT − LT has sons u1, ..., up and the corresponding 9 p vertices of Hu\\u are x1, ..., xp (that is, xi := ρu(uui) ), then we have Gu = 10 (Hu\\u)[x1 ← Gu1 , ..., xp ← Gup ]. 11

12 Proof : Let K := (Hu\\u)[x1 ← Gu1 , ..., xp ← Gup ]. As in the proof of

13 Lemma 4.10, the vertex sets of Gu and K are the same and the arcs of Gui are 14 the same as in Gu and K.

15 We consider x in Gui and y in Guj , j = i. If xy is an arc of G, there is an al- 16 ternating path from x to y. It must go through Hu via the arc ρu(uiu)ρu(uju) = 17 xixj in Hu\\u. This path goes through the leader ρui (uiu) of Hui . Hence, x is 18 alive in Gui and has label + or ⊤. Similarly, y has label − or ⊤ in Guj . Hence 19 xy is an arc of K. 20 Conversely, if xy ∈ EK, then xixj is an arc of Hu\\u, x has label + or ⊤ 21 in G and y has label − or ⊤ in G . Going back to definitions, we have an 22 ui uj alternating path from x and y built from alternating paths from x to x , and 23 i from x to y, and the arc x x . Hence, xy is an arc of G, hence of G . 24 j i j u 25 It remains to compare the vertex labels in K and in Gu. Let x be a vertex of G labelled by + in G . There is an alternating path 26 ui u 27 from x to the leader u of Hu and no such path from u to x. Hence, there is an 28 alternating path from x to ui and an arc in Hu from ρu(uui) to u. Hence the 29 label of ρu(uui) is either + or ⊤. The label of x in Gui is either either + or ⊤, 30 hence its label in K is either + or ⊤. If it would be ⊤, we would have an arc in 31 Hu from u to ρu(uui) and an alternating path from u to x and x would have 32 label ⊤ in Gu. Hence x has label + in K. 33 The proofs are similar for the other labels. # 34 35 Theorem 5.14 : Let G be defined by directed graph-labelled tree T whose 36 components have clique-width at most k. Then cwd(G) ≤ 8k + 1. 37 Proof: From Proposition 5.6 and Lemma 5.13, along the lines of Theorem 38 4.11. 39 ′ If one chooses a leaf as root r, and its unique son is u, then G = Λ (⊥,Gu) 40 where Λ′(G, H) := σ[K, x , x ] and K consists of the the arcs x x and x x , 41 1 2 1 2 2 1 x is labelled by ⊤ and x by ⊥. Hence, Λ′ generalizes for {⊤, ⊥, +, −}-graphs 42 1 2 the operation Λ of Definition 2.5. 43 # 44 45 Example 5.15 : There exist graph-labelled trees T that have components 46 of arbitrary large clique-width but define graphs without arcs, hence of clique- 47 width 1. 48 We let T be a non-leaf-rooted graph-labelled tree with any connected graph 49 H as root component. We attach to each vertex x of H a path of the form ′ ′ 50 x − vx −→ vx − wx ←− wx − xÜ (cf. Example 5.8(2)). Then G(T ) consists of the 51 isolated vertices xÜ because there is no directed alternating path between xÜ and 52 any different yÜ. # 53 54 55 38 56 57 58 59 60 61 62 63 64 65 1 2 3 4 For strongly connected graphs, we have a better situation. 5 6 7 Proposition 5.16 : There is a function f such that cwd(H) ≤ f(cwd(G)) 8 whenever G is strongly connected and H is a component of some directed graph- 9 labelled tree that defines it. 10 11 We need some definitions. An arc xy of a graph G is special if x has outdegree 12 1 and y has indegree 1. Let F be a set special arcs. A path with all its arcs in 13 F is called an F -path. The graph G\F, obtained from G by contracting the arcs 14 of F is defined as follows, where X is the set of terminal ends40 of the arcs of 15 F : 16 17 VG\F := VG − X, 18 xy ∈ E if and only if x, y∈ / X and, either xy ∈ E or there exist 19 G\F G a vertex z ∈ X such that zy ∈ E and a nonempty F -path from x 20 G to z. 21 22 If F forms a directed cycle (necessarily disconnected from G − X), then 23 V = V − X, hence, this cycle vanishes. 24 G\F G 25 26 Lemma 5.17 : There is a function f such that cwd(G\F ) ≤ f(cwd(G)) for 27 every directed graph G and every set F of special arcs. 28 Proof: There exists a monadic second-order transduction (whose formulas 29 do not use quantifications on sets of arcs) that maps the pair (G, X) of a graph 30 G and a set X that is the set of terminal ends of the arcs of a set F of special 31 arcs (uniquely determined from X) to G\F . Its definition is a straightforward 32 translation from the definition. The existence of f follows from of Corollary 33 7.38(2) of [15]. # 34 35 However, this proof does not give a good bound41 for f. It is an open 36 question whether cwd(G\F ) ≤ cwd(G) or even cwd(G\F ) = O(cwd(G)). 37 38 An induced minor of a directed or undirected graph G is obtained by con- 39 tracting arcs or edges of an induced subgraph of G. 40 41 Proposition 5.18 : If G is strongly connected and defined by a directed 42 graph-labelled tree, then each component of it is isomorphic to an induced minor 43 44 of G obtained by contracting the arcs of pairwise vertex disjoint special paths. 45 Proof : Let G be strongly connected and defined by a directed graph-labelled 46 tree T . Let Hu be a component not reduced to a single vertex. We will construct ′ ′ 47 an induced subgraph G of G such that Hu is isomorphic to G \F for some set 48 F of special arcs. 49 40 The terminal end of an arc uv is v. 50 41 For a comparison, if an undirected graph H is obtained from G by erasing degree 2 51 vertices, that is by contracting a set of edges that have all an end vertex of degree 2, then 52 cwd(H) ≤ 2cwd(G)+1 − 1 (Proposition 2 of [9]). 53 54 55 39 56 57 58 59 60 61 62 63 64 65 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 Figure 7: The directed graph-labelled tree T of Example 5.8. 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 Figure 8: The strongly connected graph G(T ), cf. Figure 7 and Proposition 47 5.18. 48 49 50 51 52 53 54 55 40 56 57 58 59 60 61 62 63 64 65 1 2 3 4 Step 1 : By performing node-joinings (cf. Definition 5.7(d)) that do not 5 ′ involve Hu, we can obtain a directed graph-labelled tree T that defines G, such 6 ′ 7 that u ∈ NT ′ , Hu = Hu and all nodes that are not leaves are neighbours of u. 8 The graph-labelled tree of Figure 7 satisfies this condition. 9 Step 2 : From now on, we assume that T satisfies this condition. We let N 10 be the set of neighbours v of u in T that are not leaves. We take u as root. 11 If x is a vertex of Hv where v is u or is in N, then we denote by xÜ the vertex 12 of Hw such that x = ρv(vw) (this condition defines w) and xÜ = ρw(vw); if Hw 13 is singleton, then w is a leaf and w = xÜ ∈ VG. (All vertices of G are of this 14 form.) Otherwise, w ∈ N and xÜ is the leader w of Hw. 15 For each v ∈ N, since Hv is strongly connected (by Proposition 5.9(3)), we 16 can choose in it a directed cycle of the form xÜ = v → y1 → ... → yp → xÜ that 17 we denote by Cv. We have in G a directed path Pv : yÜ1 → ... → yÜp. 18 We remove from all the components Hv (for v ∈ N), the vertices z not in 19 Cv, the associated vertices wÜ, and their incident arcs. We obtain an induced 20 subgraph G′ of G and a directed graph-labelled tree T ′ that defines it, such that 21 ′ N ∪ {u} ⊆ NT ′ ⊆ NT and Hu = Hu (easy verification). Its components are Hu, 22 ′ the cycles Cv and the singleton components (they contain the vertices of G ). 23 ′ ′ Hence they are all strongly connected, and so is G . We have Hv ⊆i Hv for all 24 ′ 25 v ∈ N. The arcs of the path Pv are special in G (but not necessarily in G). We 26 let F the set of these arcs. The paths Pv are pairwise vertex disjoint. 27 ′ 28 Step 3: We will verify that Hu is isomorphic to G \F . ′ 29 Contracting the arcs of F eliminates all vertices of G of the form yÜ2, ..., yÜp 30 (denoted as in Step 2), for all v ∈ N. 31 For each vertex x of Hu such that xÜ ∈ VG, we define xÉ := x.Ü Otherwise, 32 xÉ := yÜ1 (cf. Step 2), for v such that xÜ ∈ Hv. ′ 33 Claim : Hu is isomorphic to G \F by the mapping x → xÉ. 34 Proof : As noted in Step 2, the vertices of G are of the form xÜ. The vertices ′ 35 of G are of the form xÜ for some x in Hu or yÜi (in a path Pv, cf. Step 2). Those 36 ′ of G \F are of the form xÜ for x in Hu or yÜ1(in a path Pv). Hence, we have a 37 bijection between the vertex sets. 38 Let xz be an arc of Hu. We have four cases: 39 Case 1 : xÜ,zÜ ∈ VG and xÉ = x,Ü zÉ = zÜ. We have an alternating path xÜ → x → 40 ′ ′ z → z in S(T ) hence xz = xz ∈ E ′ . It is also an arc of G \F . 41 Ü ÜÜ ÉÉ G Case 2 : x = x ∈ V , z = y is in P . We have an alternating path 42 É Ü G É Ü1 v x → x → z → z → y → y in S(T ′). The arc zy is in H and it is not 43 Ü Ü 1 Ü1 Ü 1 v modified by the considered arc contractions. We have xÜyÜ1 = xÉzÉ ∈ EG′ . It is also 44 ′ 45 an arc of G \F . 46 Case 3 : xÉ = yÜ1, zÉ = zÜ ∈ VG, where yÜ1 is in Pv. We have a path yÜ1 → ... → yÜp ′ ′ 47 in G and an alternating path yÜp → yp → xÜ → x → z → zÜ in S(T ) where ypxÜ is ′ 48 in Hv and so, an arc yÜpzÜ in G . After the contraction of the path yÜ1 → ... → yÜp ′ 49 onto yÜ1, the arc yÜ1zÜ = xÉzÉ is in G \F . If p = 1, no contraction is needed. ′ 50 Case4 : xÉ = yÜ1, zÉ = wá1, where yÜ1 is in Pv, wá1 is in Pv′ for distinct v, v 51 in N. By combining the observations used in Cases 2 and 3, we get a path ′ 52 yÜ1 → ... → yÜp and an arc yÜpwá1 in G . We have an alternating path yÜp → yp → 53 54 55 41 56 57 58 59 60 61 62 63 64 65 1 2 3 4 ′ ′ xÜ → x → z → zÜ → w1 → wá1 in S(T ). We get an arc yÜpwá1 in G . After the 5 ′ contraction of the path yÜ1 → ... → yÜp, we get the arc yÜ1wá1 = xÉzÉ in G \F . 6 ′ 7 In a similar way, we can prove that every arc of G \F is of the form xÉzÉ for 8 some arc xz of Hu. # 9 This completes the proof of the Proposition 5.18.# 10 11 Example 5.19 : A directed graph-labelled T is shown in Figure 7 and the 12 associated strongly connected graph G is in Figure 8. It satisfies the requirement 13 of Step 1. The set N of the above proof is {x, v, w}. By removing 0 and its 14 neighbour in Hx, we get a component that is a cycle of two opposite arcs. No 15 arc contraction is here needed. By removing 7 and 8 and their neighbours in 16 Hw, we get a component that is a 3-cycle. The component Hv is also a 3-cycle. 17 By contracting the special arcs 45 and 69 of G − {0, 7, 8}, we obtain a graph 18 isomorphic to Hu by : a −→ 1, b −→ 2, c −→ 3, d −→ 4, e −→ 6. 19 20 Proof of Proposition 5.16 : 21 This claimed result follows from Lemma 5.17 and Proposition 5.18, because 22 we have G′ ⊆ G so that cwd(G′) ≤ cwd(G). 23 i # 24 Remarks 5.20 : (1) In Lemma 5.17 and Proposition 5.16, we can use the 25 2 k−1 26 mapping f(k) =: k .3 to bound the clique-widths of components by a result 27 of [12]. 28 (2) The proof of Proposition 5.16 given in [7] as Proposition 4.16 is incorrect: 29 Lemma A.2.3 shows (correctly) that cwd(H) ≤ 4cwd(G) if H is obtained from 30 G by fusing two vertices. But, in order to prove the statement, one must fuse 31 the vertices of several pairs (as we do above to define H from G′), hence, one 32 does not obtain any bounding function f as claimed. # 33 34 35 5.4 Related work 36 37 Kanté and Rao have defined in [35] the displit decomposition of a directed graph. 38 For an undirected graph, it is the same as the split decomposition. It is incom- 39 parable with the split decomposition of [19] because the prime components are 40 different. However, every connected directed graph has a unique decomposition. 41 Furthermore, for an appropriate notion of rank-width for directed graphs, they 42 obtain that the rank-width of a graph is the least upper-bound of the rank- 43 widths of the components of its displit decomposition (cf. Remark 4.15). 44 They also characterize the directed graphs of rank-width at most 1 in a way 45 that generalizes the various characterizations of distance-hereditary graphs, in 46 47 particular that of [37]. 48 We think that the results of this section and those of [7] about the exis- 49 tence of monadic second-order transformations between directed graphs and 50 their canonical split decompositions can be extended to displit decompositions. 51 52 53 54 55 42 56 57 58 59 60 61 62 63 64 65 1 2 3 4 6 Conclusion 5 6 7 Our purpose was to clarify the relationships between split-decompositions for 8 directed and undirected graphs, substitutions to vertices and the related graph 9 10 grammars, and also to obtain good bounds on the clique-widths of the defined 11 graphs. For doing that we have generalized, in Definitions 2.1 and 5.1, the 12 notion of substitution used in the theory of modular decomposition . 13 One open problem is the study of the operations defined in Definition 2.5 14 and their equational properties. 15 The methods of Section 5 should help to investigate particular classes of 16 directed graphs regarding their clique-width and their generation by unambigous 17 grammars if possible, along the lines of Section 4.5. Manipulating grammars so 18 as to reach unambiguity in view of counting and random generation has proved 19 useful in Section 4.5. It would be interesting to investigate in a similar way 20 the undirected graphs whose prime components are cycles. These graphs have 21 bounded clique-width by Theorem 4.14 and the upper-bound of 4 to the clique- 22 width of cycles. This fact encourages to try to define them by grammars. 23 24 25 26 References 27 28 [1] H.-J. Bandelt and H. Mulder, Distance-hereditary graphs, Journal of Com- 29 binatorial Theory, Series B, 41 (1986) 182—208. 30 31 [2] A. Brandstädt and V.B. Le, Structure and linear time recognition of 3-leaf 32 powers. Inf. Process. Lett. 98 (2006) 133-138. 33 34 [3] M.S. Chang, S.Y. Hsieh and G.H. Chen, Dynamic programming on 35 distance-hereditary graphs, Proceedings of ISAAC 1997, Algorithms and 36 Computation, Lec. Notes Comput. Sci 1350, Springer, 1997, 344-353. 37 38 [4] C. Chauve, É. Fusy and J. Lumbroso, An exact enumeration of distance- 39 hereditary graphs. Proceedings of ANALCO (14th Workshop on Analytic 40 Algorithmics and Combinatorics), Barcelona, 2017, pp. 31-45 41 [5] S. Cicerone and G. Di Stefano, On the extension of bipartite to parity 42 graphs. Discrete Applied Mathematics 95 (1999) 181-195. 43 44 [6] B. Courcelle, An axiomatic definition of context-free rewriting and its ap- 45 plication to NLC graph grammars. Theor. Comput. Sci. 55 (1987) 141-181. 46 47 [7] B. Courcelle, The monadic second-order logic of graphs XVI : Canonical 48 graph decompositions. Logical Methods in Computer Science 2 (2006). 49 50 [8] B. Courcelle, On the model-checking of monadic second-order formulas 51 with edge set quantifications, Discrete Applied Mathematics 160 (2012) 52 866-887. 53 54 55 43 56 57 58 59 60 61 62 63 64 65 1 2 3 4 [9] B. Courcelle, Clique-width and edge contraction. Inf. Process. Lett. 114 5 6 (2014) 42-44. 7 [10] B. Courcelle, From tree decompositions to clique-width terms, Discrete 8 Applied Mathematics, 248 (2018) 125-144. 9 10 [11] B. Courcelle, On quasi-planar graphs : clique-width and log- 11 ical description. 2018, Discrete Applied Mathematics, this issue, 12 https://doi.org/10.1016/j.dam.2018.07.022. 13 14 [12] B. Courcelle, Clique-width and edge contractions in directed graphs. In 15 preparation. 16 17 [13] B. Courcelle and I. Durand, Automata for the verification of monadic 18 second-order graph properties, J. Applied Logic 10 (2012) 368-409. 19 20 [14] B. Courcelle and I. Durand, Computations by fly-automata beyond 21 monadic second-order logic, Theor. Comput. Sci, 619 (2016) 32-67. 22 [15] B. Courcelle and J. Engelfriet, Graph structure and monadic second-order 23 logic, a language theoretic approach, Volume 138 of Encyclopedia of math- 24 25 ematics and its application, Cambridge University Press, June 2012. 26 [16] B. Courcelle, P. Heggernes, D. Meister, C. Papadopoulos and U. Rotics, A 27 characterisation of clique-width through nested partitions, Discrete Applied 28 Maths, 187 (2015) 70-81. 29 30 [17] B. Courcelle and M. Kanté: Graph operations characterizing rank-width. 31 Discrete Applied Mathematics 157 (2009) 627-640. 32 33 [18] B. Courcelle, J. Makowsky and U. Rotics, Linear-time solvable optimization 34 problems on graphs of bounded clique-width, Theory Comput. Syst. 33 35 (2000) 125-150. 36 37 [19] W. Cunningham, Decomposition of directed graphs, SIAM. J. on Algebraic 38 and Discrete Methods, 3 (1981) 214—228. 39 40 [20] R. Diestel, , Springer, 2006. 41 [21] R. Downey and M. Fellows, Fundamentals of parameterized complexity, 42 Springer-Verlag, 2013. 43 44 [22] I. Durand, TRAG: Term Rewriting Automata and Graphs, a software de- 45 velopped since 2015, http://dept-info.labri.u-bordeaux.fr/~idurand/trag 46 47 [23] I.Durand and M.Raskin, TRAG-WEB: Term Rewriting Automata 48 and Graphs (online), Web interface under development, 2018, 49 https://trag.labri.fr 50 51 [24] M. Fellows, F. Rosamond, U. Rotics and S. Szeider, Clique-width is NP- 52 complete. SIAM J. Discrete Math. 23 (2009) 909-939. 53 54 55 44 56 57 58 59 60 61 62 63 64 65 1 2 3 4 [25] E. Fischer J. Makowsky and E. Ravve, Counting truth assignments of for- 5 6 mulas of bounded tree-width or clique-width. Discrete Applied Mathematics 7 156 (2008) 511-529. 8 [26] P. Flajolet, P. Zimmermann and B. Van Cutsem, A calculus for the random 9 generation of labelled combinatorial structures. Theor. Comput. Sci. 132 10 (1994) 1-35. 11 12 [27] E.Gioan and C. Paul, Split decomposition and graph-labelled trees: Char- 13 acterizations and fully dynamic algorithms for totally decomposable graphs. 14 Discrete Applied Mathematics 160 (2012) 708-733. 15 16 [28] E. Gioan, C. Paul, M. Tedder and D. Corneil, Practical and efficient split 17 decomposition via graph-labelled trees. Algorithmica 69(2014): 789-843. 18 19 [29] M. Golumbic and U. Rotics, On the Clique-Width of Some Perfect Graph 20 Classes. Int. J. Found. Comput. Sci. 11 (2000) 423-443. 21 22 [30] F. Gurski, The behavior of clique-width under graph operations and graph 23 transformations. Theory Comput. Syst. 60 (2017) 346-376. 24 25 [31] M. Habib and C. Paul, A survey of the algorithmic aspects of modular 26 decomposition. Computer Science Review 4 (2010) 41-59. 27 [32] P. Heggernes, D. Meister and C. Papadopoulos, Characterising the linear 28 clique-width of a class of graphs by forbidden induced subgraphs, Discrete 29 Applied Mathematics 160 (2012) 888-90. 30 31 [33] P. Hlinený, S. Oum, D. Seese and G. Gottlob, Width parameters beyond 32 tree-width and their applications. Comput. J. 51 (2008) 326-362. 33 34 [34] M. Kanté and M. Rao, The rank-width of edge-coloured graphs. Theory 35 Comput. Syst. 52 (2013) 599-644. 36 37 [35] M. Kanté and M. Rao, Directed rank-width and displit decomposition. 38 Proceedings of WG 2009, Lecture Notes in Computer Science 5911 (2010) 39 214-225. 40 41 [36] D.Meister, Clique-width with an inactive label. Discrete Mathematics 337 42 (2014) 34-64. 43 44 [37] S. Oum, Rank-width and vertex-minors, Journal of Combinatorial Theory, 45 Series B, 95 (2005) 79—100. 46 [38] V. Ravelomanana and L.Thimonier, Asymptotic enumeration of cographs. 47 Electronic Notes in Discrete Mathematics :7 (2001) 58-61. 48 49 50 51 52 53 54 55 45 56 57 58 59 60 61 62 63 64 65