Presentation is loading. Please wait.

Presentation is loading. Please wait.

Multi-Layer Channel Routing Complexity and Algorithms Rajat K. Pal Annajiat Alim Rasel 0409052002 CSE 6404 VLSI Layout Algorithms Page.

Similar presentations


Presentation on theme: "Multi-Layer Channel Routing Complexity and Algorithms Rajat K. Pal Annajiat Alim Rasel 0409052002 CSE 6404 VLSI Layout Algorithms Page."— Presentation transcript:

1 Multi-Layer Channel Routing Complexity and Algorithms Rajat K. Pal Annajiat Alim Rasel 0409052002 annajiat@gmail.com CSE 6404 VLSI Layout Algorithms Page 67 -> 78 as a part of MS at BUET, 2009

2 Cell Circuit element Simple Pre-designed C E A D B F

3 ASIC (Standard Cell) Design Example D C C B A CC D C D B B C C C Cell Metal1 Metal2 GNDVDD C D A B Cell library Placement [©Sherwani]

4 Channel C E A D B F VLSI Layout Channel

5 AD nets: set of terminals to be connected Channel routing

6 Transitively Oriented Graph / Comparability Graph u v w w v u x

7 Transitively Oriented Graph / Comparability Graph ?? u v w w v u x

8 Transitively Oriented Graph / Comparability Graph - Vertex Types (intermediate) u (source) u V (source) w (sink) w (source) v (sink) x

9 Channel Specification 5 3 2 6 1 7 4 5 3 6 2 1 7 4 I 5 I 3 I 2 I 6 I 1 I 7 I 4 A D VH routing

10 Channel Specification 5 3 2 6 1 7 4 5 3 6 2 1 7 4 I 5 I 3 I 2 I 6 I 1 I 7 I 4 A D S5 S3 S6 S2 S1 S7 S4 I 5 I 3 I 2 I 6 I 1 I 7 I 4 A D Channel Intervals

11 S5 S3 S6 S2 S1 S7 S4 I 5 I 3 I 2 I 6 I 1 I 7 I 4 A D HCG 2 3 1 4 5 6 7

12 Channel Intervals HCG and HNCG 2 3 1 4 5 6 7 S5 S3 S6 S2 S1 S7 S4 I 5 I 3 I 2 I 6 I 1 I 7 I 4 A D

13 Channel Intervals HNCG 2 3 1 4 5 6 7 S5 S3 S6 S2 S1 S7 S4 I 5 I 3 I 2 I 6 I 1 I 7 I 4 A D

14 clique cover 3 4 1 2 5 7 6 While G ≠ empty choose a maximal clique delete the vertices of the clique algorithm

15 clique cover {1, 4, 5} 3 4 1 2 5 7 6

16 clique cover {1, 4, 5} 3 7 6 { 2, 7 } 2

17 clique cover {1, 4, 5} 3 6 { 2, 7 } { 3 }

18 clique cover {1, 4, 5} 6 { 2, 7 } { 3 } { 6 } But, the clique cover may not be minimum one

19 clique cover {1, 4, 5} { 2, 7 } { 3 } { 6 } But, the clique cover may not be minimum one 3 4 1 2 5 7 6

20 clique cover {1, 4, 5}{ 2, 7 } { 3 }{ 6 } Independent set 3 4 1 2 5 7 6 {5, 3, 6}{2, 3, 6} {2, 1, 6}{7, 1}{7, 4}

21 clique cover {1, 4, 5}{ 2, 7 } { 3 }{ 6 } Independent set 3 4 1 2 5 7 6 {5, 3, 6}{2, 3, 6} {2, 1, 6}{7, 1}{7, 4}

22 clique cover {1, 4, 5}{ 2, 7 } { 3 }{ 6 } Independent set {5, 3, 6}{2, 3, 6} {2, 1, 6}{7, 1} I2I2 I7I7 I5I5 I4I4 I1I1 I3I3 I6I6 {7, 4} For perfect graph  (G)=κ(G)  (G)= size of the max independent set κ(G) = size of the min clique cover

23 Minimum clique cover 3 4 1 2 5 7 6 Sort the intervals w. r. t. L i Orient the edges b. t. r. R i < L j While G ≠ empty choose a maximal clique from sorted list delete the vertices of the clique algorithm

24 3 4 1 2 5 7 6 I2I2 I7I7 I5I5 I4I4 I1I1 I3I3 I6I6 5 6 3 17 2 4 12 34 567

25 3 4 1 2 5 7 6 I2I2 I7I7 I5I5 I4I4 I1I1 I3I3 I6I6 5 6 3 17 2 4

