Domino Treewidth

Domino Treewidth

JOURNAL OF ALGORITHMS ARTICLE NO. 24, 94]123 Ž1997. AL960854 Domino Treewidth Hans L. BodlaenderU Department of Computer Science, Utrecht Uni¨ ersi...

486KB Sizes 0 Downloads 137 Views

JOURNAL OF ALGORITHMS ARTICLE NO.

24, 94]123 Ž1997.

AL960854

Domino Treewidth Hans L. BodlaenderU Department of Computer Science, Utrecht Uni¨ ersity, P.O. Box 80.089, 3508 TB Utrecht, The Netherlands

and Joost Engelfriet † Department of Computer Science, Leiden Uni¨ ersity, P.O. Box 9512, 2300 RA Leiden, The Netherlands Received May 16, 1994

We consider a special variant of tree-decompositions, called domino tree-decompositions, and the related notion of domino treewidth. In a domino tree-decomposition, each vertex of the graph belongs to at most two nodes of the tree. We prove that for every k, d, there exists a constant c k, d such that a graph with treewidth at most k and maximum degree at most d has domino treewidth at most c k, d . The domino treewidth of a tree can be computed in O Ž n2 log n. time. There exist polynomial time algorithms that}for fixed k}decide whether a given graph G has domino treewidth at most k. If k is not fixed, this problem is NP-complete. The domino treewidth problem is hard for the complexity classes W w t x for all t g N, and hence the problem for fixed k is unlikely to be solvable in O Ž n c . time, where c is a constant, not depending on k. Q 1997 Academic Press

1. INTRODUCTION A topic of much recent research in algorithmic graph theory is the treewidth of graphs. Applications of this research range from VLSI theory to expert systems Žand many more.. ŽSee, e.g., w4x for an overview.. In this paper, we introduce a special variant of treewidth: domino treewidth. This U

This author was partially supported by the ESPRIT Basic Research Actions of the European Community under Contract 7141 ŽProject ALCOM II.. † This author was supported by the ESPRIT Basic Research Working Group COMPUGRAPH II. 94 0196-6774r97 $25.00 Copyright Q 1997 by Academic Press All rights of reproduction in any form reserved.

DOMINO TREEWIDTH

95

notion is derived from the usual notion of treewidth by additionally requiring that every vertex ¨ g V belongs to at most two node sets X i . ŽSee Section 2 for the precise definitions.. Our interest in this notion is largely due to a maybe somewhat surprising result: for graphs of bounded degree and bounded treewidth, there is a uniform upper bound on the domino treewidth. The proof of this result is given in Section 3. We also investigate the algorithmic aspects of domino treewidth. In Section 5, we show that the problem of determining the domino treewidth of a given graph is NP-hard and also is hard for the complexity classes W w t x, for all t g N. The latter result tells us that it is unlikely that the problem, for fixed k, of deciding whether a given graph has domino treewidth F k can be solved in O Ž n c . time, where c is a constant not depending on k. Some special cases can be solved in polynomial time: for fixed k, one can check in polynomial time whether the domino treewidth of a given graph is at most k. For trees, the domino treewidth can be computed in O Ž n2 log n. time. These results are shown in Section 4.

2. DEFINITIONS AND PRELIMINARY RESULTS The notion of treewidth was introduced by Robertson and Seymour w17x. DEFINITION. A tree-decomposition of a graph G s Ž V, E . is a pair Ž X i N i g I 4 , T s Ž I, F .. with  X i N i g I 4 a collection of subsets of V, and T s Ž I, F . a tree, such that D i g I Xi s V for all edges  ¨ , w4 g E there is an i g I with ¨ , w g X i for all i, j, k g I: if j is on the path from i to k in T, then Xi l Xk : X j. v v v

The width of a tree-decomposition Ž X i N i g I 4 , T s Ž I, F .. is max i g I < X i < y 1. The treewidth of a graph G s Ž V, E . is the minimum width over all tree-decompositions of G. Let Ž X i N i g I 4 , T s Ž I, F .. be a tree-decomposition of G s Ž V, E .. For each vertex ¨ g V, we let T¨ be the subgraph of T, induced by  i g I N ¨ g X i 4 . Condition Žiii. above can be rephrased as: for every ¨ g V, T¨ is connected, or as: for every ¨ g V, T¨ is a tree. We use sizeŽ G . to denote the number of vertices of G, and deg Ž ¨ . to denote the degree of vertex ¨ . The degree of G is the maximum degree of its vertices. DEFINITION. A tree-decomposition Ž X i N i g I 4 , T s Ž I, F .. of G s Ž V, E . is a domino tree-decomposition, if for every vertex ¨ g V, sizeŽT¨ . F

96

BODLAENDER AND ENGELFRIET

2, i.e., every vertex belongs to at most two sets X i . The domino treewidth of a graph G is the minimum width over all domino tree-decompositions of G. Equivalently, the definition of a domino tree-decomposition is obtained from the first definition by changing its third condition into the following requirement: for all i, j g I, if i / j and  i, j4 f F, then X i l X j s B. For a connected graph G, this means that T is the intersection graph of the family  X i N i g I 4 . Note that if d is the maximum degree of a graph G and k is its domino treewidth, then d F 2 k. Hence the domino treewidth of a graph is at least half its maximum degree. This shows, e.g., that there is no bound on the domino treewidth of trees. As an example, the graph G in Fig. 1 Žand any similar graph. has domino treewidth 3. The dotted lines indicate a domino tree-decomposition of width 3. Note that domino tree-decompositions are easy to visualize. We remark that G has treewidth 2: G is outerplanar and all outerplanar graphs have treewidth F 2 Žsee e.g., w3x.. A well-known lemma for tree-decompositions is the following. LEMMA 1. Let Ž X i N i g I 4 , T s Ž I, F .. be a tree-decomposition of G s Ž V, E .. Let ¨ 0 , ¨ 1 , . . . , ¨ r be a path in G. Suppose ¨ 0 g X i , ¨ r g X k , and j is on the path from i to k in T. Then X j l  ¨ 0 , . . . , ¨ r 4 / B. A slightly stronger variant holds for domino tree-decompositions. The following lemma will be used later in this paper. LEMMA 2. Let Ž X i N i g I 4 , T s Ž I, F .. be a domino tree-decomposition of G s Ž V, E .. Let ¨ 0 , ¨ 1 , . . . , ¨ r be a path in G. Suppose ¨ 0 g X i , ¨ r g X k , and j is on the path from i to k in T, j / i, j / k. Then < X j l  ¨ 0 , . . . , ¨ r 4< G 2.

FIG. 1. A domino tree-decomposition.

DOMINO TREEWIDTH

97

Proof. By Lemma 1, X j l  ¨ 0 , . . . , ¨ r 4 / B. Suppose that X j l  ¨ 0 , . . . , ¨ r 4 s  ¨a 4 . Let jX be the unique node with jX / j and ¨a g X jX . As the neighbors of ¨a on the path do not belong to X j , they must belong to X jX . Either j is on the path from jX to i in T, or on the path from jX to k in T. Suppose the former. If a s 0, then ¨a g X j l X jX l X i , and i / jX : contradiction with dominoness. If a ) 0, then ¨ay1 g X jX , and hence, by Lemma 1, X j l  ¨ 0 , . . . , ¨ay14 / B, contradiction. In the case that j is on the path from jX to k, we can obtain a contradiction in a similar way. We conclude that X j contains at least two vertices from the path ¨ 0 , . . . , ¨ r . Another well-known lemma is the following Žfor a short proof, see, e.g., w9x.. LEMMA 3. Let Ž X i N i g I 4 , T s Ž I, F .. be a tree-decomposition of G s Ž V, E .. Suppose W : V forms a clique in G. Then there must be a node i g I with W : X i .

3. BOUNDED TREEWIDTH AND DEGREE CORRESPONDS WITH BOUNDED DOMINO TREEWIDTH In this section, we give the proof of a structural result: graphs with bounded degree and bounded treewidth have bounded domino treewidth. A result such as this was first shown in the context of graph grammars in w14x. The proof of this result is rather lengthy and will be given with the help of several lemmas. First we introduce some notions needed for the proof. For technical reasons, we assume in this section that the trees T taken from tree-decompositions are rooted. This induces rootedness of each T¨ in a natural way: the root of T¨ is the node of T¨ that is closest to the root of T. For a node i of a rooted tree, the parent of i and children of i Žif they exist. are defined in the usual way. The rank of i is the number of children of i. The rank of a tree is the maximum rank of its nodes. A leaf is a node of rank 0. Whenever we write down a tree arc  i, j4 as Ž i, j ., this implicitly means that i is the parent of j, i.e., i is closer to the root of T than j. The height of a tree is the maximum distance between the root and the leaves. If i is a node, and T a tree, we sometimes denote the fact that i is a node of T as i g T. Also for technical reasons, we will, for each tree-decomposition, fix a mapping c : I ª P Ž E ., such that v

v

for every i g I,  ¨ , w4 g c Ž i .:  ¨ , w4 : X i . for every  ¨ , w4 g E, there is a unique i g I with  ¨ , w4 g c Ž i ..

98

BODLAENDER AND ENGELFRIET

