BrainDen.com - Brain Teasers
• 0

# Harder hats on deathrow version

## Question

Three prisoners in deathrow are put together. They each get a unique number on their forehead. They are NOT allowed to speak to each other, only to their guard. They only get 2 clues:
- The number on their head is always higher than zero
- One of the numbers is the total of the other two numbers.

If they can guess their numbers, they are free to go.

- Person 1 gets asked if he knows his number. He says he doesn't.
- Person 2 gets asked the same, but also replies that he doesn't know
- Person 3 is being asked but doesn't know either.

Since none of them answered wrong. They get another chance.

- Person 1 again doesn't know.
- Person 2 also doesn't know.
- Person 3 however does know the answer this time: It's 148 on his head. This answer is correct and he is allowed to leave.

Question: What are the numbers on the heads of person 1 and 2 and how does person 3 know his own number?

## Recommended Posts

• 1

I assume that they also all get the clue that their numbers are unique.

the other numbers are 37 and 3*37= 111

Here’s the argument:

If the numbers are n, 2n, and 3n, then the person with 3n would recognize that fact because seeing n and 2n, the only choices would be n and 3n, but since n would not be unique, it would have to be 3n.

So the numbers are not n, 2n, and 3n.

Therefore, if someone sees n and 3n, they know they don’t have 2n, or the 3n person would have recognized it. So they must have 4n.

So the person with 148 could be 4n, seeing 37 and 111.

Neither of the other two could rule out their two possibilities.

##### Share on other sites

• 0
On 4/16/2020 at 10:33 PM, Coasterfrenzy said:

Three prisoners in deathrow are put together. They each get a unique number on their forehead. They are NOT allowed to speak to each other, only to their guard. They only get 2 clues:
- The number on their head is always higher than zero
- One of the numbers is the total of the other two numbers.

If they can guess their numbers, they are free to go.

- Person 1 gets asked if he knows his number. He says he doesn't.
- Person 2 gets asked the same, but also replies that he doesn't know
- Person 3 is being asked but doesn't know either.

Since none of them answered wrong. They get another chance.

- Person 1 again doesn't know.
- Person 2 also doesn't know.
- Person 3 however does know the answer this time: It's 148 on his head. This answer is correct and he is allowed to leave.

Question: What are the numbers on the heads of person 1 and 2 and how does person 3 know his own number?

Prisoner 3  sees the other two have  both the same number  on their head  -  which is 74  but Prisoners 1 & 2 only see number 148 and 74 on the other two prisoners heads respectively.  So they cannot really tell if they have to subtract or add to get their own number.

Correct?

##### Share on other sites

• 0
21 hours ago, qubits said:

Prisoner 3  sees the other two have  both the same number  on their head  -  which is 74  but Prisoners 1 & 2 only see number 148 and 74 on the other two prisoners heads respectively.  So they cannot really tell if they have to subtract or add to get their own number.

Correct?

Unfortunately no.

- The numbers on their heads are unique.
-  Prisoner 3 only knows his number when questioned the 2nd time.

##### Share on other sites

• 0

Nice beginning... (If this were the full solution, first round would be enough.)

Oh, I got it now!!! Great!!!

##### Share on other sites

• 0

Click to reveal the correct numbers.

37 – 111 – 148

First correct was CaptainEd

##### Share on other sites

• 0

Still confused.

Spoiler

Say the numbers are 37 111 148.

On the end of the first round C thinks:

- I can have 111-37=74 or 111+37=148.

- If the guy with 111 sees 37 and 74, he announces 37+74=111 (as he knows he cannot have 74-37=37).

- As he did not announce 111, I only can have 148.

So why the second round?

• 0

Oops

##### Share on other sites

• 0

I fear there is no solution.

Spoiler

Round 1, A:
A knows his number if he sees (1,2). As the difference (1) is already used, he must have the sum.
1Aa: (3,1,2)
1Ab: (3,2,1)

(And multiples.)

In all other cases, A must pass.

Round 1, B:
The same way:
1Ba: (1,3,2)
1Bb: (2,3,1)

