Hats: all or nothing

7 downloads 0 Views 731KB Size Report
Dec 1, 2016 - distinguishable players are randomly fitted with a white or black hat, where ... guess simultaneously the color of their own hat observing only theΒ ...
Hats: all or nothing Theo van Uem

Email: [email protected]

Abstract. 𝑁 distinguishable players are randomly fitted with a white or black hat, where the probabilities of getting a white or black hat may be different, but known and the same to all the players. All players guess simultaneously the color of their own hat observing only the hat colors of the other 𝑁 βˆ’ 1 players. The team wins if all players guess right. No communication of any sort is allowed, except for an initial strategy session before the game begins. Our goal is to maximize the probability of winning the game and to describe optimal strategies. 1 Introduction. Hat puzzles were formulated at least since Martin Gardner’s 1961 article [8]. They have got an impulse by Todd Ebert in his Ph.D. thesis in 1998 [6]. Ebert’s hat problem: All players guess simultaneously the color (white or black) of their own hat observing only the hat colors of the other 𝑁 βˆ’ 1 players. It is also allowed for each player to pass: no color is guessed. The team wins if at least one player guesses his hat color correctly and none of the players has an incorrect guess. Ebert’s hat problem with 𝑁 = 2 βˆ’ 1 players is solved in [7], using Hamming codes, and with 𝑁 = 2 players in [5] using extended Hamming codes. Lenstra and Seroussi [15] show that in Ebert’s Hat Game, playing strategies are equivalent to binary covering codes of radius one. Ebert’s asymmetric version (where the probabilities of getting a white or black hat may be different) is studied in [18],[19],[20]. In this paper 𝑁 distinguishable players are randomly fitted with a white or black hat, where the probabilities of getting a white or black hat (𝑝 respectively π‘ž; 𝑝 + π‘ž = 1 ) may be different, but known and the same to all the players. All players guess simultaneously the color of their own hat observing only the hat colors of the other 𝑁 βˆ’ 1 players. The team wins if all players guess his or her hat color correctly. An initial strategy session is allowed. Our goal is to maximize the probability of winning the game and to describe optimal strategies. 2 Lower bound on maximal winning probability A modification of the procedure used in [18] leads directly to a lower bound on maximal winning probability. We also present strategies to obtain the lower bound probabilities. The 𝑁 persons in our game are distinguishable, so we can label them from 1 to 𝑁. Each possible configuration of the white (code 0) and black (code 1) hats can be represented by an element of 𝐡 = {𝑏 𝑏 … 𝑏 |𝑏 ∈ {0,1}, 𝑖 = 1,2. . , 𝑁} . The Scode represents what the 𝑁 different players see. Player 𝑖 sees binary code 𝑏 . . 𝑏 𝑏 . . 𝑏 with decimal value 𝑠 = βˆ‘ 𝑏 .2 +βˆ‘ 𝑏 .2 . Each player has to make a choice (independent of all other players) out of two possibilities: 0=’guess white’ and 1=’guess black’. We define a decision matrix 𝐷 = π‘Ž , where 𝑖 ∈ {1,2, . . , 𝑁} (players); 𝑗 ∈ {0,1, . . , 2 βˆ’ 1} (Scode of one player); π‘Ž , πœ–{0,1}. The meaning of π‘Ž , is: player i sees Scode j and takes decision π‘Ž , (guess white or guess black). We observe the total probability (sum) of our guesses. For each 𝑏 𝑏 … 𝑏 in B with 𝑛 zero’s (𝑛 = 0,1, . . , 𝑁) we have (start: sum=0): CASE 𝑏 𝑏 … 𝑏 (Scode player 𝑖: 𝑠 = βˆ‘ 𝑏 .2 +βˆ‘ 𝑏 .2 ) IF π‘Ž , = 𝑏 AND π‘Ž , = 𝑏 AND ... AND π‘Ž , = 𝑏 THEN sum=sum+𝑝 π‘ž

.

Any choice of the π‘Ž , in the decision matrix determines which CASES have a positive contribution to sum (a GOOD CASE) and which CASES don’t contribute positive to sum (a BAD CASE).

2

