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

來源: math1999 2011-12-11 17:18:40 [] [舊帖] [給我悄悄話] 本文已被閱讀: 次 (19671 bytes)
本文內容已被 [ 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

請您先登陸,再發跟帖!

發現Adblock插件

如要繼續瀏覽
請支持本站 請務必在本站關閉/移除任何Adblock

關閉Adblock後 請點擊

請參考如何關閉Adblock/Adblock plus

安裝Adblock plus用戶請點擊瀏覽器圖標
選擇“Disable on www.wenxuecity.com”

安裝Adblock用戶請點擊圖標
選擇“don't run on pages on this domain”