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.
An owner of a business has invested Rs 10,00,000 in business. He wants a 15% ROI on his money. From an analysis of recent cost figures, he finds that hi...
According to the MSMED Act, 2006, any reference made to Micro and small enterprise facilitation council shall be resolved within ________ from date of r...
As per the Companies Act, 2013, the minimum gap between two Annual General Meetings (AGMs) should not be more than:
Which among the following is NOT a constituent of Tier-II capital of banks according to BASEL Accord?
Inflation that arises due to rising costs of production inputs such as wages and raw materials is referred to as:
Which bank has been assigned the Lead Bank Responsibility for the newly formed district of Maihar in the state of Madhya Pradesh?
Section 112 A deals with
A government is looking to undertake a large infrastructure project, such as the construction of a new highway. However, the government has limited fina...
Who introduced the concept of 'Accredited Investors' in the Indian securities markets?
ABC Ltd has declared dividend for the year 2024-25. As per the Companies Act, the amount of dividend should be deposited in scheduled bank within _____ ...