Indian Institute of Technology Madras
BS Degree Programme · Examination & Study Paper
Advanced Algorithms
Most repeated questions
Examination Instructions & Guidelines
- Solve on notebook/paper first before checking solutions.
- MCQ: Exactly 1 option is correct. Negative marking applies.
- MSQ: One or more options correct. Select all to score.
- NAT: Numerical response. No negative marking.
- Scientific calculator allowed for all calculations.
- Official answer key is sealed at the end of this sheet.
Type 1 · asked 6 times · Inclusion-exclusion counting
Count length-n sequences over {0,1,2} in which every digit appears
Read the passage below, then answer Q1–Q2

Based on the above data, answer the given subquestions.
Q1NAT2 Marks·Write the numberQuiz 2 · 3 Aug 2025 (AN)Key ↓For n= 4, calculate the number of sequences of length 4 consisting only of numbers 0, 1, and 2 such that each number occurs at least once.
Your answer:- Q2NAT2 Marks·Write the numberQuiz 2 · 3 Aug 2025 (AN)Key ↓
For n = 5, calculate the number of sequences of length 5 consisting only of numbers 0, 1, and 2 such that each number occurs at least once.
Your answer: Read the passage below, then answer Q3–Q4

Based on the above data, answer the given subquestions.
Q3NAT2 Marks·Write the numberEnd Term · 31 Aug 2025 (AN)Key ↓For n = 4, calculate the number of sequences of length 3 consisting only of numbers 0, 1, and 2 such that each number occurs at least once.
Your answer:- Q4NAT2 Marks·Write the numberEnd Term · 31 Aug 2025 (AN)Key ↓
For n = 6, calculate the number of sequences of length 5 consisting only of numbers 0, 1, and 2 such that each number occurs at least once.
Your answer: Read the passage below, then answer Q5–Q6

Based on the above data, answer the given subquestions.
Q5NAT2 Marks·Write the numberEnd Term · 31 Aug 2025 (FN)Key ↓For n = 4, calculate the number of sequences of length 4 consisting only of numbers 0, 1, and 2 such that each number occurs at least once.
Your answer:- Q6NAT2 Marks·Write the numberEnd Term · 31 Aug 2025 (FN)Key ↓
For n = 5, calculate the number of sequences of length 5 consisting only of numbers 0, 1, and 2 such that each number occurs at least once.
Your answer:
Type 2 · asked 4 times · Linear programming & LP rounding
Effect of changing the LP rounding threshold in weighted vertex cover
Read the passage below, then answer Q7–Q8

Based on the above data, answer the given subquestions.
Q7MCQ2 Marks·Choose one optionQuiz 2 · 3 Aug 2025 (AN)Key ↓
- AWe still get a valid solution, and the algorithm remains a 2-approximation.
- BWe still get a valid solution, and the algorithm becomes a 3-approximation.
- CWe may no longer get a valid solution.
- Q8MCQ2 Marks·Choose one optionQuiz 2 · 3 Aug 2025 (AN)Key ↓

- AWe still get a valid solution, and the algorithm remains a 2-approximation.
- BWe still get a valid solution, and the algorithm becomes a (3/2)-approximation.
- CWe may no longer get a valid solution.
Read the passage below, then answer Q9–Q10

Based on the above data, answer the given subquestions.
Q9MCQ2 Marks·Choose one optionEnd Term · 31 Aug 2025 (AN)Key ↓
- AWe still get a valid solution, and the algorithm remains a 2-approximation.
- BWe still get a valid solution, and the algorithm becomes a 3-approximation.
- CWe may no longer get a valid solution.
- Q10MCQ2 Marks·Choose one optionEnd Term · 31 Aug 2025 (AN)Key ↓

- AWe still get a valid solution, and the algorithm remains a 2-approximation.
- BWe still get a valid solution, and the algorithm becomes a (3/2)-approximation.
- CWe may no longer get a valid solution.
Type 3 · asked 3 times · Inclusion-exclusion counting
Inclusion-exclusion: size of each A_i (sequences missing digit i)
Read the passage below, then answer Q11

Based on the above data, answer the given subquestions.
Q11MCQ1 Mark·Choose one optionQuiz 2 · 3 Aug 2025 (AN)Key ↓
- A

- B

