CSE 326: Data Structures Lecture #15 When Keys Collide

2/11/00


Click here to start


Table of Contents

CSE 326: Data Structures Lecture #15 When 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 or Hashing with Chaining

Open Hashing Code

Load Factor in Open Hashing

Closed Hashing or Open Addressing

Probing

Linear Probing

Linear Probing Example

Load Factor in Linear Probing

Quadratic Probing

Quadratic Probing Example ?

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

Author: Steve Wolfman

Email: owner-cse326@cs.washington.edu

Home Page: http://www.cs.washington.edu/326/

Download presentation source