algorithm - What is meant by uniform distribution of hash values in Hashing technique -


in hashing, uniform distribution of hash values mean. please explain in layman's terms using appropriate example.

thank you

it means if have size of hash-table (say n), if hashing k values k<n, then:

a sequence of outputs function must appear random sequence, if input numbers sequential

also, fundamental thing hash function should minimize collisions obviously, @ same time, skewed input, output hash-function should distributed.

edit:

as asked, here uniform distribution means. say, if size of hash-table n , push k (<n) elements it, then, in every bucket of n/k in hash table, there should element. also, if k=r*c, in every bucket of size n/c in hash table, there should r elements.

obviously, perfect uniform distribution not possible...but output distribution should not skewed.


Comments

Popular posts from this blog

Receive udp packets in android gstreamer -

php - Extract Text from HTTP referer -

java - Callback from new thread to class from which thread was initiated -