Q1. Suppose that we use an open-addressed hash table of size m to store n = ↵m items, where ↵ < 1. Assume uniform hashing. Let the random variable Xi denote the number of probes required by the ith insertion, and X = max1in Xi be the maximum number of probes required by any of the n insertions.
Q2. There were two quizzes and n students. All students attended the
first quiz, and all but one attended the second. The teacher kept a single list
containing, not in any particular order, the ID’s of the students attending the
quizzes (where the ID of a student appears twice if (s)he attends both quizzes).
The teacher would like to find the ID of the student who was absent from the
second quiz.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
27 | 28 | 29 | 30 | 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |