Presentation is loading. Please wait.

Presentation is loading. Please wait.

The Hat Game 11/19/04 James Fiedler. References Hendrik W. Lenstra, Jr. and Gadiel Seroussi, On Hats and Other Covers, preprint, 2002,

Similar presentations


Presentation on theme: "The Hat Game 11/19/04 James Fiedler. References Hendrik W. Lenstra, Jr. and Gadiel Seroussi, On Hats and Other Covers, preprint, 2002,"— Presentation transcript:

1 The Hat Game 11/19/04 James Fiedler

2 References Hendrik W. Lenstra, Jr. and Gadiel Seroussi, On Hats and Other Covers, preprint, 2002, http://www.hpl.hp.com/research/info_theory/ hats_extsum.pdf. Hendrik W. Lenstra, Jr. and Gadiel Seroussi, On Hats and Other Covers, preprint, 2002, http://www.hpl.hp.com/research/info_theory/ hats_extsum.pdf. J.P. Buhler, Hat Tricks, The Mathematical Intelligencer 24 (2002), no. 4, 44 – 49. J.P. Buhler, Hat Tricks, The Mathematical Intelligencer 24 (2002), no. 4, 44 – 49. Sarah Robinson, Why Mathematicians Now Care About Their Hat Color, New York Times, Science Times, p. D5, April 10, 2001. Sarah Robinson, Why Mathematicians Now Care About Their Hat Color, New York Times, Science Times, p. D5, April 10, 2001.

3 A Famous Puzzle

4 The Setup A group of n players enter a room whereupon they each receive a hat. Each player can see everyone else’s hat but not his own. A group of n players enter a room whereupon they each receive a hat. Each player can see everyone else’s hat but not his own. The players must each simultaneously guess a hat color, or pass. The players must each simultaneously guess a hat color, or pass. The group loses if any player guesses the wrong hat color or if every player passes. The group loses if any player guesses the wrong hat color or if every player passes. Players are not necessarily anonymous, they can be numbered. Players are not necessarily anonymous, they can be numbered.

5 The Setup Assignment of hats is assumed to be random. Assignment of hats is assumed to be random. The players can meet beforehand to devise a strategy, but no communication is allowed inside the room. The players can meet beforehand to devise a strategy, but no communication is allowed inside the room. The goal is to devise the strategy that gives the highest probability of winning. The goal is to devise the strategy that gives the highest probability of winning.

6 The 2 color, 3 player case Of course, designating one player to guess randomly while every other player passes gives probability 50% in the binary case. Of course, designating one player to guess randomly while every other player passes gives probability 50% in the binary case. The best strategy turns out to have 75% winning probability. The best strategy turns out to have 75% winning probability. The strategy: If any player sees that the other two players have the same hat color, he guesses the opposite color. Otherwise the player passes. The strategy: If any player sees that the other two players have the same hat color, he guesses the opposite color. Otherwise the player passes.

7 The 2 color, 3 player case The group wins whenever exactly two hats have the same color, which will happen ¾ of the time. The group wins whenever exactly two hats have the same color, which will happen ¾ of the time. Everyone guesses incorrectly when all three hats have the same color, which will happen ¼ of the time. Everyone guesses incorrectly when all three hats have the same color, which will happen ¼ of the time. Thus 75% chance of winning. Thus 75% chance of winning.

8 Perfect Strategy This is an example of what we will call a perfect strategy (for any number players and hat colors): Every winning configuration will have one person guessing correctly and the others passing, every losing configuration will have all the players guessing incorrectly. This is an example of what we will call a perfect strategy (for any number players and hat colors): Every winning configuration will have one person guessing correctly and the others passing, every losing configuration will have all the players guessing incorrectly.

9 Perfect Strategy This is the best that can be done. This is the best that can be done. From the New York Times article: From the New York Times article:

10 Binary Game Let the two hat colors be 0, 1. Let the two hat colors be 0, 1. For n numbered players, each player i sees n-1 hats, which can be thought of as a vector of length n-1 over F 2. For n numbered players, each player i sees n-1 hats, which can be thought of as a vector of length n-1 over F 2. The strategy will tell him whether to guess 0, 1, or pass. Think of this as a function The strategy will tell him whether to guess 0, 1, or pass. Think of this as a function where V n-1 is the vector space of dimension n-1 over F 2. where V n-1 is the vector space of dimension n-1 over F 2.