Note that by the second condition of tree-decomposition, such a mapping c always exists Žbut, in general, there may be more than one.. The mapping c fixes a distribution of the edges of G over the nodes in I. Let XT s Ž X i N i g I 4 , T s Ž I, F .. be a tree-decomposition of G s Ž V, E ., and let mapping c and subtrees T¨ be defined as in Section 2 and above. Let ¨ g V, and let i g I be a node in T¨ Ži.e., ¨ g X i .. We say that i is a useful node of T¨ if there exists an edge  ¨ , w4 g c Ž i .; otherwise we say that i is a useless node of T¨ . Our first aim is to transform a tree-decomposition in such a way that the tree has no useless nodes of rank 0 or 1 Žcf. Lemma 7.. We start by removing useless nodes of degree 1. We say that a tree-decomposition XT has property ŽU1., if for every vertex ¨ g V, T¨ has no useless nodes of degree 1. LEMMA 4. Let Ž X i N i g I 4 , T s Ž I, F .. be a tree-decomposition of G s Ž V, E . of width k. There exists a tree-decomposition Ž Yi N i g I 4 , T s Ž I, F .. of G s Ž V, E . of width F k that has property ŽU1.. Proof. If i is a useless node of T¨ of degree 1, then remove i from T¨ , i.e., remove ¨ from X i . Repeat this procedure as long as possible. The resulting tree-decomposition has property ŽU1. and width F k. We need some extra terminology. Let XT s Ž X i N i g I 4 , T s Ž I, F .. be a tree-decomposition, let the subtrees T¨ and mapping c be as before. For every node i g I, define chain X T Ž i . s  ¨ g X i N i is a useless node of rank 1 in T¨ 4 For an arc Ž i, j . of T Žrecall that the notation means that i is the parent of j ., define passX T Ž i , j . s chain X T Ž i . l X j . Note that if j, jX are distinct children of i, then passX T Ž i, j . l passX T Ž i, jX . s B. We define maxp Ž XT . s max  passX T Ž i , j .

Ž i , j . g F4 .

LEMMA 5. For e¨ ery k, r g N, there exist kX , r X g N, such that for e¨ ery graph G s Ž V, E . and for e¨ ery tree-decomposition XT of G with property ŽU1. and of width F k, with the rank of T F r, if maxpŽ XT . ) 0, then there exists a tree-decomposition XT X s Ž X iX N i g I X 4 , T X s Ž I X , F X .. of G with property ŽU1. and of width F kX with the rank of T X F r X , such that maxpŽ XT X . - maxpŽ XT .. Moreo¨ er the height and size of T X are at most the height and size of T, respecti¨ ely.

DOMINO TREEWIDTH

99

Proof. We begin by making an intermediate tree-decomposition XT Y , fulfilling the property, that for every arc Ž i, j ., either < passX T Y Ž i, j .< maxpŽ XT ., or for every arc Ž j, h. it holds that < passX T Y Ž j, h.< - maxpŽ XT .. In other words: there will be no pair of arcs Ž i, j ., Ž j, h., with < passX T Y Ž i, j .< s < passX T Y Ž j, h.< s maxpŽ XT .. PROPOSITION 6. For e¨ ery k, r g N, there exist kY , r Y g N such that for e¨ ery graph G s Ž V, E . and for e¨ ery tree-decomposition XT of G with property ŽU1. and of width F k, with the rank of T F r if maxpŽ XT . ) 0, then there exists a tree-decomposition XT Y s Ž X iY N i g I Y 4 , T Y s Ž I Y , F Y .. of G with property ŽU1. and of width F kY with the rank of T Y F r Y , such that for e¨ ery arc Ž i, j . in T Y , either < passX T Y Ž i, j .< - maxpŽ XT ., or for e¨ ery arc Ž j, h. it holds that < passX T Y Ž j, h.< - maxpŽ XT .. Moreo¨ er, the height and size of T Y are at most the height and size of T, respecti¨ ely. Proof. We say that an arc Ž i, j . is maximal if < passX T Ž i, j .< s maxpŽ XT ., and we say that a node i is maximal if it has a maximal arc Ž i, j .. The idea of the construction is to fold certain paths of T, that consist of maximal arcs Ž i, j ., all with the same set of vertices passX T Ž i, j .. These vertices can then be removed from the folded path. We first define these paths. To this aim, we define a marking of the nodes and arcs of T, in a top-down fashion. A node can either stay unmarked, or can be marked as initial, middle, or final. An arc Ž i, j . can either stay unmarked, or can be marked with the set of vertices passX T Ž i, j .. We now describe the marking procedure in detail. Consider a node i of T, and assume that the nodes and arcs on the path from i to the root already have been considered. Let h be the parent of i, if existing. We distinguish two cases. Case 1. The arc Ž h, i . is unmarked, or i is the root of T. If i is a maximal node, then mark i as initial, and mark each maximal arc Ž i, j . with passX T Ž i, j .. After that, consider the children of i. Case 2. The arc Ž h, i . is marked with the set of vertices p . If there exists an arc Ž i, j . with passX T Ž i, j . s p , then mark this arc with p , and mark i as middle. Such an arc is necessarily unique. If there is no such arc, then mark i as final. After that, consider the children of i. It should be clear that the marked subgraph of T is a disjoint collection of trees. Each such tree has a root, marked initial, which is of rank at least 1; all other nodes in such a tree are marked either as middle, in which case they have rank 1, or as final, in which case they have rank 0. Moreover, all the arcs on one path from the initial node to a final node have the same mark; we will call this the mark of the path. Note that the marks of distinct paths are disjoint. Figure 2a shows an example of a marked subtree Žin which all unlabeled nodes are marked ‘middle,’ and p 1 , p 2 are disjoint

100

BODLAENDER AND ENGELFRIET

FIG. 2. Ža. A marked subtree of T. Žb. The folded marked subtree.

sets of vertices.; the figure also shows some Žunmarked. arcs that do not belong to the marked subtree. We now describe the procedure, that computes the desired tree-decomposition XT Y . Perform the following steps for each marked subtree of T. 1. Identify the initial node with all the final nodes. The resulting node of T Y is called a bridge node. 2. For each path from the initial node to a final node, let i1 , . . . , ib be the middle nodes on the path, b G 0. For a , 1 F a F b , identify ia with iby aq1 , i.e., i1 with ib , i 2 with iby1 , i 3 with iby2 , etc. The resulting nodes of T Y are called folded nodes. 3. Define the sets X jY of folded or bridge nodes as the union of the sets X i of the corresponding identified nodes. The mapping c Y is obtained similarly. ŽHowever, see below at point 5!.

DOMINO TREEWIDTH

101

4. Unmarked nodes of T will stay the same in XT Y , with the same values for X i and c . These will be called the old nodes of T Y . 5. For each folded node j, remove p from X jY , where p is the mark of the path to which the corresponding middle nodes belong. In other words, each marked path from an initial node to a final node is folded in two, and the vertices in the mark of that path are removed from the sets X i . Note that if in Step 2, b is odd, then the node that is half-way the path is not identified with another node. Figure 2b shows how the marked subtree of Fig. 2a is folded. The nodes of T Y are shown as shaded circles, containing the corresponding identified nodes of T Žwhere all unlabeled nodes of T Y are folded nodes.. We first prove that XT Y is a tree-decomposition of G. It is easy to see that after we have applied Steps 1]4, we still have a tree-decomposition XT U of G. For each path from an initial node to a final node with mark p , the middle nodes are useless nodes of rank 1 in T¨ for every ¨ g p . Hence, in T¨U , the corresponding folded nodes form a chain of useless nodes of rank 1, ending in a useless leaf. So, we can safely remove ¨ from all X jU for all folded nodes j Žas in the proof of Lemma 4., which is done in Step 5. Since at most r q 1 nodes are identified with each other, the width of XT Y is at most Ž r q 1.Ž k q 1. y 1, and the rank of T Y is at most Ž r q 1. r. It remains to show that XT Y has property ŽU1. and the property, stated in the proposition. For the second property, it is clearly sufficient to show that for every arc Ž i, j . in T Y : v v

If j is a folded node, then < passX T Y Ž i, j .< s 0. If i is an old node or a bridge node, then < passX T Y Ž i, j .< - maxpŽ XT ..

We first show that if j is a folded node, then < passX T Y Ž i, j .< s 0. Consider a path from an initial node i 0 to a final node ibq1 , and let i1 , . . . , ib be the middle nodes on the path, in top-down order. Let p be the mark of the path. First, we consider the case where i and j are both folded nodes. Suppose i is the result of identifying ia and iby aq1 , and j is the result of identifying iaq1 and iby a . Suppose ¨ g passX T Y Ž i, j .. Then ¨ f p , Ž i, j . is an arc of T¨Y , and i is a useless node of rank 1 in T¨Y . Then, by the third property of tree-decomposition, either Ž ia , iaq1 . or Ž iby a , iby aq1 . is an arc of T¨ , and ia and iby aq1 , when belonging to T¨ , are useless in T¨ . The arcs Ž ia , h. with h / iaq1 and the arcs Ž iby aq1 , hX ., hX / iby aq2 do not belong to T¨ , otherwise, i has rank more than 1 in T¨Y . In the case that Ž ia , iaq1 . is an arc of T¨ , then we obtain that ¨ g passX T Ž ia , iaq1 . s p , contradiction. In the case where Ž iby aq1 , iby aq2 . is an arc of T¨ , we obtain that ¨ g passX T Ž iby aq1 , iby aq2 . s p , contradiction. The remaining case is where

102

BODLAENDER AND ENGELFRIET

