Saturday, April 21, 2007

Sum of hats Puzzle

The problem is taken from here :
Description goes like this :
There are 3 people Abel,Bill and Clark.Three of them have numbers written on their hats.One can only see the numbers written on others hats and can not see the number written on his own hat. Sum of numbers on any two 2 hats is equal to the number on the third hat.Now the following event occurs
1. Abel was asked about the number on his hat.He replied "Don't Know"
2. Bill was asked about the number on his hat.He also replied "Don't Know"
3. Clark was asked about the number on his hat.He also replied "Don't Know"a
4. Abel was asked again ,to which he repplied "50"

Now the question is how did he know it.And what are the numbers on other people's hats.

24 comments:

Anand Sebastin said...

Probably, they were standing side-by-side,and none of them could see the others hat number.
So, when asked about their number, each said, "I don't know". However, when saying I don't know, instinctively they shake their heads from side-to-side. So, now they have seen the numbers on the others' hats.
When asked the second time, the person is able to answer correctly

Theodor said...

I surely hope you meant positive integers, otherwise my reasoning is screwed.

Let k be some positive integer.

For convenience; let a, b and c represent the number on the hats of A, B and C; respectively.

It is given that a, b and c > 0.

Hence, a != 0, b != 0 and c != 0. So, if one of these guys come across a situation where the other two fellows have equal numbers on their hats, he would be left with only one solution and would hence know the number on his hat.

1. A doesn't know ->
{2k, k, k} is not a solution.

2. B doesn't know ->
{k, 2k, k} is not a solution.
{2k, 3k, k} is not a solution.

3. C doesn't know ->
{k, k, 2k} is not a solution.
{2k, k, 3k} is not a solution.
{k, 2k, 3k} is not a solution.
{2k, 3k, 5k} is not a solution.

So, one might be seeing the Fibonacci number connection here :).

4. A knows ->

One of these is a solution:

{3k, 2k, k}
{4k, 3k, k}
{3k, k, 2k}
{4k, k, 3k}
{5k, 2k, 3k}
{8k, 3k, 5k}

5. A says "50" ->

a needs to be an integer, so the only possible solution here is {5k, 2k, 3k}.

So, b = 20 and c = 30.


Now, how does A know?

1. A sees 20 and 30 ->
A knows either a = 50 or a = 10.

Let us consider a = 10.

2. C sees 10 and 20 ->
C knows either c = 30 or c = 10. However, if c = 10, B would definitely have known b.

Thus, by contradiction, A gets to know a = 50.

QED

Beautiful puzzle.

Amps said...

test

Amps said...

Not surte if "Theodor" has covered all the cases. How about (50, 1, 49) or (50, 49, 1). I feel the information is incomplete and can results in a lots of (may be infinitely many) solutions.

Let us look at the following argument from "theodor":

2. B doesn't know ->
{k, 2k, k} is not a solution.
{2k, 3k, k} is not a solution.

Why is {2k, 3k, k} not a solution. I think it very well can be a solution, but because there are other solutions also possible, B can not just pick this one. May be the inherent assumption of having a common fact or as "k" is a wrong one.

Suprema said...

Can someone please clarify this statement?? "Sum of numbers on any two 2 hats is equal to the number on the third hat"

Is that the actual question or was it supposed to be: Sum of numbers on two of the hats is equal to the number on the third hat??

Karthik Upadrasta said...

Theodor
Thats awesome!

Suman said...

Good one dude...Thanks


--------------
My blogs:
http://onepuzzleaday.blogspot.com
http://justriddles.blogspot.com
http://justfungames.blogspot.com
---------------

Doc Jong said...

The only way any of these guys could have guessed the number on their hats is if there were at least one 0 on one of the hats. If Abel sees 25 and -25 he can only have 50 or 0. Unfortunately he is the first to be asked, so he does not know it yet. But, since B and C cannot guess their number, he knows he cannot have the 0. Hence, it's 50...

Unpurposeful said...

This kind of has to be wrong I think, unless I'm misinterpreting the statement 'sum of number on any 2 hats is equal to the number on the third hat'. That implies that
a = b + c
b = a + c
c = a + b
But, then we can show that a, for example, is equal to zero by subtracting two of the equations:

b = a + c
- a + b = c
-----------------
-a = a

So a must be equal to zero. But the equations are symmetric, so you can show that any of a, b, or c are equal to zero.

Ashish said...

bhago

Ankush Bindlish said...

Correct condition :

1. Each person knows that the number on his hat is either the sum or the difference of the other two.

2. Positive numbers

3. Rest are same as in Description.

Theodor gave the right solution but it seems a copies otherwise "{2k, 3k, k} is not a solution. " wouldnt have come. (clue from Amps remark)

Ankush Bindlish said...

Theodor forget to give contradiction clue for the case c = 30, a=10
I agree we can discard
10 20(c-a) 30 {k, 2k, 3k} is not a solution.

How about contradicting 10 40(a+c) 30
k,4k,3k ?

Ganesh said...

Going by the question. They have asked the numbers on the other people hats also.....Which means this might be the only possiblity.

This might be a special case...where A,B,C have a,b & c oon their hats.where b should be equal to c. now say a=50, then b&c shd be 25 each.

When A sees b=25 and c=25. he has a doubt, that a might be 50 or 0.so he says donno.

When asked B, he sees a & c, so 50 and 25. so b might be 75 or 25. so he says donno.

When asked C, he sees a & b. which is 50 & 25. so he might think c is 75 or 25.

Now when asked A again. if a is 0, then B might have answered it correctly as he has access to a & c. if a is 0, he would have told b is 25. As B said donno. then def a shd be 50. so A answers.

So for this to happen A shd have the number which is the sum of other 2 hats and B & C shd have equal numbers. This is the only possiblity.

Interview Puzzles said...
This comment has been removed by the author.
Interview Puzzles said...
This comment has been removed by the author.
Interview Puzzles said...
This comment has been removed by the author.
Interview Puzzles said...

view interviewpuzzle.blogspot.com for more and latest puzzles and discussions...

厦门 said...

power balance
silly bandz
Raymond Weil Watches
concord papillon
rolex datejust 36mm
wedding dresses develop quality for discerning customers and Experience the comfort, free shipping.
Buy evening dresses with a price guarantee and top rated customer service.

Bhathiya99 said...

Not enough data

Awesome Guy

Frank said...

I think most people would do the same when they are headed with the situation.puzzles

lavesh said...

Hi I got inspired by your blog and created my own puzzle blog
Puzzles

himanshu said...

a=b+c
b=a+c
c=a+b

i.e.
a+b+c = 2(a+b+c)
hence 1=2 :O

:D

Shiwani said...

Only Ganesh's answer is correct.

Satyen Nabar said...

a=50, b=20, c=30
Proof:
First inference - if a logician sees two identical numbers K on the other two hats, they immediately conclude that his number is 2*K (since it can not be 0).

At the beginning of the first round, A reasons as follows: "I see 20 and 30 thus my number is either 50 or 10". Thus he says he doesn't know.

At the beginning of the second round, A reasons as follows: "My number is either 50 or 10". Let's assume my number is 10. In that case, C saw A= 10 and B = 20. C must have reasoned this way: "My number is either 30 or 10. If it was 10, then B would have seen 10 and 10 and he would have announced his number. But B didn't say anything thus my number must be 30" (end of A reasoning about C reasoning)."

Logician A continues to reason: "However, C didn't say anything. The only conjecture is that my assumption that my number is 10 is incorrect and my number is 50." QED