A note on clique-width and tree-width for structures
aa r X i v : . [ c s . L O ] J un A note on clique-width and tree-width for structures
Hans Adler and Isolde Adler1st June 2008
Abstract
We give a simple proof that the straightforward generalisation of clique-width to arbitrarystructures can be unbounded on structures of bounded tree-width. This can be corrected byallowing fusion of elements.
Clique-width, introduced by Courcelle and Olariu, is a good measure for the complexity of a graphin the sense that many problems that are intractable in general become tractable when restrictedto graphs of bounded clique-width. Moreover, clique-width of a graph is bounded by a functionof tree-width, while the converse is not true [4]. However, the clique-width of a clique is two, sotrying to measure the complexity of a general structure by the clique-width of its Gaifman graphmakes no sense. Therefore we are looking for a notion similar to clique-width of graphs, whichshould ideally have all of the following properties:1. It is defined for arbitrary structures.2. It specialises (essentially) to clique-width, in the case of graphs.3. It is bounded by a function of the tree-width of the Gaifman graph.4. Computationally hard problems should become tractable on instances of bounded width.5. It does not increase on induced substructures.6. The value mapping is an MS transduction.7. Every set of structures that is the image of an MS transduction from trees has boundedwidth.8. For fixed k a decomposition of width k (or width f ( k )) can be computed in polynomial time.This paper mainly addresses the third criterion. We consider the generalisation of clique-width to structures as proposed by Grohe and Tur´an [8]. (A similar notion was introduced byFischer and Makowsky, resulting in values that are smaller by one because elements can also beuncoloured [6].) We give a simpler proof for a result of Courcelle, Engelfriet and Rozenberg [2,Theorem 7.5], showing that the clique-width of a class of structures is not bounded in terms of itstree-width. More specifically we show that there is a class of structures, with one ternary relationsymbol, that has unbounded clique-width while the tree-width of the class is bounded by 2. Itis known that there can be no such examples with structures that have only binary and unaryrelation symbols [4, 10]. Key words: Clique-width, tree-width, path-width.MSC2000: 68R05, 03C13, 05C75.CR categories: F.4.1, G.2.2.
1e then consider a modified definition where we additionaly allow fusion of elements. Weshow that the corresponding modified width is bounded from above by tree-width plus 2. Inan earlier version of this paper we referred to clique-width with fusion as ‘reduced clique-width’,since we were not aware that the fusion operation had already been introduced by Courcelle andMakowsky [3]. We have now corrected this to avoid unnecessary proliferation of technical terms. A signature σ = { R , . . . , R n } is a finite set of relation symbols R i , 1 ≤ i ≤ n . As usual, everyrelation symbol R ∈ σ has an associated arity ar( R ). A σ -structure is a tuple A = ( A, R A , . . . , R A n )where A is a set, the universe of A , and R A i ⊆ A ar( R i ) for 1 ≤ i ≤ n . All structures in this paperare finite (i.e. they have finite universes).Given a structure A , we write G A for the underlying graph (also called Gaifman graph ) of A :The vertices are the elements of the universe, and two different vertices are joined by an edge if,and only if, they appear together in some tuple that is in a relation of A .A tree decomposition of a graph G = ( V, E ) is a pair (
T, B ), consisting of a rooted tree T anda family B = ( B t ) t ∈ T of subsets of V , the pieces of T , satisfying: • For each v ∈ V there exists t ∈ T , such that v ∈ B t . • For each edge e ∈ E there exists t ∈ T , such that e ⊆ B t . • For each v ∈ V the set { t ∈ T | v ∈ B t } is connected in T .The width of ( T, B ) is defined as w(
T, B ) := max (cid:8) | B t | − (cid:12)(cid:12) t ∈ T (cid:9) . The tree-width of G isdefined as tw( G ) := min (cid:8) w( T, B ) (cid:12)(cid:12) ( T, B ) is a tree decomposition of G (cid:9) . Path decompositions and path-width of G , pw( G ), are defined analogously, with the additionalrestriction that T be a path.Let us call a pair ( A , γ ) consisting of a structure A and a map γ : A → ω a coloured structure .It is k - coloured if γ ( A ) ⊆ { , , . . . , k − } . We will usually think of elements of colour 0 as‘uncoloured’, and identify structures and 1-coloured structures. We call an element a of a colouredstructure ( A , γ ) isolated if a is the only element of colour γ ( a ). For a signature σ and a non-negativeinteger k , we define UCW k [ σ ] as the smallest class of k -coloured σ -structures such that:1. Every (1-coloured) empty σ -structure is in UCW k [ σ ].2. Every (1-coloured) 1-element σ -structure whose relations are all empty is in UCW k [ σ ].3. The disjoint union ( A ⊔ B , γ A ⊔ γ B ) of two coloured structures ( A , γ A ) , ( B , γ B ) ∈ UCW k [ σ ]is again in UCW k [ σ ].4. If ( A , γ ) ∈ UCW k [ σ ] and f : { , . . . , k − } → { , . . . , k − } is any function, then ( A , f ◦ γ ) ∈ UCW k [ σ ].5. If ( A , γ ) ∈ UCW k [ σ ], R ∈ σ is an n -ary relation symbol, and c , . . . , c n − ∈ { , . . . , k − } is an n -tuple of colours, then for the structure B which is like A except that B | = R ( a , . . . , a n − ) holds iff A | = R ( a , . . . , a n − ) or γ ( a i ) = c i for i = 0 , . . . , n −
1, we have( B , γ ) ∈ UCW k [ σ ].For a σ -structure A (possibly coloured) let ucw A , the unary clique-width of A , be the smallestnumber k such that A ∈
UCW k [ σ ]. ‘Unary’ because only single elements are coloured. It is easyto see that our notion is equivalent to that of Grohe and Tur´an, even though they use a morerestrictive colouring operation [8].Every k -coloured σ -structure A with | A | ≤ k elements has unary clique-width ucw A ≤ k :Take the disjoint union of | A | differently coloured 1-element structures, introduce the necessaryrelations, and recolour all elements with their final colour.2 Unary clique-width and tree-width
Proposition 1.
Every (1-coloured) structure A satisfies ucw( A ) ≤ pw( G A ) + 2 . Proof.
Let k = pw( G A )+ 1. We will show by induction on n the stronger statement that if G A hasa path decomposition B , B , . . . , B n − of width ≤ k +1 and γ : A → { , . . . , k } is a k +1-colouringof A such that all elements of A \ B n − have colour 0, then ( A , γ ) ∈ UCW k +1 [ σ ]. The case n = 0is trivial because then A is the empty σ -structure.For n ≥
1, let A ′ = A ↾ ( B ∪ · · · ∪ B n − ) be the induced substructure of A with domain B ∪ · · · ∪ B n − , and let γ ′ : B ∪ · · · ∪ B n − → { , . . . , k + 1 } be a colouring such that everyelement of B n − ∩ B n − is isolated and has a non-zero colour, while all other elements havecolour 0. Then ( A ′ , γ ′ ) ∈ UCW k +1 [ σ ] by the induction hypothesis. Let A ′′ be the σ -structurewith domain A whose relations are precisely those of A ′ . Let γ ′′ : A → { , . . . , k + 1 } extend γ ′ so that any two elements of B n − have distinct non-zero colours. ( A ′′ , γ ′′ ) can be obtainedfrom ( A ′ , γ ′ ) by disjoint union with one-element structures, so clearly ( A ′′ , γ ′′ ) ∈ UCW k +1 [ σ ]. Allrelations of A that are not also relations of A ′ must be between elements of B n − . Since everyelement of B n − has a unique colour we can introduce all these relations without introducing anyunwanted relations. Similarly, for f : { , . . . , k + 1 } → { , . . . , k + 1 } such that f (0) = 0 and f ( γ ′′ ( a )) = γ ( a ) we get γ = f ◦ γ ′′ . Hence ( A , γ ) ∈ UCW k +1 [ σ ]. Lemma 2.
For every structure A in the signature σ = { E } of graphs, there is a structure A ′ withuniverse A ′ = A ⊔ { t } in the signature σ ′ = { R } , R a ternary relation symbol, which satisfies:1. tw( G A ′ ) = tw( G A ) + 1 .2. pw( G A ′ ) = pw( G A ) + 1 .3. ucw( A ′ ) ≥ pw( G A ′ ) + 1 . (Note: The +1 in clauses 1 and 2 is due to the fact that G A ′ is an apex graph over G A , whereasthe +1 in 3 merely corrects the conventional − Proof.
We interpret the relation R as follows: A ′ | = Racb ⇐⇒ a = b and c ∈ { a, b } and (cid:0) A | = Eab or a = t (cid:1) . Then 1 and 2 hold because G A ′ is an apex graph over G A . (I.e., G A is an induced subgraph of G A ′ , and G A ′ has exactly one additional vertex, say t , and t has an edge with every vertex of G A .) Towards a proof of 3 we observe:If A ′ ∈ UCW k [ σ ′ ], then there is a tree of k -coloured σ ′ -structures such that the leaves aresingletons with empty relations, and every inner node is either binary and the disjoint union ofits two children, or unary and obtained from its only child by recolouring or by introducing a newrelation. Due to the definition of R , for every element a = t there must be a node containingboth a and t as isolated elements, and for any two distinct elements a, b = t there must be a nodecontaining a, b, t as three isolated elements.The branch ( A t , γ t ) , . . . , ( A tm − , γ tm − ) of the tree which begins with the root and ends in theleaf consisting of the single element t has the following properties:1. For every element a ∈ A the branch contains a node that has a and t as isolated elements.2. For every edge A | = Eab of A there is a node that has a, b, t as isolated elements.3. For every element a ∈ A there is a greatest index j such that a ∈ A tj , and a smallest index i ≤ j such that a is the only element of colour γ ti ( a ).3et ℓ be the greatest index such that t is isolated in A tℓ . For i = 0 , . . . , ℓ let B i consist of theisolated elements of ( A ti , γ ti ). Then B \ { t } , . . . , B ℓ \ { t } is clearly a path decomposition of A .Each bag B i \ { t } has at most k elements, so the width of the path decomposition is at most k − A ′ ≤ k implies pw A ≤ k − Corollary 3.
For every non-negative integer n there is a structure A with only one, ternary,relation symbol, such that1. tw( G A ) = 2 and2. ucw( A ) > n .Proof. Let G be an undirected tree in the signature { E } of graphs, satisfying pw( G G ) ≥ n . Let A ′ = G ′ be as in the Lemma. Then tw( G G ′ ) = tw( G G ) + 1 = 2 and ucw( G ′ ) ≥ pw( G G ′ ) + 1 =pw( G G ) + 2 > n .As Johann Makowsky pointed out to us, a result of Glikson and Makowsky [7] is cited incor-rectly in the paper by Fischer and Makowsky [6] (as Theorem 3.7 (ii)), resulting in an apparentcontradiction to Corollary 3. Our result is optimal in the sense that, as shown by Courcelle andOlariu, clique-width of structures with at most binary relations is bounded by a function of tree-width of the Gaifman graph [4]. (The details for an arbitrary number of binary relations werechecked by Till Scheffzik in his diplomarbeit [10].) The reason why the proof of Proposition 1 works with path-width but not with tree-width is thatfor unary clique-width there is no way to glue together two substructures that intersect in a smallbag of elements. In other words, while we can introduce new relations in the signature dependingonly on the colours of the elements, we cannot do this for equality, which can also be seen asa binary relation. The definition below fixes this, using the fusion operation of Courcelle andMakowsky [3, 9].We will need a rarely used universal construction for structures: The quotient by an equivalencerelation which need not be a congruence relation. Let A be a σ -structure, and let ∼ be anequivalence relation on its domain A . Let B = A/ ∼ be the set of equivalence classes of ∼ . Let B be the σ -structure with domain B which satisfies B | = R ( b , . . . , b n ( R ) ) if and only if there are a ∈ b , . . . , a n ( R ) ∈ b n ( R ) such that A | = R ( a , . . . , a n ( R ) ). We denote this quotient structure by B = A / ∼ . ( B is universal in the sense that the projection map p : A → B is a homomorphism,and for every other structure B ′ with the same domain B , if the projection map p ′ : A → B ′ isalso a homomorphism then it factors through p .) For a coloured structure ( A , γ ) and a set C ⊆ ω of colours we define a ∼ C a ′ to mean a = a ′ or γ ( a ) = γ ( a ′ ) ∈ C . The obvious colouring γ/ ∼ C induced on the quotient structure A / ∼ C satisfies γ/ ∼ C ( b ) = γ ( a ) for some/any a ∈ b .For a signature σ and a non-negative integer k , the class UCWF k [ σ ] is the smallest class of k -coloured σ -structures such that:1. Every empty σ -structure is in UCWF k [ σ ].2. Every 1-element σ -structure whose relations are all empty is in UCWF k [ σ ].3. The disjoint union ( A ⊔ B , γ A ⊔ γ B ) of two coloured structures ( A , γ A ) , ( B , γ B ) ∈ UCWF kσ isagain in UCWF k [ σ ].4. If ( A , γ ) ∈ UCWF k [ σ ] and f : { , . . . , k − } → { , . . . , k − } is any function, then ( A , f ◦ γ ) ∈ UCWF k [ σ ].5. If ( A , γ ) ∈ UCWF k [ σ ], R ∈ σ is an n -ary relation symbol, and c , . . . , c n − ∈ { , . . . , k − } is an n -tuple of colours, then for the structure B which is like A except that B | = R ( a , . . . , a n − ) holds iff A | = R ( a , . . . , a n − ) or γ ( a i ) = c i for i = 0 , . . . , n −
1, we have( B , γ ) ∈ UCWF k [ σ ]. 4. If ( A , γ A ) ∈ UCWF kσ and c ∈ { , . . . , k − } , then also ( A / ∼ { c } , γ/ ∼ { c } ) ∈ UCWF k [ σ ].The only difference to the definition of UCW k [ σ ] is that we have added the fusion operation atthe end. For a σ -structure A let ucwf A , the unary clique-width with fusions of A , be the smallestnumber k such that A ∈
UCWF k [ σ ]. Remark . Every k -coloured σ -structure ( A , γ ) with at most k elements satisfies ( A , γ ) ∈ UCWF k [ σ ]. Proof.
Clearly for every σ -structure A ′ with no relations and every k -colouring γ ′ of A ′ we have( A ′ , γ ′ ) ∈ UCWF k [ σ ]. Now for A as in the remark let A ′ be the σ -structure which has the samedomain as A but no relations, and let γ ′ be a colouring of A ′ such that every element has adifferent colour. Since ( A ′ , γ ′ ) ∈ UCWF k [ σ ], clearly also ( A , γ ) ∈ UCWF k [ σ ]. Lemma 5.
Suppose A has a tree decomposition ( T, B ) of width ≤ k , and B t is the bag at sometree node t ∈ T . Let γ be a ( k + 2) -colouring of A such that all elements a ∈ A of the domain of A have colour γ ( a ) = 0 . Then ( A , γ ) ∈ UCWF k [ σ ] .Proof. By induction on the minimal number of nodes in a tree decomposition of A in which thebag B t occurs, using the remark as induction base. Corollary 6.
Every relational structure A satisfies ucwf( A ) ≤ tw( A ) + 2 . The term +2 consists of +1 correcting for the conventional − We have shown that clique-width for structures fails even the basic requirement that it be boundedin terms of tree-width. We have also shown that this can be corrected by admitting the fusionoperation in addition to the other operations, although we have not explored the (presumablynegative) impact of this on the other desirable conditions.Another approach would be to colour tuples rather than elements. Examples for definitionsthat go in that direction are Blumensath’s partition-width [1], and patch-width, defined by Fischerand Makowsky and examined further by Shelah and Doron [6, 5]. For instance, we could assigncolours to tuples of length at most some fixed n . But then it should still be possible to adapt ourexample to show that we do not obtain a bound in terms of tree-width.The authors thank Bruno Courcelle and Johann Makowsky for valuable suggestions. References [1] Achim Blumensath, A model theoretic characterisation of clique width,
Annals of Pure andApplied Logic (2006) 321–350.[2] Bruno Courcelle, Joost Engelfriet and Grzegorz Rozenberg, Handle-rewriting hypergraphgrammars.
Journal of Computer and System Sciences (1993) 218–270.[3] Bruno Courcelle and Johann A. Makowsky, Fusion in relational structures and the verificationof monadic second-order properties, Mathematical Structures in Computer Science (2002)203–235.[4] Bruno Courcelle and Stephan Olariu, Upper bounds to the clique-width of graphs, DiscreteApplied Mathematics (2000) 77–114.[5] Mor Doron and Saharon Shelah, Relational structures constructible by quantifier free definableoperations,
Journal of Symbolic Logic (2007) 1283–1298.56] Eldar Fischer and Johann A. Makowsky, On spectra of sentences of monadic second order logicwith counting, Journal of Symbolic Logic (2004) 617–640.[7] Alexander Glikson and Johann A. Makowsky, NCE graph grammars and clique-width, Graph-Theoretic Concepts in Computer Science , Lecture Notes in Computer Science 2880 (2003)237–248.[8] Martin Grohe and Gy¨orgy Tur´an, Learnability and definability in trees and similar structures,
Theory of Computing Systems (2004) 193–220.[9] Johann A. Makowsky, Algorithmic uses of the Feferman-Vaught Theorem, Annals of Pure andApplied Logic (2004) 159–213.[10] Till Scheffzik,