DFS和深度树
我需要确定以下陈述是对还是错。如果为true,请说明为什么,如果false给出反例。
令T为图G和源顶点s上的DFS算法产生的深度树。 G是一个无向图,其周期为3个顶点。 因此,不包含从G中的S到其他顶点的所有最短途径。
我认为这是真的,但我不知道如何证明它或解释为什么
I need to decide whether the following statement is true or false. If true, explain why, if false give a counterexample.
Let T be the depth-tree resulting from running the DFS algorithm on a graph G and a source vertex s.
G is an undirected graph with a cycle of exactly 3 vertices.
So T necessarily does not contain all the shortest paths from s to the other vertices in G.
I think it's true but I don't know how to prove it or to explain why
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这有点棘手,因为图G可能包含其他周期。三个周期可能会嵌入到树上的多种方式,可能是循环中边缘的 nonne 完全在树上,因此很难通过将所有可能的嵌入分为几种情况。
我认为最简单的证明方法是:
This is a little tricky, because the graph G may contain other cycles. There are many ways that the 3-cycle might be embedded in the tree, and it may be that none of the edges in the cycle are in the tree at all, so it's difficult to make a proof by dividing all the possible embeddings into a few cases.
I think the easiest way to prove this is: