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.
Which committee recommended the 40% PSL target to be achieved by 1985, along with sub-targets for agriculture and weaker sections?
As per Union Budget 2025-26, what is the revised credit guarantee cover for startups under the government’s initiative?
Which combination of positions will tend to protect the owner from downside risk?
The finance ministry, after consultations with the RBI, multilateral institutions, and other stakeholders, is ready with the framework for its maiden Rs...
What is the HDI value of India as reported in HDR 2025? Â
What is the limit of FPI investment in Government securities (G-secs) as a percentage of outstanding stocks of securities for FY 2022-23, as notified by...
Which of the following is not one of the objectives of Sustainable Development?
Sustainable Development Goals (SDGs) are an urgent call for action by all countries - developed and developing - in a global partnership. They recogniz...
If the INR is quoted as 1 USD = Rs.76, it is called a _________
Which currency did Zimbabwe launch and is backed by gold reserves to address economic instability?