We define 0-parity of a CASE as the parity of the number of zero’s in that CASE. To obtain a lower bound on maximal winning probability, we consider two strategies: all GOOD CASES having even 0-parity and all GOOD CASES having odd 0-parity. 𝑁 𝑁 The probabilities are βˆ‘ 𝑝 π‘ž (even 0-parity) and βˆ‘ 𝑝 π‘ž (odd 0-parity). π‘˜ π‘˜ 𝑁 𝑁 We have: βˆ‘ 𝑝 π‘ž βˆ’βˆ‘ 𝑝 π‘ž = (π‘ž βˆ’ 𝑝) . π‘˜ π‘˜ 𝑁 𝑁 Using βˆ‘ 𝑝 π‘ž +βˆ‘ 𝑝 π‘ž = (π‘ž + 𝑝) = 1, we obtain: π‘˜ π‘˜ lower bound on maximal winning probability when 𝑝 < π‘ž or 𝑁 is even: ( ) 𝑁 βˆ‘ 𝑝 π‘ž = ; strategy: even 0-parity, π‘˜ lower bound on maximal winning probability when 𝑝 > π‘ž and 𝑁 is odd: ( ) 𝑁 βˆ‘ 𝑝 π‘ž = ; strategy: odd 0-parity, π‘˜ lower bound on maximal winning probability when 𝑝 = π‘ž: ; strategy: all players odd 0-parity or all players even 0-parity. |

So we have: lower bound on maximal winning probability:

|

(𝑁 = 1,2,3, … ).

3 Optimal solution when N=1,2,3,4. In this section we’ll show that when N=1,2,3,4 the optimal winning probabilities equals the lower bound probabilities. In this section we suppose 𝑝 > π‘ž, which is no restriction: ο‚· when 𝑝 < π‘ž then we interchange 𝑝 and π‘ž in the maximal probabilities; optimal strategy is: even 0-parity ο‚· when 𝑝 = π‘ž then the optimal strategies for 𝑝 > π‘ž and 𝑝 < π‘ž are both optimal We focus on player 𝑖 (𝑖 =1,2,..,𝑁). Each π‘Ž , = 0 has a counterpart π‘Ž , = 1 and vice versa: use the flipping procedure in position 𝑖: CASE 𝑏 … 𝑏 … 𝑏 β†’ CASE 𝑏 . . .1 βˆ’ 𝑏 . . . 𝑏 . When we have a GOOD CASE with probability 𝑝 π‘ž (π‘˜ = 0,1, . . , 𝑁) , then this single CASE erases (by a single bit flip) π‘˜ BAD CASES, each with probability 𝑝 π‘ž and 𝑁 βˆ’ π‘˜ BAD CASES, each with probability 𝑝 π‘ž . In short: 𝑝 π‘ž erases π‘˜ of 𝑝 π‘ž and 𝑁 βˆ’ π‘˜ of 𝑝 π‘ž . 3.1 Optimal solution when N=1. (

)

= 𝑝 which agrees with the evident optimal strategy: always guess a white hat (odd 0-parity).

3.2 Optimal solution when N=2. When 𝑝 is part of the optimal solution, then 2π‘π‘ž is erased and the local maximum is 𝑝 + π‘ž . When π‘π‘ž is part of the optimal solution, then 𝑝 and π‘ž are erased and the local maximum is 2π‘π‘ž. When π‘ž is part of the optimal solution, then 2π‘π‘ž is erased and the local maximum is 𝑝 + π‘ž . Maximal winning probability is 𝑝 + π‘ž , this agrees with Optimal strategy: guess the color you see (even 0-parity).

(

)

.

3 3.3 Optimal solution when N=3. We concentrate on 𝑝 and π‘ž . a. 𝑝 and π‘ž both in optimal solution: 3𝑝 π‘ž and 3π‘π‘ž are erased; local maximum is 𝑝 + π‘ž b. 𝑝 and (not π‘ž ) in optimal solution: 3𝑝 π‘ž is erased; 𝑝 + π›Όπ‘π‘ž ; local maximum is 𝑝 + 3π‘π‘ž c. (not 𝑝 ) and π‘ž in optimal solution: 𝛼𝑝 π‘ž + π‘ž ; local maximum is 3𝑝 π‘ž + π‘ž d. (not 𝑝 ) and (not π‘ž ) in optimal solution: 𝛼𝑝 π‘ž + π›½π‘π‘ž ; 𝑝 π‘ž =001 erases 101 and 011. Any other 𝑝 π‘ž (010 or 100) erases one extra π‘π‘ž , so we have: 𝛼(𝑝 π‘ž) 0 1 2 3

𝛽(π‘π‘ž ) 3 3-2=1 3-2-1=0 0

Local maximum is 3𝑝 π‘ž Maximal winning probability is 𝑝 + 3π‘π‘ž , this agrees with Optimal strategy: odd 0-parity.

(

)

.

3.4 Optimal solution when N=4. We concentrate on 𝑝 and π‘ž . a. 𝑝 and π‘ž both in optimal solution: 𝑝 + 𝛼𝑝 π‘ž + π‘ž ; local maximum is 𝑝 + 6𝑝 π‘ž + π‘ž b. 𝑝 and (not π‘ž ) in optimal solution: 𝑝 + 𝛽𝑝 π‘ž + π›Ύπ‘π‘ž ; 𝑝 π‘ž =0011 erases 0111 , 1011. 1100 erases the other two π‘π‘ž , but we can do better: 0101 erases 1101; 1001 erases nothing; next one of 𝑝 π‘ž erases last one of π‘π‘ž . 𝛽(𝑝 π‘ž ) 0 1 2 3 4 5 6

