What is the minimum mating of a Dijkstra tree?

I'm having trouble finding an example algorithm for the Dijkstra Minimum Spanning tree. I already know about Dijkstra's Single Shortest Path, but not a spanning tree. I have a simple explanation from the class:

For each edge, add it to the tree. If a loop is detected, remove the heaviest edge.

I browsed the Internet and I could not find an algorithm for it.

I might just need to code it for myself, but I thought I'd ask if anyone had a good example.

Can anyone help?

+4
source share
1 answer

Here is a simple example:

enter image description here

The algorithm works as follows:

  • The graph has gray edges.
  • Adding some edges without circle detection.
  • . (), .
  • . , .
  • , . 3 . (5).

, . , .

. (5) , , (3) Spanning Tree. .

+5

Source: https://habr.com/ru/post/1695927/


All Articles