B reads A's thoughts, useful in following cases:
from 1Aa: (3,!2,1) -> 1Bc: (3,4,1)
from 1Ab: (3,!1,2) -> 1Bd: (3,5,2)

In all other cases, B must pass.

Round 1, C:
As previously:
1Ca: (1,2,3)
1Cb: (2,1,3)

Let's assume C sees (3,4,?).
If the solution is (3,4,1), B would have announced it. So he has 7.

In general:
from 1Aa: (3,1,!2) -> 1Cc: (3,1,4)
from 1Ab: (3,2,!1) -> 1Cd: (3,2,5)
from 1Ba: (1,3,!2) -> 1Ce: (1,3,4)
from 1Bb: (2,3,!1) -> 1Cf: (2,3,5)
from 1Bc: (3,4,!1) -> 1Cg: (3,4,7)
from 1Bd: (3,5,!2) -> 1Ch: (3,5,8)

In all other cases, C must pass.

Round 2, A:
from 1Ba: (!1,3,2) -> 2Aa: (5,3,2)
from 1Bb: (!2,3,1) -> 2Ab: (4,3,1)
from 1Bc: (!3,4,1) -> 2Ac: (5,4,1)
from 1Bd: (!3,5,2) -> 2Ad: (7,5,2)
from 1Ca: (!1,2,3) -> 2Ae: (5,2,3)
from 1Cb: (!2,1,3) -> 2Af: (4,1,3)
from 1Cc: (!3,1,4) -> 2Ag: (5,1,4)
from 1Cd: (!3,2,5) -> 2Ah: (7,2,5)
from 1Ce: (!1,3,4) -> 2Ai: (7,3,4)
from 1Cf: (!2,3,5) -> 2Aj: (8,3,5)
from 1Cg: (!3,4,7) -> 2Ak: (11,4,7)
from 1Ch: (!3,5,8) -> 2Al: (13,5,8)

Here, I give up. Python:

Spoiler

def A(new,old):
for l in Z:
if l[0]==old: Z.append([new,old,l[3]+l[4],l[3],l[4],'',l[2],l[3],l[4]])
#for l in Z: print(*l)

def B(new,old):
for l in Z:
if l[0]==old: Z.append([new,old,l[2],l[2]+l[4],l[4],'',l[2],l[3],l[4]])

def C(new,old):
for l in Z:
if l[0]==old: Z.append([new,old,l[2],l[3],l[2]+l[3],'',l[2],l[3],l[4]])
#-------------------------------------------------------------------------#
Z=[ ['A1','  ',3,1,2], ['B1','  ',1,3,2], ['C1','  ',1,2,3],
['A1','  ',3,2,1], ['B1','  ',2,3,1], ['C1','  ',2,1,3]]

B('B1','A1')
C('C1','A1')
C('C1','B1')
A('A2','B1')
A('A2','C1')
B('B2','A2')
B('B2','C1')
C('C2','A2')
C('C2','B2')

for l in Z:
print(l[0],end=' ')
print('{:3d}'.format(l[2]),end=' ')
print('{:3d}'.format(l[3]),end=' ')
print('{:3d}'.format(l[4]),end=' ')
if len(l)>5:
print('  from',l[1],end=' ')
print('{:3d}'.format(l[6]),end=' ')
print('{:3d}'.format(l[7]),end=' ')
print('{:3d}'.format(l[8]),end='')
print()

bingo=[]
for l in Z:
if l[0]=='C2' and not l[4] in bingo: bingo.append(l[4])
bingo.sort()
print('\nPossible bingos for C2:',*bingo)

Result:

