Is there any reason we use 64-bit random codes instead of 32-bit ones? 32 bits can also create 832 random codes right? Just wanted to make sure I understood the logic correctly. Thanks!
Question on problem 13.17 hash function for chess
You are right, 32-bit is feasible, and the reason we use 64-bit is simply because we want to avoid hash collision (which is low).
0 Likes
lgtout
#3
Does the hash collision you say we need to avoid occur because XORing two different sets of 32/64 bits might actually produce identical results? For example, 111 xor 111 is 000. But 101 xor 101 is also 000.
0 Likes
You shall consider that when designing but it is really hard to prevent from it 100%.
0 Likes