Can you Solve it? Hats of Two Color Puzzle

preview_player
Показать описание
Рекомендации по теме
Комментарии
Автор

alright, i think i´ve got it. in order to not spoil it for others, you´ll have to expand this post to see my solution.




















each prisoner has to make his decision to step forward based on the following algorithm:
if you see 11 white hats->step forward on the first round
if you see 10 white hats->step forward on the second round
if you see 9 withe hats->step forward on the third round
and so on...or if you see (12-number_of_current_round) white hats -> step forward on that round. for example if there are 5 black hats and 7 white hats, then no one steps forward until the fifth round, and on the fifth round only those 5 people who see 7 white hats step forward. now anyone with a white hat knows that they must have a white hat, because 5 people saw 7 withe hats and 5+7 already makes 12 so even though the person with a white hat only sees 6 white hats he now knows that he is #7. incidently as the warden does that lineup every 5 minutes from 12:05 to 12:55 there are exactly 11 rounds just as there are exactly 11 posible configurations.

aednil
Автор

I changed my explanation slightly and deleted my old post, hopefully it's more clear this time.

Well say the Prisoners stands in a line so there is a 'first' prisoner and a '12th' one. Assume you have 11 tries to get it right (I'm guessing that's what you mean when you say there is a line up every 5 minutes from 12:05 to 12:55?).

Assume the warden is nice enough to ask each prisoner in turn from the 1st to the 12th in order 'do you want to step forward', OR the prisoners are smart enough to take things in turns to step forward or stay still, starting from the first prisoner from the left, then the 2nd...until we reach the 12th and final prisoner on the right. 

Now we begin with the first prisoner who moves first. He glances at prisoners 2-12. If he doesn't find a black hat, he steps forward and we're done. If not, he stays still.

Now the fact that the first prisoner did not step forward means to the second prisoner that there is at least 1 black hat from person 2 to person 12. The 2nd prisoner then repeats what the first prisoner did, if all hats from 3-12 are white then he steps forward since he has to be black, if not he doesn't move.

Eventually someone will have to move forward when he finds all the hats to his right are white, that person has to have a black hat. The prisoners after whoever's stepped forward will know they have white hats and so stay still permanently (removed from the equation essentially). 

Note whenever someone does step forward, that counts as one of the 11 tries. The people who already know the colour of their hats will step forward (if black) or stay still (if white) in all subsequent tries.

This process is repeated from the first prisoner again and again until we get into a situation like bwwww or (ie all the hats to the right of the first prisoner are white, note I unlisted prisoners who already know the colour of their hat by the above procedure). At most 11 prisoners have stepped forward so far (note we use a try every time a new prisoner steps forward, and the people who already know the colour of their hats will step forward (if black) or stay still (if white) whenever someone new steps forward/in all subsequent tries.). If 11 have stepped forward the first prisoner has to have a white hat so we are done within 11 tries. If 10 have stepped forward, and the first prisoner has a white hat, then we are done in 10 tries. If not, he steps forward so done in 11 tries. If <=9 have stepped forward and it's still not the correct configuration, then the first prisoner steps forward at the 10th try to complete the solution.

Hope I explained that ok and I haven't assumed too much/misunderstood anything.

Monadoabyss
Автор

See your reflection in the guillotine 

DeKlD
Автор

Prisoners are told to line up.
Prisoner 1 (P1) gets and idea and takes the initiative by goes to the left hand side of prisoner with a white hat (P2). [Here P2 knows he has a white hat]
Prisoner P3 is "smart", understands the idea and goes to the left hand side of P1 if both P1 and P2 have white hats OR to the left of P2 if P1 has a black hat, thus forming the logic for the rest to line up.
The rest follow this logic. Everyone goes between a white hat and a black hat, assuming that the left-most empty spot counts as a black hat.
Lastly P2 is smart and realises that the last guy to line up doesn't know if he's white or black and gets off the line again to set himself between the last white and the first black hat.
Everyone to the left of P2 now have black hats and step forward.

The "smart prisoners" and "no communication" is kind of what makes this puzzle somewhat annoying. Does smart mean that P3 instantly understand what P1 was after and do the rest follow? Is going next to someone to start forming a line considered communication? Is shoving yourself between prisoners communication? 

EDIT: Oh, and also the "warden lines up the prisoners" is assumed to be "he tells them to line up", althoigh now that I think of it that kind of removes the purpose of doing this 11 times...

Pegar
Автор

From the question, I am not certain if it means that whether during the 11 line up opportunities, the prisoners may never step backwards OR if they may step backwards on the next line up after stepping forwards on a previous line up.

If the former is correct, I guess someone solved it below.

If the latter is correct, then everyone can step up on try #1. Each prisoner looks right and steps back if the prisoner on right has a black hat (#2). If the prisoner who stepped back noticed that the guy to his left also stepped back, then he must have a black hat and so will step back up, while at the same time those prisoners that noticed the person on their left didn't step back will step back now because obviously their hat is not black (#3). Now the only one who doesn't know their hat color is the guy that had no one to his left. He should know by now, however, if they are not freed because he didn't step back. If they are not freed yet, he steps back (#4).
So they should all be freed on their 4th try.

This question can also appear a little more realistic, if it states that the prisoners may communicate to devise a plan, before getting the hat put on their heads by the warden.

memecommod
Автор

fk it, look in another prisionors eye and use the reflection to see your own hat colour :)

scienceyo
Автор

From 12:05 to 12:55 We have 50 min Therefore every 5 min Warden will call. 
Therefore, we have 50/5=10 times warden will call to test, but we have 12 smart prisoners. 
The process, firstly, Prisoners must look at each other realizing that there must be one of them got black hat, it's shocking that one will concludes by looking all of them wearing white hats, that he got the only one black hat so he step forward to save em all.
this must happen 10 times as warden call, at every time one prisoner is released.
After 10 times 10 prisoners left. but 2 remain, the warden will put one white & one black, 2 persons will look realizing one got black hat, n free each other.

i guess this is it! looooking for feedback guys!!

mohammadalrubaie
Автор

There are 11 line up sessions. Let the 12 prisoners be called A, B, C.... L. During first session, A joins the line. If A is black, B will join him in the line. If A is white, B will not join him. This continues on, and if the last person to join the line was black, then the next person will join the line. This continues until a white is reached, at which point, nobody will join. After waiting a while, they will realise the last guy to join was a white, and they will exclude him from the next lineup. In worst case scenario, A-K are whites and L is the only black. If this is the case, then on the 11th line up session, K and L look at each other, and the one who sees a white hat will join the line.

cirusa
Автор

This is why the prison system doesn't work.

AKindChap
Автор

Well if everyone can see each others hat, then all you have to do is count six white hats. If you count six, you black nigah', if not (you counted five) you're the last white hat.
If you're black then stand forward.

SZJerkXVI
Автор

I don't get it. If they were smart, they wouldn't be in prison. ;)

Fancitalk
welcome to shbcf.ru