Take the 2-minute tour ×
Computer Science Stack Exchange is a question and answer site for students, researchers and practitioners of computer science. It's 100% free, no registration required.

I am suppose to create a minimum spanning tree from this graph below

enter image description here

I got this answer

enter image description here

However this is my textbook answer

enter image description here

Based on what i have learnt , I think my answer and the textbook answer would both be acceptable however I would like assurance from the community that both the answers are acceptable and I did not miss anything out

Thanks

share|improve this question
    
Both of those appear to be minimum spanning trees, yes. Does the book say that you should use a specific algorithm to calculate the tree? If so, you should check carefully whether that algorithm would produce your tree or the book's. If the book doesn't specify an algorithm, then including an exercise with two answers but only printing one of those answers is a small error in the book. –  David Richerby Jul 26 at 8:02
4  
If you obtain a) a spanning tree with b) the same (minimal) total weight as the textbook solution, why do you doubt? –  Raphael Jul 26 at 8:59

1 Answer 1

It is possible to have different minimum spanning trees for a graph. Consider a simple example: a cycle graph with all weights equal. Removing any edge from the graph produces a minimum spanning tree for the cycle graph.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.