11 Binary We assume the strategy is deterministic, that it tells each player exactly which option to take for any hat configuration. We assume the strategy is deterministic, that it tells each player exactly which option to take for any hat configuration. The vector is a complete description of the strategy. We’ll call the vector a deterministic n-player strategy. The vector is a complete description of the strategy. We’ll call the vector a deterministic n-player strategy.

12 Binary Let be all the hat configurations for which our strategy wins. Let be all the hat configurations for which our strategy wins. By the rules, we have By the rules, we have. Also, Also,.

13 1-Coverings and Strategies This means that the set of all losing strategies are a 1-covering of the linear space V n. This means that the set of all losing strategies are a 1-covering of the linear space V n. Conversely every 1-covering determines a strategy for which the winning configurations are the complement of the 1-covering. Conversely every 1-covering determines a strategy for which the winning configurations are the complement of the 1-covering.

14 Strategy from a 1-Covering Let C be a 1-covering of the space V n. Let C determine a strategy as follows: if player i sees the vector (w 1, …, w i-1, w i+1, …, w n ) and if exactly one x=0,1 puts (w 1, …, w i-1, x, w i+1, …, w n ) outside of C, player i guesses x, otherwise passes. Let C be a 1-covering of the space V n. Let C determine a strategy as follows: if player i sees the vector (w 1, …, w i-1, w i+1, …, w n ) and if exactly one x=0,1 puts (w 1, …, w i-1, x, w i+1, …, w n ) outside of C, player i guesses x, otherwise passes. V n – C are winning configurations. V n – C are winning configurations.

15 Strategy from a 1-Covering Proof: Let C be a 1-covering and suppose the configuration (w 1, …, w n ) lies outside C. There is an i such that (w 1, …, w i-1, w i +1, w i+1, …, w n ) lies inside C. Then i correctly guesses his hat color and for every other player j there is at least one value (w j ) that puts the vector outside of C. Thus every other player guesses correctly or passes and V n – C  {winning config.s}. Proof: Let C be a 1-covering and suppose the configuration (w 1, …, w n ) lies outside C. There is an i such that (w 1, …, w i-1, w i +1, w i+1, …, w n ) lies inside C. Then i correctly guesses his hat color and for every other player j there is at least one value (w j ) that puts the vector outside of C. Thus every other player guesses correctly or passes and V n – C  {winning config.s}.

16 Strategy from a 1-Covering Converse: If (c 1, …, c n ) is in C then for this configuration everyone will pass or someone will guess incorrectly. If there’s a choice x for i for which (c 1, …, c i-1, x, c i+1, …, c n ) is outside of C, player i will choose that color, incorrectly. If no such choice occurs, every player passes. Thus {winning config.s}  V n – C. Converse: If (c 1, …, c n ) is in C then for this configuration everyone will pass or someone will guess incorrectly. If there’s a choice x for i for which (c 1, …, c i-1, x, c i+1, …, c n ) is outside of C, player i will choose that color, incorrectly. If no such choice occurs, every player passes. Thus {winning config.s}  V n – C.

17 Hamming Connection Thus (the complements of) 1-coverings are synonymous with winning configurations, and the best strategy for any n will be given by the smallest 1-covering code for that n. Thus (the complements of) 1-coverings are synonymous with winning configurations, and the best strategy for any n will be given by the smallest 1-covering code for that n. Thus perfect 1-coverings give optimal solutions when they exist and since Hamming Codes are perfect 1-coverings, they give the optimal strategy for n=2 r -1, any positive integer r. Thus perfect 1-coverings give optimal solutions when they exist and since Hamming Codes are perfect 1-coverings, they give the optimal strategy for n=2 r -1, any positive integer r.

18 Perfect = Perfect Perfect 1-coverings C correspond to perfect strategies. Perfect 1-coverings C correspond to perfect strategies. Proof: If C is a perfect 1-covering then no two codewords are within distance 1. Then if a given configuration is within C, every player will see one option for their hat color that puts the configuration outside of C and every player will guess wrong. If a given configuration is outside of C then for one player only will there be one option that puts his hat color outside of C, the rest will pass. Proof: If C is a perfect 1-covering then no two codewords are within distance 1. Then if a given configuration is within C, every player will see one option for their hat color that puts the configuration outside of C and every player will guess wrong. If a given configuration is outside of C then for one player only will there be one option that puts his hat color outside of C, the rest will pass.

