Donate SIGN UP

Birthday By Numbers

Avatar Image
kuiperbelt | 14:23 Tue 04th Jul 2023 | Science
29 Answers
Should I live long enough to see it, on my birthday in the year 2025, my age will be equal to the sum of the digits of my birth year. I will still be less than 100 years old. What is my birth year and how old will I be in 2025?

Gravatar

Answers

1 to 20 of 29rss feed

1 2 Next Last

Avatar Image
// Still, I bet the program TTT wrote was faster :) // Albeit pseudocode, one could be forgiven interpreting I = 1925 as a declared variable and a constant. This leads to the statement... // if (2025 - I) = dtot // corresponding to... 'if 100 = dtot'. Clearly no 4 digits arranged in any permutation will sum to 100. Plainly, Clare concedes her work to the brevity of...
20:07 Thu 06th Jul 2023
1998
2016, 9
1998, 27
Question Author
I only have the one answer, 1998.

Could it be that 2016 has been dispensed with as no child could be so precocious?? BTW, well done TTT for finding another (if not realistic) answer.

I am torn as to award BA to. Hymie for being the first to answer or TTT's touch of brilliance. Can either of you give a pointer to the method you applied??
This is the type of question where there is more than one correct answer, because criteria have not been adequately specified – so 2016 is an equally valid answer as is 1998.

My solution was arrived at by assuming that all 4 digits of the birth year were to be summed.

Based on this, it is clearly evident that the birth year cannot be from 2000 onwards, I then very quickly determined that no birth years during the 1970s & 1980s would give a correct solution and honed in on the late 1990s, first 1999 and then the correct answer 1998.
Am i still asleep, why could it not be 1989?
i am still asleep ignore me
I wrote a program.
here is a psuedo code version:
do i=2025 by -1 until I=1925
dtot=d1+d2+d3+d4 (digits of i)
if (2025 - I) = dtot then
print I ...we want these.
end-if
end-do
sorry AB mangled my indentations.
hymie: "My solution was arrived at by assuming that all 4 digits of the birth year were to be summed. " - they are it says it in the question.
"Based on this, it is clearly evident that the birth year cannot be from 2000 onwards" - why?
To get the answer by logic, you could ty something like the following:

Let the age be x, and the birth year be y = 1000a + 100b + 10c + d, where a,b,c,d run from 0-9. Then the problem tells us that y + x = 2025, and x = a +b + c + d, which we can put together to get

1001a + 101b + 11c + 2d = 2025 .

As all digits are positive, we can run through all possibilities, and rule a lot out, quite quickly. Starting with a = 3-9, which clearly doesn't work. Also, suppose a = 2, then we get

101b + 11c + 2d = 2025 - 2002 = 23

which forces b = 0, ie 11c + 2d = 23.

Now we can see that, if c = 0, then 2d = 23 has no solution for d, while if c = 2 then 2d = 23 - 22 = 1 also doesn't work.

On the other hand, c = 1 gives 2d = 12 and so d = 6, hence y = 2016 is a solution.

Now, moving to a = 1, you'd have

101b + 11c + 2d = 2025 - 1001 = 1024.

Note that the maximum value of 11c + 2d is 13*9 = 117 , so that at minimum 101b = 1024 - 117 = 907, which means that b has to be 9 going backwards, this gives 11c + 2d = 115, which (by a similar argument) only works for c = 9, and so finally d = 8.

Hence there are indeed only the two solutions TTT found, and we haven't needed to resort to brute force. This approach is, I suppose, a sort of "squeeze", as we've zoomed in on the correct solutions by narrowing the window from both sides until finally only the solution(s) remain.

Still, I bet the program TTT wrote was faster :)
||| AB mangled my indentations |||

That sounds painful :-))
I would award BA to TTT for answering both parts of the question.
// Still, I bet the program TTT wrote was faster :) //

Albeit pseudocode, one could be forgiven interpreting
I = 1925 as a declared variable and a constant.

This leads to the statement... // if (2025 - I) = dtot // corresponding to... 'if 100 = dtot'.

Clearly no 4 digits arranged in any permutation will sum to 100.

Plainly, Clare concedes her work to the brevity of pseudocode and Hymie is in denial over the solution given as 2016.

Therefore I implore, in the interest of conciseness (just 2 unknowns) consider the following as being the optimum solution.

Take the case of individual born after 1999.

Then; 2025 - 20xy (birth year) = age of person in 2025 where x and y represent 3rd and 4th digits of year born.

Rewriting; 2025 - (2000 + 10x + y) = 2 + 0 + x + y (sum of digits of birth year).

The equation can now be expressed as; 23 = 11x + 2y

The term '2y' will always be even therefore '11x' must be odd since 23 is an odd number.

Possible options for x are 1, 3, 5, 7 and 9. The term x = 3, 5, 7 and 9 can be discounted because the term x would be negative.

So let x = 1, this leads to 11x = +11 which equates in 2y = 12 resulting in y = 6

Substituting values for x and y it can be seen the birth year '20xy' becomes 2016, yielding an age of 9 in the year 2025.

Likewise, one born in the 20th century, engenders the following equation;

2025 - 19xy = 1 + 9 + x + y where 19xy signifies the birth year.

2025 - (1900 + 10x + y) = 1 + 9 + x + y ---> simplifying;

115 = 11x + 2y Once gain the term 11x must be odd as 115 is an odd number.

x = 1, 3, 5, and 7 can be discarded, because the term 2x > 37, leading to x > 18, this cannot occur as x must be a single digit!

Moving on;

When x = 9 consequently 2y = 16 providing the answer y = 8.

Thus birth year is 1998, aged 27 in the year 2025.

Although not a compendious account, this treatise is intended to demystify the complexity of the question by avoiding daunting equations and furthermore, keeping a rigid focus on the practicality of the problem in a real world scenario.

Kuiper, wing that BA over here. You know it makes sense ;-)
zebu, load of ***, it's psuedo code thus its meant to give humans a general idea.
This does demonstrate how a few lines of brut force code beats algebra for simplicity.
"do i=2025 by -1 until I=1925 " - is a standard do loop form, anyone with the slightest IT knowledge knows what it means
do this loop subtracting 1 from 2025 until it becomes 1925.
// it's psuedo code thus its meant to give humans a general idea. //

Given >08:56 - General is the best it could ever be.
What The Funicular are you on about?
That is a psuedo representation of my actual code. Stop being such a rissole.
Tora deserves BA. Perhaps the only reason 2016 was not considered was because the question was originally asked before then.

1 to 20 of 29rss feed

1 2 Next Last

Do you know the answer?

Birthday By Numbers

Answer Question >>