Skip to content

GATE CS Shortest Paths (Dijkstra, Bellman-Ford) questions

Practise Shortest Paths (Dijkstra, Bellman-Ford) questions for GATE CS. Explore official PYQs and original topic-wise quizzes, check answers and view available solutions. Free, no sign-in.

Subject, topic, year and type filter the full library. Match any choice within a filter, and all selected filter categories. Search, source and sort apply to this page.

11 on this page
Official PYQ2026AlgorithmsShortest Paths (Dijkstra, Bellman-Ford)MCQ · 2 marks
Let GG be a weighted directed acyclic graph with mm edges and nn vertices. Given GG and a source vertex ss in GG, which one of the following options gives the worst case time complexity of the fastest algorithm to find the lengths of shortest paths from ss to all vertices that are reachable from ss in G?{G}?
Official PYQ2025AlgorithmsShortest Paths (Dijkstra, Bellman-Ford)MCQ · 2 marks
Let G(V,E)G(V, E) be an undirected and unweighted graph with 100100 vertices. Let d(u,v)d(u, v) denote the number of edges in a shortest path between vertices uu and vv in VV. Let the maximum value of d(u,v),u,v∈Vd(u, v), u, v \in V such that u≠vu \neq v, be 3030. Let TT be any breadth-first-search tree of GG. Which ONE of the given options is CORRECT …
Official PYQ2020AlgorithmsShortest Paths (Dijkstra, Bellman-Ford)MCQ · 2 marks
Let G=(V,E)G = (V,E) be a directed, weighted graph with weight function w:E→Rw: E \rightarrow \mathbb{R}. For some function f:V→Rf: V \rightarrow \mathbb{R}, for each edge(u,v)∈E(u,v)\in E, define w′(u,v){w}'(u,v) as w(u,v)+f(u)−f(v)w(u,v)+f(u)-f(v). Which one of the options completes the following sentence so that it is TRUE? “The shortest paths in GG under ww are shortest …
Official PYQ2013AlgorithmsShortest Paths (Dijkstra, Bellman-Ford)MCQ · 1 mark
What is the time complexity of Bellman-Ford single-source shortest path algorithm on a complete graph of n vertices?
Official PYQ2009AlgorithmsShortest Paths (Dijkstra, Bellman-Ford)MCQ · 1 mark
Which of the following statement(s) is/are correct regarding Bellman-Ford shortest path algorithm? P: Always finds a negative weighted cycle, if one exists. Q: Finds whether any negative weighted cycle is reachable from the source.
Official PYQ2008AlgorithmsShortest Paths (Dijkstra, Bellman-Ford)MCQ · 1 mark
Dijkstra's single source shortest path algorithm when run from vertex aa in the above graph, computes the correct shortest path distance to
Official PYQ2007AlgorithmsShortest Paths (Dijkstra, Bellman-Ford)MCQ · 1 mark
In an unweighted, undirected connected graph, the shortest path from a node SS to every other node is computed most efficiently, in terms of time complexity, by
Official PYQ2006AlgorithmsShortest Paths (Dijkstra, Bellman-Ford)MCQ · 1 mark
To implement Dijkstra’s shortest path algorithm on unweighted graphs so that it runs in linear time, the data structure to be used is:
Official PYQ2005AlgorithmsShortest Paths (Dijkstra, Bellman-Ford)MCQ · 1 mark
Let G(V,E)G(V,E) be an undirected graph with positive edge weights. Dijkstra’s single source shortest path algorithm can be implemented using the binary heap data structure with time complexity:
Official PYQ2004AlgorithmsShortest Paths (Dijkstra, Bellman-Ford)MCQ · 1 mark
Suppose we run Dijkstra’s single source shortest path algorithm on the following edge-weighted directed graph with vertex PP as the source. In what order do the nodes get included into the set of vertices for which the shortest path distances are finalized?
Official PYQ2003AlgorithmsShortest Paths (Dijkstra, Bellman-Ford)MCQ · 1 mark
Let G=(V,E)G =(V,E) be an undirected graph with a subgraph G1=(V1,E1)G_1 = (V_1, E_1). Weights are assigned to edges of GG as follows. w(e)={0, if e∈E11, otherwisew(e) = \begin{cases} 0 \text{, if } e \in E_1 \\1 \text{, otherwise} \end{cases} A single-source shortest path algorithm is executed on the weighted graph (V,E,w)(V,E,w) with an arbitrary vertex v1v_1 of V1V_1 as the source. …