(v; v0) is also called a child edge of v0. v0 is an ancestor of v i there is a directed path from v to v0 in T. v is also called a descendent of v0. A subgraph of (V; E) is ...
Ecient Parallel Algorithms for Modular Decomposition and Split Decomposition of Chordal Graphs Elias Dahlhaus Basser Dept. of Computer Science University of Sydney NSW 2006, Australia
Abstract
We present ecient parallel algorithms for the modular decomposition and split decomposition of chordal graphs, provided a representation as a collection of subtrees of a tree is known. The running time is logarithmic and the processor number is linear.
0 Introduction
By a module we mean a subset V0 of the vertices of a graph G = (V; E ) such that all vertices inside V0 have the same neighbors outside V0 . The decomposition of a graph into modules plays an important role to test isomorphism of interval graphs or permutation graphs. By a split we mean a partition V1 ; V2 of the vertices of a graph G = (V; E ) such that all vertices of V2 that are in the neighborhood of V1 have the same neighbors in V1 . Note that the de nition of a split is symmetric. Split decomposition was introduced for directed graphs by Cunningham [4]. Distance hereditary graphs are those graphs that are totally split decomposable [9]. Moreover, split decomposition plays an important role in the recognition of path graphs and isomorphism testing of directed path graphs [5]. An O(n2) time algorithm for split decomposition is due to [12]. Even a simple linear time sequential algorithm for modular decomposition of chordal graphs is known [10]. In this paper, we are interested in parallel algorithms to nd a decomposition of a chordal graph into modules. We shall nd out that we can extend our parallel modular decomposition algorithm to nd a split decomposition for chordal graphs. If a representation of the chordal graph as a collection of subtrees of a tree is known then, with a linear processor number, we can restrict the time on an EREW-PRAM to O(log n). Section 1 introduces the notation that is essential for this paper. Section 2 discusses the structure of modules and splits in chordal graphs. Section 3 introduces the parallel algorithms for split decomposition and modular decomposition. Section 4 gives a further outlook.
1 Notation A graph G = (V; E ) consists of a vertex set V and an edge set E . Multiple edges and loops are not allowed. The edge joining x and y is denoted by xy. We say that x is a neighbor of y i xy 2 E . A path is a sequence (x1 : : : x ) of distinct vertices such that x x +1 2 E . A cycle is a closed path, that means a sequence (x0 : : : x ?1x0) such that x x +1 (mod ) 2 E . A tree is a cycle free connected graph. A rooted tree is a directed graph whose underlying undirected graph is a tree with a distinguished vertex r (the k
i
k
i
i
k
2
i
root) such that for any vertex v in T , there is a directed path to r. The unique vertex v0, such that (v; v0 ) is a directed edge in the rooted tree T , is called the parent of v in T . We denote the parent of a vertex in T by parent (v). (v; v0 ) is also called the parent edge of v. v is called a child of v0 if v0 is the parent of v. (v; v0) is also called a child edge of v0 . v0 is an ancestor of v i there is a directed path from v to v0 in T . v is also called a descendent of v0. A subgraph of (V; E ) is a graph (V 0; E 0 ) such that V 0 V , E 0 E . An induced subgraph is an edge-preserving subgraph, that means (V 0; E 0 ) is an induced subgraph of (V; E ) i V 0 V and E 0 = fxy 2 E : x; y 2 V 0 g. A graph (V; E ) is chordal i each cycle (x0 : : : x ?1x0 ) of length greater than 3 has an edge x x 2 E; j ? i 6= 1 mod k (which joins vertices which are not neighbors in the cycle). A subset V 0 of the vertex set V is complete i all vertices of V 0 are pairwise joined by an edge. An inclusion-maximal complete set is called a (maximal) clique. Note that chordal graphs are a generalization of interval graphs. The following characterization of chordal graphs due to Gavril [7] and Buneman [2] is essential for the whole paper. Theorem 1 A graph G = (V; E ) is chordal i it is the intersection graph of vertices of subtrees of a tree, i.e. there is a tree T and a collection S = fT : v 2 V g of subtrees of T such that vw 2 E i the subtrees T and T have a common vertex of T . We call (T; S ) also the subtree representation of G. Moreover, we may assume that the vertices of T correspond to the maximal cliques of G, i.e. the vertex t corresponds to the clique consisting of all subtrees containing t. We select some vertex r of T as the root and direct the edges of T in the direction to the root. We assume that for each edge (t1; t2 ) of T , t2 is the root of some subtree S 2 S that contains t1 and t2 . If this is not the case then we select the root t02 of a subtree passing (t1 ; t2 ) that has the largest distance from r. We can replace (t1 ; t2 ) by (t1; t02 ) and the resulting tree still has the property that all T 2 S remain subtrees. We denote by n the number of vertices and by m the number of edges of G. Note that in any chordal graph, the number of cliques is bounded by n and the number of pairs (x; c) such that x is in the clique c is bounded by m. The parallel computation models used in this paper are the concurrent read concurrent write parallel random access machine (CRCW-PRAM), the exclusive read exclusive write parallel random access machine (EREW-PRAM), and the concurrent read exclusive write PRAM (CREW-PRAM). T
k
i
j
v
v
v
3
v
2 The Structure of Modular and Split Decomposition in Chordal Graphs
We assume in this section that G is a chordal graph. Theorem 2 Let V1 ; V2 be a partition of G = (V; E ) into splits. Then the neighborhood of V1 in V2 or the neighborhood of V2 in V1 is complete. Proof: Suppose the theorem is not true. Then we nd vertices u1 ; v1 2 V1 in the neighborhood of V2 in V1 that are not adjacent and vertices u2 ; v2 2 V2 in the neighborhood of V1 that are not adjacent. On the other hand, since V1 ; V2 is a partition into splits, u1u2 , u1v2 , v1u2 , and v1v2 are edges of G and form a chordless cycle of length four. This is a contradiction to the assumption that G is chordal. 2 Note that a module V 0 de nes a split V 0; V n V 0. The neighborhood of V n V 0 in V 0 is V 0 .
Corollary 1 The neighborhood of a non complete module of a chordal graph is complete.
We assume that V1 ; V2 is a split decomposition and that the neighborhood of V1 in V2 is complete. Moreover, we assume that V1 is not complete and G restricted to V1 is a connected subgraph. Let T1 be the set of all vertices of T that are contained in some subtree T S of T with v 2 V1 , i.e. T1 = 2 1 T . v
v
v
V
Theorem 3 T1 is a subtree of T Proof: Let t1 ; t2 2 T1 , t1 2 T 1 , and t2 2 T 2 with v1 ; v2 2 V1 . Since V1 v
v
induces a connected subgraph of G, there is a path v1 = w1; w2 ; : : : ; w = v2 of vertices w 2 V1 . Note that T and T +1 share at least one vertex, because w w +1 2 E . The union of all T is therefore a subtree of T . Moreover all vertices appearing in some T are in T1 . Therefore v1 and v2 belong to the same tree of the forest that is induced by T1 . Therefore T1 induces a subtree of T. 2 We call T1 the characteristic subtree of V1 . We assume that V1 and V1 do not induce complete subgraphs and that G = (V; E ) is connected. Since all vertices in V2 with neighbors in V1 have the same neighbors in V1 , all T with v 2 V2 containing some vertices in T1 contain the same vertices in T1 . Note that these vertices of T1 form a subtree S1 of T1 . We call S1 the neighborhood subtree of V1 . Moreover, if V1 is a module then all T in V2 that have neighbors in V1 containSall vertices in T1 . Vice versa, suppose T1 = 2 1 T , where V1 is any set of vertices of G. If all T with v 62 V1 contain the same vertices in T1 then V1 ; V n V1 de nes a partition k
i
i
wi
i
wi
wi
wi
v
v
v
V
v
v
4
into splits. Moreover, if all T , v 62 V1 contain all vertices in T1 then all vertices in V1 have the same neighbors outside V1 , and therefore V1 is a module. v
Lemma 1 Let V1 ; V2 and V10; V20 be partitions into splits. If V1 and V10 have the
same characteristic subtree T1 then the neighborhood subtrees coincide and all vertices T with v 2 (V1 n V10) [ (V10 n V1 ) coincide with the neighborhood subtree of V1 . v
Proof: Suppose the characteristic subtrees of V1 and V10 coincide. Since G is connected there is at least one subtree T = T 0 that contains vertices in T1 and vertices outside T1 . T 0 \ T1 coincides with the neighborhood subtree of V1 and V10 . Therefore the neighborhood subtrees of V1 and V10 coincide. Let v 2 V1 n V10. Then T must coincide with the neighborhood subtree of V1 , because T contains only vertices in T1 . 2 We assumed that for each edge (t1; t2 ) of T , there is a T that passes (t1; t2 ) and has t2 as its root. Therefore all edges leaving the characteristic subtree of a split partition are incident to the root of its neighborhood subtree. v
v
v
v
3 The Algorithms
3.1 Modular decomposition
Note that the neighborhood subtree of a non clique module coincides with its characteristic tree. Therefore all tree edges that leave the characteristic tree of a module are incident to the root of the characteristic tree. Therefore a characteristic tree T1 of a module can be characterized as follows. Theorem 4 A subtree T1 is a characteristic tree of a module i 1. there is a root t of T1 and a collection C of children of t such that T1 consists of t and all ancestors of any t0 2 C and 2. all subtrees T that pass some tree edge tt0 with t0 62 C contain all vertices of T1 . Note that for any tree edge tt0 with t0 62 C , and any tree t00 2 C , the set of T passing tt0 is a subset of T passing tt00. Therefore the number of T passing tt00 is at most the number of T passing tt0 . Moreover, equality of the numbers is only possible if the sets of T passing some tree edge tt1 with this cardinality are equal. Therefore we can sort all children t0 of t in decreasing order with respect to the number of T that pass (t0; t) into a sequence (t ) =1, and a characteristic tree of a module consists of t and the ancestors of an initial segment t1 ; : : : ; t of the sequence of children of t. We denote the subtree consisting of t and the descendents of t1 ; : : : ; t by T v
v
v
v
v
v
k i i
v
l
l
t;l
5
Lemma 2 T is the characteristic tree of a module i all subtrees T that t;l
v
contain t, and the parent of t or some t ; j > l contain all vertices in T . j
t;l
We call an subtree T full in t if T contains all descendents of t . We can reformulate previous lemma as follows. Lemma 3 T is not the characteristic tree of a module i there is a T that is not full in some t ; i l and contains a t ; j > l. For any T with t 2 T , let first(v; t) be the smallest index i of the child t such that T is not full in t . For simplicity, we give the parent of t the index k + 1. We de ne last(v; t) as the largest index i of a vertex t that is contained by T if the parent of t is not in T . We again can reformulate previous lemma. v
i
v
i
t;l
v
i
j
v
v
v
i
i
i
v
v
Corollary 2 T is not the characteristic tree of a module if there is T containing v such that first(v; t) l < last(v; t). t;l
v
This result enables us to formulate an algorithm to compute all characteristic subtrees. Algorithm CHARACTERISTIC SUBTREES Input: A rooted tree T and a collection of subtrees T ; v 2 V . Output: A set T of characteristic subtrees of T . v
1. For each edge e = (t1; t2 ) of T , determine the number n of T that pass e. 2. For each vertex t of T , sort the children t0 of t with respect to n( ) in descending order. 3. For each T and each t 2 T , compute first(v; t) and last(v; t): If T is not full in t1 then first(v; t) = t1 else first(v; t) is the minimum i + 1 such that T is full in t but not full in T +1 . last(v) = maxfijt 2 T g. 4. For each l = 1; : : : ; k, compute the number U of v such that first(v; t) l < last(v; t): U 1 is the number of v with first(v; t) l and U 2 is the number of v with last(v; t) l. U = U1 ? U2 . 5. T is put into T i U = 0. e
v
t0 ;t
v
v
v
v
i
i
v
t;l
t;l
t;l
t;l
t;l
t;l
t;l
t;l
6
i
The correctness of this algorithm follows from the discussions before. It remains to check the parallel complexity. Note that the number of pairs (t; v) with t 2 T is bounded by the number m of edges of the underlying chordal graph G. Therefore also the number of pairs (f; v) such that the tree edge f is passed by T is bounded by m. The computation model we use here is the EREW-PRAM. The numbers n can be computed in O(log n) time using O(n + m) processors on an EREW-PRAM. To check whether a subtree T is full in t0, we have to compute the number of descendents of any t0 in T and to compare it with the number of descendents in T . The number of descendents of all vertices t of a tree t can be computed in O(log n) time with O(jT j) processors by tree contraction on an EREW-PRAM (see for example [1]). Therefore since the sum of the number of vertices of all T and T is n + m, we get a processor bound of O(n + m). To compute first(v; t), we compute the t with the smallest i such that T is full in t . If i 6= 1 then first(v; t) = 1. Otherwise first(v; t) is the rst i + 1 such that T is full in t but the next j such that T is full in t is not i + 1 or i is the maximum i such that T is full in t . Such a procedure can be done in O(log n) time with O(n + m) processors on an EREW-PRAM. The computation of last is a maximum computation that has an overall complexity of O(log n) time and O(n + m)= log n) processors on an EREW-PRAM. To compute the numbers U 1 and U 2 , we compute, for each i the numbers V and W of v with first(v; t) = i and last(v; t) = i respectively (O log n) time, O(n + m) processors on an EREW-PRAM) and apply a parallel pre x sum procedure (see for example [8]) that works in O(log n) EREW-time with O(n= log n) processors. v
v
e
v
v
v
i
v
i
v
i
v
v
t;l
j
i
i;t
t;l
i;t
Theorem 5 The characteristic trees of modules of a chordal graph can be computed in O(log n) time with O(n + m) processors on an EREW-PRAM, provided a subtree representation is given. Herewith we computed the non complete modules of a chordal graph up to those vertices v such that T coincides with a characteristic tree. To get clique modules and the vertices whose corresponding subtree coincides with a characteristic tree of a module, we enumerate the cliques, i.e. the vertices of T , in some way and sort fT jv 2 V g[fT 0jT 0 is a characteristic tree g with respect to the lexicographic ordering. Note that trees with the same vertices of T appear consecutively. The lexicographic ordering can be computed in O(log n) time with O(n + m) processors by a CRCW-PRAM (note that the comparison of two trees needs O(1) CRCW-time and as many processors as the number of vertices of the two trees) and sorting of n items needs O(log n) time and O(n) processors provided the comparison of two items is a basic operation [3]). To nd out maximal complete modules and the vertices v such that the corresponding subtree T coincides with a certain characteristic tree, we compare neighbors in the lexicographic ordering. That can be done in O(1) time with O(n + m) processors on a CRCW-PRAM. The intervals of equal trees can be found in v
v
v
7
O(log n) time with O(n) processors on an EREW-PRAM. The intervals of equal trees with at least two T form the maximal complete modules. The intervals of equal trees with a characteristic tree assign the T that are equal with this characteristic tree. Theorem 6 Modular decomposition of chordal graphs can be done in O(log n) time with O(n + m) processors on a CRCW-PRAM provided a subtree represenv
v
tation is given.
We continue with the split decomposition. We assume that split components are connected. We begin with some further structural considerations. There are two cases. 1. The characteristic tree and the neighborhood subtree of the split V1 ; V2 have the same root. 2. The characteristic tree and the neighborhood tree have dierent roots. In that case the root of the characteristic tree is the root of T , because the root of the neighborhood subtree is the only vertex of the characteristic tree that is incident to edges of T that leave the characteristic tree. In the rst case, the characteristic tree T1 consists of its root t and the descendents of some children of t. In the second case T1 consists of the vertices of the whole tree T that are not the descendents of certain children of the root of the neighborhood subtree. Let t be the root of the neighborhood subtree of V1 . Since we assume that V1 is connected, each edge of the characteristic tree T1 is passed by some T with v 2 V1 . Moreover all T with v 62 V1 that contain t contain the same vertices of T1 . Therefore for any neighbor t0 of t such that t0 62 T1 and any neighbor t00 of t in T1 , the set of T passing tt0 is a proper subset of the set of T passing tt00 or t0 and t00 have no T in common. We continue with the structure of characteristic trees that have the same neighborhood subtree. v
v
v
v
v
Lemma 4 Let U be the set of neighbors of t that are not in T1 . Suppose U = U1 [ U2 and for any vertex t1 2 U1 and t2 2 U2, t1 and t2 are not in a common subtree T . Then we can add all the trees of T n T1 that contain the vertices of U1 to T1 and the resulting tree T10 is still the characteristic tree of a split partition. The neighborhood subtree of T10 and of T1 coincide. Proof: Note that all T that appear in T10 and outside T10 appear in U2 and therefore not in U1 and therefore also in not in a subtree of T n T1 containing a vertex of U1 . Therefore all these T contain exactly those t0 2 T10 that are in the neighborhood subtree of T1 . 2 Last lemma states that we can partition the neighbors of t that are not in T1 into components C such that v
v
v
8
1. we can add all subtrees of T n T1 that contain neighbors of t not in C to T1 and the resulting tree T 0 is still a characteristic tree, 2. the neighborhood subtree of T 0 is the neighborhood subtree of T1 , and 3. the subtrees T containing vertices in C together with C are connected with respect to the membership relation. Note that all subtrees T 0 are inclusion maximal characteristic subtrees with the same neighborhood tree. We claim that the characteristic subtrees of a certain neighborhood S tree are the intersections of inclusion maximal characteristic subtrees of the neighborhood subtree S . Lemma 5 The intersection of two characteristic subtrees with the same neighborhood subtree S is a characteristic subtree with the neighborhood tree S . Proof: Without loss of generality, we may assume that the two characteristic subtrees T1 and T2 are not contained each other. Note that the common neighborhood tree of T1 and T2 is a subtree of T1 \ T2 . Let T contain vertices in T1 \ T2 and vertices outside T1 \ T2 . Vertices outside T1 \ T2 are outside T1 or outside T2 . Without loss of generality, T contains vertices outside T1 . Therefore the vertices of T in T1 are exactly the vertices in the neighborhood subtree S . Therefore the vertices of T in T1 \ T2 are exactly the vertices of S . 2 To get full information of the characteristic trees of split partitions, we only have to compute the inclusion maximal characteristic trees of certain neighborhood subtrees. A necessary condition that t is the root of a characteristic tree T1 that contains the child t0 of t is that all T that contain t and the parent t00 of t contain the same descendents of t0 . We call such children t0 good children of t. We determine the set of good children of any vertex t of T as follows. Algorithm GOOD Input: T Output: all t0 that are good children of their parents t. C
C
v
C
v
v
v
v
v
1. Compute, for each t, the number N of T that contain t and the parent of t. 2. Compute, for each T and each t 2 T , the number d(t; T ) of descendents of t in T . 3. For each t, determine a subtree T 2 fT jv 2 V g that contains t and that has the parent of t as its root. 4. For each vertex t00 let R be the set of roots of T that have t00 as a leaf. Sort R with respect to the distance from the root of T . t
v
v
v
v
v
t
t00
v
v
t00
9
5. For each t00, and each t 2 R , determine the number n of T with t00 as a leaf and a proper ancestor of t as its root (by parallel pre x computation). 6. t0 is a good child of t i it is in T , for each leaf t00 of T that is a descendent of t0 , n = N , and for each T containing t0 and the parent of t, d(t0; T ) = d(t0; T ). t00 ;t
t00
t
t00 ;t
t
v
t
v
v
t
Note that the sum of cardinalities of all R is bounded by m. Sorting of k items can be done in O(log k) time with O(k) processors [3] and parallel pre x computation of k items can be done in O(log k) time with O(k= log k) processors on an EREW-PRAM (see for example [8]). Therefore we get an overall complexity of O(log n) time and O(n + m) processors on an EREW-PRAM. Now let T1 be a characteristic tree such that the root of its neighborhood subtree t does not coincide with the root of T1 . Then, since each edge (t1; t) of T is passed by some T that has t as its root, all T that contain a child t0 of t not in T1 and t must have t as its root. Children t0 with the property that all T passing (t0 ; t) have t as root are called potentially bad children of t. Potentially bad children can be determined in O(log n) time with O(n + m) processors on an EREW-PRAM. As mentioned in lemma 4, the set C of neighbors of t not in T1 forms together with the set D subtrees T that contain t and some neighbor of t not in T1 a connected set. Let t00 be a child of t in the neighborhood subtree of T1 with a minimum number k of T containing t00 and t. Then C and D form a connected component of of the set of all neighbors t0 of t such that less than k T pass t0 and t and all T containing T . We call such a set also a k-component. For any k, a k-component is called a cluster of t. Note that clusters of t are disjoint or comparable with respect to inclusion and therefore the inclusion is a tree-like ordering. Labeling each pair (t0; T ) such that t0 2 T with the number n of T passing t0 and t, we compute a minimum spanning tree. Note that all clusters form a subtree. As in [6] we can compute a tree F such that each cluster is the set of leaves of some node of F . F is also called the single linkage tree of t. This procedure can be done in O(log n) time with O(n + m) processors on a CREW-PRAM, for all t simultaneously. The possible characteristic tree T of a cluster consists of that tree of T n C that contains t. Note that T is not a characteristic tree i there is a t0 2 T such that t0 is contained in some T 2 C but not in all T 2 C . Last is the case i 1. C contains the parent of t and there is a child t0 of t that is not in C , contains some T that contains the parent of t, and is not good or there is a t0 62 C and a T 2 C with root t that contains t0 , t00
v
v
v
v
v
v
v
v
t0
v
v
t
t
C
C
C
v
v
v
v
10
t
or 2. there is a child t0 62 C and a descendent t00 of t0 such that the number of T with t00 as a leaf that are in C is less than the number of T in C and at least one. To transform this equivalence into an ecient parallel algorithm, the following lemma is useful. Lemma 6 If neighbors t1 and t2 share a subtree T then the parents of t1 and t2 in the single linkage tree F are in one path to the root of F . Proof: Without loss of generality, the number n1 of T passing t1 t is at most the number n2 of T passing t2 t. The parent of t2 is the smallest cluster that contains t2 and is an n2 -component. Obviously, also t1 is in the same n2 -component. 2 Algorithm CHARACTERISTIC Input: T and T ; v 2 V , and the single linkage trees F ; t 2 T . Output: For each t 2 T , the set of s 2 F that represent a cluster C such that T is a characteristic tree. v
v
v
t
t
v
v
v
t
t
C
1. For each child t0 of t and each T that contains t0 and the parent of t, if t0 is not good then mark the path in F from the parent cluster of t0 to the parent of t in T , i.e. p(v; t0) = [parent (t); parent (t0)]. 2. If the parent of t is a descendent of parent (t0) then compute, for each T with t0 2 T and t as root, the least common ancestor L (v) of parent (t) and T in F . Mark the path between L (v) and Parent (t0), i.e. p(v; t0) = [L (v); Parent (t0)]. 3. For each descendent t00 that is the leaf of a subtree T with root t, determine the child t0 of t that is an ancestor of t00 , determine the set L of all least common ancestors of T with t00 as leaf and t as root in F , (exclude all c 2 L that have a descendent in L such that the parent is not in L , note that such c cannot represent a characteristic tree), i.e. { for each s 2 L , if parent (s) 62 L , mark all nodes of F between parent (s) and parent (t0), i.e. p(s; t0) = [parent (s); parent (t0)]. { Delete all c 2 L with a path p(s; t0) = [u; v] such that c is an ancestor of u and a proper descendent of v, i.e. compute for each c 2 L , the number N1 (c) of u's that are descendents of c and the number N2 (c) of v's that are descendents of c, v
t
T
Ft
Tt
v
v
v
t
t
t
t
T
Ft
Ft
v
t00 ;t
v
t
t00 ;t
t00 ;t
t00 ;t
t00 ;t
t00 ;t
Ft
Ft
Ft
t00 ;t
t00 ;t
11
t
Ft
Ft
delete c from L if N2 (c) > N1 (c), for each c 2 L , the number n(c; t00 ) of those T that contain t00 as a t00 ;t
t00 ;t
v
leaf in T and are in the cluster that corresponds to c, i.e. the leaves of in L that are descendents of c in F (by tree contraction) if n(c; t00) is not the number of T that are descendents of c in F then mark [c; parent (t0)], 4. s represents a characteristic tree i there is no marked path [u; v] such that u is a descendent of s and v is a proper ancestor of s. That is checked in the same way as in the deletion step of elements of L . t00 ;t
t
v
t
Ft
t00 ;t
The dominating steps of this algorithm are tree contractions on trees of overall size O(n + m) and therefore the algorithm can be executed in O(log n) time with O(n + m) processors on a CREW-PRAM. It remains to compute the neighborhood subtrees of the characteristic trees. It can be done by the following algorithm. Algorithm NEIGHBORHOOD TREES Input: T , T ; v 2 V , the cluster trees F ; t 2 T , the set C F of c that represent a characteristic tree. Output: The neighborhood subtrees S of c 2 C ; t 2 T . v
t
t
c
t
t
1. If c = parent (parent (t)) 2 C (i.e. the descendents of t form a characteristic tree) then S 0 is a subtree T containing t and parent (t). S is the tree S 0 n fparent (t)g that contains t. 2. If parent (parent (t)) 6= c 2 C then S 0 is a T that is a descendent of c in F such that the root of T is t. If c represents a w -component, i.e. the maximum weight n that appears in a descendent of c is k, then S 0 consists of t, all children t0 of t in S 0 such that the number of common subtrees T in t0 and t is greater than k and all descendents of such t0 in S 0 . Ft
T
t
v
c
T
c
T
c
Ft
T
t
t
c
v
v
c
t0
c
v
c
c
The processor number of this algorithm can be bounded by the number of pairs (t; T 0 ), t 2 T 0 and T 0 is a neighborhood subtree.
Lemma 7 The number of (t0; c), t0 2 S is bounded by O(m). Proof: Note that all clusters c 2 F that represent a characteristic tree are c
t
even in tree like order. Let H be the tree of these clusters. Suppose c0 is the only child of c in H . Since the number of T that are descendents of c in F is larger than the number of T that are descendents of c0 in F , there is a T that is an F -descendent of c but not an F -descendent of c0. Note that each cluster c and therefore each leaf of H has some T as a descendent in F . Therefore up to a constant factor, the number of descendents of c in H is bounded by the number of T that are descendents of c in F . t
t
t
t
v
v
v
t
t
t
v
t
t
v
12
t
Let t0 be a descendent of t and let t00 be the child of t that is an ancestor of t0 . Then the number of neighborhood subtrees that contain t0 and have t as root is bounded by the number of proper descendents of the smallest cluster c in H that contains t00. Since t0 is in the neighborhood subtree of some cluster not containing t00 , it contains all T that appear in any proper descendent of c in H . Therefore, up to a constant factor, the number of neighborhood subtrees with root t that are not the neighborhood subtree of the tree containing all descendents of t and contain t0 is bounded by the number of T with root t containing t0 . The number of neighborhood subtrees containing t0 and that are the neighborhood subtree of the subtree containing all descendents of t is bounded by the number of T that contain t0 and that have the parent of t as the root and therefore for all t simultaneously bounded by the number of T containing t0. Therefore the number of (t0; c) such that t0 2 S is bounded by m. 2. It remains to nd out those T that are have the same vertex set, those neighborhood subtrees S that coincide in its vertex set, and those T that coincide with a certain neighborhood subtree. This can be done in O(log n) CRCW-time with O(n + m) processors by lexicographic ordering with respect to some order of the vertices of T . Theorem 7 Split decomposition for chordal graphs can be done in O(log n) time on a CRCW-PRAM with O(n + m) processors, provided a subtree representation is known. t
v
t
v
v
v
c
v
c
v
4 Conclusions We developed parallel algorithms for modular decomposition and split decomposition that are nearly optimal. General algorithms for modular decomposition and split decomposition are incremental and seem therefore to be inherently sequential. Moreover, the best known time bound for modular decomposition or split decomposition is O(n2) [13, 12]. It even might be interesting to improve these algorithms to sequential linear time algorithms.
References [1] K. Abrahamson, N. Dadoun, D. Kirkpatrick, T. Przyticka, A Simple Parallel Tree Contraction Algorithm, Journal of Algorithms 10 (1988), pp. 287-302. [2] P. Buneman, A Characterization of Rigid Circuit Graphs, Discrete Mathematics 9(1974), pp. 205-212. [3] R. Cole, Parallel Merge Sort, 27 Symposium on Foundations of Computer Science (1986), pp. 511-516. th
13
[4] W. Cunningham, Decomposition of Directed Graphs, SIAM Journal on Algebraic and Discrete methods 3 (1982), pp. 214-228. [5] E. Dahlhaus, "Chordale Graphen im besonderen Hinblick auf parallele Algorithmen", Habilitation Thesis, University of Bonn. [6] E. Dahlhaus, Fast Parallel Algorithms for the Single Link Heuristics of Hierarchical Clustering, Proceedings of the Fourth IEEE Symposium on Parallel and Distributed Processing (1992), pp. 184-186. [7] F. Gavril, The Intersection Graphs of Subtrees in Trees are Exactly the Chordal Graphs, Journal of Combinatorial Theory Series B 16 (1974), pp. 47-56. [8] A. Gibbons, W. Rytter, Ecient Parallel Algorithms, Cambridge University Press, Cambridge, 1989. [9] P. Hammer, F. Maray, Completely Separable Graphs, Discrete Applied mathematics 27 (1990), pp. 85-99. [10] W. Hsu, T. Ma, Substitution Decomposition on Chordal Graphs and Applications, ISA91, Algorithms, LNCS 557, W. Hsu, R.C.T. Lee ed., 1991, pp. 52-60. [11] P. Klein, Ecient Parallel Algorithms for Chordal Graphs, 29 Symposium on Foundation of Computer Science (1988), pp. 150-161. [12] T. Ma, J. Spinrad, Split Decomposition of Undirected Graphs, Proceedings of the First Symposium on Discrete Algorithms (1988), pp. 252-260. [13] J. Muller, J. Spinrad, Incremental Modular Decomposition, Journal of the ACM 36 (1989), pp. 1-19. [14] R. Tarjan, U. Vishkin, Finding Biconnected Components in Logarithmic Parallel Time, SIAM-Journal on Computing 14 (1985), pp. 862-874. th
14