Ž iby a , iby aq1 . is an arc of T¨ , but Ž iby aq1 , iby aq2 . is not. In this case, iby aq1 is a useless leaf of T¨ , which contradicts property ŽU1.. So, if i and j are both folded nodes, then passX T Y Ž i, j . s B. The other case to consider is where i is a bridge node. Suppose i is the result of identifying i 0 with all final nodes, including ibq1 , and suppose j is the result of identifying i1 with ib . Assume that ¨ g passX T Y Ž i, j .. As before, we have that ¨ f p , and either Ž i 0 , i1 . or Ž ib , ibq1 . is an arc of T¨ . In the case that Ž i 0 , i1 . is an arc of T¨ , we obtain that ¨ g passX T Ž i 0 , i1 .. In the case that Ž ib , ibq1 . is an arc of T¨ , we obtain that ibq1 is a useless leaf of T¨ . In both cases, we have a contradiction. This proves that if j is a folded node, then < passX T Y Ž i, j .< s 0. Next, we show that for old nodes i, < passX T Y Ž i, j .< - maxpŽ XT .. j is either an old node, or the result of an identification of some nodes, one of which is a child of i. Let j0 be the node in T, corresponding to j, such that there is an arc Ž i, j0 . in T. Since Ž i, j0 . is unmarked in T, Ž i, j0 . is not maximal, and hence < passX T Ž i, j0 .< - maxpŽ XT .. Clearly, passX T Ž i, j0 . s passX T Y Ž i, j .: i is a useless node of rank 1 in T¨ , if and only if it is a useless node of rank 1 in T¨Y . Hence < passX T Y Ž i, j .< - maxpŽ XT .. We now show that for bridge nodes i, < passX T Y Ž i, j .< - maxpŽ XT .. Let i 0 be the initial node, and f 1 , . . . , f m be the final nodes of T, corresponding to i. There are three cases. Case 1. There is an unmarked arc Ž i 0 , j0 ., such that j0 corresponds to j. Consider ¨ g passX T Y Ž i, j .. Then Ž i 0 , j0 . is in T¨ , and hence ¨ f passX T Ž i 0 , h. for all h / j0 Žotherwise, we would get a contradiction with the rank of i 0 in T¨ .. So, every child h of i 0 with ¨ g X h corresponds to a node hX in T Y with ¨ g X hYX . It follows that ¨ g passX T Ž i 0 , j0 .. As Ž i 0 , j0 . is unmarked, and hence not maximal, we have that < passX T Y Ž i, j .< F < passX T Ž i 0 , j0 .< - maxpŽ XT .. Case 2. There is a marked arc Ž i 0 , j0 ., such that j0 corresponds to j and j0 is a middle node. Then j is a folded node, and hence, by the proof given above, < passX T Y Ž i, j .< s 0. Case 3. j corresponds to a node j0 , that is a child in T of a final node fd , for some d , 1 F d F m. Let Ž i 0 , h. be the first arc of T on the path from i 0 to fd . We now claim that passX T Y Ž i, j . s passX T Ž i 0 , h. l passX T Ž fd , j0 .. It is easy to verify that passX T Ž i 0 , h. l passX T Ž fd , j0 . : passX T Y Ž i, j .. For the other direction, let ¨ g passX T Y Ž i, j .. It is easy to see that ¨ g passX T Ž fd , j0 .. To show that ¨ g passX T Ž i 0 , h., we consider two cases. The first case is where h / fd . Then, by property ŽU1., fd is not a node of degree 1 in T¨ , hence Ž hX , fd . is in T¨ , where hX is the last middle node on the path from i 0 to fd . In T Y , h and hX are identified Žor equal., and so

DOMINO TREEWIDTH

103

there is an arc Ž i, hY . in T¨U with hY / j. ŽRecall that XT U is the tree-decomposition after Steps 1]4 of the operation, described above. hY is either the result of identifying h and hX or hY s h s hX .. Since Ž i, hY . is not in T¨Y Žbecause ¨ g passX T Y Ž i, j .., ¨ is removed from X hYY in Step 5 of the procedure, so ¨ belongs to the mark of the path from i 0 to fd , hence ¨ g passX T Ž i 0 , h.. The second case is where h s fd . Since fd is not a node of degree 1 in T¨ , Ž i 0 , h. is in T¨ . From this it easily follows that ¨ g passX T Ž i 0 , h.. We conclude that passX T Y Ž i, j . s passX T Ž i 0 , h. l passX T Ž fd , j0 .. Now, since fd is final, passX T Ž fd , j0 . / passX T Ž i 0 , h.. Since Ž i 0 , h. is maximal, < passX T Ž fd , j0 .< F < passX T Ž i 0 , h.<. Consequently, passX T Ž i 0 , h. l passX T Ž fd , j0 . is a proper subset of passX T Ž i 0 , h., and hence < passX T Y Ž i, j .< < passX T Ž i 0 , h.< s maxpŽ XT .. This proves the desired property. Finally, we show that property ŽU1. holds for XT Y . As this proof is very similar to the proofs given above, we just consider a few cases, and leave the remaining cases to the reader. Consider a path from an initial node i 0 to a final node ibq1 , let i1 , . . . , ib be the middle nodes on the path, and let p be the mark of the path. Let 1 F a F b with a q 1 F b y a , and let i be the node of T Y that is the result of identifying middle nodes ia and iby aq1. Assume now that i is a useless leaf of T¨Y Žof degree 1.. Then either Ž iay1 , ia . or Ž iby aq1 , iby aq2 . is in T¨ . All arcs Ž ia , j . are not in T¨ , arc Ž iby a , iby aq1 . is not in T¨ , and all arcs Ž iby aq1 , h. with h / iby aq2 are not in T¨ . Hence, if Ž iay1 , ia . is in T¨ , then ia is a useless leaf of T¨ , and if Ž iby aq1 , iby aq2 . is in T¨ , then iby aq1 is a useless root of rank 1 of T¨ . This contradicts property ŽU1. of XT. As a second and last case, we assume b s 2g y 1, and consider the middle node ig which is half-way the path from i1 to ib . Then ig is also a node of T Y . Assume that ig is a useless leaf of T¨Y . Note that this implies that ¨ f p . Either Ž igy1 , ig . or Ž ig , igq1 . is in T¨ , and all arcs Ž ig , j . with j / igq1 are not in T¨ . If Ž ig , igq1 . is in T¨ , then ¨ g passX T Ž ig , igq1 . s p , a contradiction. If Ž ig , igq1 . is not in T¨ , then Ž igy1 , ig . is in T¨ , and ig is a useless leaf of T¨ , contradicting property ŽU1. of XT. This ends the proof of Proposition 6. Now we can prove Lemma 5. First use the construction from Proposition 6. Apply the following operation to XT Y : identify each node i 0 in T Y that is at even distance to the root with all its children i1 , . . . , i s Ž0 F s F r Y .; see Fig. 3. If j is the resulting node of T X , then X jX s X iY0 j X iY1 j ??? j X iYs , and c X Ž j . s c Y Ž i 0 . j c Y Ž i1 . j ??? j c Y Ž i s .. Let XT X s Ž X iX N i g I X 4 , T X s Ž I X , F X .. be the resulting tree-decomposition. The width kX of XT X is at most Ž r Y q 1.Ž kY q 1. y 1, and the rank r X of T X is at most r Y 2 . It remains to show that maxpŽ XT X . - maxpŽ XT ., i.e., that < passX T X Ž i, j .< - maxpŽ XT . for every arc Ž i, j . of T X .

104

BODLAENDER AND ENGELFRIET

FIG. 3. Example of operation in the proof of Lemma 5.

Consider an arc Ž i, j . of T X . Let i be the result of identifying a parent i 0 with its children i1 , i 2 , . . . , i s , and let j be the result of identifying parent j0 with its children j1 , . . . , j sX . Since Ž i, j . is an arc in T X , there must be an arc Ž ia , j0 . in T Y for some a , 1 F a F s. We now claim that passX T X Ž i, j . s passX T Y Ž i 0 , ia . l passX T Y Ž ia , j0 .. The inclusion passX T Y Ž i 0 , ia . l passX T Y Ž ia , j0 . : passX T X Ž i, j . is obvious. For the other direction, let ¨ g passX T X Ž i, j .. It is easy to see that ¨ g passX T Y Ž ia , j0 .. As XT Y has property ŽU1., this implies that i 0 is a node in T¨Y , i.e., that ¨ g X iY0 . Since i is useless in T¨X , i 0 is useless in T¨Y . Suppose that i 0 is not of rank 1 in T¨Y . Then, for some b / a , ib is a node of T¨Y . Since ¨ g chain X T X Ž i ., ib must be a useless leaf of T¨Y , contradicting property ŽU1.. Hence ¨ g passX T Y Ž i 0 , ia .. From the equality passX T X Ž i, j . s passX T Y Ž i 0 , ia . l passX T Y Ž ia , j0 ., we can conclude that < passX T X Ž i, j .< F maxpŽ XT . as follows. If < passX T Y Ž i 0 , ia .< maxpŽ XT ., then < passX T X Ž i, j .< F < passX T Y Ž i 0 , ia .< - maxpŽ XT .. Otherwise, by Proposition 6, maxpŽ XT . ) < passX T Y Ž ia , j0 .< G < passX T X Ž i, j .<. In a similar way, one can show that XT X has property ŽU1.. LEMMA 7. For e¨ ery k, r g N, there exist kX , r X g N, such that for e¨ ery graph G s Ž V, E . and for e¨ ery tree-decomposition XT of G of width F k, with the rank of T F r, there exists a tree-decomposition XT X s Ž X iX N i g I X 4 , T X s Ž I X , F X .. of G of width F kX with the rank of T X F r X , such that for

DOMINO TREEWIDTH

105

