The Student Room Group

How do I draw a minimum spanning tree when given the distance matrix?

I get what both of them are, but surely there are many combinations of graphs that fit n vertices and the distances?
How do I know what vertices connect with each other?
Use an algorithm like prims algorithm
Reply 2
Original post by gyuigygh
Use an algorithm like prims algorithm

Thank you!
how would I know where the vertices go in relation to each other? say if the distance between A and B is 10:
Like B could be directly below A, it could be 30 degrees to its left, etc. surely it could be anywhere in a circle of radius 10 around A?
Original post by flumefan1
Thank you!
how would I know where the vertices go in relation to each other? say if the distance between A and B is 10:
Like B could be directly below A, it could be 30 degrees to its left, etc. surely it could be anywhere in a circle of radius 10 around A?

Pretty sure it doesn't matter. Just make it so that the edges don't cross over each other.
You can even draw it in the shape of a generic tree graph.
(edited 3 years ago)
Reply 4
Original post by gyuigygh
Pretty sure it doesn't matter. Just make it so that the edges don't cross over each other.
You can even draw it in the shape of a generic tree graph.

okay thank you! so it doesn't matter if my graph looks completely different to the one in the answers, as long as the weights are the same and stuff?
thank you!

Quick Reply

Latest