Start learning 50% faster. Sign in now
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.
जो सब जगह विद्यमान हो
निम्नलिखित में से सही विलोम शब्द - युग्म कौन - सा है ?
किस क्रमांक में अंग्रेजी पारिभाषिक शब्द के सामने उसक�...
निम्नलिखित में से तद्भव शब्द क्या है ?
शुद्ध वर्तनी वाला शब्द है
NATURAL JUSTICE का आशय है
' समरथ को नहीं दोष गोसाई ' का अर्थ है ?
' अन्वेषण ' का संधि विच्छेद क्या होगा ?
निर्देश : निम्नलिखित वाक्य को ,(a ) (b ), (c ),(c )और (e ) में विभक�...
"श्याम घर आना चाहता है" वाक्य में कौन-सी क्रिया है?