There are five thieves; each one robs a bakery, one after another. The first…

2024

There are five thieves; each one robs a bakery, one after another. The first thief takes half of the total number of breads plus half a bread. The second, third, fourth, and fifth thieves each do the same — taking half of the breads remaining at that point, plus half a bread. After the fifth thief has taken his share, 3 breads remain. Initially, how many breads were there?

  1. A.

    125

  2. B.

    126

  3. C.

    127

  4. D.

    128

Attempted by 2 students.

Show answer & explanation

Correct answer: C

Concept: When a quantity is repeatedly reduced by ‘half of the current amount plus half a unit’, work backward from the final remaining amount using the inverse relation: amount BEFORE a step = 2 × (amount AFTER that step) + 1. This follows directly from the forward rule after = before/2 − 1/2, i.e. before = 2×after + 1.

Application: Apply this inverse relation five times, starting from the final remainder of 3 breads (left after the fifth thief) and working backward to before the first thief took his share.

  1. Before the fifth thief (i.e. the remainder after the fourth thief) = 2 × 3 + 1 = 7.

  2. Before the fourth thief (remainder after the third thief) = 2 × 7 + 1 = 15.

  3. Before the third thief (remainder after the second thief) = 2 × 15 + 1 = 31.

  4. Before the second thief (remainder after the first thief) = 2 × 31 + 1 = 63.

  5. Before the first thief — the initial number of breads — = 2 × 63 + 1 = 127.

Cross-check (forward simulation starting from 127):

  • Thief 1 takes 127/2 + 1/2 = 64; remaining = 127 − 64 = 63.

  • Thief 2 takes 63/2 + 1/2 = 32; remaining = 63 − 32 = 31.

  • Thief 3 takes 31/2 + 1/2 = 16; remaining = 31 − 16 = 15.

  • Thief 4 takes 15/2 + 1/2 = 8; remaining = 15 − 8 = 7.

  • Thief 5 takes 7/2 + 1/2 = 4; remaining = 7 − 4 = 3 — matching the final remainder given in the question.

Result: The bakery initially had 127 breads.

Explore the full course: Infosys Preparation

Loading lesson…