Hash Tables



Hash Tables: Content Addressable



Hash Table: Common in Modern Languages



Problem Overview



Hash Table: Implementation Illustration



Hash Tables: Problem Generalization



Hash Function



Collisions



Chaining



Chaining - Insert



Chaining - Delete



Chaining - Search



Load Factor: α



Simple Uniform Hashing



Worst Case Analysis of Search (Hashing with Chaining)



Analyzing Search: Some Notation and Facts



Average Case Analysis of Search: Two Cases



Average Case Analysis of Unsuccessful Search



Average Case Analysis of Successful Search - Simple Version



Average Case Analysis of Successful Search - More Complex



Average Case Analysis of Successful Search (continued)



Average Case Analysis of Successful Search: Bottom Line



Comparison with Binary Search



Hash Functions



Mapping Keys to Integers



Division Method



Multiplication Method



Universal Hashing



Open Addressing



Perfect Hashing