e¨ ery ¨ ertex ¨ g V, if sizeŽT¨X . G 2, then T¨X has no useless nodes of rank 1 or 0. Moreo¨ er, the height and size of T X are at most the height and size of T, respecti¨ ely. Proof. First we apply Lemma 4. Let XT Y be the resulting tree-decomposition. Note that maxpŽ XT Y . F k q 1. By applying Lemma 5 at most k q 1 times, we obtain a tree-decomposition XT X of bounded width, and of bounded rank, such that maxpŽ XT X . s 0. This implies that chain X T X Ž i . s B, for every node i in T X , and hence that for every vertex ¨ g V, if sizeŽT¨X . G 2, then T¨X has no useless nodes of rank 1 or 0. LEMMA 8. For e¨ ery k, r, d g N, there exist kX , r X g N, such that for e¨ ery graph G s Ž V, E . with maximum degree F d and for e¨ ery tree-decomposition XT of G of width F k, with the rank of T F r, there exists a tree-decomposition XT X s Ž X iX N i g I X 4 , T X s Ž I X , F X .. of G of width F kX with the rank of T X F r X , such that for e¨ ery ¨ ertex ¨ g V, T¨X has height at most one. Moreo¨ er, the height and size of T X are at most the height and size of T, respecti¨ ely. Proof. First, we apply Lemma 7. Let XT X be the resulting tree-decomposition with width F kX and rank of T X at most r X . Note that every tree T¨X contains at most deg Ž ¨ . useful nodes, so at most deg Ž ¨ . nodes of rank 1 or 0. It follows that each T¨X contains at most 2 d y 1 nodes. Now apply the following operation to XT X : let i 0 be the root of T X . Identify all trees T¨X with ¨ g X iX0 , i.e., we have one node iX0 , with X iYX0 s D  j g T ¨X N ¨ g X iX 4 X jX . Repeat this procedure with all subtrees in the forest, 0 obtained by removing the set  j g T¨X N ¨ g X iX0 4 from T X . Y Let XT be the resulting tree-decomposition. The width of XT Y is at most Ž2 d y 1.Ž kX q 1. 2 y 1, and the rank of T Y is at most Ž2 d y 1.Ž kX q 1. r X , as we identify never more than Ž2 d y 1.Ž kX q 1. nodes. Suppose j is a node in T¨Y that is not the root of T¨Y . Suppose i 0 is the root node in T X of the subtree that was contracted to j. It follows that X X X ¨ g Vi 0 , hence all nodes i in T with ¨ g X iX that are a descendant of i 0 are contracted with i 0 to j. So j is a leaf in T¨Y . As nodes in T¨Y are either leaves or roots of T¨Y , the height of T¨Y is at most one. THEOREM 9. For e¨ ery k, r, d g N, there exist kX , r X g N, such that for e¨ ery graph G s Ž V, E . with maximum degree F d and for e¨ ery tree-decomposition XT of G of width F k, with the rank of T F r, there exists a domino tree-decomposition XT X s Ž X iX N i g I X 4 , T X s Ž I X , F X .. of G of width F kX with the rank of T X F r X . Moreo¨ er the height and size of T X are at most the height and size of T, respecti¨ ely.

106

BODLAENDER AND ENGELFRIET

Proof. First apply Lemma 8. Let XT X be the resulting tree-decomposition with width F kX and rank F r X . Then apply the following operation: identify all nodes that have a common parent in T X . Let XT Y be the resulting tree-decomposition; see Fig. 4. The rank of T Y is at most r X 2 , and the width of XT Y is at most r X ? Ž kX q 1. y 1. Moreover, each T¨Y consists of at most two nodes. COROLLARY 10. For e¨ ery k, d g N, there exists kX g N, such that e¨ ery graph with treewidth at most k and maximum degree at most d has domino treewidth at most kX . Moreo¨ er, gi¨ en a graph G s Ž V, E . with treewidth at most k and maximum degree at most d, one can find a domino tree-decomposition of width at most kX in O Ž< V <. time. Proof. It is well known that a graph with treewidth k has a tree-decomposition of width k and of rank 2. The first part of the result now follows directly from Theorem 9. One can find a tree-decomposition of G with width F k and with O Ž< V <. nodes in O Ž< V <. time w6x. It is easy to transform this tree-decomposition into one with the same width and of rank 2 in O Ž< V <. time. The constructions described in the proofs of Lemmas 4, 5, 7 and 8 and Theorem 9 can be carried out in O Ž< V <. time in total. ŽEach of the described operations costs O Ž< I <. s O Ž< V <. time, and at most 2 k q 5 such operations are carried out.. Inspecting the proofs in this section, it can be seen that kX is double exponential in k. We do not know whether this is optimal. COROLLARY 11. For e¨ ery k, d g N, there exists kX g N, such that e¨ ery graph G s Ž V, E . with treewidth at most k and maximum degree at most d has a domino tree-decomposition of width at most kX and with the height of the tree O Žlog < V <.. Proof. Using the algorithm of w16x, one obtains a tree-decomposition of G with width F 6Ž k q 1., and with the height of the tree O Žlog < V <.. Observing this algorithm, it follows directly that the rank of the tree is

FIG. 4. Example of operation in the proof of Lemma 9.

DOMINO TREEWIDTH

107

bounded by the maximum number of components of a graph Gw V y S x with < S < F 4Ž k q 1., which is at most 4Ž k q 1. d, assuming that G is connected. ŽOtherwise, apply the algorithm separately for every connected component.. So now we can apply Theorem 9. COROLLARY 12. equi¨ alent:

For e¨ ery class of graphs G , the following statements are

1. There exists a constant c g N, such that e¨ ery graph in G has domino treewidth at most c. 2. There exist constants k, d g N, such that e¨ ery graph in G has treewidth at most k and maximum degree at most d. There is also a connection with the notion of strong treewidth, as introduced by Seese w18x. DEFINITION. A strong tree-decomposition of a graph G s Ž V, E . is a pair Ž X i N i g I 4 , T s Ž I, F .. with  X i N i g I 4 a collection of disjoint subsets of V, and T s Ž I, F . a tree, such that v

D i g I Xi s V

for all edges  ¨ , w4 g E, either there is an i g I with ¨ , w g X i , or there are i, iX g I, that are adjacent in T ŽŽ i, iX . g F ., and ¨ g X i , w g X iX . v

The width of a strong tree-decomposition Ž X i N i g I 4 , T s Ž I, F .. is max i g I < X i <. The strong treewidth of a graph G s Ž V, E . is the minimum width over all strong tree-decompositions of G. Note that in general, a strong tree-decomposition of a graph G, is not a tree-decomposition of G. Note also that every tree has strong treewidth 1 Žtake  X i N i g I 4 to consist of all singleton vertex sets.. As observed in w18x, every graph of strong treewidth F k is of treewidth F 2 k y 1. However, there is a set of graphs of treewidth 2, that is of unbounded strong treewidth. As an example, consider the set of all paths with one additional vertex that is adjacent to all vertices of the path. It is not difficult to see that if such a graph has a strong tree-decomposition of width k, then the tree has height at most 1, and the graph has at most k Ž k q 1. vertices. A similar example is the set of all ‘‘wheels.’’ However, if a graph has bounded treewidth and bounded degree, then it is also of bounded strong treewidth. In fact, a domino tree-decomposition of width F k can easily be turned into a strong tree-decomposition of width F k q 1: if T¨ is a tree with two nodes i and j with j the child of i, then remove ¨ from X j . It is straightforward to check that this procedure gives a strong tree-decomposition. Thus, the following extension of Corollary 12 follows.

108

BODLAENDER AND ENGELFRIET

COROLLARY 13. equi¨ alent:

For e¨ ery class of graphs G , the following statements are

1. There exists a constant c g N such that e¨ ery graph in G has domino treewidth at most c. 2. There exist constants k, d g N such that e¨ ery graph in G has treewidth at most k and maximum degree at most d. 3. There exist constants kX , d g N such that e¨ ery graph in G has strong treewidth at most kX and maximum degree at most d.

4. ALGORITHMS FOR DETERMINING DOMINO TREEWIDTH 4.1. Domino Treewidth of Trees It is easy to see that every tree T has domino treewidth F d y 1, where d is the maximum degree of T ; thus, its domino treewidth lies between 12 d and d y 1. In this subsection we show that there exists an O Ž kn. time algorithm to determine whether the domino treewidth of a given tree is at most k. We use dynamic programming to do this. Let T s Ž V, E . be a tree. Choose an arbitrary vertex r g V, and consider T as a rooted tree with r as root. Denote the subtree of T, formed by a vertex ¨ and all its descendants by T Ž ¨ . s Ž V¨ , E¨ .. For each vertex ¨ g V, let Wk Ž ¨ . be defined as the minimum, over all domino tree-decompositions Ž X i N i g I 4 , T s Ž I, F .. of T Ž ¨ . of width at most k, of the minimum size of a set X i with ¨ g X i . Wk Ž ¨ . is `, if there does not exist a domino tree-decomposition of T Ž ¨ . with width at most k. To test whether T has domino treewidth at most k, we compute for all ¨ g V, Wk Ž ¨ ., in a bottom-up order. Clearly, the domino treewidth of T is at most k, if and only if Wk Ž r . / `. Suppose k G 1. For a leaf vertex ¨ , one can observe directly that Wk Ž ¨ . s 1. We now describe how we can compute Wk Ž ¨ . of a vertex ¨ , given the values of Wk Ž w 1 ., . . . , Wk Ž wp ., for the children w 1 , . . . , wp of ¨ . PROPOSITION 14. Wk Ž ¨ . s min 1 q Ý j g S Wk Ž wj . N S :  1, . . . , p4 , Ý j g S Wk Ž wj . F k n Ý j g 1, . . . , p4yS Wk Ž wj . F k 4 . Proof. Consider a set S :  1, . . . , p4 , such that Ý j g S Wk Ž wj . F k and Ý j g 1, . . . , p4yS Wk Ž wj . F k. For j, 1 F j F p, take a domino tree-decomposition of T Ž wj . with a set X h j containing wj and of size Wk Ž wj .. Now, merge these domino tree-decompositions in the following way: take two new