19 Perfect = Perfect Conversely, if we have a perfect strategy, call the set of losing configurations C, let c=(c 1, …, c n ) be in C. We know already that C is a 1-covering so let Conversely, if we have a perfect strategy, call the set of losing configurations C, let c=(c 1, …, c n ) be in C. We know already that C is a 1-covering so let (c 1, …, c i-1, x, c i+1, …, c n ) be outside of C. Given this configuration i will see (c 1, …, c i-1, c i+1, …, c n ) and correctly guess hat color x. Now, suppose (c 1, …, c i-1, x, c i+1, …, c n ) is within distance 1 of another element of C (spheres of radius 1 around elements of C are not distinct). (c 1, …, c i-1, x, c i+1, …, c n ) is within distance 1 of another element of C (spheres of radius 1 around elements of C are not distinct).

20 Perfect = Perfect Say switching c j gets us to this other element. Then players i and j would both guess a (correct) hat color in the configuration Say switching c j gets us to this other element. Then players i and j would both guess a (correct) hat color in the configuration (c 1, …, c i-1, x, c i+1, …, c n ). Then the strategy would not be perfect. Thus the sphere of radius 1 around the elements of the 1-covering C are distinct, which means C is a perfect 1-covering.

21 Hamming Again The only perfect 1-coverings in the binary case are Hamming Codes, so all perfect strategies in the binary case occur for n=2 r -1. The only perfect 1-coverings in the binary case are Hamming Codes, so all perfect strategies in the binary case occur for n=2 r -1. The n=3 case corresponds to the code (losing configurations) {000, 111}. The n=3 case corresponds to the code (losing configurations) {000, 111}.

22 Probability of Losing For Hamming Codes of length n we have |C| = 2 n /(n+1), reaching the sphere packing bound. For Hamming Codes of length n we have |C| = 2 n /(n+1), reaching the sphere packing bound. The probability of losing with a Hamming Code strategy is then The probability of losing with a Hamming Code strategy is then P L =|C|/2 n = (2 n /(n+1))/2 n = 1/(n+1).

23 Other Hamming-based Strategies For 2 r -1 < n < 2 r+1 -1, we can construct a strategy based on the Hamming Code as follows. For 2 r -1 < n < 2 r+1 -1, we can construct a strategy based on the Hamming Code as follows. The first 2 r -1 players ignore the players 2 r, …, n and play according to the 2 r -1 game, the players 2 r, …, n always pass. The first 2 r -1 players ignore the players 2 r, …, n and play according to the 2 r -1 game, the players 2 r, …, n always pass. It is known that these strategies are optimal for n=2 r, but not for larger n. It is known that these strategies are optimal for n=2 r, but not for larger n.

24 Probability of Losing Probability of losing for these strategies is Probability of losing for these strategies is. The lower bound is from the sphere packing bound, attained when n=2 r -1. The lower bound is from the sphere packing bound, attained when n=2 r -1. The upper bound comes from the worst case Hamming-based strategy. The upper bound comes from the worst case Hamming-based strategy.

25 Best Known Linear and Nonlinear Strategies For n > 8 the optimal solution is unknown except when n=2 r or n=2 r -1. For n > 8 the optimal solution is unknown except when n=2 r or n=2 r -1. It is known that there are nonlinear 1-coverings that approach the sphere packing bound as n goes to infinite. Thus there are strategies that approach the winning probability of 1. It is known that there are nonlinear 1-coverings that approach the sphere packing bound as n goes to infinite. Thus there are strategies that approach the winning probability of 1.

26 The q-ary Game Same rules, now the set of hat colors is Q={0, …, q-1}. Same rules, now the set of hat colors is Q={0, …, q-1}. Valid strategies are now synonymous with strong coverings: Valid strategies are now synonymous with strong coverings: A strong covering C  Q n is such that for all (w 1, …, w n ) in Q n – C there is an i such that for all x in Q – {w i } (w 1, …, w i-1, x, w i+1, …, w) is in C. A strong covering C  Q n is such that for all (w 1, …, w n ) in Q n – C there is an i such that for all x in Q – {w i } (w 1, …, w i-1, x, w i+1, …, w) is in C.

