Professional Documents
Culture Documents
I Introduction(Contd..) d i (C d )
Virendra Singh g Indian Institute of Science g Bangalore
virendra@computer.org
Design of VLSI Systems Complex p system y Need systematic methodology Algorithms Can be automated Sh ld h Should handle dl very l large d designs i
E0-285@SERC
St t l D Structural Domain i
Processors ALU, RAM, .. Gates, FFs, .. Transistors Transistor Layout Cell Layout Module Layout Floorplan Physical Partitions
Physical Domain
Aug 17, 2010 E0-285@SERC
Algorithms
z z z z z z z
Mostly M l i intractable bl problems bl Exact Algorithms Approximate algorithms Branch and Bound Dynamic y Programming g g Greedy Algorithms Soft computing techniques
E0-285@SERC
Algorithms
z
A Graph G(V, E) is a pair (V, E), where V is a set and E is a relation on V Directed Graph - the edges are ordered pairs of vertices Undirected Graph p edges g are unordered p pairs
E0-285@SERC
*
3
*
7
*
dx y
*
+
yl
8
xl
+ <
c
10
a
*
4
11
ul
E0-285@SERC 7
Graph Representation
1 d 4 a e c 3
1
2 b
2 1 0 0 0
3 1 1 0 0
4 1 0 1 0
1 2 3 4
0 0 0 0
E0-285@SERC
Graph Representation
1 d 4 a e c 3 2 b 2 3 4 1
2
3 4
E0-285@SERC
Graph Algorithms
Shortest h Path h Algorithms l h
Longest g Path Algorithms g Traveling Salesman Problem Maximal M i l Cliques Cli Graph Colouring Vertex Covering Minimum Spanning Tree
Aug 17, 2010 E0-285@SERC 10
Graph Algorithms
z z z z z z
Mostly intractable problems Approximate algorithms B Branch h and dB Bound d Dynamic Programming Greedy Algorithms Soft computing techniques
E0-285@SERC
11
Graph Algorithms
z z
10
1
30 10
100
Greedy algorithm Make local decision g greedily y Gives shortest path from a
source node
5
60
20
E0-285@SERC
12
Dijkstras Algorithms
10
1
30 10
Iter. S 100
V-S
w 2 4 3 5
D[2] 10 10 10 10 10
Init {1} {2 {2,3,4,5} 3 4 5} 1 2 3 4 {1,2} {3,4,5} {1,2,4} {3,5} {1,2,4,3} {5} {1,2,4,3,5}
2
50
5
60
20
E0-285@SERC
13
Dijkstras Algorithms
z z z
10
1
30 10
100
2 3
5
60
D[i] = C [1,i] initialize Choose a vertex w in V-S s.t. D[w] is minimum Add w to S F each For h vertex t v in i V-S V S do d
20
end
Aug 17, 2010 E0-285@SERC 14
Floyds Algorithms
z z
Make local decision and refine it later Gives shortest p path for all p pairs
2 8
2
5
E0-285@SERC
15
Floyds Algorithms
2 8
2
5
1 2 1 0 8 2 3 3 0 2 A0[i,j]
Aug 17, 2010
3 5 0
1 1 0 2 3 3
2 8 0
3 5 8 0
A1[i,j]
E0-285@SERC 16
Floyds Algorithms
2 8
2
5
1 2 1 0 8 2 3 3 5 A2[i,j]
Aug 17, 2010
3 5 8 0
1 1 0 2 3 3 5 A3[i,j]
E0-285@SERC
2 7 0 2
3 5 8 0
0 2
17
Floyds Algorithms
z z z
For j = 1 to n do
2
5
For I = 1 to n do
A[I i] = 0 A[I,i]
For i = 1 to n do
For j = 1 to n do
end
Aug 17, 2010 E0-285@SERC 18
Spanning Tree
z z z z
Free three F th that th t connects t all ll the th vertices ti Cost of a spanning tree is sum of edges Minimum Spanning Tree (MST) Prims Algorithm
Greedy algoritthm Start from an intial node U = {1} Grows G ST, ST one edge d at t a time ti At each step, it finds a shortest edge (u,v) that connects U and V V-U U and adds v to V V-U U from U
Aug 17, 2010 E0-285@SERC 19
Prims Algorithm
6
1
5 6 1
5 5 4
1 4
2
2
3
3
6
2
3
4
4 2
E0-285@SERC
20
Prims Algorithm
2
3 6 5 6
1
1
5 5 4
1 4 6 2 5 1 3 4 6 4
3
6 1
4 6
2
2 5
1 3
1 4 4 6 2 5 2 5 1 3 4 4 6
E0-285@SERC
1 2 3 5
21
2 5
1 3
1 3 4 4 6 2
Kruskals Algorithm
z z z
Start with a graph t = (V,) only vertices Each vertex is connected component in itself As algorithm progresses, To build progressively larger connected component
Have collection of connected components For each component select an edge for ST
Examine edges for E in order of increasing cost If the edge connects two vertices in two different connected component, tthen add edge to T
E0-285@SERC 22
Kruskals Algorithm
2
3 6 5 6
1
1
5 5 4
3
6 1
4 6
2
2 5
1 3 6
2 5
1 1 3 6
4 2
1 1 4 2 6 2 3 5 3 4 4 6
E0-285@SERC
1 2 3 5
23
2 3 5
1 3
1 3 4 4 6 2
Vertex Covering of an undirected graph G is a subset of the vertices s.t. each edge in E has h at t least l t one edge d in i th that t subset b t Heuristic
Select vertex with largest degree Deletion of a vertex corresponds to the removal
of f vertex itself i lf and d all ll edges d i incident id to i it
E0-285@SERC
24
3 1
Aug 17, 2010
4 2
3 1
E0-285@SERC
4 2
25
z z
Graph G h colouring l i problem bl of f an undirected di t d graph G is a labeling of vertices such that no edge in E has two end end-points points with the same label Search for a vertex colouring with minimum number of colours Most algorithms are based on sequential scan of vertex set where vertices are coloured one at a time
Aug 17, 2010 E0-285@SERC 26
THANK YOU
Aug 17, 2010 E0-285@SERC 27