DOMINO TREEWIDTH

109

nodes i 0 , i1 with an arc between them. Put ¨ in X i 0 and in X i1. Identify all nodes h j , with j g S, with i 0 Žso, X i 0 s  ¨ 4 j D j g S X h j .. Identify all nodes h j , with j g  1, . . . , p4 y S, with i 1 Žso, X i 1 s  ¨ 4 j D j g 1, . . . , p4yS X h j .. The resulting domino tree-decomposition is a treedecomposition of T Ž ¨ ., with width at most k, and with a set, containing ¨ of size 1 q Ý j g S Wk Ž wj .. Now, suppose we have a domino tree-decomposition Ž X i N i g I 4 , T s Ž I, F .. of T Ž ¨ . of width at most k with the minimum size of a set X i with ¨ g X i . There must be at most 2 nodes, say i1 and i 2 of which the sets contain ¨ . ŽIf there is only one such node, add a new node iX with X iX s  ¨ 4 .. Let S s  j N wj g X i14 . As Ž X i l Vw j N i g I 4 , T s Ž I, F .. is a domino tree-decomposition of T Ž wj . of width at most k, it follows that X i1 contains at least Wk Ž wj . vertices from T Ž wj . for each j g S. So < X i1 < G 1 q Ý j g S Wk Ž wj .. Since X i1 F k q 1, this implies that Ý j g S Wk Ž wj . F k. With similar arguments one can show that < X i 2 < G 1 q Ý j g 1, . . . , p4yS Wk Ž wj . and that Ý j g 1, . . . , p4yS Wk Ž wj . F k. Finding the set S which achieves the minimum value, as described in Proposition 14 above, when given the values Wk Ž wj . for all children of ¨ , corresponds to an instance of a variant of the KNAPSACK problem, and can be solved by a standard dynamic programming algorithm in O Ž p ? k . time. ŽSee e.g., w15, Chap. 5x.. So, Wk Ž ¨ . can be computed in O Ž deg Ž ¨ . ? k . time, given the values Wk Ž wj . for all children of ¨ . The total time to compute Wk Ž r . hence is O ŽÝ¨ g V deg Ž ¨ . ? k . s O Ž k ? < V <.: compute successively all values Wk Ž ¨ ., in a bottom-up manner in the tree. THEOREM 15. There exists an O Ž kn. algorithm to compute whether the domino treewidth of a tree with n ¨ ertices is at most k. The algorithm can output a corresponding domino tree-decomposition within the same time bounds. To find the domino treewidth of a given tree T, one can do binary search on the value of k, and use the procedure described above. This approach costs, in the worst case, O Ž n2 log n. time. We conjecture that some improvements will be possible to this bound. 4.2. Fixed Parameter Algorithms In this section, we show that the problem whether the domino treewidth of a given graph G is at most k, for constant k, is solvable in polynomial time. Our algorithm has a structure similar to that of the O Ž n kq 2 . algorithm from Arnborg et al. w2x for recognizing graphs with treewidth at most k. The additional technicalities are elaborate.

110

BODLAENDER AND ENGELFRIET

For R : V, Gw R x s Ž R,  ¨ , w4 g E N ¨ , w g R4. denotes the subgraph of G s Ž V, E ., induced by R. For sets S : V, B : S, D :  ¨ , w4 g E N ¨ g S 4 , define R Ž S, D . s  ¨ g V N there exists a path from ¨ to a vertex in S that does not use edges in D 4 Pk Ž S, D, B . m there exists a domino tree-decomposition Ž  X i N i g I 4 , T s Ž I, F . . of G R Ž S, D . with width at most k , such that there exists an i 0 g I with X i 0 s S and for all i g I : i / i 0 « X i l B s B. Note that if ¨ g RŽ S, D . y S, then ¨ can only be adjacent to vertices in RŽ S, D .. From now on we assume Žw.l.o.g.. that the node sets of a tree-decomposition are nonempty. LEMMA 16. Let G s Ž V, E . be a connected graph. The domino treewidth of G is at most k if and only if there exists a set S : V with S / B, < S < F k q 1, and Pk Ž S, B, B.. Proof. « : Take a domino tree-decomposition Ž X i N i g I 4 , T s Ž I, F .. of G with width at most k, and take S s X i for an arbitrary i g I. ¥: Note that RŽ S, B. s V. The result now follows from the definition. Note that Pk Ž S, D, B . is true if < S < F k q 1 and RŽ S, D . s S. LEMMA 17. Let G s Ž V, E . be a connected graph. Let S : V, B : S, D :  ¨ , w4 g E N ¨ g S4 , S / B, < S < F k q 1, and RŽ S, D . / S. Pk Ž S, D, B . is true, if and only if at least one of the following two properties holds: 1. 'SX : RŽ S, D .: 'DX :  ¨ , w4 g E N ¨ g SX 4 : < SX < F k q 1 SX / B B l SX s B !' ¨ g SX y S: ' w g S y SX :  ¨ , w4 g E Pk Ž SX , DX , S l SX . RŽ S, D . s RŽ SX , DX . j Ž S y SX . Ž S y SX . l RŽ SX , DX . s B < RŽ SX , DX .< - < RŽ S, D .< or Ž B s B and S l SX / B. 2. 'D 1 :  ¨ , w4 g E N ¨ g S 4 : 'D 2 :  ¨ , w4 g E N ¨ g S4 : 'B1 : S: 'B2 : S: v v v v v v v v

v v

RŽ S, D 1 . j RŽ S, D 2 . s RŽ S, D . RŽ S, D 1 . l RŽ S, D 2 . s S

DOMINO TREEWIDTH v v v v v v

111

< RŽ S, D 1 .< - < RŽ S, D .< < RŽ S, D 2 .< - < RŽ S, D .< Pk Ž S, D 1 , B1 . Pk Ž S, D 2 , B2 . S s B1 j B2 B : B1 j B2

Proof. « : Suppose Pk Ž S, D, B . holds. Let Ž X i N i g I 4 , T s Ž I, F .. be a domino tree-decomposition of Gw RŽ S, D .x with width at most k, and let i 0 g I such that X i 0 s S and for all i / i 0 : X i l B s B. Note that if ¨ g D i g I X i y S, then ¨ can only be adjacent to vertices in D i g I X i : if  ¨ , w4 g E and ¨ g RŽ S, D . y S, then we have w g RŽ S, D .. Let r be the number of neighbors of i 0 in T. As RŽ S, D . / S, we have that r ) 0. We consider two cases. Case 1. Suppose r s 1. Let i1 be the unique neighbor of i 0 in T. We will show that the first property, mentioned in the lemma holds. Take SX s X i1. Write W s D i g Iyi 0 4 X i s RŽ S, D . y Ž S y SX .. Take X D s  ¨ , w4 g E N ¨ g SX , w f W 4 . PROPOSITION 18.

RŽ SX , DX . s W.

Proof. We first observe that vertices in W y SX can only be adjacent to vertices in W. In fact, let ¨ g W y SX and  ¨ , w4 g E. Since the treedecomposition is domino, ¨ f S and so w g RŽ S, D .. Using the definition of tree-decomposition, it follows that w f S y SX . Hence w g W. Suppose ¨ g RŽ SX , DX . y W. There exists a path from ¨ to a vertex in X S , avoiding edges in DX , say ¨ 0 , ¨ 1 , . . . , ¨ s , ¨ s ¨ 0 , ¨ s g SX . Let ¨ j be the last vertex on the path that does not belong to W. j / s, because SX : W. Now  ¨ j , ¨ jq14 g E, ¨ j f W, ¨ jq1 g W. Using the above observation, it follows that ¨ jq1 must belong to SX , which contradicts the fact that  ¨ j , ¨ jq14 f DX . So, RŽ SX , DX . : W. Suppose ¨ g W. As G is connected, there is a path in G from ¨ to a vertex in SX . Let s be the first vertex in SX on this path. By the above observation, the path up to s does not use edges in DX , so ¨ g RŽ SX , DX .. From the proposition, it follows directly that Ž S y SX . l RŽ SX , DX . s B, and that RŽ S, D . s RŽ SX , DX . j Ž S y SX .. Clearly, < SX < F k q 1, SX / B. Pk Ž SX , DX , S l SX . holds: consider the domino tree-decomposition Ž X i N i g I y  i 0 44 , T w I y  i 0 4x.. If ¨ g SX y S and w g S y SX , there is no X i containing both ¨ and w, so by definition of tree-decomposition,  ¨ , w4 f E. Finally, we consider two subclasses: Case 1.1. B.

S : SX . Now RŽ SX , DX . s RŽ S, D ., B s B, and S l SX s S /

112

BODLAENDER AND ENGELFRIET

Case 1.2.

S ­ SX . Clearly, now < RŽ SX , DX .< - < RŽ S, D .< holds.

