• 沒有找到結果。

RECOGNITION OF DEC AND DET NETWORKS

In this section we study the recognition of DEC and DET networks.

First, we partition networks into six groups, A, C, D, E, F, and Z. A network N is in A, C, D, and E if there exists a graph representation ŽG N , G Nw x w Xx. that has a trail cover in group T , T , T , and T , respec-A C D E tively. A network N is in F if it is not in A, C, D, or E, and there exists a

Ž w x w Xx.

graph representation G N , G N that has a trail cover in T . All of theF remaining networks are said to be in Z. Since trail cover classes a, b, c, d, and e are mutually disjoint, as stated in Lemma 3.2, a network N cannot

 4

realize trail covers in class a and in class b for a, b g a, b, c, d, e and a / b. Therefore, network N cannot be in more than one of the groups A, C, D, E, F, and Z. For example, if N is in A, N cannot be in C, D, E, F, or Z.

Let M be a DET network with child subnetworks N , N , . . . , N that1 2 k w x

realizes a DET L in G M . We assume that M is of type S. To attain results for M of type P, we need only take the duals of the results for M of type S.

Ž X.

A DEC network is a DET network that has a DET L, L such that both L and LXare Euler circuits. It is easy to check that the smallest DEC

Ž X.

network is the network with a graph representation G , G3 3 in Example w x

2.2. Since there is no trail cover in class 0, 0 , the only DEC trail cover

w x

must be in y, y . Let M be a DEC network. M does not contain a child

subnetwork in F, since otherwise L cannot begin and end at the same

w x

vertex. Examining the rules listed in Table 2 for y, y , we note that theS

w x

only rule for y, y S without containing any internal trail is the first rule

w x w x  w x 4 w x

for p, i.e., y, y S¤ 0, 2 Ps m f, u s 0, 2 , where m G 0. Since thisP P

w x

rule is the only rule for y, y S to be a DEC, it is a necessary and sufficient condition for DEC networks and we conclude in the following theorem.

THEOREM5.1. Let M be a network with type S, and let N , N , . . . , N be1 2 k the child subnetworks of M. Then M is a DEC network if and only if exactly two N are in T and the others are in T .i C E

It follows from Lemmas 3.3, 3.4, and Remark 3.1 that at most two N ’si

w x w x

have LG Ni g T , at most two N ’s have L N g T , and all of theF i G i C

w x

other N ’s have Li G Ni g T j T . Therefore, we have the followingA E

lemma in terms of network groups.

LEMMA 5.1. Assume a network M is a DET network with child subnet-works N , N , . . . , N . Then the following hold:1 2 k

Ž .i At most two N are in F.i Ž .ii At most two N are in C.i

Žiii. All of the remaining N are in Ai j E.

Now we point out some interesting facts about the arrangement of child w x

subnetworks of M in all graph representations G M that realize a DET Žsee Fig. 11 for an illustration :.

Ž .i Child subnetworks in C must be placed at the top and bottom w x

parts of G M . This follows from the fact that the child subnetwork in C has only one distinguished vertex to concatenate with a trail cover in another child subnetwork.

Ž .ii The subgraph representing child subnetworks in E must be connected to the graph representation of a child subnetwork in C. There-fore, the number of connected components representing child subnetworks in E is no greater than the number of child subnetworks in C.

Žiii. Suppose that M contains two child subnetworks N and N inp q F. Child subnetworks in E cannot be placed between the subgraphs representing N and N in G, since otherwise no DET can begin and endp q with an edge in N and an edge in N . Furthermore, if M contains childp q subnetworks in A, those child subnetworks must be placed between Np and N .q

LEMMA 5.2. Let M be a type S network consisting of two child subnet-works N , N in F, two child subnetsubnet-works in C, and some child subnetsubnet-worksp q

wŽ . Ž .x

in Aj E. Then M possesses a DET if and only if x, x q 2, 2 P or

FIG. 11. General arrangement of the child subnetworks of a DET network M in all graph Ž w x w Xx.

representations G M , G M that realize a DET.

x, x.q 2, 0Ž .xP is the trail co¨er of N and N . Furthermore, the resultingp q

w x

DET trail of M is in class y, y .

Proof. We can prove the lemma by checking the rules in Table 2.

With this lemma, we know that the converse of Lemma 5.1 is not true.

Instead of giving a necessary and sufficient condition for DET networks, we present a linear time algorithm to recognize such networks. To justify the algorithm, we need the following discussion. following facts can be proved by induction on the height of the tree structure for N:

Ž .1 If a is in Class N , then there are exactly two vertices of oddŽ .

w x w Xx

degree in G N and G N , respectively, namely, their two distinguished vertices.

