Breadth First Search

1. Consider the following graph:
Vertices, V = [a, b, c, d, e, f]
Edges, E = [[a, b], [a, c], [b, d], [b, e], [c, e], [c, f]]
Where each array within E signifies an edge between the two mentioned vertices.
How many queue-deletion iterations are required for BFS to completely traverse this graph when starting from vertex 'a' and marking each vertex as visited when it is first added to the queue?

Explanation

Explanation

Explanation

Explanation

2. When comparing the auxiliary space requirements of BFS and DFS on a graph, under what condition can BFS require more space than DFS? Here, BFS space is associated with the maximum frontier size and DFS space with the maximum depth of the traversal.
Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

3. What is the main reason BFS can be used to find shortest paths in an unweighted graph?
Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

4. Which statement correctly describes the role of the queue in BFS?
Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

5. Consider a graph with V|V| vertices and E|E| edges represented by adjacency lists. What is the time complexity of BFS when all reachable vertices and their adjacency lists are processed?
Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

6. A BFS implementation marks a vertex as visited only when it is removed from the queue instead of when it is first discovered. What problem can arise in a graph where multiple vertices have edges to the same unvisited vertex?
Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

7. Consider an unweighted graph in which BFS assigns distance 00 to the source vertex. If vertex xx receives distance 44, what does this distance represent?
Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

8. In a BFS traversal of a connected graph, a vertex is placed in the queue when it is first discovered. Which statement about that vertex is correct?
Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

9. Consider an unweighted graph where two different paths from source ss to vertex vv contain 3 and 5 edges respectively. If BFS reaches vv through the path containing 3 edges first, what distance should BFS assign to vv?

Explanation

Explanation

Explanation

Explanation

Explanation