Q BgQuestion:

Rookie
Karma Points: 4
Respect (68%):
posted by  A.Shah on 7/22/2008 2:28:10 PM  |  status: Live  

Algorithms

Course Textbook Chapter Problem
N/A N/A N/A N/A
Question Details:

AAnswers:

Answer Question
Expert
Karma Points: 811
posted by sam_GT on 7/22/2008 11:33:17 PM  |  status: Live
Asker's Rating: Helpful   
A.Shah's comment:
"thanx"
Response Details:
1. Init the graph, each node is a different tree.
 
 
 
2. Arrage edges in ascending order.
 1.( N1,N2) (N7,N8)
 2. (N2,N3)
 3. (N1,N6)
 4. (N2,N6) (N3,N4)
 5. (N2,N7)
 6. (N3,N7) (N4,N8)
 7. (N4,N7) (N4,N5)
 8. (N6,N7) (N5,N8)
 
Add these edges in forest until all tree become a single tree & there is no loop in tree.
 
Adding edges of weight 1.
 
 
 
 
 
 
Adding edges of weight 2,3
 
 
 
Adding (N2,N6) will make loop so not adding it, adding (N3,N4) (N2,N7)
 
 
Adding of (N3,N7) (N4,N8) (N4,N7) will make loop so not adding these nodes.
Now adding (N4,N5)
 
 
 
Now adding of (N6,N7) & (N5,N8) will make loop so i will ignore these edges.
 
Hence no edges are left, the above tree is minimum spanning tree.
Answer Question
Ask New Question

Join Cramster's Community

Cramster.com brings together students, educators and subject enthusiasts in an online study community. With around-the-clock expert help and a community of over 100,000 knowledgeable members, you can find the help you need, whenever you need it. Join for free today »