DSCI 220, 2025 W1
December 2, 2025
Place a colorful little dot on your own birthday.
Interesting questions to ask:
What’s the probability no-one in this room has a birthday today?
What’s the probability that there are 2 people (or more) with the same birthday?
Does this change depending on the number of people in the room?
How many pips do we expect to see on a die?
Definitions that will help us:
How many pips do we expect to see on 2 dice?
What is expected # of people who share a bday w someone else?
Definitions that will help us:
Sum over all \(X_{ij}\) to get the number of shared bdays and its expectation:
Collisions: if we randomly put \(k\) items into \(m\) bins, we expect ________ pairs to collide.
Implication:
We can only avoid collisions if the size of keyspace is less than equal to the size of our hash table and we have a perfect hash function.
We can thwart poor performance by randomizing our choice of hash function for each application. Universal Hashing to the rescue!
We have to deal with collisions: even with only ____ keys we will expect at least one.
We need a collision resolution strategy…