CAT 2020 Slot 1QA Question 8

2 Variable EquationsEasy

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

Solution

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 aa21a\to\tfrac{a}{2}-1 gives a=2(after+1)a=2(\text{after}+1).

1

Set up the reverse rule. If a child sees aa toffees, the stock left is a(a2+1)=a21a-\left(\tfrac{a}{2}+1\right)=\tfrac{a}{2}-1. So given the "after" amount, the "before" amount is a=2(after+1)a=2(\text{after}+1).

after=a21  a=2(after+1)\begin{aligned} &\text{after}=\frac{a}{2}-1\ \Rightarrow\ a=2(\text{after}+1) \end{aligned}
2

Unwind from the 5th child to the start. Stock is 0 after the 5th child; apply the reverse rule five times.

before 5th=2(0+1)=2before 4th=2(2+1)=6before 3rd=2(6+1)=14before 2nd=2(14+1)=30before 1st (initial)=2(30+1)=62\begin{aligned} &\text{before 5th}=2(0+1)=2\\ &\text{before 4th}=2(2+1)=6\\ &\text{before 3rd}=2(6+1)=14\\ &\text{before 2nd}=2(14+1)=30\\ &\text{before 1st (initial)}=2(30+1)=62 \end{aligned}

The pattern is an=2an+1+2a_{n}=2a_{n+1}+2 starting from 00: 0261430620\to2\to6\to14\to30\to62 (each term is one less than a power-of-two multiple: 2k222^k\cdot 2-2).

62 toffees62\ \text{toffees}
CAT 2020 Slot 1 QA Q8: A gentleman decided to treat a few children in the following manner. He gives half of his total stock of toffe — Solution | TheCATExam