Dining Cryptographers

Today I learned about the Dining cryptographers problem. It is such a great usage of XOR!

Suppose we have three cryptographers-a,b and c- seated in a circle. They all flip a coin and see the coin of the person sitting to the right of them. The goal: anonymously signal “I paid” (bit 1) or “Nobody paid” (bit 0) by publicly announcing XORs of coin flips, without revealing who paid. One of them can relay a message by saying the opposite of what the protocol usually expects. If a b and c gather round a table here's how everyone's positioned:

   a
b     c

for a: a XOR c

for b: b XOR a

for c: c XOR b

Now you can easily see that if a, b and c toss a coin, and always say truth about the XOR of their coin's state with the state of their neighbour's coins, the result is always 0 because each element cancel itself out. That is: (a XOR c) XOR (b XOR a) XOR (c XOR b) is always zero. However if any of them want to say that a state is true (that at least one of them has paid for the dinner instead of the NSA for example) they can do so by opting to announce the NOT of their XORs instead. That way the answer would be 1, a message has been collaborated to the whole group, however the sender of the message is private. But the problem is that there can be only one sender, and one bit at each round to be sent.