null
US
Sign In
Sign Up for Free
Sign Up
We have detected that Javascript is not enabled in your browser. The dynamic nature of our site means that Javascript must be enabled to function properly. Please read our
terms and conditions
for more information.
Next up
Copy and Edit
You need to log in to complete this action!
Register for Free
1592346
Hashing
Description
220 Mind Map on Hashing, created by dadelgado01 on 06/11/2014.
No tags specified
220
Mind Map by
dadelgado01
, updated more than 1 year ago
More
Less
Created by
dadelgado01
about 11 years ago
7
1
0
Resource summary
Hashing
Data Structures
Associative Array or Dictionary
O(1) to find any record
Hash Functions
Should produce hash codes that are (almost) uniformly random
Hashing methods
Division
Use prime number as table size, m
Convert keys, k, into integers
use remainder, h(k) = k % m as hash value
Folding
Divide the int key, k, into sections
Add, subtract and/or multiply them, combining them into the hash code
Middle-Squaring
Choose a middle section of the int key, k
Square the chosen section
Use middle section of hat result as hash key
Truncation
Delete part of the key, k
Use remaining part as hash key
Hash Collisions
The Perfect Hash Function is one that gives a different hash code for every key
A Minimal hash function is when the number of keys n equals the array size m
Collision Resolution Policy
OALP - Open Addressing with Linear Probing
Successive search for first entry with matching key at lower location in table
If no such entry, "Wrap around" the table
Clusters keys together
OADH - OA with Double Hashing
Hash a collided key again with a different hash function
Use result of second hashing as increment for probing table locations
Other Techniques
Hash Buckets
Divide a big hash table into several small sub-tables, or buckets
Hash function maps key into one of the buckets
Keys are stored in each bucket in sequentially increasing order
Chaining
All records for a single hash address are kept in a linked list, or chain, started at that address
Desired Properties for a good Hashing theme
Hash locations spread out
Use relatively small table size, that doesn't affect performance
The function h is fast to compute
Show full summary
Hide full summary
Want to create your own
Mind Maps
for
free
with GoConqr?
Learn more
.
Similar
CompTIA A+ 220-902
Patrick Jenkins
Chp 11.
Omo Mora
Chp 13 and 16
Omo Mora
Macroecon Exam 1
Omo Mora
Chapter 10
Omo Mora
Hash Functions
msladey
Static Perfect Hashing
msladey
Cuckoo Hashing
msladey
Browse Library