26 3 4 1 2 5 7 6 5 6 3 17 2 4 527

27 3 4 1 2 5 7 6 5 6 3 17 2 4 527

28 3 4 1 6 5 3 7 2 527 314

29 3 4 1 6 5 3 7 2 527 314

30 6 3 527 314 6 Obviously, this is the minimum clique

31

32 Lemma Lemma 3.1 For any vertices v i, v j and v k of the HNCG, if v i  v j and v j  v k, then v i  v k Proof From definition, R i < L j and R j < L k From the interval, L j < R j So, we have R i < L k So, the HNCG is a comparability graph

33 Lemma Lemma 3.2 Each maximal clique computed by the algorithm MCC1 in step 3 has exactly one vertex from each maximal independent set of G case 1: There is no interval ending on the left side of the starting column of any interval in A We consider any maximal independent set A

34 Independent set {5, 3, 6}{2, 3, 6} {2, 1, 6}{7, 1} I2I2 I7I7 I5I5 I4I4 I1I1 I3I3 I6I6 {7, 4} Lemma 3.2 (cont.) 527 314 6 In this case, vertices in A will be selected as the source vertex of successive maximal cliques

35 case 2: There is an interval ending on the left side of the starting column of at least one of the intervals in A Lemma 3.2 (cont.)

36 Independent set {5, 3, 6}{2, 3, 6} {2, 1, 6}{7, 1} I2I2 I7I7 I5I5 I4I4 I1I1 I3I3 I6I6 {7, 4} Lemma 3.2 (cont.) 527 314 6 Let, I be the rightmost interval selected by MCC1 in C 1 such that at least one interval of A starts after I ends & J be the interval of A with left most end point among the intervals of A, starting after I ends

37 Independent set {5, 3, 6}{2, 3, 6} {2, 1, 6}{7, 1} I2I2 I7I7 I5I5 I4I4 I1I1 I3I3 I6I6 {7, 4} Lemma 3.2 (cont.) 527 314 6 So, one interval of A is chosen by the algorithm MCC1 in C 1 So, exactly one interval of A is chosen in C 1

38 Lemma Lemma 3.3 MCC1 computes a minimum clique cover of the HNCG, G=(V, E’) consisting of d max cliques Proof d max = size of the maximum independent set From, lemma 3.2 A will become empty when C l is computed Let, the size of the maximal independent set A be l, where l < d max

39 Lemma 3.3 (cont.) {5, 3, 6}{2, 3, 6} {2, 1, 6}{7, 1}{7, 4} 527 314 6 The last clique computed by MCC1 will include the last interval from each maximum independent set

40 Lemma 3.3 (cont.) {5, 3, 6}{2, 3, 6} {2, 1, 6}{7, 1}{7, 4} 527 314 6 The last clique computed by MCC1 will include the last interval from each maximum independent set So, it follows that the number of cliques computed by MCC1 is exactly d max

41 Theorem 3.1 The construction of the HNCG, G=(V, E’) and its transitively oriented graph G*=(V, F) from the intervals belonging to a channel can be implemented in O(n+e) time, where n is the number of nets and e is the size of the HNCG

42 Theorem 3.1 (cont.) orienting of the edges can be done by scanning all the intervals exactly once from left to right The following cases may occur at a column position while scanning an interval starts an interval terminates all the intervals continue

43 Theorem 3.1 (cont.) case 1: while I i starts, if I j  S 1 terminated before I i ; orient an edge v j  v i in G* case 2: If I i terminates at current column position, we add I i in the set S 1 case 3: No action required

44 Theorem 3.1 (cont.) In any instance of the CRP, at most two intervals may start or terminate at the same column. In this case, both the intervals are processed one after another. The scanning of the columns requires O (n) time The algorithm spends constant time in introducing each edge of G and G* The introducing time of all the edges is O (e)

45 Theorem 3.2 The algorithm MCC1 correctly computes a routing solution for the two layer CRP without vertical constraints using d max tracks. MCC1 can be executed in O(n+e) time.

46 O (n) O (n+e) In total, O (n+e) time

47 Theorem 3.3 The algorithm MCC2 correctly computes a routing solution for the two layer CRP without vertical constraints using d max tracks. MCC2 can be executed in O(nlogn) time

48 Self-balancing binary search tree OperationBig-O time LookupO(log n) InsertionO(log n) RemovalO(log n) In-order iteration over all elements O(n) The overall worst-case Build Time is O(nlog n) Times for various other operations in terms of number of nodes in the tree n: For some implementations these times are worst-case, while for others they are amortized.

