Question
Which of the following traversal algorithms is
guaranteed to visit all vertices in the minimum number of edges in an unweighted graph?Solution
In an unweighted graph, Breadth-First Search (BFS) is optimal for finding the shortest path in terms of the number of edges. BFS explores all vertices at the current depth level before moving on to the next level, ensuring that the shortest path is found when the destination vertex is first encountered. For unweighted graphs, the edge count represents the path cost, and BFS efficiently identifies the shortest path by expanding vertices layer by layer. Why Other Options Are Incorrect: 1. Depth-First Search (DFS): DFS explores as far as possible along a branch before backtracking, which does not guarantee the shortest path in terms of edges. 2. Dijkstra’s Algorithm: While Dijkstra’s algorithm is used for weighted graphs, it is not necessary for unweighted graphs where BFS suffices. 3. Prim’s Algorithm: Prim’s algorithm is used for finding minimum spanning trees, not shortest paths. 4. Bellman-Ford Algorithm: While Bellman-Ford can handle negative weights, it is computationally expensive compared to BFS for unweighted graphs.
When were the National Energy Conservation Awards (NECA) instituted?
Which country emerged as the third-largest exporting platform in India?
Who has been appointed as the Chairperson of the United Nations Internal Justice Council?
What strategic initiative did Google Pay and NPCI International Payments recently sign an agreement for?
What technological initiative under e-NAM helps in the quality assaying of agricultural produce?
Who was the first winner of the Arjuna Award in Kabaddi?
What is the IMF’s GDP growth projection for India in 2025-26, as per its World Economic Outlook?
Which state won the IDCA Under-19 T20 cricket championship in 2024?
What was Joby Mathew’s previous personal best lift before the Cairo 2025 Championship?
For which type of InvITs will the OFS trading lot be the same as the trading lot prescribed in the secondary market under SEBI's Infrastructure Investme...