Some people count sheep when they can’t get to sleep.
I create math puzzles when I wake up too early.
Here is my latest:
Alice is 10 years old and just got a newborn baby brother, Bob. Although he will always be ten years younger than she, there will be a point in time when Bob’s age is less than half of Alice’s age.
How old will Alice and Bob be when that milestone occurs?
To simplify the objective, we’re trying to find out how old Bob has to be for the number of years that he has been alive to be equal to/greater than the number of years difference between his age and his sister’s age.
Sure, we could plot out the siblings’ age progressions in a spreadsheet program to solve this problem by rote and/or visually (see chart at right for an example if you don’t care about spoilers).
But that approach requires data entry. It also doesn’t give us a formula that we can re-use to solve similar types of problems in the future.
Rather than focusing in on the specific numbers in the data, let’s contemplate the relationship between them. The first piece of the puzzle is the amount of time between Alice and Bob’s births. That’s simple enough.
yearsApart = Alice.currentAge – Bob.currentAge;
The second piece of the puzzle is how much longer Bob must live for the amount of time that he has been alive to equal or exceed the yearsApart.
yearsTilMilestone = yearsApart – Bob.currentAge;
Simple enough. Subtract the current age of the youngest from the delta between the two ages. Since Bob is a newborn, his effective current age should be considered 0 and yearsApart is 10. If we’d met Bob when he was 5, then yearsApart would be 5. If we’d met Bob when he was 7, then yearsApart would be 3. The point is, the yearsApart doesn’t change, and neither does the relationship between Bob’s current age and the yearsTilMilestone.
NOTE: if this calculation gives you a negative number, then that milestone has already occurred in the past!
Those two formulas can be consolidated into one, and made more generic, like so:
yearsTilMilestone = (older.currentAge – younger.currentAge) – younger.CurrentAge;
So ten years from now, Bob will reach the milestone of being less than half the age of his older sister, and Alice will reach the milestone of being less than twice as old as her brother.
Alice.milestoneAge = Alice.currentAge + yearsTilMilestone;
Bob.milestoneAge = Bob.currentAge + yearsTilMilestone;
Therefore, Alice will be 20, Bob will be 10. If we had been given actual birthdates instead of merely years, our result could be more precise, but this is the best we can hope for with the given data.