𝛾(π‘π‘ž ) 4 2 ≀1 ≀1 0 0 0

Local maximum is 𝑝 + 6𝑝 π‘ž c. (not 𝑝 ) and π‘ž in optimal solution: γ𝑝 π‘ž + 𝛽𝑝 π‘ž + π‘ž ; we can use the last table and we get the local maximum 4𝑝 π‘ž + π‘ž . d. (not 𝑝 ) and (not π‘ž ) in optimal solution: α𝑝 π‘ž + 𝛽𝑝 π‘ž + π›Ύπ‘π‘ž We can use the same table to obtain: Ξ±(𝑝 π‘ž) 4 2 ≀1 ≀1 0 0 0

𝛽(𝑝 π‘ž ) ←0β†’ ←1β†’ ←2β†’ ←3β†’ ←4β†’ ←5β†’ ←6β†’

𝛾(π‘π‘ž ) 4 2 ≀1 ≀1 0 0 0

Local maximum is 4𝑝 π‘ž + 4π‘π‘ž Maximum winning probability is 𝑝 + 6𝑝 π‘ž + π‘ž , this agrees with Optimal strategy: even 0-parity.

(

)

.

4 Hats: Nothing. Until now we were interested in perfect guessing: all players must guess correct. In this section we demand the opposite: all players must guess wrong. The theory of (lower bound) maximal winning probabilities stays the same, but the optimal strategy is now: use the strategy in β€˜all players guess right’, followed by a bit flip.

4

References: 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21.

W. Blum, Denksport fΓΌr HuttrΓ€ger, Die Zeit, May 3, 2001. J. Buhler, Hat tricks, Math. Intelligencer 24 (2002), 44-49. E. Burke, S. Gustafson, G. Kendall, A puzzle to challenge genetic programming, Genetic Programming, 136-147, Lecture Notes in Computer Science, Springer, 2002. S. Butler, M. Hajianghayi, R Kleinberg, T. Leighton, Hat guessing games, SIAM J Discrete Math 22 (2008), 592-605. G. Cohen, I. Honkala, S. Litsyn, A. Lobstein, Covering Codes, North-Holland, Mathematical Library 54, 1997. T. Ebert, Applications of recursive operators to randomness and complexity, Ph.D. Thesis, University of California, Santa Barbara, 1998. T. Ebert, W. Merkle, H. Vollmer, On the autoreducibility of random sequences, SIAM J. Comp. 32 (2003), 1542-1569. M. Gardner, The 2nd Scientific American Book of Mathematical Puzzles&Diversions, Simon and Schuster, New York, 1961. W. Guo, S. Kasala, M. Rao, B. Tucker, The hat problem and some variations, Advances in distribution theory, order statistics, and inference, 459-479, Stat. Ind. Technol., BirkhΓ€user Boston, 2006. C. Hardin, A. Taylor, The Mathematics of coordinated inference: A study of generalized hat problems, Springer International Publishing Switzerland 2013. B. Johnson, http://mathstat.slu.edu/~johnson/public/maths/hatproblem.pdf G. KΓ©ri, Tables for bounds on covering codes, www.sztaki.hu/~keri/codes M. Krzywkowski, On the hat problem, its variations, and their applications, Annales Universitatis Paedagogicae Cracoviensis Studia Mathematica 9 (1), 55-67, 2010. M Krzywkowski, A more colorful hat problem, Annales Universitatis Paedagogicae Cracoviensis Studia Mathematica 10 (1), 67-77, 2011. H. Lenstra, G. Seroussi, On hats and other covers, (Extended Summary), arXiv:cs/0509045v1 [cs.IT] 15 sep 2005. J. Poulos, Could you solve this $1 million hat trick?, abcNews, November 29, 2001 S. Robinson, Why mathematicians now care about their hat color, The New York Times, Science Times Edition, page D5, April 10, 2001. T. van Uem, The Hat Game and covering codes, https://arxiv.org/abs/1612.00276 1 dec 2016 T. van Uem, Asymmetric Hat Game with three players and three colors, https://arxiv.org/abs/1612.05924v2 6 jan 2017 T. van Uem, General three and four person two color Hat Game, https://arxiv.org/abs/1704.04244 13 apr 2017 P. Winkler, Mathematical Mind-Benders, A.K. Peters, Wellesley, Massachusetts, 2007