回複:紅藍帽子問題的真正答案

本文內容已被 [ math1999 ] 在 2011-12-12 02:34:33 編輯過。如有問題,請報告版主或論壇管理刪除.
回答: 紅藍帽子問題的真正答案a7a82011-12-11 14:48:38

If we suppose that everyone can hear what other people have reported, then all people can survive.


Suppose that we have x red hats and y blue hats, where x,y are between 1 and 99, and x+y=100.


Case one ------ x=y=50:


                The queue is: red, blue, red, blue, …, red, blue.


The first one is red and the last one is blue. The last person knows that he is blue and report blue. Then each other people know the hat of his color from the pattern of the queue he see or hear.


 


Case two ------ x is less than y, such as x=10, y=90:


                The queue is: 10 blue, 10 red, 80 blue.


                The last 80 people with blue hats and last 9 people with red hats are easy to know that there 10 red hats when they see 10 blue hats at the beginning of the queue. So they can guess the colors of hats they have by counting their locations in the queue. The first 10 people with blue hats and the first people with red hat can guess the colors of their hats by counting how many people report red hats and their locations in the queue.


 


Case three ----- y is less than x.


                The queue is: y red, y blue, x-y red.


                Reason is similar to the case two.

所有跟帖: 

你不能假設帽子,那是國王的權力。此題是囚犯自救。 -a7a8- 給 a7a8 發送悄悄話 (0 bytes) () 12/11/2011 postreply 18:42:33

請您先登陸,再發跟帖!