January 8th, 2007, 3:02 pm
Let A be the fraction of times for which a_m = 1, i.e. and define B and C similarly. Then A, B, and C are each between 0 and 1 (inclusive) and they sum to const, which is either 1 or 2. If the constant is 1, there can't be two of A, B, and C which are both larger than 1/2, whereas if the constant is 2, there can't be two of A, B, and C which are smaller than 1/2. So if a wise man's fraction is < 1/2, he says 1, but if it is > 1/2, he says 2. Some care must be taken when it equals 1/2 though, since we could have either 1/2, 1/2, 0 (if the constant is 1) or 1/2, 1/2, 1 (if the constant is 2). The problem only arises when 2 wise men both have a ratio of 1/2, in which case we want to guarantee that one says 1 and the other says 2 (thus letting the third wise man be the tie breaker). I'm confident there is a clever way to do this, but for now it evades me. I'll think about it more later.