49 Self-balancing binary search tree OperationBig-O time LookupO(log n) InsertionO(log n) RemovalO(log n) In-order iteration over all elements O(n) The overall worst-case Build Time is O(nlog n) Times for various other operations in terms of number of nodes in the tree n: For some implementations these times are worst-case, while for others they are amortized. In computer science, especially analysis of algorithms, amortized analysis finds the average running time per operation over a worst-case sequence of operations. Amortized analysis differs from average-case performance in that probability is not involved; amortized analysis guarantees the time per operation over worst-case performance.

50 O (n) O (n+e) O (nlogn) O (logn) Building Self Balancing BST of intervals sorted on their starting column numbers - O (nlogn) Total =nlogn+(n + e) + n + n X (logn + logn) =2n + e + nlogn + 2nlogn =2n + e + 3nlogn =nlogn O (logn)

51 Vertex Representation Class Vertex { – int key; //starting column and sequence number in transitive orientation – int n; //vertex name: v1, v2 … etc. Prefix “v” will be used for now on for clarity – double endingPosition; // ending column, double value such as 3.5 indicates that it ended before column 4. Thought it should be int, but due to lack of numbers between 3 and 4, double values are used. – int outDegree; }

52 Input / Initialization Assuming for the given example following declarations and initializations have been done 1) Vertex v1, v2, v3, v4, v5, v6, v7; 2) v1.n=1; v2.n=2; …………. V7.n=7; 3) All vertexes know their key (startingPosition) and endingPosition

53 Step 1 - Building BST Insert v5 k=1 end=3.5 outDeg=4 n = v5

54 Step 1 - Building BST Insert v3 k=1 end=3.5 outDeg=0 n = v5 k=2 end=4.5 outDeg=0 n = v3

55 Step 1 - Building BST Insert v6 k=1 end=3.5 outDeg=0 n = v5 k=2 end=4.5 outDeg=0 n = v3 k=3 end=5.5 outDeg=0 n = v6

56 Step 1 - Building BST The balance factor of a node is the height of its right subtree minus the height of its left subtree. A node with balance factor 1, 0, or -1 is considered balanced. A node with any other balance factor is considered unbalanced and requires rebalancing the tree. The balance factor is either stored directly at each node or computed from the heights of the subtrees. k=1 end=3.5 outDeg=0 n = v5 k=2 end=4.5 outDeg=0 n = v3 k=3 end=5.5 outDeg=0 n = v6 Here v5 is unbalanced

57 Step 1 - Building BST In right right case, tree is balanced using left rotation. So, left rotating v5, v3, v6 from v3 k=1 end=3.5 outDeg=0 n = v5 k=2 end=4.5 outDeg=0 n = v3 k=3 end=5.5 outDeg=0 n = v6 Here v5 is unbalanced

58 Step 1 - Building BST k=1 end=3.5 outDeg=0 n = v5 k=2 end=4.5 outDeg=0 n = v3 k=3 end=5.5 outDeg=0 n = v6 Here v5 is now balanced

59 Step 1 - Building BST k=1 end=3.5 outDeg=0 n = v5 k=2 end=4.5 outDeg=0 n = v3 k=3 end=5.5 outDeg=0 n = v6 Inserted v2 k=4 end=5.7 outDeg=0 n = v2

60 Step 1 - Building BST k=1 end=3.5 outDeg=0 n = v5 k=2 end=4.5 outDeg=0 n = v3 k=3 end=5.5 outDeg=0 n = v6 Inserted v5 k=4 end=5.7 outDeg=0 n = v2 K=5 End=6.5 outDeg=0 n = v1

61 Step 1 - Building BST k=1 end=3.5 outDeg=0 n = v5 k=2 end=4.5 outDeg=0 n = v3 k=3 end=5.5 outDeg=0 n = v6 Tree now has become unbalanced and v6, v2, v1 now forms a right right case k=4 end=5.7 outDeg=0 n = v2 K=5 End=6.5 outDeg=0 n = v1

62 Step 1 - Building BST k=1 end=3.5 outDeg=0 n = v5 k=2 end=4.5 outDeg=0 n = v3 k=3 end=5.5 outDeg=0 n = v6 Lets balance the tree using a left rotation k=4 end=5.7 outDeg=0 n = v2 K=5 End=6.5 outDeg=0 n = v1

63 Step 1 - Building BST k=1 end=3.5 outDeg=0 n = v5 k=2 end=4.5 outDeg=0 n = v3 k=3 end=5.5 outDeg=0 n = v6 Tree is now balanced k=4 end=5.7 outDeg=0 n = v2 K=5 End=6.5 outDeg=0 n = v1