Ž .2 If b is in Class N , then there are exactly two vertices of oddŽ . w x

degree in G N , namely, its two distinguished vertices, and there is no w Xx

vertex of odd degree in G N .

Ž .3 If c is in Class N , then there is no vertex of odd degree inŽ .

w x w Xx

G N , and there are exactly two vertices of odd degree in G N , namely, its two distinguished vertices.

Ž .4 If d or e is in Class N , then there is no vertex of odd degree inŽ . w x w Xx

either G N or G N .

It can be observed from the rules in Table 2 that generate f, g, h, and i that for any network N in Y there is a subnetwork not necessarily a childŽ

. X

subnetwork of N or N that is a series connection of at least one network

w x w x 4

containing a trail cover class in 2, 2 , 2, 0P P and at least one network

w x w x w x 4

containing a trail cover class in 0, 2 ,P u, f , f, uP P . As a result, if ŽG N , G Nw x w Xx.is any graph representation for some network N in Y, then

w x there exists a nondistinguished vertex which is of odd degree in G N or

w Xx

G N . The lemma is proved.

Using the rules in Table 2, we can develop a linear time algorithm to recognize DET networks. The algorithm works as follows:

Algorithm: RECOG DET

Input: A network N in tree representation.

Output: ‘‘Yes’’ and resulting trail cover classes if N possesses a DET, and

‘‘No’’ otherwise.

Method: For each nonleaf node x, use N x to denote the subnetwork thatŽ .

leaves to the root, level by level, calculate Class M x : TC, which denotes the set of trail cover classes realized on M x , by theŽ . following steps.

Ž Ž .X. w x 4 1. If x is a leaf node, Class M x s 2, 2 .P

Ž Ž ..

2. If x is a nonleaf node, compute Class M x using the rules in Table 2.

3. If none of the rules can be applied, then output ‘‘No’’ and STOP.

w x w x w x w x w x

4. If x is the root and one of 2, 2 , 2, 0 , 0, 2 , x, x , or y, yS S S S S Ž Ž ..

is in Class M x , then output ‘‘Yes’’ and STOP. If x is the root and none Ž Ž ..

of the above five classes is in Class M x , then output ‘‘No’’ and STOP.

Ž Ž .X.

5. If x is a nonleaf node, calculate Class M x by setting

Ž Ž .X. Ž Ž ..

Class M x s dual of Class M x , and proceed to next node.

The correctness of RECOG DET follows from our rules. We observe that the time spent on Step 2 is crucial in determining the time complexity of our algorithm. To discuss the time spent on Step 2, we describe the method used to implement this step.

Ž . XŽ . XŽ . XŽ .

Assume that M x has w child subnetworks M x , M x , . . . , M x1 2 w . Ž Ž ..

Let K be any trail cover in Possible M x . Observe that any trail cover in

f, g, h, i contains exactly one distinguished trail, whereas any trail cover4

 4

in j, k, l, m, n, o contains exactly two nondistinguished trails. Moreover, a nondistinguished trail can be concatenated with at most one other trail.

XŽ .

Hence all of the trail covers for M xi induced by K satisfy one of the

Ž . XŽ .

following three cases: Case 1 in all M x , every induced trail cover is ini

a, b, c, d, e ; Case 2 in all M x , at most two induced trail covers are in4 Ž . XŽ i.

cover classes in Class M x for trail covers in Case 1 . Since

<Class M xŽ XŽ i..l a, b, c, d, e / 0 for every i, it follows from Lemma 3.2 4<

 4

that each child subnetwork N has a unique trail cover class in a, b, c, d, e .i

Ž . Ž .

To find all of the trail cover classes for the trail cover of M x in Case 1 , Ž Ž ..

we scan all of the rules in Table 2 that are a series connection of a M x

Ž Ž .. Ž Ž ..

trail covers in class a, b M x trail covers in class b, c M x trail covers

Ž Ž .. Ž Ž ..

in class c, d M x trail covers in class d, and e M x trail covers in class e. Although Table 2 has many rules, the number of rules is still bounded by a constant. Thus we use additional O 1 time to find all of the trail coverŽ .

Ž . Ž Ž .. Ž Ž .. Ž Ž .. Ž Ž ..

classes in Case 1 once we have a M x , b M x , c M x , d M x , Ž Ž ..

and e M x .

Consider Case 2 . It follows from Lemma 5.3 that there is no networkŽ . in Xl Y. We can easily find all child subnetworks with an induced trail

 4

cover in f, g, h, i . Moreover, there are at most two such child subnet-works. We assume without loss of generality that the induced trail covers

XŽ . XŽ .  4

