CAT 2020 Slot 1 — QA Question 8
A gentleman decided to treat a few children in the following manner. He gives half of his total stock of toffees and one extra to the first child, and then the half of the remaining stock along with one extra to the second and continues giving away in this fashion. His total stock exhausts after he takes care of 5 children. How many toffees were there in his stock initially?
Answer & solution
Answer: 62
Easy
Each child receives "half of what's there, plus one more." Working forward is messy, so work backwards: after the 5th child the stock is 0, and "before" can be recovered from "after" by reversing the step. Reversing gives .
Set up the reverse rule. If a child sees toffees, the stock left is . So given the "after" amount, the "before" amount is .
Unwind from the 5th child to the start. Stock is 0 after the 5th child; apply the reverse rule five times.
The pattern is starting from : (each term is one less than a power-of-two multiple: ).