Question: Draw two distinct graphs G 1 and G 2 on 7 vertices {a; b; c; d; e; f; g} such that (i) a DFS starting
Draw two distinct graphs G1 and G2 on 7 vertices {a; b; c; d; e; f; g} such that (i) a DFS starting at a of
G1 visits the vertices of G1 in the same order as a BFS starting at a of G1 , AND (ii) a DFS starting at a
of G2 visits the vertices of G2 in the same order as a BFS starting at a of G2 .
Note. If DFS has several choices, it chooses the vertex that comes rst in the alphabetical ordering. For
example, if c and e can both be visited next, DFS chooses c.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
