Jump to content
BrainDen.com - Brain Teasers
  • 0


Guest
 Share

Question

That dirty king is at it again, and he has another twisted plan in store for you

you are one of 12 men sentenced to be executed, unless you can determine a solution to his game.

You will be separated into two groups, with one person from each group being chosen as a leader. The other 5 from each team will be blindfolded and given either a red or black hat. One team will be dictated the "informant team" and they will each get a number 1-5

The leaders cannot see the prisoners from the other group, only his. You are told the ratio of hats will be even

i.e. red:black 0:10, 2:8, 4:6, 6:4, 8:2, or 10:0

The rules are as follows. One leader is the informer (We'll say Leader A), the other determines the ratio of hats(Leader B). The informer is allowed to communicate as follows.

When the game starts, the informer, Leader A, gives a "True" or "False" to a guard, that will in turn deliver it to Leader B

After hearing the initial "True" or "False," Leader B chooses a number 1-5. The prisoner from Leader A with that number is brought over to Leader B's group.

After this, Leader A gives a second "True" or "False" to be communicated. After this, Leader B must determine the ratio of hats. How can you make a plan so these two T/F communications can get you the ratio?

Same rules as always, no cheating!

Sorry if it seems confusing, or if it's easier than I initially thought it was :P

Link to comment
Share on other sites

9 answers to this question

Recommended Posts

  • 0

Initially B knows odd or even number of red and black hats are in A team (from seeing his own team). Lets say Black was odd and red was even. 5 hats can be as follows red:black 4:1, 2:3, 0:5. First A says True if Red outnumbers black False if otherwise.If A says true then only possible variant is 4:1 and no further action is needed. If A says False possible variants are 2:3 and 0:5. Then one prisoner goes into b team from A. Now A says True if difference between hats number are greater than 1, False otherwise. if the prisoner had red hat then 0:5 variant is ruled out leaving only 2:3. If he has black A room can have 2:2 and 0:4 and A-s second word will be enough to answer this.

Lets say black was even and red was odd. Possible variants are red:black 1:4, 3:2, 5:0. If A first says false only possible variant is 1:4 and no further action is needed. If A says true then variants are 3:2, 5:0 and its same as above. All in all rule is as follows

1. A says True if Red outnumbers black says false otherwise

2. A says True if number difference is greater than 1 and says false otherwise. Now B knows ratio.

Link to comment
Share on other sites

  • 0

I believe I've found a way for both leaders to end with knowledge of the ratio.

There are 6 starting scenarios for Team B, [#red hats,#black hats]: [0,5], [1,4], [2,3], [3,2], [4,1] and [5,0]

Each of these six scenarios results in reducing the number of possible ratios to three. For example:

If B starts with [0,5], possible ratios are (r:b): (0:10), (2:8) and (4:6)

If B starts with [3,2], possible ratios are (r:b): (4:6), (6,4) and (8:2)

As Amiab has suggested, Leader A would first send a True/False message to Leader B where True indicates that Team A has more red hats than B and False otherwise. He correctly implies that for each starting scenario, one version of the message (True or False) will result in immediate knowledge of the ratio for Leader B while the other answer leaves two possible ratios. Here's the chart:


B's start;  Ratio(s) if T;  Ratio(s) if F

[0,5]       (4:6)           (0:10), (2:8)

[1,4]       (4:6), (6:4)    (2:8)

[2,3]       (6:4)           (4:6), (2:8)

[3,2]       (6:4), (8:2)    (4:6)

[4,1]       (8:2)           (4:6), (6:4)

[5,0]       (8:2), (10:0)   (6:4)

At this point, Leader B will formulate the number that will be sent to Leader A. This number will be a binary code devised of the following three expressions: Digit 1: if number of red hats in Team B equals 0 then 1 else 0 Digit 2: if number of red hats in Team B is greater than 2 then 1 else 0 Digit 3: if number of red hats in Team B is less than 5 then 1 else 0 So B's number that is sent to A is found on this chart:

B's start;  r=0;  r>2;  r<5;  Number Sent

[0,5]       1     0     1     5

[1,4]       0     0     1     1

[2,3]       0     0     1     1

[3,2]       0     1     1     3

[4,1]       0     1     1     3

[5,0]       0     1     0     2

If Leader A receives a 1 or 3, then B's starting scenario is determined by which would result in even numbers of red hats. At this point, Leader A now knows exactly how many red hats and black hats there are and therefore their ratio. Leader A will then send another True/False message to B where True indicates that Team A started with only 1 color of hats (i.e. 5 red or 5 black hats) and False otherwise. Now both Leaders know the ratio of red hats to black hats, here's the cheat sheet:

Msg1: Number of red hats is greater than number of black hats in Team A. (T/F)

Msg2: Team A started with all of one color of hats (i.e. all red or all black). (T/F)

#toA: Three digit binary number converted to decimal (d1d2d3)

  d1: Number of red hats in Team B equals 0 (1/0)

  d2: Number of red hats in Team B is greater than 2 (1/0)

  d3: Number of red hats in Team B is less than 5 (1/0)


B's start;  TT;     TF;     FT;     FF;     #toA

[0,5]               (4:6)   (0:10)  (2:8)   5

[1,4]       (6:4)   (4:6)           (2:8)   1

[2,3]               (6:4)   (2:8)   (4:6)   1

[3,2]       (8:2)   (6:4)           (4:6)   3

[4,1]               (8:2)   (4:6)   (6:4)   3

[5,0]       (10:0)  (8:2)           (6:4)   2

Edited by Egghead
Link to comment
Share on other sites

  • 0

here is how I would do it.

If Leader B has an odd number, so does Leader A

So leader A sends true if he has 3 or more red hats, False if 2 or less.

If it is true, Leader B knows its 3, 4 or 5. If he has an even number it is 4, so he can just send that message, if he has an odd sends 3. Leader A answers if 3 is his number.

If it is false, Leader B knows its 0, 1, or 2. If he has an odd number he knows it is 1, so he can just send that message. if he has even number he sens 0, again Leader A just answers if zero is the number.

with that info Leader B should know the final count.

Link to comment
Share on other sites

  • 0

Maybe I missed something but here is my attempt

Focus only on the number of RED hats

Possible combinations:

(a,b)

(0,0)

(0,2)

(0,4)

(2,0)

(2,2)

(2,4)

(4,0)

(4,2)

(4,4)

(1,1)

(1,3)

(1,5)

(3,1)

(3,3)

(3,5)

(5,1)

(5,3)

(5,5)

If leader A has either 2 or 3 red hats he says "TRUE", if he has 0,1,4,or 5 red hats he says "FALSE"

Communication from B to A does not matter - send anyone.

If leader A has either 1 or 0 red hats he says "TRUE", if he has 4 or 5 red hats he says "FALSE", if he has 2 or 3 red hads he says whatever he wants, doesn't matter.

If the first message is "TRUE", leader B can figure out the number of red hats leader A has (if he has an odd number it is 3, if he has an even number it is 2).

If the first message is "FALSE" and the second message is "TRUE", leader B can figure out the number of red hats leader A has (odd=1, even=0).

If the first message is "FALSE" and the second message is "FALSE", leader B can figure out the number of red hats leader A has (odd=5, even=4).

Edited for (sort of) clarity.

Edited by smoth333
Link to comment
Share on other sites

  • 0

I think the puzzle was misunderstood.

Only leader A can communicate. Leader B does not return a True or False message. Therefore there is no way Leader A can know the ratio.

I didn't read through and analyze each solution yet I will in a minute, however, this is actually really simple.

Look at it this way, alter the scenario a little.

Say there are 2 Leader As A1 and A2. A1 sees the scene first and sends his T/F then is taken away. A2 then comes in after the prisoner is taken, he doesn't know which color was taken away.

Each of the 2 T/F can correspond with one simple question

Thanks for the replies and god job!

Link to comment
Share on other sites

  • 0

A's first T/F:

1)True:Red hats >black hats....(so no. of red hats:3,4,5)

2)False:Black hats >Red hats...(so no. of black hats:3,4,5)

Case 1:

A and B knows the no. of even/odd red/black hats in their respective groups.

i.e. if no. of red hats in group a are even then group b will also have even no. of red hats.

and if no. of red hats in group a are odd then group b will also have odd no. of red hats.

So 1st true will let B know that red hats in A's group are 3/4/5.

he'll check in his group and if he finds even no. red hats then will know the ratio immediattely.(Since only 4 is even in 3/4/5)

otherwise he'll know its either 3 or 5.

So the 2nd T/F will let B know about the no. of hats in group A.

i.e T if red hats are 5

F if red hats are 3.

So he can now determine the ratio.

Case 2 is same as Case 1, but here black hats are taken into consideration.

i.e the 1st false msg will indicate that no. of black hats in A are 3/4/5.........................

Also in this solution there is no need for the prisoner in group A to go in Group B! :D

So only a msg like TT , TF, FT, FF will be sufficient for Leader B to determine the ratio!

Link to comment
Share on other sites

Join the conversation

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

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

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

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...