of M x1 and M x2 are in f, g, h, i and the remaining child subnet-works are in X. Since there are at most four possible trail cover classes in

f, g, h, i , we scan the rules 16 times at most to find all trail cover classes4

Ž . Ž .

in Case 2 . Additional O 1 time will be used to find all of the trail cover classes for M x .Ž . trail cover K for M x that includes KŽ . 1 as an induced trail cover must

 4

induce some trail covers in a, b, c, d, e for other child subnetworks. That is, all of the other child subnetworks must be in X. Thus K is a series

Ž Ž ..

connection of a trail cover in class j, a M x y 1 trail covers in class a,

Ž Ž .. Ž Ž .. Ž Ž ..

b M x trail covers in class b, c M x trail covers in class c, d M x Ž Ž ..

trail covers in class d, and e M x trail covers in class e. We can find the trail cover class for K in O 1 time. Since there are only six trail coverŽ .

 4 Ž .

classes in j, k, l, m, n, o , we may use O 1 time to find all of the trail

 4

cover classes that are a series connection of a trail cover in j, k, l, m, n, o

XŽ .  4 XŽ .

for M x1 and some other trail covers in a, b, c, d, e for M xi with Ž XŽ ..

i/ 1. Moreover, if a f Class M x , exactly one of b, c, d, and e can be1

Ž XŽ ..

in Class M x1 . The discussion for these situations is analogous, so Ž . Ž .

statements ii and iii can be treated similarly. Since the possible induced

 4 XŽ .

trail covers in j, k, l, m, n, o may be in M xi for 1F i F w, we can find Ž .

all such trail cover classes in O w time.

From leaves to the root and level by level, the time spent on Step 2 for Ž .

each node x is bounded by O d , where d is the number of children forx x x. Therefore, we have the following theorem.

THEOREM 5.2. Algorithm RECOG DET recognizes DET networks in linear time.

From the above discussion, it is clear that the time complexity of our algorithm is T nŽ .sa n, where a is a large constant. a can be viewed as the number of rules in Table 2.

6. AN EXAMPLE

To illustrate the above algorithm, we use the network given by the

ŽŽŽŽŽŽ . . Ž .. Ž .. . Ž ..

Boolean function an b k c n f k g k e n d n h k k n l

Ž . Ž .

n i k j n m k n , which has two pairs of graph representations, shown in Figure 12. The trail covers realized in a parallel type subnetwork are obtained by taking the duals of the trail covers derived from the rules for series connection. To obtain the trail covers realized in a series type subnetwork, we need to take the duals of the trail covers in its child subnetworks and then apply the rules in Table 2. Figure 13 also illustrates this procedure. The network has two nonequivalent DET’s dehijklmnabfgc and abcdefghijklmn, which satisfy the fourth and the ninth rules for wy, y . From this final result, we can determine the trail covers realized inxS

FIG. 12. Two nonisomorphic graph pairs of a DET network realizing different DETs.

FIG. 13. Illustration of the RECOG DET algorithm.

each subnetwork, from the root to leaves, that result in DETs. The ones

w x

that lead to the DET satisfying the fourth rule for y, y S are marked by a

v, and those leading to the ninth rule are marked by a).

7. CONCLUSION

In this paper we study the DET problem that arises from VLSI layout.

Ž .

We build a multivalued function Table 1 to discuss the concatenation of these trail cover classes. It is observed that Table 1 is closed under series connection, parallel connection, and taking the dual. There are exactly 16 trail cover classes. To discuss the possible concatenation of all permuta-tions of trail cover classes, we study the basic structures of the trail cover classes of DET networks. Then we use a program to generate rules for trail cover class composition. Using these rules, we can build a linear time algorithm to recognize those networks that possesses DET trails. The approach that uses a program to generate rules is very interesting. We believe that such an approach can be used in algorithm designs for other problems, especially those complicated problems using dynamic program-Ž . ming. We also believe that the original problem that computes DCT N for any network N might be a candidate problem using this approach.

Ž .

Actually, we have tried this approach on DCT N . However, we need to reclassify those trail cover classes so that it is closed under series connec-tion, parallel connecconnec-tion, and taking the dual. We believe that at least 540 trail cover classes should be considered as we analyze the behavior of

Ž .

DCT N . Because the problem is so complicated, we still cannot solve the DCT problem.

We also want to point out that RECOG DET can be translated into a w x

parallel algorithm. Tree contraction 1 is a general technique for designing parallel algorithms for certain problems defined on a tree. The DET problem is also a problem defined on a tree. It is easy, but not trivial, to modify the technique of tree contraction to solve the DET problem in

Ž . Ž . w x