A1   3   1   2
B1   1   3   2
C1   1   2   3
A1   3   2   1
B1   2   3   1
C1   2   1   3
B1   3   5   2   from A1   3   1   2
B1   3   4   1   from A1   3   2   1
C1   3   1   4   from A1   3   1   2
C1   3   2   5   from A1   3   2   1
C1   1   3   4   from B1   1   3   2
C1   2   3   5   from B1   2   3   1
C1   3   5   8   from B1   3   5   2
C1   3   4   7   from B1   3   4   1
A2   5   3   2   from B1   1   3   2
A2   4   3   1   from B1   2   3   1
A2   7   5   2   from B1   3   5   2
A2   5   4   1   from B1   3   4   1
A2   5   2   3   from C1   1   2   3
A2   4   1   3   from C1   2   1   3
A2   5   1   4   from C1   3   1   4
A2   7   2   5   from C1   3   2   5
A2   7   3   4   from C1   1   3   4
A2   8   3   5   from C1   2   3   5
A2  13   5   8   from C1   3   5   8
A2  11   4   7   from C1   3   4   7
B2   5   7   2   from A2   5   3   2
B2   4   5   1   from A2   4   3   1
B2   7   9   2   from A2   7   5   2
B2   5   6   1   from A2   5   4   1
B2   5   8   3   from A2   5   2   3
B2   4   7   3   from A2   4   1   3
B2   5   9   4   from A2   5   1   4
B2   7  12   5   from A2   7   2   5
B2   7  11   4   from A2   7   3   4
B2   8  13   5   from A2   8   3   5
B2  13  21   8   from A2  13   5   8
B2  11  18   7   from A2  11   4   7
B2   1   4   3   from C1   1   2   3
B2   2   5   3   from C1   2   1   3
B2   3   7   4   from C1   3   1   4
B2   3   8   5   from C1   3   2   5
B2   1   5   4   from C1   1   3   4
B2   2   7   5   from C1   2   3   5
B2   3  11   8   from C1   3   5   8
B2   3  10   7   from C1   3   4   7
C2   5   3   8   from A2   5   3   2
C2   4   3   7   from A2   4   3   1
C2   7   5  12   from A2   7   5   2
C2   5   4   9   from A2   5   4   1
C2   5   2   7   from A2   5   2   3
C2   4   1   5   from A2   4   1   3
C2   5   1   6   from A2   5   1   4
C2   7   2   9   from A2   7   2   5
C2   7   3  10   from A2   7   3   4
C2   8   3  11   from A2   8   3   5
C2  13   5  18   from A2  13   5   8
C2  11   4  15   from A2  11   4   7
C2   5   7  12   from B2   5   7   2
C2   4   5   9   from B2   4   5   1
C2   7   9  16   from B2   7   9   2
C2   5   6  11   from B2   5   6   1
C2   5   8  13   from B2   5   8   3
C2   4   7  11   from B2   4   7   3
C2   5   9  14   from B2   5   9   4
C2   7  12  19   from B2   7  12   5
C2   7  11  18   from B2   7  11   4
C2   8  13  21   from B2   8  13   5
C2  13  21  34   from B2  13  21   8
C2  11  18  29   from B2  11  18   7
C2   1   4   5   from B2   1   4   3
C2   2   5   7   from B2   2   5   3
C2   3   7  10   from B2   3   7   4
C2   3   8  11   from B2   3   8   5
C2   1   5   6   from B2   1   5   4
C2   2   7   9   from B2   2   7   5
C2   3  11  14   from B2   3  11   8
C2   3  10  13   from B2   3  10   7

Possible bingos for C2: 5 6 7 8 9 10 11 12 13 14 15 16 18 19 21 29 34

None of these numbers divides 148.

Notice that it is always the prisoner with the highest number who can know, so there is no solution in the form [a*148,b*148,148].

Please comment, especially if you found it correct

Edited by harey
##### Share on other sites

• 0
On 10/11/2021 at 6:25 AM, harey said:

I fear there is no solution.

Reveal hidden contents

Round 1, A:
A knows his number if he sees (1,2). As the difference (1) is already used, he must have the sum.
1Aa: (3,1,2)
1Ab: (3,2,1)

(And multiples.)

In all other cases, A must pass.

Round 1, B:
The same way:
1Ba: (1,3,2)
1Bb: (2,3,1)

B reads A's thoughts, useful in following cases:
from 1Aa: (3,!2,1) -> 1Bc: (3,4,1)
from 1Ab: (3,!1,2) -> 1Bd: (3,5,2)

In all other cases, B must pass.

