One night at McDonald's, the fry cook asked the cashier "How old are those three customers?"
"Well," replied the cashier, "the product of their ages is 16170 and the sum of their ages is three times your age."
"I'm afraid I still don't know" said the fry cook.
"Ah, none of them are the same age as you! You should be able to figure out their ages now!" cried the cashier.
“Why thank you!” said the fry cook, ”Now I know their ages!”
What is the positive difference between the age of the oldest customer and the youngest customer?
[This question is correctly phrased. There is enough information to arrive at a unique answer.]
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
How about the 21,22,35 which sum up to 78 and is a multiple of 3?? so the waiters age becomes 26. this also satisfies all the conditions given in the question.
Log in to reply
Of course not my friend. The fry cook does know how old he is and all the other combinations except 1 1 , 3 0 , 4 9 and 1 4 , 2 1 , 5 5 have distinct value of their sum. If the combination is 2 1 , 2 2 , 3 5 or other than those two, the fry cook would immediately know the combination of their ages customers but he couldn't, which means there must be two or more combinations have equal sum that made he was confused, that's why he needed the second clue. You might want to read about puzzles in the movie Fermat's Room to understand this problem.
Log in to reply
Wow that last clue totally flew over my head. I was sure there were multiple possible answers to this problem, thanks for clarifying.
Dude you r supposed to get a unique solution. So u hav to fix or find cook's age first.And cook's age should be greater then 26 because A.M> =G.M
if it is he will know it at once
What about 77, 21 and 10 sum is 1670 and the cook is 36. Difference of the oldest to the youngest is 67
You explained it quite well.
I used trial and error too, with a little help from the computer. But you can narrow things down a lot as shown in other solutions.
very good.. i just luck to find 14,21, and 55. Well first i find 11,30, and 49 but i did'nt think there is connection between them.
I think that 10, 21, and 77 is also a possible combination
Log in to reply
but the chef was confused , he needed one more hint to solve the problem,this combination would have resulted in an immediate answer therefore this combination is not possible, read the question carefully again
Woah ! man What a thought . "he knew his age and still had confusion in solving that means he got multiple cases for same sum of value" . thanks :)
There are other possibilities which sum up to give a multiple of 3..... 10,21,77.......&.........21,22,35
I tried 5,49,66 and it was not listed as an answer, although it fulfills all of the listed conditions.
First, let's try to figure out what is going on:
Since the fry cook knows how old he is, he knows both the sum and the product of the ages. Additionally, his age is the average of the three ages (make sure you see why). So he knows the sum and product, yet he still doesn't know their ages! That means there must be more than one case!
How can we find these cases?
The problem implies that there exists a case with the average being the fry cook's age. Since one is his age, one must be k larger than his age, and the other must be k less. If the fry cook's age is f, then we have ( f − k ) ( f ) ( f + k ) = f 3 − f k 2 = 1 6 1 7 0 . Here it gets a bit guess and checky, but I tried to be nice when I wrote the problem, so the first thing most people try (f=30) works so we have 2 7 0 0 0 − 3 0 k 2 = 1 6 1 7 0 ⟹ k = 1 9 so we obtain the triple (11,30,49), and this sums to 90!
How to find the other case?
Not sure of a good way actually. All we have to do is find integers (a,b,c) such that abc=16170 and a+b+c=90 which after a bit of guess and check, we find is (14,21,55), so the difference is 4 1
I see a lot of comments suggesting that there are multiple answers. Extending Nathan's argument, we see that f divides 16170 and f 3 >16170. Thus f is a factor of 16170 that is greater than 25.
Additionally, f 1 6 1 7 0 = f 2 - k 2 >= f 2 − ( f − 1 ) 2 = 2 f − 1 . For (f,k) equal to (f,f-1), the quadratic equation has irrational roots. Thus f 1 6 1 7 0 being an integer is greater than or equal to 2f. This gives us that f is lesser than 90.
So only the factors that we need to check are 30, 33, 35, 42, 49, 55, 66, 70 and 77. Put them in the following equation and check if the result is a square:
f 2 − f 1 6 1 7 0 = k 2
Only 30 works. So the average has to be 30. Messing around a little, we get the other solution (14,55,21).
Say the cook is 36 years old. And the ages of the customers are 21, 77, and 10. How does that not work? Change the question to ask for the minimum difference, or something like that, because 41 is not the only answer.
Log in to reply
(77 21 10) add up to 108 along with (66 35 7). but the average is 36 so this combination cannot be. Only other combo is (55 21 14) and (49 30 11) adding up to 90. And so it is 55-14 = 41 considering the cooks age is 30.
Log in to reply
(Satyen, note that your 22 should be 21.)
Finn, how does your example work? In what way does telling the cook "None of them are the same age as you" allow the cook to conclude what the ages of the customers are? Which set of ages is rejected?
In the example that Nathan gave, the possible ages are (11, 30, 49) and (14, 21, 55). And because the cook knows that none of them are 30 years old, hence he now knows that they must be (14, 21, 55).
Log in to reply
@Calvin Lin – Oh, I see.
@Calvin Lin – Why doesn't 22,35 and 21 work?
Log in to reply
@Snehdeep Arora – Dear Snehdeep, Because it adds up to 78. There is no other combination that adds up to 78 in which case the cook knowing his own age would be able to make out the three ages with the very first info provided. Hence the sum of the ages had to be a total which could be provided by two or more combinations.
i agree....i thought that as well
When you say,
Here it gets a bit guess and checky, but I tried to be nice when I wrote the problem, so the first thing most people try (f=30)
It actually isn't. The sum of the three is
f + (f-k) + (f+k) = 3f = 90
, which means
f=30
. After plugging it in, you get
Log in to reply
I left off on the previous post; you get k = 19.
The sum of their ages remains unknown to us. We cannot equate it to 90.
what about ( 7 , 30 , 77 ) the answer then is 70
Log in to reply
Can you get 70 with any other combination? No. If it was 70 then the cook would know it after the first piece of info. Only those numbers which are possible to get with two combos can be considered.
Baat teh mundae di sayi hai
How to find the other case?
Not sure of a good way actually.
...
Did you consider m o d 7 ?
Log in to reply
I don't think anyone else has commented yet on how m o d 7 can be used here, so I'll elaborate: Once we know that the "excluded triple" is ( 1 1 , 3 0 , 4 9 ) , and that we need another triple with sum 9 0 and product 1 6 1 7 0 , it is easy to check that two of the numbers must be multiples of seven.
Therefore, the other number must be ≡ 9 0 ≡ − 1 ≡ ( − 2 ) 3 m o d 7 and it must be a factor of 3 3 0 = 2 ∗ 3 ∗ 5 ∗ 1 1 . Then if we note that:
5 ≡ − 2 m o d 7
1 1 ≡ ( − 2 ) 2 m o d 7
2 ≡ ( − 2 ) 4 m o d 7
3 ≡ ( − 2 ) 5 m o d 7
then we can show that the only factors of 3 3 0 that are ≡ 9 0 m o d 7 are 6 and 5 5 .
6 doesn't yield a suitable triple, but 5 5 leads us to the desired 1 4 , 2 1 , 5 5 .
Log in to reply
Oh... This is kind of late but I never got a chance to look at this. Nice!
this question is not clear,and it is poor. there are many solutions which we can come up with (product is 16170 and no one has the same age) i found some,they are (10,21,77) (11,21,70) ...
Log in to reply
This question is subtle. There really is only one solution. Your solution (10, 21, 77) isn't valid because the sum of the ages is 98 which isn't a multiply of 3. The same goes for your other solution (11, 21, 70) has a sum of 92, also not divisible by 3.
Log in to reply
Dude seriously are you f*kin mad 10+21+77=108 And11+21+70=102 You fool !!!
I took 21 22 and 35. So the total came 78 which brings the cooks age to 26. Sad question.
Log in to reply
but no other combination gives you 78. Also the average,26, should divide 16170. In this case, it does not.
10,21,77 satisfies all conditions too!
Actually (22,21,35) and (10,21,77) too work along with (14.21.55)........reason i got my first try incorrect lol!!
Log in to reply
How do they work? If those were their ages then the guy would have know off the bat. Use the fact that he needed to know that none were his age.
The first two do not sum to 90.... that's why they don't work.
Log in to reply
why does it need to be equal to the sum of 90??It may as well be 108 for that matter
I was confused at first by these two sets that sum to 108. Then I finally realized that the cook's age would be 36, but hearing that none of them were his age wouldn't have helped him in this case, since both sets don't contain 36.
I had made this question by easiest method :-
as I had firstly taken out the positive divisors which are 2,3,5,7,11 after that the as we know the sum of ages is three times the cook therefore the sum of ages of three customers should be a multiple of 3 and when the sum is divided by 3 it should not be equal to the age of any customers
searching that qualification you will get only 4 sets (10,21,77) , (55,21,14) , (65,35,7) , (70,21,11)
In these you will find the most appropriate the 2nd set which is (55,21,14) .
I have taken this set because of following reasons:-
1) this can fulfill all the qualifications mentioned above. 2)this the set in which the age of younger customer is highest. 3)this is also the set which can be taken as a example.
OK ..i did this question by trial and error, but till a trick left...u might come across the combination 35,22,21 which satisfies all the conditions ..but that cannot the ans ..Because the sum of these 3 is 78 ..and no other combination has a sum 78 ..so the person would not need the 3rd hint ..but because the 3 rd hint was given we had to reject this odered triplet
Since the question does not say anything about the age of the cook. , the combination of ages (3,55,98) also satisfies the 2 conditions namely that the product is 16170 and the sum of their ages is156 (which is 3 times the age of the cook) which can be 52 years , and is also not individually equal to any of the ages of the customers.. So theoretically speaking the maximum possible diff between the age of the oldest & youngest customer can be 95 years also.
Log in to reply
Well the sum is very clever. Note the cook always knows his age. So now the cook works all possible triplets for 16170. Now he adds all triplets too see which of it is 3 times his age. So if any matched he would right away give his answer but he still could not. This means that two triplet sets exists such that they have the same sum, which was thrice the cooks age. Only after 2nd info was provided we can eliminate one set. And thus the answer. Initially even I did not get this. Got it on my third try but messed my subtraction. I did highest-second highest age, god knows why.
If that's so, then your cook would have known the ages without anymore extra information. First, surely he knows his own age. Second, he was told the product, the sum and the relationship between the sum and his own age. Still, he cannot solve it because he found more than one set of 3 ages that fulfill all the conditions. Your sum is unique, so those can't be the answers.
Problem Loading...
Note Loading...
Set Loading...
Perhaps this is not a good solution but I will try my best to explain it.
First of all, this question is the variant form of the famous math puzzle and the puzzle appears at movie Fermat's Room . By using the same logic, first thing that I should do is finding prime factorization of 1 6 1 7 0 . We obtain: 2 , 3 , 5 , 7 , 7 , 1 1 . Let x , y , and z be the ages of three customers and t be the age of the fry cook. Therefore, we have x y z = 1 6 1 7 0 and x + y + z = 3 t . Do not use any sophisticated method, use the easiest one: trial and error , because the combinations are not so many. Just make sure that x , y , z , and t are reasonable numbers, which means all of them are integers and each number is less than 1 0 0 . After using trial and error, we will find that there are two combinations that yield x + y + z = 9 0 , which are: 1 1 , 3 0 , 4 9 and 1 4 , 2 1 , 5 5 . These two combinations that made the fry cook could not determine the each age of the customers at the first time he got a clue from the cashier. After he got the second clue: "None of them are the same age as you!", he could determine the answer with 100% certainty, which is: 1 4 , 2 1 , 5 5 since t = 3 1 ( 1 1 + 3 0 + 4 9 ) = 3 0 ⇒ the same age as one of the three customers . Thus, the positive difference between the age of the oldest customer and the youngest customers is 5 5 − 1 4 = 4 1 .
Anyway, if you are interested to try 'similar' problem, you may want to try this one: Two Math Professors .
# Q . E . D . #