Quote:Original post by Extrarius
For example, you could construct a "perfect table" but instead of indexing it using table[state] use table[state ^ key] as a very simple "encryption" method, and then you can have unlimited functions and unknown worst case behavior while still theoretically having superior typical case behavior.
I dont have the time right now to investigate, but my first impression is that you arent getting twice as many good hash bits by using two "encryption" keys.
Anyways, I would argue that the benefits of a "perfect" table are extremely marginal.
It is definately trivial to guarantee that precisely half of the hash bits are effected by a single change to the input by filling the zobrist table with values that have precisely half their bits set.
There are 601,080,390 32-bit values that qualify and there are algorthms that can both enumerate them in lexigraphical sequence (bit twiddling) as well as pluck them arbitrarily out of the sequence based on their position within it (walking a depth-32 pascals triangle)