Hi Louis,
I had thought the paragraph beginning, “With zero knowledge proofs” was a little brief
but the focus was not on this. Let me try a simulated real world explanation.
Suppose in a two player game, each player has a secret number of uniquely numbered
game tokens. One player accuses the other of cheating due to stealing a token.
Perhaps they are red and blue for each respective player.
To verify that the accused has no stolen tokens without divulging the total number,
the tokens are randomly distributed into several hidden or covered piles. The other
player chooses one of the piles to examine and records the token numbers. Then the
tokens are randomly redistributed into several piles. It does not matter if some tokens
are not placed into a random pile for each random choice provided every token has a
chance at being selected at least once.
Each examination adds to the tally of total tokens viewed, the number of new and
the number of previously viewed tokens. After many randomizations and viewings,
there will come a time when the number of repeat viewed tokens divided by newly
viewed tokens equals 0.581976 or 1/(e-1). The total number of tokens viewed will be
very close to the total number of tokens the player has.
Here’s some pseudo code:
Code:
while repeat / nonrepeat < 0.6
if random number not previously generated
increment nonrepeat
else
increment repeat
end if
increment total
wend
guessed number is total
Javascript version: http://www.iinet.net.au/~htjs/temp/equipartiton.htm
Bookmarks