Question:

There is a vertical stack of books marked 1, 2 and 3 on Table-A, with 1 at the bottom and 3 on top. These are to be placed vertically on Table-B with 1 at the bottom and 2 on the top, by making a series of moves from one table to the other. During a move, the topmost book, or the topmost two books, or all the three, can be moved from one of the tables to the other. If there are any books on the other table, the stack being transferred should be placed, on top of the existing books, without changing the order of books in the stack that is being moved in that move. If there are no books on the other table, the stack is simply placed on the other table without disturbing the order of books in it. What is the minimum number of moves in which the above task can be accomplished?

Show Hint

The three books must end on Table-B in the order 1, 3, 2 from bottom to top. Moves never change the order inside a moved stack, so books 2 and 3 have to be separated at some point.
Updated On: Nov 4, 2026
  • One
  • Four
  • Three
  • Two
Show Solution
collegedunia
Verified By Collegedunia

The Correct Option is B

Solution and Explanation

Step 1: Target arrangement:
All three books must end on Table-B with 1 at the bottom and 2 on top, so from bottom to top Table-B holds 1, 3, 2. Initially Table-A holds 1, 2, 3 (bottom to top), so 2 and 3 must swap places.

Step 2: A solution in four moves:
Move 1: move book 3 to Table-B. (A: 1, 2; B: 3). Move 2: move book 2 to Table-B on top of 3. (A: 1; B: 3, 2). Move 3: move the top two books (3, 2) back to Table-A on top of 1. (A: 1, 3, 2; B: empty). Move 4: move all three books to Table-B. (B: 1, 3, 2). So four moves are enough.

Step 3: Why fewer is not possible:
After 1 move the possible positions (A | B) are: 12 | 3, 1 | 23, and nothing | 123. After 2 moves they are: 1 | 32, nothing | 312, nothing | 231, 13 | 2, 3 | 12, 23 | 1. None of these is the target (nothing | 132). A is empty in the target, so the last move takes books from A to B, and just before it the position (A | B) was one of 2 | 13, 32 | 1 or 132 | nothing. None of these appears in the lists above (after 0, 1 or 2 moves), so each needs at least 3 moves. Hence the target needs at least 4 moves.

Final Answer:
The correct option is (2): Four
Was this answer helpful?
0
0

Top CAT Quantitative Aptitude Questions

View More Questions