O log n time with O nrlog n processors under EREW PRAM 18 . In VLSI layouts, circuit designers may wish to keep the DETs to pursue height or floor plan optimization. We have seen in Figure 12 that a DET network may realize various DETs in different pairs of graph representa-tions. Figure 14 shows the corresponding geometric layouts. The layout designers may prefer the layout with the smaller height or the layout that fits his floor plan. For this reason, it is usful to design a data structure that

w x keeps the DETs in all graph representations for any network 14 .

FIG. 14. Two different geometric layouts for the DET network in Figure 13.

ACKNOWLEDGMENTS

The authors are very grateful to the anonymous referees for their thorough review of the paper and many concrete and helpful suggestions. This work was supported in part by the National Science Council of the Republic of China under contract NSC83-0208-M009-034.

REFERENCES

1. K. Abrahamson, D. Dadoun, D. G. Kirkpatrick, and T. Przytycka, A simple parallel tree

Ž .

contraction algorithm, J. Algorithms 10 1989 , 287]302.

2. M. W. Bern, E. L. Lawler, and A. L. Wong, Linear time computation of optimal

Ž .

subgraphs of decomposable graphs, J. Algorithms 8 1987 , 216]235.

3. J. A. Bondy and U. S. R. Murty, ‘‘Graph Theory with Applications,’’ Elsevier, New York, 1976.

4. B. S. Carlson, C. Y. Chen and D. S. Meliketian, Daul Eulerian properties of plane

Ž .

multigraphs, SIAM J. Disc. Math. 8 1995 , 33]50.

Ž . 5. R. J. Duffin, Topology of series parallel networks, J. Math. Anal. Appl. 10 1965 ,

303]318.

6. L. H. Hsu, J. Y. Hwang, T. Y. Ho, and C. H. Tsai, A linear time algorithm to recognize the double Euler trail for series-parallel networks, in ‘‘Lecture Notes in Computer

Ž .

Science, No. 557, ISA ’91 Algorithms’’ W. L. Hsu and R. C. T. Lee, Eds. , pp. 316]325, Springer-Verlag, Berlin, 1991.

7. L. H. Hsu and S. Y. Wang, Maximum independent number for series-parallel networks,

Ž .

Networks 21 1991 , 457]468.

8. T. Kikuno, N. Yoshida, and Y. Kakuda, A linear time algorithm for domination number

Ž .

of a series parallel networks, Discrete Appl. Math. 5 1983 , 299]311.

9. T. Lengauer and R. Muller, Linear algorithm for optimizing the layout of dynamic CMOS¨

Ž .

cells, IEEE Trans. Circuits Systems 35 1988 , 279]285.

10. R. Maziasz and J. Hayes, Layout optimization of CMOS functional cells, in ‘‘Proceedings of the 24th ACMrIEEE Design Automation Conference,’’ 1987, pp. 544]551.

11. R. Maziasz and J. Hayes, Layout optimization of static CMOS functional cells, IEEE

Ž .

Trans. Computer-Aided Design 9 1990 , 708]719.

12. R. Nair, A. Bruss, and J. Reif, Linear time algorithms for optimal CMOS layout, in

Ž .

‘‘VLSI: Algorithms and Architecture’’ P. Bertolazzi and F. Luccio, Eds. , pp. 237]338, North-Holland, Amsterdam, 1985.

13. J. Riordan and C. E. Shannon, The number of two terminal series parallel networks, J.

Ž .

Math. Phys. 21 1942 , 83]93.

14. T. Y. Sung, L. H. Hsu, and J. Y. Hwang, Data structure for graph representations of a network having double Euler trails, in ‘‘Information Processing 92, Volume I: Algorithms,

Ž .

Software, Architecture’’ J. van Leeuwen, Ed. , pp. 436]442, Elsevier Science Publishers

Ž .

B.V. North-Holland , Amsterdam, 1992.

15. K. Takamizawa, T. Nishizeki, and N. Saito, Linear time computability of combinatorial

Ž .

problems on series parallel graphs, J. Assoc. Comput. Mach. 29 1982 , 623]641.

16. T. Uehara and C. vanCleemput, Optimal layout of CMOS functional arrays, IEEE Trans.

Ž .

Comput. 30 1981 , 305]312.

17. J. Valdes, R. E. Tarjan, and E. L. Lawler, The recognition of series parallel digraphs,

Ž .

SIAM J. Comput. 11 1982 , 289]313.

18. J. J. Wang, S. Y. Wang, L. H. Hsu, and T. Y. Sung, Extended tree contraction for some

Ž .

parallel algorithms on series-parallel networks, J. Inform. Sci. Engrg. 13 1997 , 665]680.

相關文件