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 16–20 of 22

Q16GATE 20061 markMCQ−0.33 if wrong
To implement Dijkstra's shortest path algorithm on unweighted graphs so that it runs in linear time, then data structure to be used is

Q17GATE 20051 markMCQ−0.33 if wrong
Let GG be a directed graph whose vertex set is the set of numbers from 1 to 100. There is an edge from a vertex ii to a vertex jj iff either j=i+1j = i + 1 or j=3ij = 3i. The minimum number of edges in a path in G from vertex 1 to vertex 100 is

Q18GATE 20051 markMCQ−0.33 if wrong
Let s and t be two vertices in a undirected graph G=(V, E) having distinct positive edge weights. Let [X, Y] be a partition of V such that s∈\inX and t∈\inY. Consider the edge e having the minimum weight amongst all those edges that have one vertex in X and one vertex in Y.

Let the weight of an edge e denote the congestion on that edge. The congestion on a path is defined to be the maximum of the congestions on the edges of the path. We wish to find the path from s to t having minimum congestion. Which one of the following paths is always such a path of minimum congestion?

Q19GATE 20051 markMCQ−0.33 if wrong
Let 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:

Q20GATE 20041 markMCQ−0.33 if wrong
Suppose we run Dijkstra's single source shortest-path algorithm on the following edge-weighted directed graph with vertex P as the source.
1 1 4 6 7 2 1 3 2 2 P Q R S T U
In what order do the nodes get included into the set of vertices for which the shortest path distances are finalized?

Keep practising

Topics in Algorithms

All CS topics ›