GateAI
Algorithm Design Techniques

GATE CSE 2015 Set 1 · Q6

MCQ1 markEasy

Time

Match the following: (P) Prim's algorithm for minimum spanning tree (Q) Floyd-Warshall algorithm for all pairs shortest paths (R) Mergesort (S) Hamiltonian circuit (i) Backtracking (ii) Greedy method (iii) Dynamic programming (iv) Divide and conquer

Select one answerSingle correct

Pick an option to check

Solution

Step-by-step verified solution

Official answer: C) P-ii, Q-iii, R-iv, S-i

Algorithm Design Techniques

Matching the algorithms to their corresponding design paradigm:

  • (P) Prim's algorithm for minimum spanning tree: It iteratively selects the minimum-weight edge connecting the tree to a vertex outside the tree, which is a Greedy method→\rightarrow(ii).

  • (Q) Floyd-Warshall algorithm for all pairs shortest paths: It computes shortest paths by systematically considering all intermediate vertices via Dynamic programming→\rightarrow(iii).

  • (R) Mergesort: It divides the array into two halves, sorts them recursively, and merges the sorted halves using the Divide and conquer paradigm →\rightarrow (iv).

  • (S) Hamiltonian circuit: Finding a Hamiltonian circuit is an NP-complete problem, commonly solved systematically via state-space search with Backtracking→\rightarrow(i).

Thus, the correct matching is P-ii, Q-iii, R-iv, S-i, which corresponds to option (C).

Try the question first, then check your work.

Think the official key or this write-up is wrong?

Report error or challenge

Examiner trap

The misconception this question tests

This Algorithm Design Techniques previous year question is Q6 of the GATE CSE 2015 Set 1 paper. Find more GATE CSE PYQs on Algorithm Design Techniques in Algorithms, or browse all GATE CSE PYQs.

Free diagnostic

Where do you stand for GATE?

Take the 20-minute diagnostic: the 3 topics that cost you the most marks, and a rank range. Or sit 5 related Algorithm Design Techniques PYQs now with no account.

One GATE CSE PYQ every morning

An official question by email at 7 AM IST, with a link to its verified solution. Unsubscribe in one click.

Algorithm Design Techniques in GATE CSE

Algorithm Design Techniques has 6 GATE CSE PYQs across 6 papers from 2011 to 2017. 2 of them are 1-mark MCQs like this one, and it is the only one in GATE CSE 2015 Set 1.

How GATE tests Algorithm Design Techniques

More from GATE CSE 2015 Set 1

Share this solution

A plain-text card for WhatsApp or Telegram study groups.

GateAI solution cardGATE CSE 2015 Set 1 · Q6 · MCQ

Match the following: (P) Prim's algorithm for minimum spanning tree (Q) Floyd-Warshall algorithm for all pairs shortest paths (R) Mergesort (S) Hamiltonian circuit (i) Backtracking (ii) Greedy method (iii) Dynamic programming (iv) Divide and conquer

Topic-wise GATE CS PYQs with verified steps

Independent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.