- C

- D

- A
Read the passage below, then answer Q12

Based on the above data, answer the given subquestions.
Q12MCQ2 Marks·Choose one optionEnd Term · 31 Aug 2025 (AN)Key ↓
- A3^n
- B2^n
- Cn^3
- Dn^2
Read the passage below, then answer Q13

Based on the above data, answer the given subquestions.
Q13MCQ2 Marks·Choose one optionEnd Term · 31 Aug 2025 (FN)Key ↓
- A3^n
- B2^n
- Cn^3
- Dn^2
Type 4 · asked 3 times · Inclusion-exclusion counting
Inclusion-exclusion: size of each pairwise intersection A_i ∩ A_j
Read the passage below, then answer Q14

Based on the above data, answer the given subquestions.
Q14MCQ1 Mark·Choose one optionQuiz 2 · 3 Aug 2025 (AN)Key ↓
- A

- B

- C

- D

- A
Read the passage below, then answer Q15

Based on the above data, answer the given subquestions.
Q15MCQ2 Marks·Choose one optionEnd Term · 31 Aug 2025 (AN)Key ↓
- A2^n
- Bn
- C1
- D0
Read the passage below, then answer Q16

Based on the above data, answer the given subquestions.
Q16MCQ2 Marks·Choose one optionEnd Term · 31 Aug 2025 (FN)Key ↓
- A2^n
- Bn
- C1
- D0
Type 5 · asked 3 times · Inclusion-exclusion counting
Inclusion-exclusion: size of the triple intersection A_0 ∩ A_1 ∩ A_2
Read the passage below, then answer Q17

Based on the above data, answer the given subquestions.
Q17MCQ1 Mark·Choose one optionQuiz 2 · 3 Aug 2025 (AN)Key ↓
- A

- B

- C

- D

- A
Read the passage below, then answer Q18

Based on the above data, answer the given subquestions.
Q18MCQ2 Marks·Choose one optionEnd Term · 31 Aug 2025 (AN)Key ↓
- A3^n
- B2^n
- C1
- D0
Read the passage below, then answer Q19

Based on the above data, answer the given subquestions.
Q19MCQ2 Marks·Choose one optionEnd Term · 31 Aug 2025 (FN)Key ↓
- A3^n
- B2^n
- C1
- D0
Type 6 · asked 2 times · Greedy algorithms & their pitfalls
Decide which greedy algorithm correctly tests if a tree has a perfect matching
- Q20MCQ3 Marks·Choose one optionEnd Term · 31 Aug 2025 (AN)Key ↓

- ANeither algorithm always correctly determines whether or not a given tree graph has a perfect matching.
- BBoth algorithms always correctly determine whether or not a given tree graph has a perfect matching.
- CAlgorithm B always correctly determines whether or not a given tree graph has a perfect matching; algorithm A does not.
- DAlgorithm A always correctly determines whether or not a given tree graph has a perfect matching; algorithm B does not.
- Q21MCQ3 Marks·Choose one optionEnd Term · 31 Aug 2025 (FN)Key ↓

- ANeither algorithm always correctly determines whether or not a given tree graph has a perfect matching.
- BBoth algorithms always correctly determine whether or not a given tree graph has a perfect matching.
- CAlgorithm B always correctly determines whether or not a given tree graph has a perfect matching; algorithm A does not.
- DAlgorithm A always correctly determines whether or not a given tree graph has a perfect matching; algorithm B does not.
Type 7 · asked 2 times · NP-hardness & branching algorithms
Identify the complexity class (P/NP/NP-hard) of the generalized SWISH game
Type 8 · asked 2 times · Matroids
Is a matroid with one element deleted still a matroid?
Type 9 · asked 2 times · Matroids
Check which given set systems (E, I) are matroids
Type 10 · asked 2 times · Dynamic programming for set cover
Find the missing entry in a set cover DP table
Type 11 · asked 2 times · Dynamic programming for set cover
Read values from the set cover DP table Pi(X, j)
Read the passage below, then answer Q30

Based on the above data, answer the given subquestions.
Q30MCQ3 Marks·Choose one optionEnd Term · 31 Aug 2025 (AN)Key ↓
- A

- B

- C

- D

- A
Read the passage below, then answer Q31