Round 1, C:
As previously:
1Ca: (1,2,3)
1Cb: (2,1,3)

Let's assume C sees (3,4,?).
If the solution is (3,4,1), B would have announced it. So he has 7.

In general:
from 1Aa: (3,1,!2) -> 1Cc: (3,1,4)
from 1Ab: (3,2,!1) -> 1Cd: (3,2,5)
from 1Ba: (1,3,!2) -> 1Ce: (1,3,4)
from 1Bb: (2,3,!1) -> 1Cf: (2,3,5)
from 1Bc: (3,4,!1) -> 1Cg: (3,4,7)
from 1Bd: (3,5,!2) -> 1Ch: (3,5,8)

In all other cases, C must pass.

Round 2, A:
from 1Ba: (!1,3,2) -> 2Aa: (5,3,2)
from 1Bb: (!2,3,1) -> 2Ab: (4,3,1)
from 1Bc: (!3,4,1) -> 2Ac: (5,4,1)
from 1Bd: (!3,5,2) -> 2Ad: (7,5,2)
from 1Ca: (!1,2,3) -> 2Ae: (5,2,3)
from 1Cb: (!2,1,3) -> 2Af: (4,1,3)
from 1Cc: (!3,1,4) -> 2Ag: (5,1,4)
from 1Cd: (!3,2,5) -> 2Ah: (7,2,5)
from 1Ce: (!1,3,4) -> 2Ai: (7,3,4)
from 1Cf: (!2,3,5) -> 2Aj: (8,3,5)
from 1Cg: (!3,4,7) -> 2Ak: (11,4,7)
from 1Ch: (!3,5,8) -> 2Al: (13,5,8)

Here, I give up. Python:

Reveal hidden contents

def A(new,old):
for l in Z:
if l[0]==old: Z.append([new,old,l[3]+l[4],l[3],l[4],'',l[2],l[3],l[4]])
#for l in Z: print(*l)

def B(new,old):
for l in Z:
if l[0]==old: Z.append([new,old,l[2],l[2]+l[4],l[4],'',l[2],l[3],l[4]])

def C(new,old):
for l in Z:
if l[0]==old: Z.append([new,old,l[2],l[3],l[2]+l[3],'',l[2],l[3],l[4]])
#-------------------------------------------------------------------------#
Z=[ ['A1','  ',3,1,2], ['B1','  ',1,3,2], ['C1','  ',1,2,3],
['A1','  ',3,2,1], ['B1','  ',2,3,1], ['C1','  ',2,1,3]]

B('B1','A1')
C('C1','A1')
C('C1','B1')
A('A2','B1')
A('A2','C1')
B('B2','A2')
B('B2','C1')
C('C2','A2')
C('C2','B2')

for l in Z:
print(l[0],end=' ')
print('{:3d}'.format(l[2]),end=' ')
print('{:3d}'.format(l[3]),end=' ')
print('{:3d}'.format(l[4]),end=' ')
if len(l)>5:
print('  from',l[1],end=' ')
print('{:3d}'.format(l[6]),end=' ')
print('{:3d}'.format(l[7]),end=' ')
print('{:3d}'.format(l[8]),end='')
print()

bingo=[]
for l in Z:
if l[0]=='C2' and not l[4] in bingo: bingo.append(l[4])
bingo.sort()
print('\nPossible bingos for C2:',*bingo)

Result:

