Logic Puzzle - Age equals sum of digits

preview_player
Показать описание


Send me suggestions by email (address at end of many videos). I may not reply but I do consider all ideas!

If you purchase through these links, I may be compensated for purchases made on Amazon. As an Amazon Associate I earn from qualifying purchases. This does not affect the price you pay.

If you purchase through these links, I may be compensated for purchases made on Amazon. As an Amazon Associate I earn from qualifying purchases. This does not affect the price you pay.

Book ratings are from January 2023.

My Books (worldwide links)

My Books (US links)
Mind Your Decisions: Five Book Compilation
A collection of 5 books:
"The Joy of Game Theory" rated 4.3/5 stars on 290 reviews
"The Irrationality Illusion: How To Make Smart Decisions And Overcome Bias" rated 4.1/5 stars on 33 reviews
"40 Paradoxes in Logic, Probability, and Game Theory" rated 4.2/5 stars on 54 reviews
"The Best Mental Math Tricks" rated 4.3/5 stars on 116 reviews
"Multiply Numbers By Drawing Lines" rated 4.4/5 stars on 37 reviews

Mind Your Puzzles: Collection Of Volumes 1 To 3
A collection of 3 books:
"Math Puzzles Volume 1" rated 4.4/5 stars on 112 reviews
"Math Puzzles Volume 2" rated 4.2/5 stars on 33 reviews
"Math Puzzles Volume 3" rated 4.2/5 stars on 29 reviews

2017 Shorty Awards Nominee. Mind Your Decisions was nominated in the STEM category (Science, Technology, Engineering, and Math) along with eventual winner Bill Nye; finalists Adam Savage, Dr. Sandra Lee, Simone Giertz, Tim Peake, Unbox Therapy; and other nominees Elon Musk, Gizmoslip, Hope Jahren, Life Noggin, and Nerdwriter.

My Blog

Twitter

Instagram

Merch

Patreon

Press
Рекомендации по теме
Комментарии
Автор

Based on personal experience, i turned 25 in 2021 and I was born in 1996. 1+9+9+6=25. So I'm fairly certain the answer is 1996

MadisonM
Автор

I used a different approach that was friendlier for head maths since I didn’t feel like taking out a pen and paper.
I thought about the problem for a little bit and realized that the maximum sum of digits for the 2010s would be 12, because 2019 is the biggest. 2019 is also 2 years away from 2021. Because each year decreases the sum value by one, that meant I could take the average of the two numbers to find a middle value that had a sum value which was the same as its distance from 2021. 12 + 2 is 14, 14/2 is 7, 2021 - 7 is 2014, 2 + 0 + 1 + 4 is 7. I thought there might be multiple answers but i was too lazy to look for a second one.
The 1996 answer can be proved with the same method, however. The max sum value of 1990s would be 28, and 1999 is 22 years away from 2021. 28 + 22 = 50, 50/2 = 25, 2021-25 = 1996, 1 + 9 + 9 + 6 = 25.

koibubbles
Автор

There are two possible solutions:

Consider the first case when the year is between 1900 and 2000 (exclusive), in this case, let the year is 19xy.
The sum of the digits is 1 + 9 + x + y = 10 + x + y
The age is 2021 - 19xy = 2021 - 1900 - 10x - y = 121 - 10x - y.
Since the sum of the digits is equal to the age:
121 - 10x - y = 10 + x + y
=> 111 - 2y = 11x

By searching for y, it gets y=6 such that 111 - 2y is divisible by 11.
In this case, the value of x is 9.
Therefore, the age is 10+9+6=25, and the year is 1996.

Consider the first case when the year is between 2000 and 2021 (exclusive), in this case, let the year is 20xy.
The sum of the digits is 2 + 0 + x + y = 2 + x + y
The age is 2021 - 20xy = 2021 - 2000 - 10x - y = 21 - 10x - y
Since the sum of the digits is equal to the age:
21 - 10x - y = 2 + x + y
=> 19 - 2y = 11x

By searching for y, it gets y=4 such that 19 - 2y is divisible by 11.
In this case, the value of x is 1.
Therefore, the age is 1 + 4 + 2 = 7, and the year is 2014.

peterkwan
Автор

If born in the 1900s, the max age is 1+9+9+9 = 28.
If born in the 2000s, the max age is 2+0+1+9 = 12.
This greatly simplifies the logic.

EricScheid
Автор

I figured that the maximum sum of digits can be 28 (1+9+9+9), and from that I can check the 28 cases in less time than the duration of this video.

morrispearl
Автор

Another possible solution is to see that both year and age have the same remainder from division by 9 (7), and then see the upper limit of age as the maximum possible sum of digits in a year - 1+9+9+9 which left us with only three possible values for age: 7, 16 and 25 years old, which can be easily checked (and option 16 therefore discarded).

МаркИпатов-йз
Автор

Here's how I did it in very few seconds :-
The maximum sum of digits in a birthyear would be in the year 1999 i.e 28, then as we go back sum of the digits will reduce to 25 and the age will increase to 25 from 22(the age if you were born in 1999) i.e birthyear would be 1996. And minimum sum is 2 at the year 2000 where you will be 21 and then max sum in 2000s is 2009 i.e 11 but your would be 12 so then check in 2010's, you will get 2014 as another answer

tigerinthejungle_
Автор

