Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Hash function
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Analysis == Worst case results for a hash function can be assessed two ways: theoretical and practical. The theoretical worst case is the probability that all keys map to a single slot. The practical worst case is the expected longest probe sequence (hash function + collision resolution method). This analysis considers uniform hashing, that is, any key will map to any particular slot with probability {{math|1/''m''}}, a characteristic of universal hash functions. While [[Donald Knuth|Knuth]] worries about adversarial attack on real time systems,<ref>{{cite book |last=Knuth |first=Donald E. |author-link=Donald Knuth |date=1975 |title=The Art of Computer Programming, Vol. 3, Sorting and Searching |page=540 |publisher=[[Addison-Wesley]] |location=Reading, MA}}</ref> Gonnet has shown that the probability of such a case is "ridiculously small". His representation was that the probability of {{math|''k''}} of {{math|''n''}} keys mapping to a single slot is {{Math|α<sup>''k''</sup> / (''e''<sup>α</sup> ''k''!)}}, where {{math|''α''}} is the load factor, {{math|''n''/''m''}}.<ref>{{cite tech report |last=Gonnet |first=G. |date=1978 |title=Expected Length of the Longest Probe Sequence in Hash Code Searching |id=CS-RR-78-46 |publisher=[[University of Waterloo]] |location=Ontario, Canada}}</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)