A1   3   1   2
B1   1   3   2
C1   1   2   3
A1   3   2   1
B1   2   3   1
C1   2   1   3
B1   3   5   2   from A1   3   1   2
B1   3   4   1   from A1   3   2   1
C1   3   1   4   from A1   3   1   2
C1   3   2   5   from A1   3   2   1
C1   1   3   4   from B1   1   3   2
C1   2   3   5   from B1   2   3   1
C1   3   5   8   from B1   3   5   2
C1   3   4   7   from B1   3   4   1
A2   5   3   2   from B1   1   3   2
A2   4   3   1   from B1   2   3   1
A2   7   5   2   from B1   3   5   2
A2   5   4   1   from B1   3   4   1
A2   5   2   3   from C1   1   2   3
A2   4   1   3   from C1   2   1   3
A2   5   1   4   from C1   3   1   4
A2   7   2   5   from C1   3   2   5
A2   7   3   4   from C1   1   3   4
A2   8   3   5   from C1   2   3   5
A2  13   5   8   from C1   3   5   8
A2  11   4   7   from C1   3   4   7
B2   5   7   2   from A2   5   3   2
B2   4   5   1   from A2   4   3   1
B2   7   9   2   from A2   7   5   2
B2   5   6   1   from A2   5   4   1
B2   5   8   3   from A2   5   2   3
B2   4   7   3   from A2   4   1   3
B2   5   9   4   from A2   5   1   4
B2   7  12   5   from A2   7   2   5
B2   7  11   4   from A2   7   3   4
B2   8  13   5   from A2   8   3   5
B2  13  21   8   from A2  13   5   8
B2  11  18   7   from A2  11   4   7
B2   1   4   3   from C1   1   2   3
B2   2   5   3   from C1   2   1   3
B2   3   7   4   from C1   3   1   4
B2   3   8   5   from C1   3   2   5
B2   1   5   4   from C1   1   3   4
B2   2   7   5   from C1   2   3   5
B2   3  11   8   from C1   3   5   8
B2   3  10   7   from C1   3   4   7
C2   5   3   8   from A2   5   3   2
C2   4   3   7   from A2   4   3   1
C2   7   5  12   from A2   7   5   2
C2   5   4   9   from A2   5   4   1
C2   5   2   7   from A2   5   2   3
C2   4   1   5   from A2   4   1   3
C2   5   1   6   from A2   5   1   4
C2   7   2   9   from A2   7   2   5
C2   7   3  10   from A2   7   3   4
C2   8   3  11   from A2   8   3   5
C2  13   5  18   from A2  13   5   8
C2  11   4  15   from A2  11   4   7
C2   5   7  12   from B2   5   7   2
C2   4   5   9   from B2   4   5   1
C2   7   9  16   from B2   7   9   2
C2   5   6  11   from B2   5   6   1
C2   5   8  13   from B2   5   8   3
C2   4   7  11   from B2   4   7   3
C2   5   9  14   from B2   5   9   4
C2   7  12  19   from B2   7  12   5
C2   7  11  18   from B2   7  11   4
C2   8  13  21   from B2   8  13   5
C2  13  21  34   from B2  13  21   8
C2  11  18  29   from B2  11  18   7
C2   1   4   5   from B2   1   4   3
C2   2   5   7   from B2   2   5   3
C2   3   7  10   from B2   3   7   4
C2   3   8  11   from B2   3   8   5
C2   1   5   6   from B2   1   5   4
C2   2   7   9   from B2   2   7   5
C2   3  11  14   from B2   3  11   8
C2   3  10  13   from B2   3  10   7

Possible bingos for C2: 5 6 7 8 9 10 11 12 13 14 15 16 18 19 21 29 34

None of these numbers divides 148.

Notice that it is always the prisoner with the highest number who can know, so there is no solution in the form [a*148,b*148,148].

Please comment, especially if you found it correct

I also come up with there not being a solution, although admittedly with a bit of hand waving toward the end. Without a computer (or at least not much):

Spoiler

Let's call the people and their numbers L, M, and N. Since one of the numbers is the sum of the other two, people will know that their own number must be one of two possibilities, for example if L sees M and N then he knows his number must be |M-N| or M+N.

Round 1, Person L
The only thing that could end it at this point is if L sees M = 2N or N = 2M, because then they can rule out that their number is |M-N| since that would equal the smaller of M or N, and someone else already has that number while the OP says everyone has a unique number.

Since L didn't speak, we've ruled out the possibilities
M = 2N
2M = N

Round 1, Person M
They could end it if they see L = 2N or N = 2L by the same logic as above. They also know that M can't be 2N or N/2, or else L would have spoken. So if one of M's two possible values (|L-N| or L+N) would have M=2N or M=N/2 then that possibility could be ruled out. Therefore M would speak if any of the following are true:
L-N = N/2 → L = 3N/2
N-L = N/2 (already covered because this is the N = 2L scenario)
L+N = N/2 (not possible)
L-N = 2N → L = 3N
N-L = 2N (not possible)
L+N = 2N (not possible because that would mean L=N)

