Page 1 of 1

Algorithm that will reveal your age

Posted: Fri Jan 29, 2016 6:24 pm
by Eli
The problem below was originally posted by someone on the WhatsApp group. The first step needed a person to consider the last digit of his/her phone number, actually, this step is equivalent to choosing randomly any integer from $0$ to $9$, because practically, phone number's last digit must be any integer from $0$ to $9$. There are a couple of modifications I've made but they do not in any sense change the logic of the original problem.

Here is the problem:

1. Consider any integer from $0$ to $9$, call it $n$.

2. Multiply the integer by $2$.

3. Add $5$ to the answer in 2 above.

4. Multiply the answer obtained in Step 3 by $50$.

5. Add the number $1766$ to the result obtained in 3 above.

6. Subtract $n \times 100$ from the answer obtained in step number 5 above.

7. Finally, subtract your birth year from the answer obtained in step number 6.


The answer you get is your age!


The question is, what is the mathematics behind this problem?


Let's go step-by-step to reveal out the secret!

Step 1. Let's consider an integer, say $n$.

Step 2: Let's multiply $n$ by $2$,

so, we have $2n$.

Step 3. Adding $5$, we have $2n + 5$.

Step 4. Multiplying by $50$, we get $(2n + 5)50$.

Step 5. Adding $1766$, results into $(2n + 5)50 + 1766$.

Step 6. Subtracting $n \times 100$ yields $(2n + 5)50 + 1766 - (n \times 100)$.

Step 7. Let's denote the birth year by $Y$, and finally, subtracting it from the answer in Step 6 above,

we have,

$\text{Age}= (2n + 5)50 + 1766 - (n \times 100) - Y \\ \\ = 100n + 250 + 1766 - 100n - Y \\ \\ = 100n - 100n + 250 + 1766 - Y \\ \\ = 2016 - Y,$

which is the usual algebraic formula for calculating roughly the age of a person in years, i.e.,

Age $=$ Current Year - Birth Year.

$250$ that comes from Steps 3 and 4 is added to a constant $1766$ (for the algorithm to work, this number needs to be incremented by $1$ each year after 2016) to obtain $2016$, which is the digit for the current year. The rest of the terms cancel each other, and we remain with $2016 - Y$.

Re: Algorithm that will reveal your age

Posted: Sat Jul 30, 2016 2:17 pm
by 1/0
Interesting