Placement AptitudeVery hardProduct company OA · CAT level

Eight books standing in positions 1 to 8 on a shelf are taken down and put back so that every book ends up either in its original position or in a position next to it. In how many ways can they be put back (including the original order)?

  1. A. 21
  2. B. 34
  3. C. 55
  4. D. 64

Correct answer: B. 34

Look at book 1: either it stays (then the remaining 7 books form the same problem) or it swaps with book 2 (the only way book 2 can then be placed is position 1, so the two simply swap), leaving 6 books. So aₙ = aₙ₋₁ + aₙ₋₂ with a₁ = 1, a₂ = 2: 1, 2, 3, 5, 8, 13, 21, 34. a₈ = 34. 21 is a₇; 64 = 2⁶ treats each neighbouring pair as an independent swap, but overlapping swaps conflict.

More Permutations, Combinations and Probability (Placement) questions

Exams that ask this topic