English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

100 programmers are lined up in a row by an assassin. the assassin puts red and blue hats on them. they can't see their own hats, but they can see the hats of the people in front of them. the assassin starts in the back and says "what color is your hat?" the fogcreek programmer can only answer "red" or "blue." the programmer is killed if he gives the wrong answer; then the assassin moves on to the next programmer. the programmers in front get to hear the answers of the programmers behind them, but not whether they live or die. they can consult and agree on a strategy before being lined up, but after being lined up and having the hats put on, they can't communicate in any way other than those already specified.

2007-01-23 22:47:09 · 4 answers · asked by Anonymous in Science & Mathematics Alternative Other - Alternative

4 answers

They should say that at 6 pm that day a program will execute that will transfer all of the assassin's money to a Swiss bank account. Only one of the programmers knows how to stop the transfer but none of the programmers knows who that person is. The same action will occur every day at 6 PM for the foreseeable future and each day a different programmer will know how to stop the transfer. That seems a lot better than walking around with silly colored hats.

2007-01-24 03:06:30 · answer #1 · answered by Gene 7 · 0 0

see the color of the hat in front of them ... and say it in a "coded"
way ((this is after having been informed of their own hat color
by the programmer behind them)) ...

if they already "know" that they are wearing RED and the programmer in front is wearing BLUE, they will say "RED ??"
in a questionning way ... if they are wearing BLUE and the
programmer in front of them is wearing BLUE, they will say
"BLUE" in an assertive way ((without the rising inflection of
a 'questionning' way ))

this way, they save their own lives AND pass on the info to
the programmewr in front of them.

[NOTE: the very first programmer in line has a 50-50 chance ...
sometimes the early bird gets the worm]

this way at least 99 of the 100 programmers say alive

2007-01-24 05:25:29 · answer #2 · answered by atheistforthebirthofjesus 6 · 0 0

Always say the color of the hat in front of you unless that hat is different than the hat color you heard called out, in which case say the hat color you heard called out.

2007-01-24 17:03:37 · answer #3 · answered by luck d 2 · 0 0

have everyone trade hats.

2007-01-24 00:01:08 · answer #4 · answered by ikeman32 6 · 0 0

fedest.com, questions and answers