GATE / CS ARCHIVE

GATE CSE 2015 SET 2 / QUESTION 47

GATE CSE 2015 Set 2 Q47

Algorithms · Other / Mixed Topics · Full GATE CSE 2015 Set 2 paper

GATE 2015 Set 2, Q47 2 marks · MCQ
Report issue

Other / Mixed Topics

Question 47, GATE 2015: Match algorithms 1Dijkstra, 2Floyd–Warshall, 3 binary search, 4 backtracking with i divide/conquer, ii dynamic programming, iii greedy, iv DFS, v BFS. A1i2 iii 3i4v; B1 iii 2 iii 3i4v; C1 iii 2 ii 3i4 iv; D1 iii 2 ii 3i4v.
Tap to enlarge
Your answer
Answer & solution

Official answer: C

Dijkstra uses greedy finalization; Floyd–Warshall uses dynamic programming; binary search divides the search interval; backtracking explores depth first. Hence 1-iii, 2-ii, 3-i, 4-iv, C.

Dijkstra commits the currently smallest tentative distance using a greedy safe-choice argument. Floyd–Warshall improves paths by allowing successively larger sets of intermediate vertices, which is dynamic programming. Binary search reduces the search interval to one half, matching divide-and-conquer here. Backtracking explores one partial-choice path before undoing it and trying another, so its traversal is depth-first rather than breadth-first. The complete matching is 1 iii, 2 ii, 3i, 4 iv.

Original paper, page 42 · Answer key