chapter
    Recurrences and Generating Functions Practice Questions for GATE CS

    Solve 48+ Recurrences and Generating Functions practice questions for GATE CS with answers and detailed solutions. Free sample questions below.

    Try a question

    Answer it here to see how it works. Nothing is recorded until you sign in.

    Question 1
    Level 1: Warm-up

    Consider the recurrence . Which of the following statements about its characteristic equation is TRUE?

    Question 2
    Level 1: Warm-up

    The generating function for a sequence is . What is the maximum value of for which the coefficient of is strictly less than 100?

    Question 3
    Level 1: Warm-up

    Assertion (A): The general solution to the recurrence is .

    Reason (R): The characteristic roots of the recurrence are and .

    Question 4
    Level 1: Warm-up

    For the divide-and-conquer recurrence , what is the maximum integer value of for which the Master Theorem yields ?

    Question 5
    Level 1: Warm-up

    Consider the recurrence defined by:

    Assertion (A): The value of is 7.

    Reason (R): .

    Question 6
    Level 1: Warm-up

    Let be the generating function for the sequence . We form a new generating function . What is the minimum number of leading zero coefficients in the sequence corresponding to ?

    Question 7
    Level 1: Warm-up

    Consider the recurrence relation for Binary Search: . Which of the following bounds is TRUE for the solution of this recurrence?

    Question 8
    Level 1: Warm-up

    A generating function packs the sequence into . If the sequence is defined by , what is the value of the coefficient of in ?

    Question 9
    Level 1: Warm-up

    Which of the following recurrence relations is a linear homogeneous recurrence with constant coefficients?

    Question 10
    Level 1: Warm-up

    For the Merge Sort algorithm, the recurrence relation is . What is the minimum depth of the recursion tree when the input size is ?

    Free preview ends here

    Login to view the complete practice questions and solutions

    Creating an account is free. You get the rest of this chapter, step-by-step solutions, and a study plan built around the topics you are actually weak at.

    Why MastersUp

    Personalised first. High quality throughout.

    Most platforms hand everyone the same content. Here the content moves with your performance, topic by topic.

    Built around you, not around a syllabus PDF

    Every answer you give moves your topic-level intelligence rate. The next question, the next revision card and tomorrow's plan all change with it.

    Revision that hits your weak spots

    We only revise topics you have actually attempted and are still below the safe bar on — never the same chapter on repeat.

    Questions calibrated to the real exam

    Each question carries a measured toughness. You are served a rung above your current level, so practice keeps stretching you.

    Notes written for recall, not for volume

    Full lesson cards for first study, curated short-note cards for the last mile — with derivations, traps and exam patterns marked.

    One place for everything

    Notes, chapter practice, previous-year questions, test series and full-length papers — all feeding one picture of your preparation.

    Honest progress

    No vanity streaks. Progress here means chapters mastered and accuracy that held up on harder questions.

    Unlock the whole course

    Full notes and short notes, the complete question bank with worked solutions, mock tests, full-length papers, and an adaptive plan that rebuilds itself as you improve.

    Recurrences and Generating Functions Practice Questions for GATE CS

    Solve 48+ Recurrences and Generating Functions practice questions for GATE CS with answers and detailed solutions. Free sample questions below.

    Chapter Roadmap: Recurrences and Generating Functions

    Chapter Journey

    1. Generating Functions for Sequences
    Algebraic representation, standard transforms, and coefficient extraction.
    2. Linear Recurrences & Characteristic Roots
    Solving constant-coefficient linear difference equations and handling repeated roots.
    3. Binary & Divide-and-Conquer Recurrences
    Master theorem applications and algorithmic time complexity analysis.
    Goal: Master the translation between discrete sequences and continuous algebraic functions to solve complex exam problems efficiently.

    The Core Intuition: What is a Generating Function?

    The Core Idea

    A sequence is just a list of numbers:

    A Generating Function packs this entire infinite list into a single algebraic object (a formal power series):

    Why do we do this?

    • Algebraic Power: Add, multiply, differentiate, and integrate to perform complex operations on the sequence.
    • Closed Forms: Compress an infinite series into a simple fraction (like ).
    • Extraction: Use algebraic techniques to find a direct formula for the -th term, .
    Think of it as a data compression algorithm for mathematics.

    Recurrences and Generating Functions: Solved Questions with Step-by-Step Explanations (10 Problems)

    Question 1 · Engineering Mathematics MCQ

    Consider the recurrence . Which of the following statements about its characteristic equation is TRUE?

    1. A.

      The characteristic equation is .

    2. B.

      The characteristic roots are and .

    3. C.

      The characteristic equation is .

    4. D.

      The characteristic roots are and .

    Correct Answer:

    B

    Step-by-Step Solution

    Key idea: For a recurrence , the characteristic equation is .

    Step 1: Identify coefficients from . Here and .

    Step 2: Form the characteristic equation: .

    Step 3: Solve the quadratic equation. Factor it: .

    Step 4: The roots are and .

    Answer: The characteristic roots are 2 and 3.

    Question 2 · Engineering Mathematics MCQ

    The generating function for a sequence is . What is the maximum value of for which the coefficient of is strictly less than 100?

    1. A.

      3

    2. B.

      5

    3. C.

      4

    4. D.

      6

    Correct Answer:

    C

    Step-by-Step Solution

    Key idea: The generating function corresponds to the geometric sequence . Here, , so .

    Step 1: Identify the sequence formula. .

    Step 2: We need the maximum such that .

    Step 3: Test powers of 3:

    Step 4: Since and , the maximum is 4.

    Answer: 4

    Question 3 · Engineering Mathematics MCQ

    Assertion (A): The general solution to the recurrence is .

    Reason (R): The characteristic roots of the recurrence are and .

    1. A.

      Both A and R are true and R is the correct explanation of A.

    2. B.

      Both A and R are true but R is not the correct explanation of A.

    3. C.

      A is false but R is true.

    4. D.

      A is true but R is false.

    Correct Answer:

    C

    Step-by-Step Solution

    Key idea: For distinct characteristic roots , the general solution is . Both roots must be raised to the power .

    Step 1: Evaluate Reason (R). The recurrence is .

    Step 2: Characteristic equation: . Roots are 3 and 1. So R is TRUE.

    Step 3: Evaluate Assertion (A). The general solution must be .

    Step 4: The assertion writes the second term as , omitting the exponent . This is mathematically incorrect for a sequence solution. So A is FALSE.

    Answer: A is false but R is true.

    Question 4 · Engineering Mathematics MCQ

    For the divide-and-conquer recurrence , what is the maximum integer value of for which the Master Theorem yields ?

    1. A.

      1

    2. B.

      2

    3. C.

      3

    4. D.

      4

    Correct Answer:

    B

    Step-by-Step Solution

    Key idea: The Master Theorem compares against where . Case 1 applies when grows strictly slower than .

    Step 1: Identify parameters from . Here , , and .

    Step 2: Compute the critical exponent .

    Step 3: We want . This corresponds to Case 1 (Leaves dominate).

    Step 4: Case 1 requires for some . This means must grow strictly slower than , so .

    Step 5: The maximum integer value of strictly less than 3 is 2.

    Answer: 2

    Question 5 · Engineering Mathematics MCQ

    Consider the recurrence defined by:

    Assertion (A): The value of is 7.

    Reason (R): .

    1. A.

      Both A and R are true and R is the correct explanation of A.

    2. B.

      Both A and R are true but R is not the correct explanation of A.

    3. C.

      A is true but R is false.

    4. D.

      A is false but R is true.

    Correct Answer:

    A

    Step-by-Step Solution

    Key idea: To evaluate piecewise even-odd recurrences, apply the correct rule based on the parity of the index, working down to the base case.

    Step 1: Evaluate Assertion (A) by computing .

    Since 7 is odd, use with .

    .

    Step 2: Compute . Since 3 is odd, use the odd rule with .

    .

    Step 3: Substitute back into .

    . Assertion (A) is TRUE.

    Step 4: Evaluate Reason (R).

    R states: .

    This matches our exact derivation step-by-step. Reason (R) is TRUE and correctly explains (A).

    Answer: Both A and R are true and R is the correct explanation of A.

    Question 6 · Engineering Mathematics MCQ

    Let be the generating function for the sequence . We form a new generating function . What is the minimum number of leading zero coefficients in the sequence corresponding to ?

    1. A.

      3

    2. B.

      2

    3. C.

      4

    4. D.

      5

    Correct Answer:

    A

    Step-by-Step Solution

    Key idea: Multiplying a generating function by shifts the entire sequence to the right by positions, inserting zeros at the beginning.

    Step 1: Identify the shift operation. means the sequence is shifted right by 3.

    Step 2: The original sequence is (starting at ).

    Step 3: Shifting right by 3 inserts three zeros at indices .

    Step 4: The new sequence is .

    Step 5: The number of leading zero coefficients is exactly 3.

    Answer: 3

    Question 7 · Engineering Mathematics MCQ

    Consider the recurrence relation for Binary Search: . Which of the following bounds is TRUE for the solution of this recurrence?

    1. A.

    2. B.

    3. C.

    4. D.

    Correct Answer:

    B

    Step-by-Step Solution

    Key idea: The Master Theorem solves by comparing to where .

    Step 1: Identify parameters from . Here , , and .

    Step 2: Compute the critical exponent .

    Step 3: Compare with . We have and .

    Step 4: Since , this falls under Case 2 of the Master Theorem.

    Step 5: Case 2 yields .

    Answer:

    Question 8 · Engineering Mathematics MCQ

    A generating function packs the sequence into . If the sequence is defined by , what is the value of the coefficient of in ?

    1. A.

      8

    2. B.

      6

    3. C.

      9

    4. D.

      16

    Correct Answer:

    A

    Step-by-Step Solution

    Key idea: The coefficient of in the generating function is exactly the -th term of the sequence .

    Step 1: Identify the sequence formula from the problem statement, which is .

    Step 2: We need the coefficient of , which corresponds to the index .

    Step 3: Substitute into the sequence formula: .

    Answer: 8

    Question 9 · Engineering Mathematics MCQ

    Which of the following recurrence relations is a linear homogeneous recurrence with constant coefficients?

    1. A.

    2. B.

    3. C.

    4. D.

    Correct Answer:

    C

    Step-by-Step Solution

    Key idea: A linear homogeneous recurrence with constant coefficients must have previous terms multiplied only by fixed constants, with no standalone terms and no non-linear operations.

    Step 1: Check option A: . The "+ 2" makes it non-homogeneous.

    Step 2: Check option B: . The multiplier "" means it does not have constant coefficients.

    Step 3: Check option C: . The terms are linear, coefficients (4 and -3) are constant, and there is no standalone term. This fits all criteria.

    Step 4: Check option D: . The squared term makes it non-linear.

    Answer:

    Question 10 · Engineering Mathematics MCQ

    For the Merge Sort algorithm, the recurrence relation is . What is the minimum depth of the recursion tree when the input size is ?

    1. A.

      4

    2. B.

      5

    3. C.

      16

    4. D.

      32

    Correct Answer:

    B

    Step-by-Step Solution

    Key idea: In a divide-and-conquer recurrence , the problem size is divided by at each level. The depth of the recursion tree is the number of times you can divide by until you reach the base case (size 1).

    Step 1: Identify the division factor from the recurrence. Here, .

    Step 2: The depth satisfies , which means .

    Step 3: Substitute and : .

    Step 4: Solve for : .

    Answer: 5

    More practice questions in this unit