Home > puzzles, theory > More about hats and auctions

More about hats and auctions

In my last post about hats, I told I’ll soon post another version with some more problems, which I ended up not doing and would talk a bit more about those kind of problems. I ended up not doing, but here are a few nice problems:

Those {n} people are again a room, each with a hat which is either black or white (picked with probability {\frac{1}{2}} at random) and they can see the color of the other people’s hats but they can’t see their own color. They write in a piece of paper either “BLACK” or “WHITE”. The whole team wins if all of them get their colors right. The whole team loses, if at least one writes the wrong color. Before entering the room and getting the hats, they can strategyze. What is a strategy that makes them win with {\frac{1}{2}} probability?

If they all choose their colors at random, the probability of winning is very small: {\frac{1}{2^n}}. So we should try to correlate them somehow. The solution is again related with error correcting codes. We can think of the hats as a string of bits. How to correct one bit if it is lost? The simple engineering solution is to add a parity check. We append to the string {x_0, x_1, \hdots, x_n} a bit {y = \sum_i x_i \mod 2}. So, if bit {i} is lost, we know it is {x_i = (y + \sum_{j \neq i} x_j) \mod 2}. We can use this idea to solve the puzzle above: if hats are places with {\frac{1}{2}} probability, the parity check will be {0} with probability {\frac{1}{2}} and {1} with probability {\frac{1}{2}}. They can decide before hand that everyone will use {y = 0} and with probability {\frac{1}{2}} they are right and everyone gets his hat color right. Now, let’s extend this problem in some ways:

The same problem, but there are {k} hat colors, they are choosen independently with probability {\frac{1}{k}} and they win if everyone gets his color right. Find a strategy that wins with probability {\frac{1}{k}}.

There are again {k} hat colors, they are choosen independently with probability {\frac{1}{k}} and they win if at least a fraction {f} ({0 < f < 1}) of the people guesses the right color. Find a strategy that wins with probability {\frac{1}{fk}}.

Again to the problem where we just have BLACK and WHITE colors, they are chosen with probability {\frac{1}{2}} and everyone needs to find the right color to win, can you prove that {\frac{1}{2}} is the best one can do? And what about the two other problems above?

The first two use variations of the parity check idea in the solution. For the second case, given any strategy of the players, for each string {x \in \{0,1\}^n} they have probability {p_x}. Therefore the total probability of winning is {\frac{1}{2^n}\sum_{x \in \{0,1\}^n} p_x}. Let {x' = (1-x_1, x_2, \hdots, x_n)}, i.e., the same input but with the bit {1} flipped. Notice that the answer of player {1} is the same (or at least has the same probabilities) in both {x} and {x'}, since he can’t distinguish between {x} and {x'}. Therefore, {p_{x} + p_{x'} \leq 1}. So,

\displaystyle 2 \frac{1}{2^n}\sum_{x \in \{0,1\}^n} p_x = \frac{1}{2^n}\sum_{x \in \{0,1\}^n} p_x + \frac{1}{2^n}\sum_{x \in \{0,1\}^n} p_x' \leq 1

. This way, no strategy can have more than {\frac{1}{2}} probability of winning.

Another variation of it:

Suppose now we have two colors BLACK and WHITE and the hats are drawn from one distribution {D}, i.e., we have a probability distribution over {x \in \{0,1\}^n} and we draw the colors from that distribution. Notice that now the hats are not uncorrelated. How to win again with probability {\frac{1}{2}} (to win, everyone needs the right answer).

I like a lot those hat problems. A friend of mine just pointed out to me that there is a very nice paper by Bobby Kleinberg generalizing several aspects of hat problems, for example, when players have limited visibility of other players hats.


I began being interested by this sort of problem after reading the Derandomization of Auctions paper. Hat guessing games are not just a good model for error correcting codes, but they are also a good model for truthful auctions. Consider an auction with a set {N} single parameter agents, i.e., an auction where each player gives one bid {b_i} indicating how much he is willing to pay to win. We have a set of constraints: {\mathcal{X} \subseteq 2^N} of all feasible allocations. Based on the bids {(b_i)_{i \in N}} we choose an allocation {S \in \mathcal{X}} and we charge payments to the bidders. An example of a problem like this is the Digital Goods Auction, where {\mathcal{X} = 2^N}.

In this blog post, I discussed the concept of truthful auction. If an auction is randomized, an universal truthful auction is an auction that is truthful even if all the random bits in the mechanism are revealed to the bidders. Consider the Digital Goods Auction. We can characterize universal truthful digital goods auction as bid-independent auctions. A bid-independent auction is given by function {f_i(b_{-i})}, which associated for each {b_{-i}} a random variable {f_i(b_{-i})}. In that auction, we offer the service to player {i} at price {f_i(b_{-i})}. If {b_i \geq f_i(b_{-i})} we allocate to {i} and charge him {f_i(b_{-i})}. Otherwise, we don’t allocate and we charge nothing.

It is not hard to see that all universal truthful mechanisms are like that: if {x_i(b_i)} is the probability that player {i} gets the item bidding {b_i} let {U} be an uniform random variable on {[0,1]} and define {f_i(b_{-i}) = x_i^{-1}(U)}. Notice that here {x_i(.) = x_i(., b_{-i})}, but we are inverting with respect to {b_i}. It is a simple exercise to prove that.

With this characterization, universal truthful auctions suddenly look very much like hat guessing games: we need to design a function that looks at everyone else’s bid but not on our own and in some sense, “guesses” what we probably have and with that calculated the price we offer. It would be great to be able to design a function that returns {f(b_{-i}) = b_i}. That is unfortunately impossible. But how to approximate {b_i} nicely? Some papers, like the Derandomization of Auctions and Competitiveness via Consensus use this idea.

  1. No comments yet.
  1. No trackbacks yet.