Depth of BFS Tree With Different Root Nodes

1.3k Views Asked by At

I need to either prove or disprove that for any node of a graph, the depth of the BFS tree using this node as root is always the same. My intuition is that this is true, but I'm having difficulty constructing a proof, is this correct? If so, could someone offer a hint? If not, could someone suggest a counterexample?

1

There are 1 best solutions below

0
On BEST ANSWER

It is always true. You just need to show that the vertices on the $i$'th level of BFS tree, are the vertices with distance $i$ to the root. So the depth of BFS tree will be always the longest shortest distance from the root to other vertices in the graph.