Based on the above data, answer the given subquestions.
Q31MCQ3 Marks·Choose one optionEnd Term · 31 Aug 2025 (FN)Key ↓
- A

- B

- C

- D

- A
Type 12 · asked 2 times · Dynamic programming for set cover
Which DP table entries are looked up to compute Pi(X, j) for set cover
Read the passage below, then answer Q32

Based on the above data, answer the given subquestions.
Q32MCQ3 Marks·Choose one optionEnd Term · 31 Aug 2025 (AN)Key ↓
- A

- B

- C

- D

- A
Read the passage below, then answer Q33

Based on the above data, answer the given subquestions.
Q33MCQ3 Marks·Choose one optionEnd Term · 31 Aug 2025 (FN)Key ↓
- A

- B

- C

- D

- A
Type 13 · asked 2 times · Randomized algorithms
True/false: worst-case and expected running time of randomized algorithms
Read the passage below, then answer Q34
Consider the given statements and answer the subquestions if they are true or false.
Q34MCQ2 Marks·Choose one optionEnd Term · 31 Aug 2025 (AN)Key ↓The worst-case running time and expected running time are equal to within constant factors for any randomized algorithm.
- ATRUE
- BFALSE
Read the passage below, then answer Q35
Consider the following statements and answer the given subquestions if they are true or false.
Q35MCQ2 Marks·Choose one optionEnd Term · 31 Aug 2025 (FN)Key ↓The worst-case running time and expected running time are equal to within constant factors for any randomized algorithm.
- ATRUE
- BFALSE
Type 14 · asked 2 times · Randomized algorithms
Can an adversary force randomized quicksort beyond n log n time?
Read the passage below, then answer Q36
Consider the given statements and answer the subquestions if they are true or false.
Q36MCQ2 Marks·Choose one optionEnd Term · 31 Aug 2025 (AN)Key ↓
- ATRUE
- BFALSE
Read the passage below, then answer Q37
Consider the following statements and answer the given subquestions if they are true or false.
Q37MCQ2 Marks·Choose one optionEnd Term · 31 Aug 2025 (FN)Key ↓
- ATRUE
- BFALSE
Type 15 · asked 2 times · Linear programming & LP rounding
True/false: every linear program has a unique optimal solution
Read the passage below, then answer Q38–Q39
Answer the given subquestions.
Q38MCQ2 Marks·Choose one optionEnd Term · 31 Aug 2025 (AN)Key ↓Every linear program has a unique optimal solution.
- ATRUE
- BFALSE
- Q39MCQ2 Marks·Choose one optionEnd Term · 31 Aug 2025 (FN)Key ↓
Every linear program has a unique optimal solution.
- ATRUE
- BFALSE
Type 16 · asked 2 times · Greedy algorithms & their pitfalls
Does the max-degree greedy algorithm always output a vertex cover?
Type 17 · asked 2 times · Greedy algorithms & their pitfalls
Can the minimum vertex cover be exactly twice the maximum matching?
Read the passage below, then answer Q42–Q43
Answer the given subquestions.
Q42MCQ2 Marks·Choose one optionEnd Term · 31 Aug 2025 (AN)Key ↓Recall that the size of an optimal vertex cover is at most twice the size of a maximum matching of a graph G. Are there examples of graphs where the size of the optimal vertex cover is exactly equal to twice the size of its maximum matching? For example, this is not true for a path on three vertices: the size of both the maximum matching and minimum vertex cover is 1
- AYes
- BNo
- Q43MCQ2 Marks·Choose one optionEnd Term · 31 Aug 2025 (FN)Key ↓
Recall that the size of an optimal vertex cover is at most twice the size of a maximum matching of a graph G. Are there examples of graphs where the size of the optimal vertex cover is exactly equal to twice the size of its maximum matching? For example, this is not true for a path on three vertices: the size of both the maximum matching and minimum vertex cover is 1.
- AYes
- BNo
Type 18 · asked 2 times · Iterative compression & FPT
Running time of d-hitting set via iterative compression
Official KeyMaster Answer Key & Explanations
Official answer keys from IIT Madras BS past papers. Click any question to review.
Reveal KeyCollapse Key
Master Answer Key & Explanations
Official answer keys from IIT Madras BS past papers. Click any question to review.













