CSE 326: Data StructuresLecture #15When Keys Collide
Today’s Outline
Alternate Universal Hash Function
Alternate Universal Hash Function: Example
Thinking about the Alternate Universal Hash Function
Hash Function Summary
How to Design a Hash Function
Collisions
Open Hashing orHashing with Chaining
Open Hashing Code
Load Factor in Open Hashing
Closed Hashing orOpen Addressing
Probing
Linear Probing
Linear Probing Example
Load Factor in Linear Probing
Quadratic Probing
Quadratic Probing Example ?
Quadratic Probing Succeeds (for ? ? ˝)
Quadratic Probing May Fail(for ? > ˝)
Load Factor in Quadratic Probing
Double Hashing
A Good Double Hash Function…
Double Hashing Example
Load Factor in Double Hashing
Deletion in Closed Hashing
The Squished Pigeon Principle
Rehashing
To Do
Coming Up
Email: owner-cse326@cs.washington.edu
Home Page: http://www.cs.washington.edu/326/
Download presentation source