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
Let be a weighted directed acyclic graph with edges and vertices. Given and a source vertex in , which one of the following options gives the worst case time complexity of the fastest algorithm to find the lengths of shortest paths from to all vertices that are reachable from in
Let be an undirected and unweighted graph with vertices. Let denote the number of edges in a shortest path between vertices and in . Let the maximum value of such that , be . Let be any breadth-first-search tree of . Which ONE of the given options is CORRECT …
Let be a directed, weighted graph with weight function . For some function , for each edge, define as . Which one of the options completes the following sentence so that it is TRUE? “The shortest paths in under are shortest …
What is the time complexity of Bellman-Ford single-source shortest path algorithm on a complete graph of n vertices?
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.
Dijkstra's single source shortest path algorithm when run from vertex in the above graph, computes the correct shortest path distance to
In an unweighted, undirected connected graph, the shortest path from a node to every other node is computed most efficiently, in terms of time complexity, by
To implement Dijkstra’s shortest path algorithm on unweighted graphs so that it runs in linear time, the data structure to be used is:
Let 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:
Suppose we run Dijkstra’s single source shortest path algorithm on the following edge-weighted directed graph with vertex as the source. In what order do the nodes get included into the set of vertices for which the shortest path distances are finalized?
Let be an undirected graph with a subgraph . Weights are assigned to edges of as follows. A single-source shortest path algorithm is executed on the weighted graph with an arbitrary vertex of as the source. …
