All 20 achievements completed – May not be currently achievable by those who had all 20 achievements before this badge was made. We'll fix this very soon -- sorry!
GGGRRRR
Hashing uniformly distributed data
If the inputs are bounded-length strings (such as telephone numbers, car license plates, invoice numbers, etc.), and each input may independently occur with uniform probability, then a hash function needs only map roughly the same number of inputs to each hash value. For instance, suppose that each input is an integer z in the range 0 to N−1, and the output must be an integer h in the range 0 to n−1, where N is much larger than n. Then the hash function could be h = z mod n (the remainder of z divided by n), or h = (z × n) ÷ N (the value z scaled down by n/N and truncated to an integer), or many other formulas
the inputs are bounded-length [[string (computer science)|strings]] (such as [[telephone]] numbers, [[car license plate]]s, [[invoice]] numbers, etc.), and each input may [[statistical independence|independently]] occur with [[uniform distribution|uniform]] probability, then a hash function needs only map roughly the same number of inputs to each hash value. For instance, suppose that each input is an integer ''z'' in the range 0 to ''N''−1, and the output must be an integer ''h'' in the range 0 to ''n''−1, where ''N'' is much larger than ''n''. Then the hash function could be ''h'' = ''z'' '''mod''' ''n'' (the remainder of ''z'' divided by ''n''), or ''h'' = (''z'' × ''n'') ÷ ''N'' (the value ''z'' scaled down by ''n''/''N'' and truncated to an integer), or many other formulas.