Computer Science Stack Exchange is a question and answer site for students, researchers and practitioners of computer science. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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


share|cite|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 '14 at 8:02
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 '14 at 8:59

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|cite|improve this answer

Your Answer


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.