27 Strong Covering from a Strategy Proof: If w = (w 1, …, w n ) is a winning configuration then some player i guesses his hat color w i correctly from the information (w 1, …, w i-1, w i+1, …, w n ). Thus for x ≠ w i, the configuration (w 1, …, w i-1, x, w i+1, …, w n ) will cause player i to guess incorrectly and lose. Thus the losing configurations form a strong cover. Proof: If w = (w 1, …, w n ) is a winning configuration then some player i guesses his hat color w i correctly from the information (w 1, …, w i-1, w i+1, …, w n ). Thus for x ≠ w i, the configuration (w 1, …, w i-1, x, w i+1, …, w n ) will cause player i to guess incorrectly and lose. Thus the losing configurations form a strong cover.

28 Strategy from a Strong Cover Converse: Let C be a strong covering. Determine a strategy as follows: given the information (w 1, …, w i-1, w i+1, …, w n ), if there is exactly one choice x such that (w 1, …, w i-1, x, w i+1, …, w n ) is outside C then player i guesses hat color x, otherwise passes. Converse: Let C be a strong covering. Determine a strategy as follows: given the information (w 1, …, w i-1, w i+1, …, w n ), if there is exactly one choice x such that (w 1, …, w i-1, x, w i+1, …, w n ) is outside C then player i guesses hat color x, otherwise passes.

29 Strategy from a Strong Cover This gives a valid strategy: If (w 1, …, w n ) is outside C then there is at least one player for whom there is only one choice (the correct one) for which (w 1, …, w i-1, w i+1, …, w n ) is outside C. Everyone else has at least one choice so guesses correctly or passes. If (c 1, …, c n ) is inside C then any player that sees exactly one option that puts the configuration outside C then he guesses incorrectly. Otherwise everyone passes. This gives a valid strategy: If (w 1, …, w n ) is outside C then there is at least one player for whom there is only one choice (the correct one) for which (w 1, …, w i-1, w i+1, …, w n ) is outside C. Everyone else has at least one choice so guesses correctly or passes. If (c 1, …, c n ) is inside C then any player that sees exactly one option that puts the configuration outside C then he guesses incorrectly. Otherwise everyone passes.

30 Perfect Strong Covering If C is a strong covering, then If C is a strong covering, then If equality holds C is called perfect, and perfect strong coverings correspond to perfect strategies. If equality holds C is called perfect, and perfect strong coverings correspond to perfect strategies. Unfortunately, for q > 2 and n > 1 perfect strong coverings do not exist. Unfortunately, for q > 2 and n > 1 perfect strong coverings do not exist.

31 Analog of Sphere-Packing Bound For a strong covering C, For a strong covering C, Proof: Consider ordered pairs (x,y) where x is a winning configuration, y a losing configuration and they differ in one coordinate. Let S be the set of all these ordered pairs. If we fix x then there are at least q – 1 choices for y since C is a strong covering. Proof: Consider ordered pairs (x,y) where x is a winning configuration, y a losing configuration and they differ in one coordinate. Let S be the set of all these ordered pairs. If we fix x then there are at least q – 1 choices for y since C is a strong covering.

32 Analog of Sphere-Packing Bound Thus (q – 1)|V n - C|  |S| or Thus (q – 1)|V n - C|  |S| or (q – 1)(q n - |C|)  |S|. If we fix y then there are at most n choices for x, so |S|  n|C| and rearranging (q – 1)(q n -|C|)  |S|  n|C| we get

33 Perfect = Perfect Perfect strong coverings correspond to perfect strategies. Perfect strong coverings correspond to perfect strategies. Proof: Let C be a perfect strong covering. Then we get equality (q – 1)(q n -|C|) = |S|= n|C| from last slide. If w = (w 1, …, w n ) is not in C then for one player i there will be exactly one hat color x=w i which puts (w 1, …, w i-1, x, w i+1, …, w n ) outside C. The left side of the equality above means that there are exactly q-1 ways to change w to put the configuration inside C. All of these changes are already used by the i th coordinate. Proof: Let C be a perfect strong covering. Then we get equality (q – 1)(q n -|C|) = |S|= n|C| from last slide. If w = (w 1, …, w n ) is not in C then for one player i there will be exactly one hat color x=w i which puts (w 1, …, w i-1, x, w i+1, …, w n ) outside C. The left side of the equality above means that there are exactly q-1 ways to change w to put the configuration inside C. All of these changes are already used by the i th coordinate.

