Answer
Describing the trees produced by breadth-first search and depth-first search of the wheel graph Wn, starting at the vertex of degree n, where n is an integer with n ≥ 3.
Work Step by Step
--With breadth-first search,
- the initial vertex is the middle vertex, and the n spokes are added
to the tree as this vertex is processed.
Thus,
- the resulting tree is K1,n.
With depth-first search, we start at the vertex in the
middle of the wheel and visit a neighbor—one of the vertices
on the rim.
-From there we move to an adjacent vertex on the
rim,
- and so on all the way around until we have reached every
vertex.
Thus,
-- the resulting spanning tree is a path of length n.