64 Step 1 - Building BST k=1 end=3.5 outDeg=0 n = v5 k=2 end=4.5 outDeg=0 n = v3 k=3 end=5.5 outDeg=0 n = v6 Changed for a better view k=4 end=5.7 outDeg=0 n = v2 K=5 End=6.5 outDeg=0 n = v1

65 Step 1 - Building BST k=1 end=3.5 outDeg=0 n = v5 k=2 end=4.5 outDeg=0 n = v3 k=3 end=5.5 outDeg=0 n = v6 Inserted v7 k=4 end=5.7 outDeg=0 n = v2 K=5 End=6.5 outDeg=0 n = v1 K=6 End=8 outDeg=0 n = v7

66 Step 1 - Building BST k=1 end=3.5 outDeg=0 n = v5 k=2 end=4.5 outDeg=0 n = v3 k=3 end=5.5 outDeg=0 n = v6 Tree is unbalenced. v3, v2, and v1 forms a right right case which is to be solved using a left rotation k=4 end=5.7 outDeg=0 n = v2 K=5 End=6.5 outDeg=0 n = v1 K=6 End=8 outDeg=0 n = v7

67 Step 1 - Building BST k=1 end=3.5 outDeg=0 n = v5 k=2 end=4.5 outDeg=0 n = v3 k=3 end=5.5 outDeg=0 n = v6 Tree is now balenced k=4 end=5.7 outDeg=0 n = v2 K=5 End=6.5 outDeg=0 n = v1 K=6 End=8 outDeg=0 n = v7

68 Step 1 - Building BST k=1 end=3.5 outDeg=0 n = v5 k=2 end=4.5 outDeg=0 n = v3 k=3 end=5.5 outDeg=0 n = v6 Insert v7 k=4 end=5.7 outDeg=0 n = v2 K=5 End=6.5 outDeg=0 n = v1 K=6 End=8 outDeg=0 n = v7 K=7 End=9 outDeg=0 n = v4

69 Step 1 - Building BST k=1 end=3.5 outDeg=0 n = v5 k=2 end=4.5 outDeg=0 n = v3 k=3 end=5.5 outDeg=0 n = v6 V1, v7, v4 forms a right right case requiring to be balanced k=4 end=5.7 outDeg=0 n = v2 K=5 End=6.5 outDeg=0 n = v1 K=6 End=8 outDeg=0 n = v7 K=7 End=9 outDeg=0 n = v4

70 Step 1 - Building BST k=1 end=3.5 outDeg=0 n = v5 k=2 end=4.5 outDeg=0 n = v3 k=3 end=5.5 outDeg=0 n = v6 Tree is now balanced k=4 end=5.7 outDeg=0 n = v2 K=5 End=6.5 outDeg=0 n = v1 K=6 End=8 outDeg=0 n = v7 K=7 End=9 outDeg=0 n = v4

71 Step 1 - Building BST, Done! k=1 end=3.5 outDeg=0 n = v5 k=2 end=4.5 outDeg=0 n = v3 k=3 end=5.5 outDeg=0 n = v6 Better view k=4 end=5.7 outDeg=0 n = v2 K=5 End=6.5 outDeg=0 n = v1 K=6 End=8 outDeg=0 n = v7 K=7 End=9 outDeg=0 n = v4

72 Channel Intervals S5 S3 S6 S2 S1 S7 S4 I 5 I 3 I 2 I 6 I 1 I 7 I 4 A D HCG 2 3 1 4 5 6 7 Step 2 – Construct HNCG

73 Channel Intervals HCG and HNCG 2 3 1 4 5 6 7 Step 2 – Construct HNCG S5 S3 S6 S2 S1 S7 S4 I 5 I 3 I 2 I 6 I 1 I 7 I 4 A D

74 Channel Intervals HNCG 2 3 1 4 5 6 7 Step 2 – Construct HNCG S5 S3 S6 S2 S1 S7 S4 I 5 I 3 I 2 I 6 I 1 I 7 I 4 A D

75 Channel Intervals HNCG 2 3 1 4 5 6 7 Step 2 – Transitive Orientation S5 S3 S6 S2 S1 S7 S4 I 5 I 3 I 2 I 6 I 1 I 7 I 4 A D

76 Similarly, whole graph is made transitively oriented and “outDegree” field of all vertexes are now updated v3 v4 v1 v2 v5 v7 v6 5 6 3 17 2 4 Step 2 – Transitive Orientation

