Asked • 04/21/19

Minimum spanning tree vs Shortest path?

What is the difference between minimum spanning tree algorithm and a shortest path algorithm?In my data structures class we covered two minimum spanning tree algorithms (Prim's and Kruskal's) and one shortest path algorithm (Dijkstra's). Minimum spanning tree is a tree in a graph that spans all the vertices and total weight of a tree is minimal. Shortest path is quite obvious, it is a shortest path from one vertex to another. What I don't understand is since minimum spanning tree has a minimal total weight, wouldn't the paths in the tree be the shortest paths? Can anybody explain what I'm missing?Any help is appreciated.

1 Expert Answer

By:

Isaac W. answered • 12/04/20

Tutor
5 (35)

Tutor for Computer Science at UH

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.