Since L and M each didn't speak, we can rule out the possibilities
(old)
M = 2N
2M = N
(new)
L = 2N
2L = N
L = 3N/2
L = 3N

Round 1, Person N
They could end it if they see L = 2M or M = 2L. Like M, N knows that since L didn't speak, that implies M and N can't be either M = 2N or M = N/2, so per the previous logic they would know their number and speak if L = 3M/2 or L = 3M.

And since M didn't speak, N also knows that L and N can't be either L = 2N or N = 2L, so by the previous logic they also know their number if M = 3L/2 or M = 3L.

Next, looking at the last of the new information from the previous round (ruling out L = 3N/2 and L = 3N), N would know their number if one of their possible values (|L-M| or L+M) is 2L/3 or L/3:
L-M = 2L/3 → M = L/3
M-L = 2L/3 → M = 5L/3
L+M = 2L/3 (not possible)
L-M = L/3 → M = 2L/3
M-L = L/3 → M = 4L/3
L+M = L/3 (not possible)

Since no one spoke so far, we can rule out the possibilities
(old)
M = 2N
2M = N
L = 2N
2L = N
L = 3N/2
L = 3N
(new)
L = 2M
M = 2L
L = 3M/2
L = 3M
M = 3L/2
M = 3L
M = L/3
M = 2L/3
M = 4L/3
M = 5L/3

I think you might be able to continue like this, drawing more and more conclusions about which possibilities can be ruled out based on what previous people have (or haven't) said and whether it rules out one of your two possible numbers. And when someone does speak, one of the New criteria must have just been met.

That list of conditions where someone speaks if the numbers they see are a specific ratio of two others gets too complicated for me to want to do everything by hand, but it does seem like with each new person speaking there are new terms introduced of the form X = iY/j where i is in the range from 1 to 2j and j increases by 1 with each person – person L would have spoken in round 1 if N and M satisfied it with j=1, person M would have spoken in round 1 if L and N satisfied it with j=1 or j=2, and person N would have spoken in round 1 if L and M satisfied it with j=1, j=2, or j=3.

In this case the number we're given is 148, and for it to be of the form X+Y (note that in each case where the person speaks so far, they've ruled out the smaller of their two possibilities so they must have the larger number) where X = iY/j, substituting that value for X in we would have 148 = X+Y = iY/j – Y = (i+j)Y/j which means 148 must be divisible by some number j that shows up when N knows their number (speaking at the end of the second round). The prime factors are 148 = 2*2*37. The j term won't be larger than 6 by the end of the second round, and if j=2 then someone would speak in the first round, so j would have to be 4 and you would have 148 = (i+4)Y/4 where i is in the range from 1 to 7. That can be brute forced and the only "solution" that comes up is i=4, Y=74 but we know that's not a real answer because you can't have the numbers be 74, 74, and 148.

Edit: SMH I just realized that the stipulation of i being in the range from 1 to 2j doesn't hold for all cases (specifically I listed examples of i=3, j=1 that I overlooked) so I would need to rethink if there are more possibilities, or trudge through everything by hand.

Edited by plasmid
##### Share on other sites

• 0

@Plasmid I translated your notation into mine, as far as we are gone, we have same results (excepted some doublets).

Spoiler

Round 1, Person N
...

(new)      L M N
L = 2M     2 1 3
M = 2L     1 2 3
L = 3M/2   3 2 5 (a)
L = 3M     3 1 4 (b)
M = 3L/2   2 3 5
M = 3L     1 3 4
M = L/3    3 1 4 (b)
M = 2L/3   3 2 5 (a)
M = 4L/3   3 4 7
M = 5L/3   3 5 8

I thought about interpolation, too, but I did not go this way estimating there is not enough data.

## Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

×   Pasted as rich text.   Paste as plain text instead

Only 75 emoji are allowed.

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.