Intuitively thought of 2014 immediately, but wasn't sure how to make a full method. Interesting video!

OfficialScottR
Автор

Faster method from 1:57 - Since b<=9, then 2b<=18 and so 11a>=93, or a>=93/11>8, so a=9 is the only possibility. You can use the same method to show that there are no solutions if you were born in the 1800s (or earlier), so the statement "I am less than 100 years old" is redundant. Thanks for the problem, enjoyed this one!

Dan-vtvk
Автор

The calculation of the first case might be greatly simplified if we consider, that the maximum possible age is in fact 1 + 9 + 9 + 9 = 28 (there are no combinations greater than that), thus the minimum considered year is 1993, therefore, a is 9, and b in [3..9].

TheSome
Автор

I picked a year in the late 20th century and calculated the age and the sum. My first guess was 1990, whose sum is 19 and the age would be 31. As the year increases, the age decreases but the sum increases, so i then checked 1991 which got me 20 as the age and 30 as the sum, noticed that 5 years further would get a 25 and a 25, so the answer would be 1996.

ParadoxDev_
Автор

Somehow he made the solution prozess more complicated than it had to be.

2021 - abcd = x
a+b+c+d = x
x < 100

case 1
a= 1, b= 9
assume c=9, d=9 => a+b+c+d = 28, 22 = 2021 - abcd (difference 6, half 3)
assume c=9, d=6 => a+b+c+d = 25, 25 = 2021 - abcd
=> 1996

case 2
a= 2, b = 0
assume c=1, d=9 => a+b+c+d = 12, 2 = 2021 - abcd (difference 10, half 5)
assume c=1, d=4 => a+b+c+d = 7, 7 = 2021 - abcd
=> 2014

maraann
Автор

I used Excel - nesting numbervalue(), left(), and right() functions to extract and sum the individual year digits. Not as elegant as Mr. Talwalkar's solution, but got the job done.

robertlewis
Автор

Since you’re less than 100 years old, that limits the range of years to 1922 or after. Then, with some trial and error, I stumbled upon 1996.

emtheslav
Автор

Pretty easy with modular arithmetic. A number is equivalent to the sum of its digits modulo 9. So if the birth year and age are equivalent to x mod 9, 2021 is equivalent to 2x. 2021 is equivalent to the sum of its digits, 5. If 2x is equivalent to 5 modulo 9, x is equivalent to 7. So we try ages of 7, 16, and 25. 16 doesn't work as an age, but the other 2 check out.

dujas
Автор

A bonus question
A draft version of the video omitted the words "On my birthday." This leads to one more possible answer. Left as an exercise for the reader!

tonyhasler
Автор

I was able to get both correct answers, but through a completely different route. I did start with the realization that someone celebrating a birthday in 2021 would either be born in the 20th or 21st Century, so a year starting with 19 (the sum of which is 10) or 20 (the sum of which is 2). I quickly realized that the year with the highest possible sum in that range, 1999, would yield a sum of only 28-- and since someone born in 1990 would be 31 in 2021, it immediately ruled out anything before the 1990s. 2020 could also be ruled out, since the sum of the digits was 4, which is greater than than 1. That meant the person in question was born in the 1990s, 2000s, or 2010s.

Next, I calculated the ranges of both the sums of the digits and the possible ages for each decade, based on 2021 being the given year in the question, in order to see if there were any overlaps in the two sets of numbers that could potentially indicate an answer. For the 1990s, the sum range was 19-28, and the age range was 31-22 (going from 1990 to 1999); there was an overlap here. For the 2000s, the sum range was 2-11, and the age range was 21-12; no overlap at all, so the entire decade could be discarded as a possibility. For the 2010s, the sum range was 3-12, and the age range was 11-2; the ranges overlapped here too, so a second date could be possible. So now I knew I had one possible answer in the 1990s, and one in the 2010s.

From there, it was just a simple matter of figuring out how the two ranges fell in each decade, and where they lined up in the middle. By listing the two values for each year of the 1990s and 2010s, I was able to find both matches pretty rapidly-- 1996 and 2014. I double-checked each to make sure the math worked out, and had my answers. Not a particularly elegant or efficient way to arrive at the solution, but it worked. :p

chevand
Автор

Where this video and I diverged in our solution is at 2:17. I used x, y instead of a, b, but they are exactly the same. I went to 111 - 11x = 2y, then, since y can't be greater than 9, I turned it into the inequality

111 - 11x <= 18
-11x <= -91
x >= 8.27
therefore x = 9

You then just plug that back into the equation and get y = 6. The 20xx's are even easier as by inspection x can only possibly be 1. 0 and 2 obviously don't work when y is limited to the range [0..9], Thus you plug it in directly and get 4.

BangkokBubonaglia
Автор

The numbers of the solutions are fewer than I expected.

vacuumcarexpo
Автор

So basically what I did:
Since 1+9+9+9=28, that's the largest possible sum. 2021-28=1993 so only years after that can be answers. There can be max. one year per decade since increasing the last digit decreases the age (and vice versa). 2021 is odd, which means the year of birth and age must have opposite parities, so the first 3 digits of the year of birth must add up to an odd number. This leaves only the 1990s and 2010s as options. And checking years from those decades gives us 1+9+9+6=25 and 2+0+1+4=7.

StarTheTripleDevil