Will a minimum spanning tree and shortest path tree always share at least one edge?

前端 未结 2 452
花落未央
花落未央 2021-02-07 20:27

I\'m studying graph theory and I have a question about the connection between minimum spanning trees and shortest path trees.

Let G be an undirected, co

2条回答
  •  离开以前
    2021-02-07 21:23

    Proof To vertex s and its shortest-path tree Ts, the wedge in MST T is w(s, v) ,and suppose it doesn't exist in Ts . then there must be a shorter path from v to s,and there is a vertex in the path(because w(s, v) is not the shortest path),which suppose to be p, and makes s->p->v, w(s, v) >= path(s->p->v). Remove w(s, v) and add w(s, p) in T , when all edge are positive and different, w(s, p) < w(s, v). we get a less minimum spanning tree T '.

    But T is an MST.Here is the contradiciton. Assumption does not hold, which prove that T and Ts have to share at least one edge, and it is w(s, v) in MST T.

    If there is a weight with 0 cost, the situation is alike. You can suppose the two vertex which w(a,b) = 0 are the same vertex, and remove one of them. The proof works when weights are non-negative.

    when some weights are negative and w(s, p) > w(s ,v), that is, w(p ,v) <0, w(s, v) >= path(s->p->v) can't make w(s, p) < w(s, v).But in MST T, w(s, v) should also not exist,because path(s->p->v) makes s to v with less cost, replace w(s, v) in T with w(s, p) and w(p, v) if necessary makes a a less minimum spanning tree T '. Still contradiciton.

提交回复
热议问题