Download presentation
Presentation is loading. Please wait.
1
Homework #6: Local Access Design
Given the topology below, the weight of each node is 1, and W = 3 a) apply the greedy CMST algorithm. b) apply the Esau-Williams algorithm. Highlight the trees (components) selected. 4/15/2019 C. Edward Chow
2
Solution to Hw#6 Solution a): Greedy MST. First sort the edge cost in increasing order. Edge Cost CMST Decision (1,4) 1 select (2,3) (0,1) 2 (3,5) (0,5) 5 Select, Done! (2,4) (1,2) 6 (1,3) 7 (0,2) 8 4/15/2019 C. Edward Chow
3
Solution to Hw#6(2) Solution b) Esau-Williams Algorithm
begin by computing the tradeoffs for the nearest neighbors of each node (since that link will have smallest cost and yield a low trade-off values): t14 = c14 - cc1 = = t23 = = t32 = = t41 = = t53 = c53 - cc5 = = -3 starting with t41 which is the lowest tradeoff value, we add link (4,1) to subtrees, now cc4 = 2 since node 4 now connected to the center through node 1, find the next nearest neighbor of 1 to be 0, t10=2-2=0 let us now compute the tradeoff between node 4 and the next nearest neighbor to node 4 (which is node 2), t42 = c42 - cc4 = 5 -2 = 3 4/15/2019 C. Edward Chow
4
Solution to Hw#6(3) Now t32 has the lowest tradeoff value, add link (3,2) to the subtrees, now cc3 = 8 and the next nearest neighbor to node 3 is 5, t35 = = -6 We also need to update t23 since (2,3) is chosen. The next nearest neighbor to node 2 is 4, t24 = = -3 Select t35=-6, add link(3,5) to the subtrees. N ow Cc2=Cc3=Cc5=5, we need to update t31=7-5=2 t24=5-5=0 t50=5-5=0 Select (1,0) add link (1,0) to the subtrees. Reject (2,4) since it will create a component of weight = 4. Select (5,0) add link (5,0) to the subtrees. Now all nodes are connected to node 0. Note that the algorithm always terminates with links whose tradeoffs are 0. We will never consider any links with positive tradeoff. 4/15/2019 C. Edward Chow
5
Solution to Hw#6(4) The solution has a cost of 11.
Both EW algorithm and GMST find optimal solution but GMST is much faster. 4/15/2019 C. Edward Chow
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.