Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Networks ppt

192 views

Published on

  • Be the first to comment

  • Be the first to like this

Networks ppt

  1. 1. Networks • Minimum spanning tree • Maximum flow • Minimum distance
  2. 2. Networks A G F C H B D E 38 18 25 34 40 52 36 35 20 22 24 75 20
  3. 3. Minimum Spanning tree : shortest way between ALL points A G F C H B D E 38 18 25 34 40 52 36 35 20 22 24 75 20 30
  4. 4. D A C G E B H 26 30 40 52 94 33 40 23 40 50 30 20 F50 26 Minimum Spanning tree : shortest way between ALL points
  5. 5. Networks A B C D E F G A - - 310 - 300 - 620 B - - 550 430 530 330 - C 310 550 - - 350 - - D - 430 - - - 210 390 E 300 530 350 - - 380 360 F - 330 - 210 380 - - G 620 - - 390 360 - - You can start at ANY node, but let’s choose A • Decide row/column (lets choose column) • If you choose a column, rule out the LINE for A • Find the shortest connection from A • Now Rule out the rest of row E • look at both columns for A and E for shortest connection • Rule out the rest of row C • Now we look at columns A, E, C for shortest connection • Rule out rest of row G • Include column G, find shortest from A, E, C, G Prim’s algorithm: Minimum Spanning Tree: AC, AE, EF, EG, FB, FD
  6. 6. Maximum flow: The maximum flow from the source, that reaches the endpoint (sink) 50 40 10 30 40 30 20 A B X C D A-B-X = 40 10 0 A-B-C-X = 100 0 30 A-C-X = 30 0 0 A-D-X = 20 10 0 Total = 100
  7. 7. The End

×