Continue with your mobile number
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.
Speed of a boat in still water is 4 times more than the speed of stream. If boat covers 126 km in downstream in 7 hours, then find the time taken by the...
The ratio of the distances traveled by a boat in upstream and downstream is 6:7, respectively, and the total time taken to cover the desired distance is...
A man can go on a motor boat with a speed of 15 km/hour in still water to a certain upstream point and come back to the starting point in a river which ...
A boat can travel 21 km downstream in 42 min. The ratio of the speed of the boat in still water to the speed of the stream is 5: 1. How much time will t...
If a man rows at the rate of 14 kmph in still water and his rate against the current is 5 kmph, then the man’s rate along the current is:...
A boat travels faster than the stream by 28 km/h. It covers a distance of 112 km upstream and returns 132 km downstream, all within 7 hours. Calculate t...
A boy can swim in water with a speed of 12 km/hr in still water. If the speed of the stream is 5 km/hr, what will be the time taken by the boy to cover ...
A motor boat goes downstream from point A to B ,which is 36 km away from point A, and then returns to A.If actual speed of the boat in still water is 7...
A man rows to a place 221 km away and comes back to the starting point. If the speed of the stream is 2 km/hr and the speed of the boat in still water i...
Speed of a boat in still water is 15 km/h while the speed of the stream is ____ km/h. Total time taken by the boat to go 150 km upstream and 225 km down...