Shortest Path: GATE CS Previous Year Questions

Shortest Path · Algorithms

22 questions · asked in 17 of 27 years (2000–2026)

MCQ 21 · NAT 11-mark 12 · 2-mark 10

2000Questions per year2026

Questions 6–10 of 22

Q6GATE 20202 marksMCQ−0.67 if wrong
Let G=(V,E)G=(V,E) be a directed, weighed 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 G under ww are shortest paths under w′w' too,_________".

Q7GATE 2016 (Session 1)2 marksNAT
Consider the weighted undirected graph with 4 vertices,where the weigh to edge {i, j} is given by the entry Wij in the matrix W.
W=[02852058850x58x0]W=\begin{bmatrix} 0 & 2&8 & 5\\ 2& 0& 5 &8 \\ 8 & 5 & 0& x\\ 5&8 & x&0 \end{bmatrix}
The largest possible integer value of x, for which at least one shortest path between some pair of vertices will contain the edge with weight x is ____.

Q8GATE 2014 (Session 2)1 markMCQ−0.33 if wrong
Consider the tree arcs of a BFS traversal from a source node W in an unweighted, connected, undirected graph. The tree T formed by the tree arcs is a data structure for computing

Q9GATE 20131 markMCQ−0.33 if wrong
What is the time complexity of Bellman-Ford single-source shortest path algorithm on a complete graph of n vertices?

Q10GATE 20122 marksMCQ−0.67 if wrong
Consider the directed graph shown in the figure below. There are multiple shortest paths between vertices S and T. Which one will be reported by Dijkstra's shortest path algorithm? Assume that, in any iteration, the shortest path to a vertex v is updated only when a strictly shorter path to v is discovered
4 1 1 3 7 3 4 1 5 3 4 2 3 5 3 2 S A C E G D B F T

Keep practising

Topics in Algorithms

All CS topics ›