The Tower of Hanoi problem is a classic example of a problem that can be…

2025

The Tower of Hanoi problem is a classic example of a problem that can be solved using recursion. How many minimum moves are required to solve the Tower of Hanoi problem with 3 disks?

Answer: B. 7ConceptThe Tower of Hanoi puzzle has a well-known recurrence for the minimum number of moves: T(n) = 2·T(n-1) + 1, with base case T(1) = 1. Solving this…

  1. A.

    3

  2. B.

    7

  3. C.

    15

  4. D.

    63

Attempted by 4 students.

Show answer & explanation

Correct answer: B

Concept

The Tower of Hanoi puzzle has a well-known recurrence for the minimum number of moves: T(n) = 2·T(n-1) + 1, with base case T(1) = 1. Solving this recurrence gives the closed-form formula: Moves = 2n − 1, where n is the number of disks.

Application

  1. Identify the number of disks: n = 3.

  2. Write the closed-form formula: Moves = 2n − 1.

  3. Substitute n = 3: Moves = 23 − 1.

  4. Evaluate the power: 23 = 8.

  5. Subtract: 8 − 1 = 7.

Cross-check

Verify independently using the recurrence itself, building up from the base case: T(1) = 1. T(2) = 2·T(1) + 1 = 2·1 + 1 = 3. T(3) = 2·T(2) + 1 = 2·3 + 1 = 7. This matches the closed-form result exactly.

Result

Therefore, the minimum number of moves required to solve the Tower of Hanoi problem with 3 disks is 7.

Explore the full course: Bihar Stet Paper Ii Computer Science

Loading lesson…