6 Qs · 2011–2017 · 10 marks · 0.4 marks/paperStandard yield
GATE tests algorithm design techniques through two primary styles: conceptual classification and mechanical algorithmic execution. At the 1-mark level, questions focus on matching… Guide
DOSOMETHING (c, a, n)
z ← 1
for i ← 0 to k - 1
do z ← z^2 mod n
if c[i] = 1
then z ← (z × a) mod n
return z…Topic guide
GATE tests algorithm design techniques through two primary styles: conceptual classification and mechanical algorithmic execution. At the 1-mark level, questions focus on matching standard classical algorithms (such as MST algorithms, shortest paths, and sorting algorithms) to their corresponding paradigms like Greedy, Dynamic Programming, Divide and Conquer, or Backtracking. At the 2-mark level, the focus shifts to quantitative problem solving, such as building a Huffman tree and computing the exact total or expected bit length for encoded messages.
Algorithm-to-Paradigm Matching
common · MCQ · 1 marks · 2017, 2015
Matching a list of standard algorithms (e.g., Prim's, Kruskal's, Floyd-Warshall, Mergesort, Quicksort, Hamiltonian circuit) to their fundamental design technique (Greedy, DP, Divide and Conquer, Backtracking).
Huffman Coding Message Length Calculation
occasional · NAT · 2 marks · 2017
Constructing an optimal prefix-free tree from character frequencies/probabilities to determine the codeword lengths and calculating the total or expected encoded message length in bits.
Recurrence / Optimal Substructure Formulation
occasional · NAT · 2 marks · 2014
A shortest-path or dynamic programming problem on a discrete grid/line with special transitions (e.g., shortcuts) is specified. The question asks to identify the successor states in the Bellman optimality recurrence and compute an aggregate value (such as their product).
Pseudocode Tracing of Divide-and-Conquer / Arithmetic Algorithms
occasional · NAT · 2 marks · 2015
A structured algorithm (such as left-to-right binary modular exponentiation using repeated squaring) is provided in pseudocode with concrete input parameters, requiring precise variable simulation and modulo arithmetic.
Matrix Chain Multiplication Optimal Cost Calculation
common · MCQ · 2 marks · 2011
Given dimensions for a sequence of 4 matrices, compute the minimum number of scalar multiplications required to multiply them using dynamic programming recurrence relations.
Expected Length per Character in Huffman Coding
Used when calculating the average codeword length per character given character probabilities and tree depths/codeword lengths .
Total Encoded Message Length
Used to find the total bit count of a message of characters encoded via variable-length prefix codes like Huffman coding.
Dynamic Programming Optimal Substructure Recurrence
Used to express the minimal cost/steps to reach a destination from state by transitioning to reachable adjacent states .
Modular Exponentiation (Left-to-Right Binary Method)
Used in repeated squaring algorithms to compute where is represented in binary array .
Matrix Chain Multiplication DP Recurrence
Used to find the minimum number of scalar multiplications required to compute the product of matrices given dimension array .
Scalar Multiplications for Two Matrices
Used to compute the cost of multiplying an intermediate or single matrix of size by another of size .
Direct 1-mark matching questions test quick recall of the design paradigms behind fundamental graph, sorting, and search algorithms.
2017, 2015
Shift toward NAT questions for greedy algorithmic computation (e.g., Huffman encoding) to evaluate numerical accuracy without multiple-choice elimination.
2017
Both questions appeared as 2-mark Numerical Answer Type (NAT) problems requiring exact numerical evaluation rather than asymptotic complexity derivations.
2015, 2014
Matrix chain multiplication is tested as a 2-mark calculation-heavy problem where candidates must apply bottom-up DP across chain lengths 2, 3, and 4.
2011
Easy: Direct paradigm matching of standard textbook algorithms (e.g., Prim's, Quicksort, Floyd-Warshall). Medium: Multi-step manual tracing of greedy algorithms (e.g., building a 5-symbol Huffman tree, finding depths, and evaluating message bit length). Hard: Complex recurrence relations, hybrid dynamic programming/greedy correctness proofs, or non-trivial state-space bounds.