Discrete Mathematics and Its Applications, Seventh Edition

Published by McGraw-Hill Education
ISBN 10: 0073383090
ISBN 13: 978-0-07338-309-5

Chapter 11 - Section 11.4 - Spanning Trees - Exercises - Page 797: 47

Answer

Using mathematical induction to prove that breadth-first search visits vertices in order of their level in the resulting spanning tree.

Work Step by Step

-Because the edges not in the spanning tree are not followed in the process, we can ignore them. -Thus we can assume that the graph was a rooted tree to begin with. ---The basis step is trivial (there is only one vertex), so we assume the inductive hypothesis that breadth-first search applied to trees with n vertices have their vertices visited in order of their level in the tree and consider a tree T with n+1 vertices. -The last vertex to be visited during breadth-first search of this tree, say v, is the one that was added last to the list of vertices waiting to be processed. - It was added when its parent, say u, was being processed. -We must show that v is at the lowest (bottom-most, i.e., numerically greatest) level of the tree. - Suppose not; say vertex x, whose parent is vertex w, is at a lower level. -Then w is at a lower level than u. -Clearly v must be a leaf, because any child of v could not have been seen before v is seen. - Consider the tree T obtained from T by deleting v. By the inductive hypothesis, the vertices in T must be processed in order of their level in T (which is the same as their level in T , and the absence of v in T has no effect on the rest of the algorithm). --Therefore u must have been processed before w, and therefore v would have joined the waiting list before x did, a contradiction. --Therefore v is at the bottom-most level of the tree, and the proof is complete.
Update this answer!

You can help us out by revising, improving and updating this answer.

Update this answer

After you claim an answer you’ll have 24 hours to send in a draft. An editor will review the submission and either publish your submission or provide feedback.