Which of the following algorithms are based on the Breadth First Search (BFS)?…
2025
Which of the following algorithms are based on the Breadth First Search (BFS)?
A. Prim's algorithms
B. Kruskal algorithms
C. Dijkstra algorithms
D. Greedy algorithms
E. Dynamic Programming
Choose the correct answer from the options given below:
- A.
A & B only
- B.
A, C & D only
- C.
D & E only
- D.
A & C only
Attempted by 207 students.
Show answer & explanation
Correct answer: D
Correct answer and explanation:
None of the provided answer choices is correct. None of the listed algorithms or paradigms are fundamentally based on Breadth First Search (BFS).
Key points:
Breadth First Search (BFS) is a graph traversal that explores vertices level by level. It is commonly used for unweighted shortest-path problems (shortest number of edges).
Prim's algorithm is a greedy algorithm for minimum spanning trees that selects edges by minimum weight using a structure similar to a priority queue; it is not derived from BFS.
Kruskal's algorithm builds a minimum spanning tree by sorting edges and using union-find; it is not based on BFS.
Dijkstra's algorithm solves shortest paths on weighted graphs using relaxation and a priority queue. It is not a BFS-based method, although when all edge weights are equal, Dijkstra's behavior reduces to that of BFS.
Greedy algorithms and Dynamic Programming are algorithm design paradigms, not specific BFS-based algorithms.
Because none of the provided option combinations correctly state algorithms that are based on BFS, the question's answer choices are flawed. A correct choice would be an option stating "None of the above" or explicitly listing algorithms that use BFS (for example, algorithms for unweighted shortest paths or level-order graph exploration).
A video solution is available for this question — log in and enroll to watch it.