Case 2. Suppose r G 2. Let i1 , . . . , i r be the neighbors of i 0 , and let T1 s Ž I1 , F1 ., . . . , Tr s Ž Ir , Fr . be the subtrees of T w I y  i 0 4x, such that Tj contains the node i j . Write I X s I1 j ??? j Iry1 , I Y s Ir , W1 s D i g I X X i j X i 0 , W2 s D i g I Y X i j X i 0 . Using the properties of tree-decompositions, we have that W1 l W2 s X i 0 . Vertices in W1 y S can only be adjacent to vertices in W1; vertices in W2 y S can only be adjacent to vertices in W2 . Now take D 1 s   ¨ , w 4 g E N ¨ g S, w f W1 4 D 2 s   ¨ , w 4 g E N ¨ g S, w f W2 4 B1 s  ¨ g S N ; i g I X : ¨ f X i 4 B2 s  ¨ g S N ; i g I Y : ¨ f X i 4 . As was done in Case 1 of this proof, one can show that W1 s RŽ S, D 1 . and W2 s RŽ S, D 2 .. Now RŽ S, D . s W1 j W2 s RŽ S, D 1 . j RŽ S, D 2 .. RŽ S, D 1 . l RŽ S, D 2 . s W1 l W2 s X i 0 s S. As D i g I X X i / B and D i g I Y X i / B, we have RŽ S, D . y RŽ S, D 1 . s D i g I Y X i / B, and RŽ S, D . y RŽ S, D 2 . / B. Pk Ž S, D 1 , B1 . holds: look at the domino tree-decomposition Ž X i N i g I X j  i 0 44 , T w I X j  i 0 4x.. By definition of B1 , X i l B1 s B for all i g I X . In the same way it follows that Pk Ž S, D 2 , B2 . holds. If ¨ g S y B1 , then there exists an iX g I X with ¨ g X iX . When there exists also an iY g I Y with ¨ g X iY , then ¨ belongs to the three sets X i 0 , X iX , X iY . It follows that ¨ g S y B1 implies that ¨ g B2 . Hence S s B1 j B2 . Finally, it is clear that when ¨ g B, then also ¨ g B1 and ¨ g B2 , so B : B1 l B2 . This ends the analysis of Case 2, and of the « part of the proof. ¥: First suppose we have sets SX , DX , fulfilling the first property mentioned in the lemma. Write BX s S l SX . There exists a domino tree-decomposition Ž X i N i g I 4 , T s Ž I, F .. with width at most k of Gw RŽ SX , DX .x with for some i1 g I: X i1 s SX and for all i / i1 , X i l BX s B. Take a new node i 0 f I, and take X i 0 s S. Let T X be the tree, obtained by making i 0 adjacent to i1 in T. We claim that Ž X i N i g I j  i 0 44 , T X . is a domino tree-decomposition for Gw RŽ S, D .x with X i 0 s S, and for all i / i 0 , X i l B s B. Clearly, the width of this domino tree-decomposition is at most k. First, D i g I j i 0 4 X i s D i g I X i j X i 0 s RŽ SX , DX . j S s RŽ SX , DX . j Ž S y SX . s RŽ S, D .. Second, if  ¨ , w4 g E, ¨ , w g RŽ S, D ., then v

if ¨ , w g RŽ SX , DX .: ' i g I: ¨ , w g X i .

DOMINO TREEWIDTH

113

if ¨ g RŽ SX , DX ., w g S y SX , then ¨ g SX . Also, by assumption, ¨ f S y S. So ¨ , w g X i 0 . if ¨ , w g S y SX : ¨ , w g X i 0 . v

X

v

Using that S l RŽ SX , DX . : SX , one easily verifies the third condition of tree-decomposition. Now we check dominoness. Vertices in S y SX only belong to X i 0 and to no other set X i , i g I. Vertices in S l SX belong to X i 0 and X i1, but, by assumption, not to any set X i , i g I y  i1 4 . Clearly, all vertices in RŽ S, D . y S belong to at most two sets X i , i g I, and not to X i 0 . Finally, for all ¨ g B, and for all i g I j  i 0 4 : if ¨ g X i , then ¨ f SX , X X ¨ g S, so ¨ f RŽ S , D ., hence i s i 0 . This ends the analysis of the case where the first property holds. Now suppose we have sets D 1 , D 2 , B1 , B2 fulfilling the second property mentioned in the lemma. Take domino tree-decompositions Ž X i N i g I14 , T1 s Ž I1 , F1 .. of Gw RŽ S, D 1 .x and Ž Yi N i g I2 4 , T2 s Ž I2 , F2 .. of Gw RŽ S, D 2 .x, with width at most k and with for some i1 g I1 , i 2 g I2 : X i1 s Yi 2 s S, for i g I1 y  i14 : X i l B1 s B; for i g I2 y  i 2 4 : X i l B2 s B. Let T be obtained by taking the union of T1 and T2 and identifying i1 and i 2 . Write for i g I1: Zi s X i , and for i g I2 : Zi s Yi . Consider the tree-decomposition Ž Zi N i g I1 j I2 4 , T .. We claim that this is a domino tree-decomposition of Gw RŽ S, D 1 . j RŽ S, D 2 .x s Gw RŽ S, D .x with width at most k, such that Zi1 s S, and for all i g I1 j I2 y  i14 : B l Zi s B. The latter condition follows from earlier made assumptions, as B : B1 l B2 . It is straightforward to verify that we indeed have a tree-decomposition of width at most k, using that RŽ S, D 1 . j RŽ S, D 2 . s RŽ S, D ., and RŽ S, D 1 . l RŽ S, D 2 . s S. Dominoness also holds: for ¨ f S, it follows directly that ¨ belongs to at most two sets Zi , i g I1 j I2 . If ¨ g B2 , then ¨ does not belong to a set Zi , i g I2 y  i 2 4 . So ¨ belongs to at most two sets Zi , i g I1 j I2 , both with i g I1. A similar analysis applies when ¨ g B1. This ends the analysis of the case that the second property holds. THEOREM 19. For fixed k, there exists an algorithm, that checks whether a gi¨ en graph G with n ¨ ertices has domino treewidth at most k in O Ž n2 kq3 . time. Proof. Since it clearly suffices to consider connected components, we may assume that G is connected. First, we compute for all S : V with < S < F k q 1, D :  ¨ , w4 g E N ¨ g S 4 , the set RŽ S, D .. Then, we sort all pairs Ž S, D . in order of increasing size of RŽ S, D .. In order of increasing size of RŽ S, D ., we will compute for all B : S, in order of decreasing size of B, the value of Pk Ž S, D, B .. For this, we use the result of Lemma 17.

114

BODLAENDER AND ENGELFRIET

We check whether one of the properties holds. Note that all values of Pk , referred to in the characterization of Lemma 17 have been computed before they are needed. The first property can be checked by looking at all O Ž n kq 1 . possible guesses for SX , and all O Ž1. guesses for DX . ŽThis number only depends on the maximum degree of a vertex in G, and k; both may be assumed to be bounded by constants.. For each such guess, the property can be verified in O Ž n. time. The second property can be checked similarly. It follows that the time per triple Ž S, D, B . to compute Pk Ž S, D, B . is O Ž n kq 2 .. As we have O Ž n kq 1 . triples Ž S, D, B . to look at, the total time becomes O Ž n2 kq3 .. Finally, we look up whether for any S, Pk Ž S, B, B. holds. ŽCf. Lemma 16.. The algorithm can be modified so that it outputs}when one exists}a domino tree-decomposition of the input graph with width at most k, and so that it still uses O Ž n2 kq3 . time. It might be possible to improve the running time somewhat.

5. HARDNESS RESULTS In this section, we show that the domino treewidth problem is W w t x-hard for all t g N, where the notion of W w t x-hardness is taken from the work of Downey and Fellows Žsee w1, 11]13x.. Also, we prove the problem to be NP-complete. Both results follow from the same transformation from LONGEST COMMON SUBSEQUENCE. To be precise, we establish W w t x-hardness for the following problem: DOMINO TREEWIDTH Instance: Graph G s Ž V , E . , integer k. Parameter: k. Question: Is the domino treewidth of G at most k? The fact that domino treewidth is W w t x-hard for all t g N Žas in the theory on fixed parameter intractability, developed by Downey and Fellows. suggests strongly that it is impossible to find algorithms for the domino treewidth F k problem that use f Ž k . pol Ž n. time, i.e., where only the constant factor in the running time depends on k. ŽNote that such algorithms do exist for some related problems, such as treewidth F k, pathwidth F k.. The classes W w t x denote classes of parameterized problems: problems Q : Ž k, s . N k g N, s g SU 4 , for some alphabet S. To prove W w t x-hardness for a problem P, it suffices to find a W w t x-hard

DOMINO TREEWIDTH

115

problem Q and functions f, h: N ª N, g: N = SU ª SU , such that for all Ž k, s . g N = SU : Ž k, s . g Q m Ž f Ž k ., g Ž k, s .. g P, f is any computable function, and g is computable in time hŽ k . ? < s < c for some constant c. ŽI.e., the time is polynomial in the length of the non-parameter part of the input, but may depend in any way on the parameter.. The LONGEST COMMON SUBSEQUENCE problem is the following: LONGEST COMMON SUBSEQUENCE Instance: Alphabet S, strings s 1 , . . . , s r g SU , integer m g N. Parameter: r . Question: Does there exist a string in SU of length at least m, that is a subsequence of each string s 1 , . . . , s r ? Very recently, it has been shown that LONGEST COMMON SUBSEQUENCE is W w t x-hard for all t g N w7, 8x. THEOREM 20.

For all t g N, DOMINO TREEWIDTH is W w t x-hard.

Proof. We give a transformation from LONGEST COMMON SUBSEQUENCE.

Let an instance S, s 1, . . . , s r , m of LONGEST COMMON SUBSEQUENCE be given. We suppose we have a numbering of the characters in S, say S s  s1 , . . . , sl 4. Let l s < S <, k s 20 r 2 q 40 r y 1, q s mŽ lr 2 q 1.. We now define a graph G s Ž V, E . that consists of the following components: Two Anchors. Take two cliques, each with k q 1 vertices, with vertex sets A1 s  a1i N 1 F i F k q 14 and A 2 s  a2i N 1 F i F k q 14 . The Floor. Take q cliques of 25 Ž k q 1. s 8 r 2 q 16r vertices,  bia N 1 F i F 52 Ž k q 1., 1 F a F q4 . Take edges: v

