But she only sees one, so she deduces that her hat is also black.
但是她只看到了一个,所以她推测出自己的也是黑帽子。
Prisoners five through nine are each looking for an odd number of black hats,
第五个人至第九个人每个都寻找奇数个黑帽子,
which they see, so they figure out that their hats are white.
他们找到了,所以他们推测自己的帽子都是白色的。
Now it all comes down to you at the front of the line.
现在到了站在最前面的你了。
If the ninth prisoner saw an odd number of black hats, that can only mean one thing.
假如第九个人看到的是奇数个黑帽子的话,那就只有一种可能(最后一个人是黑帽子)。
You'll find that this strategy works for any possible arrangement of the hats.
你会发现这个策略对所有的排列组合都是适用的。
The first prisoner has a 50% chance of giving a wrong answer about his own hat,
最开始的那个人有50%的几率出错,
but the parity information he conveys allows everyone else to guess theirs with absolute certainty.
但是他传达的奇偶性的信息让其他所有人都可以猜对自己帽子的颜色。
Each begins by expecting to see an odd or even number of hats of the specified color.
每个人在开始时都假定自己应当在身前看到奇数或偶数个特定颜色的帽子。
If what they count doesn't match, that means their own hat is that color.
如果他们的数字不对的话,意味着他们自己的帽子就是那种特定的颜色。
And everytime this happens, the next person in line will switch the parity they expect to see.
每次这样的情况发生后,下个人就知道他们需要看到奇数还是偶数个特定颜色的帽子。
So that's it, you're free to go.
好了成功了,你们可以走了。
It looks like these aliens will have to go hungry, or find some less logical organisms to abduct.
看起来这些外星人只好饿肚子了,或者去找些其他逻辑差的生物来绑架。