chapter

    Solving Recurrences Practice Questions for Cmi M.sc. and Ph.d. Computer Science

    Solve 0+ Solving Recurrences practice questions for CMI M.Sc. and Ph.D. Computer Science with answers and detailed solutions. Free sample questions below.

    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.

    Explore complete test series, official past papers, and chapter-wise study tools.

    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.

    Solving Recurrences Practice Questions for CMI M.Sc. and Ph.D. Computer Science

    Solve 0+ Solving Recurrences practice questions for CMI M.Sc. and Ph.D. Computer Science with answers and detailed solutions. Free sample questions below.

    What a recurrence is

    Intuition

    What a recurrence is

    A recurrence expresses a term using earlier terms and initial values, turning a step-by-step counting process into a checkable equation.

    The problem it solves

    A counter asks how many moves solve a Tower of Hanoi with disks. She does not count from scratch. She says: to move disks, first move disks aside, then move the bottom disk, then move the disks back. That sentence is a recurrence. The analogy stops here: a recurrence is a mathematical equation, not a sentence, and it applies to any indexed sequence, not just puzzles.

    The idea made exact

    A recurrence relation on a sequence is an equation that expresses in terms of earlier values , together with initial values that pin down the first few terms.

    The exact version adds two pieces. First, the equation itself, which tells you how to compute from earlier terms. Second, the initial values, which anchor the computation at the bottom. Without both, the recurrence is an incomplete instruction.

    needs initial values defined for

    Setting up a recurrence from a problem

    Derivation

    Setting up a recurrence from a problem

    We translate the rules of moving disks into an equation for the minimum number of moves.

    disks on source peg one auxiliary peg larger never on smaller
    1. To move disks, we must at some point move the largest disk from source to target. largest disk must move.
    2. Before that move, the top disks must all sit on the auxiliary peg. Moving them there takes moves. subproblem of size .
    3. Moving the largest disk takes $1$ move. single disk move.
    4. Moving the disks from the auxiliary peg to the target takes moves. second subproblem of size .
    5. Total: . sum the parts.
    6. Base case: with zero disks, no moves are needed, so . anchor at the bottom.
    Result
    Check

    . . . Each matches direct counting.

    More practice questions in this unit