certain that it will be safe to include the shortest edge across the cut, in this case (d,j). The argument is once again
exactly the same: We build an alternative tree, which will necessarily include at least one other edge across the cut
(in order to keep the graph connected). If we then add (d,j), at least one of the other, longer edges across the cut would
be part of the same cycle as (d,j), meaning that it would be safe to remove the other edge, giving a smaller spanning tree.
You can see how the two first ideas are special cases of this “shortest edge across a cut” principle: Choosing the
shortest edge in the graph will be safe because it will be shortest in every cut in which it participates, and choosing the
shortest edge incident to any node will be safe because it’s the shortest edge over the cut that separates that node from
Do'stlaringiz bilan baham: |