All Exams Test series for 1 year @ ₹349 only
Question

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:

This question was previously asked in
UGC NET 2024 Computer Science and Applications Question Paper (23-Aug-2024) (Shift 1)
The correct answer is

A & C only

Breadth First Search grows a search tree outward from a source vertex, keeping a frontier of discovered vertices in a queue and repeatedly expanding the next frontier vertex. Cormen et al. note that Prim's minimum-spanning-tree algorithm and Dijkstra's single-source shortest-path algorithm both use ideas similar to BFS: they also grow a tree from a single source by repeatedly taking the best vertex from a frontier, using a priority queue instead of a FIFO queue.

A. Prim's algorithm: grows one tree from a start vertex, each time adding the minimum-weight edge leaving the tree; this is a weighted generalisation of the BFS frontier expansion.

C. Dijkstra's algorithm: expands vertices from the source in order of distance; with all edge weights equal it reduces exactly to BFS.

B. Kruskal's algorithm sorts all edges and merges a forest with a disjoint-set structure; it does not grow from a source or explore neighbours level by level, so it is not BFS-based.

D. Greedy algorithms and E. dynamic programming are general design paradigms, not algorithms built on BFS, so any choice containing them is wrong.

A & C only option is correct.

Was this answer helpful?

Similar Questions

  1. In the following graph, discovery time stamps and finishing time stamps of Depth First Search (DFS) are shown as \(x/y\), where \(x\) is discovery time stamp and \(y\) is finishing time stamp.

    It shows which of the following depth first forest ?

  2. Consider the graph given below. What is the order in which the nodes mentioned in the options are to be traversed to find the shortest path from A to Z using best first search?

    Weighted directed graph with nodes A, B, C, D, E, F and Z

    A. Node-A

    B. Node-B

    C. Node-C

    D. Node-D

    E. Node-E

    F. Node-F

    Choose the correct answer from the options given below:


Important Questions from Graph Search

  1. The depth first search will use ________ as a structure to held nodes for further processing.
  2. Consider the following pseudocode for depth-first search (DFS) algorithm which takes a directed graph $G(V, E)$ as input, where $d[v]$ and $f[v]$ are the discovery time and finishing time, respectively, of the vertex $v \in V$.

    DFS(G):
      unmark all v ∈ V
      t ← 0
      for each v ∈ V
        if v is unmarked
          t ← Explore(G, v, t)
        end if
      end for
    Explore(G, v, t):
      mark v
      t ← t + 1
      d[v] ← t
      for each (v, w) ∈ E
        if w is unmarked
          t ← Explore(G, w, t)
        end if
      end for
      t ← t + 1
      f[v] ← t
      return t

    Suppose that the input directed graph $G(V, E)$ is a directed acyclic graph (DAG).
    For an edge $(u, v) \in E$, which of the following options will NEVER be correct?

  3. Consider the following algorithm someAlgo that takes an undirected graph G as input.

    someAlgo (G)
    1. Let $v$ be any vertex in G. Run BFS on G starting at $v$. Let $u$ be a vertex in G at maximum distance from $v$ as given by the BFS.
    2. Run BFS on G again with $u$ as the starting vertex. Let $z$ be the vertex at maximum distance from $u$ as given by the BFS.
    3. Output the distance between $u$ and $z$ in G.

    The output of someAlgo (T) for the tree shown in the given figure is ____________ (Answer in integer)

  4. In the following graph, discovery time stamps and finishing time stamps of Depth First Search (DFS) are shown as \(x/y\), where \(x\) is discovery time stamp and \(y\) is finishing time stamp.

    It shows which of the following depth first forest ?

  5. Consider the graph given below. What is the order in which the nodes mentioned in the options are to be traversed to find the shortest path from A to Z using best first search?

    Weighted directed graph with nodes A, B, C, D, E, F and Z

    A. Node-A

    B. Node-B

    C. Node-C

    D. Node-D

    E. Node-E

    F. Node-F

    Choose the correct answer from the options given below:

Need Expert Advice?
Upcoming Exams
CTET
December 12, 2026
CBSE UGC NET
December 14, 2026
CSIR UGC NET
December 19, 2026
Test Series
UGC NET img
Teaching
UGC NET (Paper 2) 2026 Mock Test Series
796 Tests 2 Tests Free
219 Attempts
4.4(46)
English
More Questions from UGC NET

Start Your Preparation with Prepp Mobile App

Download the app from Google Play & App Store
Download the app from Google Play & App Store
Prepp Mobile App