Cramster.com - Homework Solutions, Lecture Notes, Exams, and Free Online Homework Help
Sign Up Now! Login Customer Support Cramster Blog
McAfee Secure sites help keep you safe from identity theft, credit card fraud, spyware, spam, viruses and online scams
Problem Solved.
    Home    
    Homework Help    
   Answer Board   
    Resources (Beta)    
   
Member's Topic Headline:

algo pleeeeeeeez

Know the answer? Have a better solution? Share it.
Sign Up Now for FREE!
Join the thousands of students
getting ahead in their classes.
Member Testimonials

Question:

Advertisement:

Answer | Ask New Question | Customize Profile | Leaderboards | 
FAQ

Member's Avatar

Rookie
Karma Points: 0
Respect (49%):
Date Posted: 7/21/2008 10:45:41 AM  Status: Live
algo pleeeeeeeez
Course Textbook Chapter Problem
N/A N/A N/A N/A
Question Details:
Question No. 01                                                                      [20 Marks]
Run Kruskal’s algorithm on the above graph. Show each step.
  
 
 
Note: each step carries marks so do all steps.

Answers:

Member's Avatar

Expert
Karma Points: 811
Date Posted: 7/21/2008 11:52:22 AM  Status: Live
Asker's Rating: Helpful   
Response:
 
1. Init the graph, each node is a seprate 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.
 
Barilla's Comment:
thanxxxxxxxxxxxxxxxxxx




By reading or posting messages on these forums, you are agreeing to the Answer Board's Terms of Service and Conduct (TSC).


About Cramster | Terms of Use | Privacy Policy | Contact Us | Press Room | Site Map | Support | Anti-Cheating Policy

Cramster.com is not affiliated with any publisher. Book covers, title and author names appear for reference only.
Copyright © 2008 Cramster, Inc.