77 While (! tree.empty()){ – min = tree.findMinVertex(); – C = C U min – Tree.delete(min) – If min.outDegree <> 0 then // not a sink Next = tree.findGreaterThan(min.endingPosition) – Else CliqueCover = CliqueCover U C C = Empty } Step 3 – Overview

78 Step 3 - Details k=1 end=3.5 outDeg=4 n = v5 k=2 end=4.5 outDeg=3 n = v3 k=3 end=5.5 outDeg=2 n = v6 k=4 end=5.7 outDeg=2 n = v2 K=5 End=6.5 outDeg=1 n = v1 K=6 End=8 outDeg=0 n = v7 K=7 End=9 outDeg=0 n = v4

79 Step 3 - Details k=1 end=3.5 outDeg=4 n = v5 k=2 end=4.5 outDeg=3 n = v3 k=3 end=5.5 outDeg=2 n = v6 Find min k=4 end=5.7 outDeg=2 n = v2 K=5 End=6.5 outDeg=1 n = v1 K=6 End=8 outDeg=0 n = v7 K=7 End=9 outDeg=0 n = v4

80 Step 3 - Details k=1 end=3.5 outDeg=4 n = v5 k=2 end=4.5 outDeg=3 n = v3 k=3 end=5.5 outDeg=2 n = v6 Find min k=4 end=5.7 outDeg=2 n = v2 K=5 End=6.5 outDeg=1 n = v1 K=6 End=8 outDeg=0 n = v7 K=7 End=9 outDeg=0 n = v4

81 Step 3 - Details k=1 end=3.5 outDeg=4 n = v5 k=2 end=4.5 outDeg=3 n = v3 k=3 end=5.5 outDeg=2 n = v6 Min = v5 Add v5 to Clique, C k=4 end=5.7 outDeg=2 n = v2 K=5 End=6.5 outDeg=1 n = v1 K=6 End=8 outDeg=0 n = v7 K=7 End=9 outDeg=0 n = v4

82 Step 3 - Details k=1 end=3.5 outDeg=4 n = v5 k=2 end=4.5 outDeg=3 n = v3 k=3 end=5.5 outDeg=2 n = v6 Tree.delete (v5) k=4 end=5.7 outDeg=2 n = v2 K=5 End=6.5 outDeg=1 n = v1 K=6 End=8 outDeg=0 n = v7 K=7 End=9 outDeg=0 n = v4 { v5 }

83 Step 3 - Details k=1 end=3.5 outDeg=4 n = v5 k=2 end=4.5 outDeg=3 n = v3 k=3 end=5.5 outDeg=2 n = v6 Tree.delete (v5) k=4 end=5.7 outDeg=2 n = v2 K=5 End=6.5 outDeg=1 n = v1 K=6 End=8 outDeg=0 n = v7 K=7 End=9 outDeg=0 n = v4 { v5 }

84 Step 3 - Details k=1 end=3.5 outDeg=4 n = v5 k=2 end=4.5 outDeg=3 n = v3 k=3 end=5.5 outDeg=2 n = v6 v5.outDeg > 0, so, its not sink, continue tree.findGreaterThan(v5.end) k=4 end=5.7 outDeg=2 n = v2 K=5 End=6.5 outDeg=1 n = v1 K=6 End=8 outDeg=0 n = v7 K=7 End=9 outDeg=0 n = v4 { v5 }

85 Step 3 - Details k=1 end=3.5 outDeg=4 n = v5 k=2 end=4.5 outDeg=3 n = v3 k=3 end=5.5 outDeg=2 n = v6 min = tree.findGreaterThan(v5.end) // 4 (v2) is greater than v5.end = 3.5 k=4 end=5.7 outDeg=2 n = v2 K=5 End=6.5 outDeg=1 n = v1 K=6 End=8 outDeg=0 n = v7 K=7 End=9 outDeg=0 n = v4 { v5 }

86 Step 3 - Details k=1 end=3.5 outDeg=4 n = v5 k=2 end=4.5 outDeg=3 n = v3 k=3 end=5.5 outDeg=2 n = v6 Add min to Clique k=4 end=5.7 outDeg=2 n = v2 K=5 End=6.5 outDeg=1 n = v1 K=6 End=8 outDeg=0 n = v7 K=7 End=9 outDeg=0 n = v4 { v5 }

87 Step 3 - Details k=1 end=3.5 outDeg=4 n = v5 k=2 end=4.5 outDeg=3 n = v3 k=3 end=5.5 outDeg=2 n = v6 Add min to Clique k=4 end=5.7 outDeg=2 n = v2 K=5 End=6.5 outDeg=1 n = v1 K=6 End=8 outDeg=0 n = v7 K=7 End=9 outDeg=0 n = v4 { v5, v2 }

88 Step 3 - Details k=1 end=3.5 outDeg=4 n = v5 k=2 end=4.5 outDeg=3 n = v3 k=3 end=5.5 outDeg=2 n = v6 Now to delete v2, we need to swap v6 (3) and v2 (4) k=4 end=5.7 outDeg=2 n = v2 K=5 End=6.5 outDeg=1 n = v1 K=6 End=8 outDeg=0 n = v7 K=7 End=9 outDeg=0 n = v4 { v5, v2 }

89 Step 3 - Details k=1 end=3.5 outDeg=4 n = v5 k=2 end=4.5 outDeg=3 n = v3 k=3 end=5.5 outDeg=2 n = v6 Now to delete v2, we need to swap v6 (3) and v2 (4) k=4 end=5.7 outDeg=2 n = v2 K=5 End=6.5 outDeg=1 n = v1 K=6 End=8 outDeg=0 n = v7 K=7 End=9 outDeg=0 n = v4 { v5, v2 }

90 Step 3 - Details k=1 end=3.5 outDeg=4 n = v5 k=2 end=4.5 outDeg=3 n = v3 k=4 end=5.7 outDeg=2 n = v2 swapped v6 (3) and v2 (4) k=3 end=5.5 outDeg=2 n = v6 K=5 End=6.5 outDeg=1 n = v1 K=6 End=8 outDeg=0 n = v7 K=7 End=9 outDeg=0 n = v4 { v5, v2 }

91 Step 3 - Details k=1 end=3.5 outDeg=4 n = v5 k=2 end=4.5 outDeg=3 n = v3 k=4 end=5.7 outDeg=2 n = v2 Now delete v2 k=3 end=5.5 outDeg=2 n = v6 K=5 End=6.5 outDeg=1 n = v1 K=6 End=8 outDeg=0 n = v7 K=7 End=9 outDeg=0 n = v4 { v5, v2 }

92 Step 3 - Details k=1 end=3.5 outDeg=4 n = v5 k=2 end=4.5 outDeg=3 n = v3 k=4 end=5.7 outDeg=2 n = v2 Deleted v2 k=3 end=5.5 outDeg=2 n = v6 K=5 End=6.5 outDeg=1 n = v1 K=6 End=8 outDeg=0 n = v7 K=7 End=9 outDeg=0 n = v4 { v5, v2 }

93 Step 3 - Details k=1 end=3.5 outDeg=4 n = v5 k=2 end=4.5 outDeg=3 n = v3 k=4 end=5.7 outDeg=2 n = v2 V2.outDeg > 0, so, not a sink, continue Min = tree.FindGreaterThan(v2.end) k=3 end=5.5 outDeg=2 n = v6 K=5 End=6.5 outDeg=1 n = v1 K=6 End=8 outDeg=0 n = v7 K=7 End=9 outDeg=0 n = v4 { v5, v2 }

94 Step 3 - Details k=1 end=3.5 outDeg=4 n = v5 k=2 end=4.5 outDeg=3 n = v3 k=4 end=5.7 outDeg=2 n = v2 Min = tree.FindGreaterThan(v2.end) // 6 (v7) is greater than 5.7 (end of v2) k=3 end=5.5 outDeg=2 n = v6 K=5 End=6.5 outDeg=1 n = v1 K=6 End=8 outDeg=0 n = v7 K=7 End=9 outDeg=0 n = v4 { v5, v2 }

95 Step 3 - Details k=1 end=3.5 outDeg=4 n = v5 k=2 end=4.5 outDeg=3 n = v3 k=4 end=5.7 outDeg=2 n = v2 Min = tree.FindGreaterThan(v2.end) // 6 (v7) is greater than 5.7 (end of v2) k=3 end=5.5 outDeg=2 n = v6 K=5 End=6.5 outDeg=1 n = v1 K=6 End=8 outDeg=0 n = v7 K=7 End=9 outDeg=0 n = v4 { v5, v2 }

96 Step 3 - Details k=1 end=3.5 outDeg=4 n = v5 k=2 end=4.5 outDeg=3 n = v3 k=4 end=5.7 outDeg=2 n = v2 Add min to clique k=3 end=5.5 outDeg=2 n = v6 K=5 End=6.5 outDeg=1 n = v1 K=6 End=8 outDeg=0 n = v7 K=7 End=9 outDeg=0 n = v4 { v5, v2 }

97 Step 3 - Details k=1 end=3.5 outDeg=4 n = v5 k=2 end=4.5 outDeg=3 n = v3 k=4 end=5.7 outDeg=2 n = v2 Add min to clique k=3 end=5.5 outDeg=2 n = v6 K=5 End=6.5 outDeg=1 n = v1 K=6 End=8 outDeg=0 n = v7 K=7 End=9 outDeg=0 n = v4 { v5, v2, v7 }

98 Step 3 - Details k=1 end=3.5 outDeg=4 n = v5 k=2 end=4.5 outDeg=3 n = v3 k=4 end=5.7 outDeg=2 n = v2 To delete 6 (v7), we need to swap 5 (v1) and 6 (v7) k=3 end=5.5 outDeg=2 n = v6 K=5 End=6.5 outDeg=1 n = v1 K=6 End=8 outDeg=0 n = v7 K=7 End=9 outDeg=0 n = v4 { v5, v2, v7 }

99 Step 3 - Details k=1 end=3.5 outDeg=4 n = v5 k=2 end=4.5 outDeg=3 n = v3 k=4 end=5.7 outDeg=2 n = v2 Swapped 5 (v1) and 6 (v7) k=3 end=5.5 outDeg=2 n = v6 K=6 End=8 outDeg=0 n = v7 K=5 End=6.5 outDeg=1 n = v1 K=7 End=9 outDeg=0 n = v4 { v5, v2, v7 }

100 Step 3 - Details k=1 end=3.5 outDeg=4 n = v5 k=2 end=4.5 outDeg=3 n = v3 k=4 end=5.7 outDeg=2 n = v2 delete 6 (v7) k=3 end=5.5 outDeg=2 n = v6 K=6 End=8 outDeg=0 n = v7 K=5 End=6.5 outDeg=1 n = v1 K=7 End=9 outDeg=0 n = v4 { v5, v2, v7 }

101 Step 3 - Details k=1 end=3.5 outDeg=4 n = v5 k=2 end=4.5 outDeg=3 n = v3 k=4 end=5.7 outDeg=2 n = v2 V7.outDeg is 0, so, v7 is a sink. So, current clique is complete. Hiding deleted vertices and Going to build next clique … k=3 end=5.5 outDeg=2 n = v6 K=6 End=8 outDeg=0 n = v7 K=5 End=6.5 outDeg=1 n = v1 K=7 End=9 outDeg=0 n = v4 { v5, v2, v7 }

102 Step 3 - Details k=2 end=4.5 outDeg=3 n = v3 Min = tree.FindMin() We get 2 (v3) k=3 end=5.5 outDeg=2 n = v6 K=5 End=6.5 outDeg=1 n = v1 K=7 End=9 outDeg=0 n = v4 { v5, v2, v7 }

103 Step 3 - Details k=2 end=4.5 outDeg=3 n = v3 Added 2 (v3) to clique Now delete 2 (v3) k=3 end=5.5 outDeg=2 n = v6 K=5 End=6.5 outDeg=1 n = v1 K=7 End=9 outDeg=0 n = v4 { v5, v2, v7 } { v3 }

104 Step 3 - Details k=2 end=4.5 outDeg=3 n = v3 deleted 2 (v3) Tree is now unbalanced in a right right case k=3 end=5.5 outDeg=2 n = v6 K=5 End=6.5 outDeg=1 n = v1 K=7 End=9 outDeg=0 n = v4 { v5, v2, v7 } { v3 }

105 Step 3 - Details k=2 end=4.5 outDeg=3 n = v3 Rebalancing using a left rotation k=3 end=5.5 outDeg=2 n = v6 K=5 End=6.5 outDeg=1 n = v1 K=7 End=9 outDeg=0 n = v4 { v5, v2, v7 } { v3 }

106 Step 3 - Details k=2 end=4.5 outDeg=3 n = v3 Rebalance using a left rotation k=3 end=5.5 outDeg=2 n = v6 K=5 End=6.5 outDeg=1 n = v1 K=7 End=9 outDeg=0 n = v4 { v5, v2, v7 } { v3 }

107 Step 3 - Details k=2 end=4.5 outDeg=3 n = v3 2 (v3) was not a sink, so continue Tree.findGreaterThan(v3.end) // 5 (v1) is greater than 4.5 (end of v3) k=3 end=5.5 outDeg=2 n = v6 K=5 End=6.5 outDeg=1 n = v1 K=7 End=9 outDeg=0 n = v4 { v5, v2, v7 } { v3 }

108 Step 3 - Details k=2 end=4.5 outDeg=3 n = v3 Tree.findGreaterThan(v3.end) // 5 (v1) is greater than 4.5 (end of v3) Add v1 to clique k=3 end=5.5 outDeg=2 n = v6 K=5 End=6.5 outDeg=1 n = v1 K=7 End=9 outDeg=0 n = v4 { v5, v2, v7 } { v3, v1 }

109 Step 3 - Details k=2 end=4.5 outDeg=3 n = v3 Swap 3 (v6) and 5 (v1) k=3 end=5.5 outDeg=2 n = v6 K=5 End=6.5 outDeg=1 n = v1 K=7 End=9 outDeg=0 n = v4 { v5, v2, v7 } { v3, v1 }

110 Step 3 - Details k=2 end=4.5 outDeg=3 n = v3 Swapped 3 (v6) and 5 (v1) K=5 End=6.5 outDeg=1 n = v1 k=3 end=5.5 outDeg=2 n = v6 K=7 End=9 outDeg=0 n = v4 { v5, v2, v7 } { v3, v1 }

111 Step 3 - Details k=2 end=4.5 outDeg=3 n = v3 Now we can easily delete 5 (v1) K=5 End=6.5 outDeg=1 n = v1 k=3 end=5.5 outDeg=2 n = v6 K=7 End=9 outDeg=0 n = v4 { v5, v2, v7 } { v3, v1 }

112 Step 3 - Details k=2 end=4.5 outDeg=3 n = v3 deleted 5 (v1) Min=tree.FindGreaterThan(v1.end) // 7 (v4) is greater than 6.5 K=5 End=6.5 outDeg=1 n = v1 k=3 end=5.5 outDeg=2 n = v6 K=7 End=9 outDeg=0 n = v4 { v5, v2, v7 } { v3, v1 }

113 Step 3 - Details k=2 end=4.5 outDeg=3 n = v3 v1 was not a sink, so we can continue Add v4 to clique K=5 End=6.5 outDeg=1 n = v1 k=3 end=5.5 outDeg=2 n = v6 K=7 End=9 outDeg=0 n = v4 { v5, v2, v7 } { v3, v1, v4 }

114 Step 3 - Details k=2 end=4.5 outDeg=3 n = v3 Delete v4 K=5 End=6.5 outDeg=1 n = v1 k=3 end=5.5 outDeg=2 n = v6 K=7 End=9 outDeg=0 n = v4 { v5, v2, v7 } { v3, v1, v4 }

115 Step 3 - Details k=2 end=4.5 outDeg=3 n = v3 Delete v4 K=5 End=6.5 outDeg=1 n = v1 k=3 end=5.5 outDeg=2 n = v6 K=7 End=9 outDeg=0 n = v4 { v5, v2, v7 } { v3, v1, v4 }

116 Step 3 - Details k=2 end=4.5 outDeg=3 n = v3 Deleted v4 K=5 End=6.5 outDeg=1 n = v1 k=3 end=5.5 outDeg=2 n = v6 K=7 End=9 outDeg=0 n = v4 { v5, v2, v7 } { v3, v1, v4 }

117 Step 3 - Details k=2 end=4.5 outDeg=3 n = v3 V4.outDeg was zero, hence current clique is complete. Hiding deleted vertices for clarity K=5 End=6.5 outDeg=1 n = v1 k=3 end=5.5 outDeg=2 n = v6 K=7 End=9 outDeg=0 n = v4 { v5, v2, v7 } { v3, v1, v4 }

118 Step 3 - Details Min=tree.findMin() // we get 3 (v6) Add to clique k=3 end=5.5 outDeg=2 n = v6 { v5, v2, v7 } { v3, v1, v4 } { v6 }

119 Step 3 - Details delete 3 (v6) k=3 end=5.5 outDeg=2 n = v6 { v5, v2, v7 } { v3, v1, v4 } { v6 }

120 Step 3 - Details deleted 3 (v6) Tree is now empty, so we stop and we are done! We have found 3 minimum cliques in our clique cover! { v5, v2, v7 } { v3, v1, v4 } { v6 }

121 Reference Multi-Layer Channel Routine Complexity and Algorithms by Rajat K. Pal Graph theory and its applications to problems of society by Fred S. Roberts Introduction to Graph Theory by Douglas B. West Slide 2 -> 3 is from teacher.buet.ac.bd/saidurrahman/cse6404 Slide 4 -> 5 from Mr. Jawaherul and 14 -> 47 from Mr. Emran From en.wikipedia.org, Binary_search_tree, Tree_rotation, Self-balancing_binary_search_tree webpages.ull.es/users/jriera/Docencia/AVL/AVL%20tree%20a pplet.htm

122 © www.awesomebackgrounds.com

123 Suggestions Please feel free to send comments / suggestions / criticisms to Annajiat Alim Rasel annajiat @ gmail. com 01711935759 http://annajiat.googlepages.com


Download ppt "Multi-Layer Channel Routing Complexity and Algorithms Rajat K. Pal Annajiat Alim Rasel 0409052002 CSE 6404 VLSI Layout Algorithms Page."

Similar presentations


Ads by Google