hw8_sol - Homework 8 March 31, 2009 Solution to Exercise...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Homework 8 March 31, 2009 Solution to Exercise 2(a), page 241 . The problem is the same as the Cable connec- tion for Midwest TV Company with an addi- tional link { 5 , 6 } of length 2. We can apply the minimum spanning tree algorithm starting with any node. Iteration 1: Suppose we start with node 1. Looking across all the link connecting node 1 with the remaining nodes, we find that link { 1 , 2 } has the smallest weight (i.e., distance). We choose node 2, and we place node 1 and 2 in the same set. Iteration 2: We now consider links crossing from the set { 1 , 2 } to the set { 3 , 4 , 5 , 6 } of the remaining nodes. Among the links connecting these two sets, we find that link { 2 , 5 } has the smallest weight, and we move node 5 in the set with nodes 1 and 2. Iteration 3: We now consider links crossing from the set { 1 , 2 , 5 } to the set { 3 , 4 , 6 } of the remaining nodes. Among the links connecting these two sets, we find that link { 5 , 6 } has the smallest weight, and we move node 6 in the set with nodes 1,2 and 5. 1 Iteration 4: We now consider the links cross- ing from the node set { 1 , 2 , 5 , 6 } to the node set { 3 , 4 } . Of all the links connecting these two sets, we find that link { 4 , 6 } has the smallest weight (weight of 3), and we move node 4 in the set with nodes 1,2,5 and 6. Iteration 5: We now consider links the cross- ing from the set { 1 , 2 , 4 , 5 , 6 } to the singleton set consisting of node 4 only. Among the links connecting the set with node 4, we find that there are two links { 3 , 4 } and { 1 , 3 } that have the smallest weight of 5. We can choose ei- ther of the links and obtain a smallest weight spanning tree. We have two solutions corresponding to these choices. The last figure to the right shows one solution, while the figure below shows the other solution....
View Full Document

Page1 / 9

hw8_sol - Homework 8 March 31, 2009 Solution to Exercise...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online