v

v

v

 bia , bja 4 , 1 F a F q, 1 F i, j F 25 Ž k q 1., i / j.  bia , bjaq14 , 1 F a - q, 1 F i, j F 52 Ž k q 1..  a1i , bj14 , 1 F i, j F 25 Ž k q 1..  a2i , bjq 4 , 1 F i, j F 52 Ž k q 1..

The number 52 is chosen because 2 ? 52 - 1, and 3 ? 52 ) 1. To ease presentation, we will denote vertices a1i with 1 F i F 25 Ž k q 1. also as bi0 , and vertices a2i with 1 F i F 52 Ž k q 1. also as biqq1.

116

BODLAENDER AND ENGELFRIET

The Hills. We have m ‘‘hills.’’ Take vertices  c i,a j N 1 F a F m, 1 F i F l ? r 2 , 1 F j F 15 Ž k q 1. y Ž2 r q 1.4 . Take edges:  c i,a j , b1Ž l r q1.?Ž ay1.qi 4 , 1 F a F m, 1 F i F l ? r 2 , 1 F j F 15 Ž k q 1. y Ž2 r q 1.. 2  c i,a j , b1Ž l r q1.?Ž ay1.qiq1 4 , 1 F a F m, 1 F i F l ? r 2 , 1 F j F 15 Ž k q 1. y Ž2 r q 1.. 2

v

v

Each hill, together with the adjacent floor vertices, represents a character of the subsequence. The String Components. For each string s i, 1 F i F r, we have a string component. Below, we describe the different parts for the ith string component. Suppose s i s s1i s2i ??? slii . The String Path. Take a path with l i ? Ž lr 2 q 1. q 2 vertices, and attach it to a11 and a12 : take vertices  d ji N 0 F j F l i ? Ž lr 2 q 1. q 14 , edges i  d ji , d jq1 4 ,  d 0i , a114 ,  d li ?Ž l r 2q1.q1 , a12 4 . i The Blobs. We take l i q 1 cliques of 2 r q 2 vertices, and attach these to the string paths. Take vertices  e j,i jX N 0 F j F l i , 1 F jX F 2 r q 24 . Take edges: v

v

v

 e j,i jX , e j,i jY 4 , 0 F j F l i , 1 F jX , jY F 2 r q 2, jX / jY . X i  e j,i jX , d j?Ž 4 l r 2 q1. , 0 F j F l i , 1 F j F 2 r q 2. X i  e j,i jX , d j?Ž 4 l r 2 q1.q1 , 0 F j F l i , 1 F j F 2 r q 2.

The idea is that blobs cannot come on top of hills. This forces the part between blobs to fall over a hill Žif it does. in a precise way. Each such part represents a character in the string s i ; the lr 2 q 1 vertices in such a part are needed for symbol checking. The Symbol Checkers. These vertices are used to check that the chosen characters for the different strings are the same. Take vertices  fai , Ž iy1. r lqŽ jy1.lqt N 1 F a F l i , 1 F j F r, st s sai 4 j  fai , Ž jy1. r lqŽ iy1.lqt N 1 F a F l i , 1 F j F r, st / sai 4 . If vertex fai , b exists, make it adjacent to the vertices dŽi ay1.Ž l r 2q1.q b and dŽi ay1.Ž l r 2q1.q bq1. Let G s Ž V, E . be the resulting graph. Parts of this construction are illustrated in Figs. 5 and 6. We denote: B a s  bia N 1 F i F 25 Ž k q 2.4 , C a s  c i,a j N 1 F i F l ? r 2 , 1 F j F 15 Ž k y 1. y Ž2 r q 1.4 , Cia s  c i,a j N 1 F j F 51 Ž k y 1. y Ž2 r q 1.4 , and Eji s  e j,i jX N 1 F jX F 2 r q 24 . PROPOSITION 21. The domino treewidth of G is at most k, if and only if s 1 , . . . , s r ha¨ e a common subsequence of length at least m.

FIG. 5. Anchors, floor, and hills.

DOMINO TREEWIDTH

117

FIG. 6. The ith string component: string path and blobs.

118 BODLAENDER AND ENGELFRIET

DOMINO TREEWIDTH

119

Proof. « : Suppose Ž X i N i g I 4 , T s Ž I, F .. is a domino tree-decomposition of G of width F k. First, note that there must be nodes h 0 , hg with A1 : X h 0 , A 2 : X hg ŽLemma 3.. Consider the path in T between h 0 and hg , and number the nodes on this path consecutively h 0 , h1 , h 2 , . . . , hgy1 , hg . In fact, as < A1 < s < A 2 < s k q 1, A1 s X h 0 and A 2 s X hg. It follows that all vertices of the form a1i or bj1, 1 F i, j F 25 Ž k q 1., must be elements of X h1: these form a clique, which Žby Lemma 3. must be contained in a node-set of a node, adjacent to h 0 Žby dominoness., and by Lemma 1, it cannot be another node than h1 Žbecause there is a path in G from a vertex bj1 to a vertex in A 2 that avoids vertices in A1 .. Now, we claim, with induction to a , that for all j, 1 F j F 25 Ž k q 1., bja and bjaq1 are in X haq1. We know this holds for a s 0. Let 0 - a F q. All nodes bja and bjaX q1 form together a clique. By Lemma 3, there is a node iX , with X iX containing this clique. iX / ha , otherwise X ha contains too many vertices. Hence iX is a neighbor of ha Žby dominoness.. If iX / haq1 , then note that there are 25 Ž k q 1. vertex disjoint paths from vertices in the set  bjaX q1 N 1 F jX F 25 Ž k q 1.4 to vertices in the set A 2 , that avoid vertices of the form bjay1 or bja . By Lemma 1, this gives in total 56 Ž k q 1. vertices that belong to X h a, contradiction. So all nodes of the form bja and bjaX q1 belong to X haq1. It follows that g s q q 2. For each hill vertex c i,a j , note that there is a unique node containing the neighbors of the vertex, namely hŽ ay1.Ž l r 2q1.qiq1 , so c i,a j g X h Ž ay 1.Ž l r 2q 1.q iq 1. For each blob, there must be a node, containing all vertices in the blob Žas it is a clique.. However, such a node cannot be a node of the form hŽ ay1.Ž l r 2q1.qiq1 , as the number of hill vertices plus the blob size plus the number of floor vertices that would belong to the node would be larger than k q 1. Call nodes of this form hill nodes. Nodes of the form ha Ž l r 2q1.q1 are called ¨ alley nodes. Note that each hill node also contains at least two vertices per string path Žbecause of Lemma 2.. These 2 r vertices, with the hill vertices and the floor vertices give in total k vertices, so only one extra vertex is possible. Consider a blob, with vertices Eji s  e j,i jX N 1 F jX F 2 r q 24 . There must be a node iX g I, with Eji j  d jŽ l r 2q1. , d jŽ l r 2q1.q1 4 : X iX ŽLemma 3.. We have already argued that iX is not a hill node. Suppose iY is the first node on the path from iX to h 0 that is also on the path from h 0 to hg . We claim that iY is a valley node. If iX is a valley node, then we are done, as in that case iX s iY . Suppose iX is not a valley node, hence iX is not on the path from h 0 to hg . It follows that X iY must contain at least four nodes of the ith string path ŽLemma 2., and, hence, that iY cannot be a hill node, so must be a valley node. Write f Ž i, j . s a , if the node iY as above is of the

120

BODLAENDER AND ENGELFRIET

