this is kind of tricky.
if you suppose that this sub-tree is rooted on source, then its easy
to see that the sub-tree will be a set of shortest paths between
the source and the other nodes, making it be a SPT ROOTED ON SOURCE.
otherwise, it wont be a SPT, cause if its rooted on some other node
(instead of source), the path from the root to other node (different
from source) may not be minimum.
证明(非正式):让你在K中成为一个顶点 . 因为,u也在V中,Ts给出的路径p = s - > u是最短的 . 假设,T 's is not a shortest path tree of G' . 然后路径p = s - > u由T 's is not the shortest in G'给出 . 这意味着,存在另一个顶点v(在K中为\),使得p不包含v,而v创建了一个类似s - > v - > u的快捷方式 .
由于Ts给出的路径p = s - > u是G中最短的,所以p必须在s和u之间的某处包含v,这导致矛盾 .
2 回答
好吧,我猜这个SPT(最短路径树)只是一个从源到另一个节点的边缘的树(如果它不是这样的cos,它可能包含循环) .
然后,如果您选择原始SPT的某个子树,您将必须保留树的属性,然后我们有一些情况:
我猜您对源自源的子树感兴趣,但很容易看到子树只包含最短路径(因为它是SPT本身的子树),然后它将是一个SPT .
由于问题不够明确,我认为你的问题如下 -
你可以通过矛盾来证明 .
证明(非正式):让你在K中成为一个顶点 . 因为,u也在V中,Ts给出的路径p = s - > u是最短的 . 假设,T 's is not a shortest path tree of G' . 然后路径p = s - > u由T 's is not the shortest in G'给出 . 这意味着,存在另一个顶点v(在K中为\),使得p不包含v,而v创建了一个类似s - > v - > u的快捷方式 .
由于Ts给出的路径p = s - > u是G中最短的,所以p必须在s和u之间的某处包含v,这导致矛盾 .