34 Perfect=Perfect Thus we can change the others freely, which means any other player j will have more than one choice that puts the configuration outside of C and will pass. Let c = (c 1, …, c n ) lie inside C. Then there are exactly n changes we can make to c to push it outside C, based on the right side of the equality above. If any more than 1 of these changes can be made in any coordinate, C would not be a strong covering. Thus each player will see 1 hat color that puts the configuration (that he sees) outside of C and every player will guess incorrectly. Thus we have a perfect strategy. Thus we can change the others freely, which means any other player j will have more than one choice that puts the configuration outside of C and will pass. Let c = (c 1, …, c n ) lie inside C. Then there are exactly n changes we can make to c to push it outside C, based on the right side of the equality above. If any more than 1 of these changes can be made in any coordinate, C would not be a strong covering. Thus each player will see 1 hat color that puts the configuration (that he sees) outside of C and every player will guess incorrectly. Thus we have a perfect strategy.

35 Perfect = Perfect Converse: Just as the above direction this is similar to the binary case. I’ll skip the converse for now. Converse: Just as the above direction this is similar to the binary case. I’ll skip the converse for now.

36 A Strong Covering for Q-ary Case Let n=2 r -1, and let M be a check matrix for the binary Hamming Code of length n. Let v be in Q n, φ:Q n →Q r, φ(v) = Mv T. In terminology from Wednesday φ finds the syndrome of v. Let Let n=2 r -1, and let M be a check matrix for the binary Hamming Code of length n. Let v be in Q n, φ:Q n →Q r, φ(v) = Mv T. In terminology from Wednesday φ finds the syndrome of v. Let Then C is a strong covering. Then C is a strong covering.

37 A Strong Covering for Q-ary Case Let Let Then C is a strong covering. Proof: If w = (w 1, …, w n ) is in Q n – C, then some coordinates of φ(w) are zero. There is a column m j of M whose coordinates are 1 exactly when the coordinates of φ(w) are zero. Then for all α in Q *, φ(w) + α m j is in C, since this latter vector no longer has any zero coordinates. Proof: If w = (w 1, …, w n ) is in Q n – C, then some coordinates of φ(w) are zero. There is a column m j of M whose coordinates are 1 exactly when the coordinates of φ(w) are zero. Then for all α in Q *, φ(w) + α m j is in C, since this latter vector no longer has any zero coordinates.

38 Probabiltiy of Losing This strategy loses with probability This strategy loses with probability which goes to zero as n .

39 A More General Construction Slightly smaller strong coverings can be achieved with the following generalization Slightly smaller strong coverings can be achieved with the following generalization where wt is the Hamming weight, the number of nonzero coordinates.

40 Bounds It is known that there are strong coverings that can do better than either of these q-ary constructions, with a losing probability of It is known that there are strong coverings that can do better than either of these q-ary constructions, with a losing probability of Constructions have not been found to reach this limit. Constructions have not been found to reach this limit.

41 Variations In the full version of their paper, Lenstra and Seroussi consider the following variations. In the full version of their paper, Lenstra and Seroussi consider the following variations. Non-uniform distributions Non-uniform distributions Randomized playing strategies Randomized playing strategies Symmetric strategies Symmetric strategies Zero-information strategies Zero-information strategies

42 References Hendrik W. Lenstra, Jr. and Gadiel Seroussi, On Hats and Other Covers, preprint, 2002, http://www.hpl.hp.com/research/info_theory/ hats_extsum.pdf. Hendrik W. Lenstra, Jr. and Gadiel Seroussi, On Hats and Other Covers, preprint, 2002, http://www.hpl.hp.com/research/info_theory/ hats_extsum.pdf. J.P. Buhler, Hat Tricks, The Mathematical Intelligencer 24 (2002), no. 4, 44 – 49. J.P. Buhler, Hat Tricks, The Mathematical Intelligencer 24 (2002), no. 4, 44 – 49. Sarah Robinson, Why Mathematicians Now Care About Their Hat Color, New York Times, Science Times, p. D5, April 10, 2001. Sarah Robinson, Why Mathematicians Now Care About Their Hat Color, New York Times, Science Times, p. D5, April 10, 2001.


Download ppt "The Hat Game 11/19/04 James Fiedler. References Hendrik W. Lenstra, Jr. and Gadiel Seroussi, On Hats and Other Covers, preprint, 2002,"

Similar presentations


Ads by Google