form ha Ž l r 2q1.q1. It is easy to see that a does not depend on the choice of iX . Note that f Ž i, j . F f Ž i, j q 1.; if not, then the string path between blob i Eji and blob Ejq1 must go back over a hill: that hill then gets too many string path vertices in its node sets. We also must have f Ž i, 0. s 0, and f Ž i,l i . s m. So, for each i, there are exactly m values d 1i , d 2i , . . . , dmi , with d 1i - d 2i - ??? - dmi , and for all p, 1 F p F m: f Ž i, d pi y 1. s p y 1 and f Ž i, d pi . s p. We now claim, that all subsequences sdi 1i sdi 2i ??? sdi mi are equal. Consider the two characters sdi pi s st and sdj pj s stX . We must show these are equal. Write r s Ž p y 1.Ž lr 2 q 1. q 1, and r X s pŽ lr 2 q 1. q 1. hr is the valley node, just before the pth hill, and hrX is the valley node just after the pth hill. X hr must contain a vertex dŽi d pi y1.Ž l r 2q1.q1q « for some « G 0. X hrX must contain a vertex ddi pi Ž l r 2q1.y « X for some « X G 0. Note that the distance in T between hr and hr X equals the length of the path between these vertices for « s « X s 0, plus one. From dominoness, it follows, that for all b , 0 F b F lr 2 , we must have that dŽi d pi y1.Ž l r 2q1.q1q b g X hrq b l X hrq bq 1. A similar analysis holds for the nodes on the jth string path. In particular, we have that iZ s hrqŽ iy1. r lqŽ jy1.lqt is the unique node th a t c o n ta in s d Ži d pi y 1 . Ž l r 2 q 1 . q Ž iy 1 . r lq Ž jy 1 . lq t and i dŽ d pi y1.Ž l r 2q1.qŽ iy1. r lqŽ jy1.lqtq1 , and is the unique node that contains dŽjd pj y1.Ž l r 2q1.qŽ iy1. r lqŽ jy1.lqt and dŽjd pj y1.Ž l r 2 q1.qŽ iy1. r lqŽ jy1.lqtq1 . Both fdipi , Ž iy1. r lqŽ jy1.lqt and fdjpj , Ž iy1. r lqŽ jy1.lqt when existing, must belong to iZ . As iZ is a hill node, they cannot exist both, otherwise X iZ contains too many vertices. As fdipi , Ž iy1. r lqŽ jy1.lqt exists Žwe assumed st s sdi pi ., we have that fdjpj , Ž iy1. r lqŽ jy1.lqt does not exist, and hence that sdj pj s st s sdi pi . It follows that all subsequences sdi 1i sdi 2i ??? sdi mi are equal, hence the strings i s , 1 F i F r, have a common subsequence of length m. ¥: Suppose subsequences sdi 1i sdi 2i ??? sdi mi of strings s i are all equal. We show how to construct a domino tree-decomposition of G of width k. First, we take nodes h 0 , . . . , h qq2 , forming a path. Put all vertices of A1 in X h 0 , all vertices of A 2 in X h qq 2 , and all vertices of the form bia Ž0 F a F q q 1, 1 F i F 25 Ž k q 1.. in X ha and X haq 1. Next, put each hill vertex in the unique node set that contains the neighbors of the hill vertex; i.e., put c i,a j in X h Ž ay 1.Ž l r 2q 1.q iq 1. Let 1 F i F r. We now consider the ith string component. For all p, 1 F p F m, b , 0 F b F lr 2 , put dŽi d pi y1.Ž l r 2q1.q1q b in X h Ž py 1.Ž l r 2q 1.q 1q b , and in X h Ž py 1.Ž l r 2q 1.q 2q b . Put the vertices  edi pi y1, j N 1 F j F 2 r q 24 in X h Ž py 1.Ž l r 2q 1.q 1, and put the vertices  edi pi , j N 1 F j F 2 r q 24 in X h pŽ l r 2q 1.q 1. If i d pi q 1 / d pq1 , we must ‘‘fold’’ the part from the ith string component between what is put on top of the pth hill and what is on top of the i Ž p q 1.st hill. First, we define sets Yj , d pi ? Ž lr 2 q 1. F j F d pq1 ? Ž lr 2 q 1.,

DOMINO TREEWIDTH

121

i and put Žfor j in this range., d ji and d jq1 in Yj . Also, for each blob and symbol checker vertex ¨ , if their neighbors belong to some set Yj , put ¨ in Yj . Note that the maximum size of a set Yj is 2 r q 4. The sequence of sets i 2 Yd pi ?Ž l r 2q1. , . . . , Yd pq forms a domino tree-decomposition, with the 1 ?Ž l r q1. tree being a path. Note that the first, and the last set of this domino tree-decomposition are contained in X h pŽ l r 2q 1.q 1. We now take u 12 Ž d pi ? Ž lr 2 q i Ž 2 .. .v 1. y Ž d pq 1 ? lr q 1 y 1 new nodes, by identifying the second and one but last node of the node sets Y, the third and the second but last node of i 2 , the node sets Y, etc; i.e., we take sets Zt s Yd pi ?Ž l r 2q1.qt j Yd pq 1 ?Ž l r q1.yt and make the new node with set Zt adjacent to the node with set Ztq1 in the tree T. Also, make Z1 adjacent to h pŽ l r 2q1.q1. Further, put vertices e0,i jX and d 0i in X h 1, put e lii , jX and d lii Ž l r 2q1.q1 in X h qq 1, and ‘‘fold’’ the first and the last part of the ith string path, in case d 1i / 1, or dmi / l i , respectively. Finally, symbol checker vertices that are not yet placed are put in that set that contains both its neighbors. It is a tedious but rather straightforward verification, that the construction above gives a domino tree-decomposition of G with width k. We just note that X h pŽ l r 2q 1.q 1 contains at most 45 Ž k q 1. q 2 r Ž2 r q 4. s 45 Ž k q 1. q 1 Ž . 5 k q 1 vertices.

The theorem now follows from the transformation, given above, and the fact that LONGEST COMMON SUBSEQUENCE in W w t x hard for all t g N w7, 8x. THEOREM 22.

D OMINO T REEWIDTH is NP-complete.

Proof. Membership in NP is trivial. Observe that the transformation, given in the proof of Theorem 20, is a polynomial time transformation from the NP-complete LONGEST COMMON SUBSEQUENCE problem to DOMINO TREEWIDTH. Hence, the latter is NP-complete.

6. CONCLUSIONS In this paper, we considered the notion of domino treewidth. We showed a correspondence between bounded domino treewidth, and bounded degree and treewidth, and obtained several results on the complexity of determining the domino treewidth of a given graph. We believe the notion of domino treewidth can be of use for other investigations in the Žalgorithmic. theory on the treewidth of graphs. For instance, having a domino tree-decomposition of logarithmic height, and of bounded width allows easy schemes for some problems on graphs that can be changed dynamically under the operations: delete an edge, change the weight or label of a vertex or edge, where each such operation takes

122

BODLAENDER AND ENGELFRIET

logarithmic time: for many problems, there are algorithms, solving these problems in linear time, of the type, where for each node ‘‘something’’ is computed, and this information can be computed, given the information for the children of the node in constant time. For many problems, it is easy to see that when the graph is changed by an edge deletion or a weight or label change of an edge or vertex, for nodes that do not have an endpoint of the edge involved or the vertex involved in its node-set, and this holds also for all its descendants, the information to be computed is not changed. So, when we have a domino tree-decomposition, only O Žlog n. nodes must have their information recomputed, so the update can be done in O Žlog n. time. Unfortunately, the large constants involved make this scheme impractical. Other approaches for dynamic algorithms on graphs with bounded treewidth, which may be more practical, can be found, e.g., in w5, 10x.

REFERENCES 1. K. A. Abrahamson, R. G. Downey, and M. R. Fellows, Fixed-parameter tractability and completeness. IV. On completeness for W w P x and PSPACE analogues, Ann. Pure Appl. Logic 73 Ž1995., 235]276. 2. S. Arnborg, D. G. Corneil, and A. Proskurowski, Complexity of finding embeddings in a k-tree, SIAM J. Algebra Discrete Methods 8 Ž1987., 277]284. 3. H. L. Bodlaender, Some classes of graphs with bounded treewidth, Bull. Eur. Assoc. Theoret. Comput. Sci. 36 Ž1988., 116]126. 4. H. L. Bodlaender, A tourist guide through treewidth, Acta Cybernet. 11 Ž1993., 1]23. 5. H. L. Bodlaender, Dynamic algorithms for graphs with treewidth 2, in ‘‘Proceedings, 19th International Workshop on Graph-Theoretic Concepts in Computer Science WG’93,’’ pp. 112]124, Springer-Verlag, Berlin, 1994. 6. H. L. Bodlaender, A linear time algorithm for finding tree-decompositions of small treewidth, SIAM J. Comput. 25 Ž1996., 1305]1317. 7. H. L. Bodlaender, R. G. Downey, M. R. Fellows, and H. T. Wareham, The parameterized complexity of sequence alignment and consensus. Theoret. Comput. Sci. 147 Ž1995., 31]54. 8. H. L. Bodlaender, M. R. Fellows, and M. Hallett, Beyond NP-completeness for problems of bounded width: Hardness for the W hierarchy, in ‘‘Proceedings of the 26th Annual Symposium on Theory of Computing,’’ pp. 449]458, Assoc. Comput. Mach., New York, 1994. 9. H. L. Bodlaender and R. H. Mohring, The pathwidth and treewidth of cographs, SIAM J. ¨ Discrete Methods 6 Ž1993., 181]188. 10. R. F. Cohen, S. Sairam, R. Tamassia, and J. S. Vitter, Dynamic algorithms for optimization problems in bounded tree-width graphs, in ‘‘Proceedings of the 3rd Conference on Integer Programming and Combinatorial Optimization,’’ pp. 99]112, 1993. 11. R. G. Downey and M. R. Fellows, Fixed-parameter tractability and completeness. III. Some structural aspects of the W hierarchy, in ‘‘Complexity Theory.’’ ŽK. Ambos-Spies, S. Homer and U. Schoning, Eds.., pp. 191]226, Cambridge Univ. Press, Cambridge, UK, ¨ 1993.

DOMINO TREEWIDTH

123

12. R. G. Downey and M. R. Fellows, Fixed-parameter tractability and completeness. I. Basic results, SIAM J. Comput. 24 Ž1995., 873]921. 13. R. G. Downey and M. R. Fellows, Fixed-parameter tractability and completeness. II. On completeness for W w1x, Theoret. Comput. Sci. 141 Ž1995., 109]131. 14. J. Engelfriet, L. M. Heyker, and G. Leih, Context-free graph languages of bounded degree are generated by Apex graph grammars, Acta Informat. 31 Ž1994., 341]378. 15. E. Horowitz and S. Sahni, ‘‘Fundamentals of Computer Algorithms,’’ Pitman, London, 1978. 16. B. Reed, Finding approximate separators and computing tree-width quickly, in ‘‘Proceedings of the 24th Annual Symposium on Theory of Computing,’’ pp. 221]228, ACM Press, New York, 1992. 17. N. Robertson and P. D. Seymour, Graph minors. II. Algorithmic aspects of tree-width, J. Algorithms 7 Ž1986., 309]322. 18. D. Seese, Tree-partite graphs and the complexity of algorithms, in L. Budach, editor, ‘‘Proceedings, 1985 International Conference on Fundamentals of Computation Theory’’ ŽL. Burdach, Ed.., Lecture Notes in Computer Science, Vol. 199, pp. 412]421, SpringerVerlag, Berlin, 1985.