The landscape
- 7-wise independent ⇒ expected constant insertion time (proved in the previous topic).
25:34 - 5-wise independent ⇒ still expected constant time — Pagh, Pagh & Ružić, original paper ~2007 with a later journal version.
25:3426:46 - 4-wise is not sufficient — Pătraşcu and Thorup exhibit a 4-wise-independent family where there is a good chance the number of probes is
Θ(log n)rather than constant.27:30 - The claim being proved is about the expected insertion time being
O(1), not a high-probability bound.27:08
The obstacle
The 7-wise proof needed the 6th moment only because of the factor k from union-bounding over the k length-k intervals containing h(x). Kill that k and a 4th moment suffices — which needs only 4 + 1 = 5-wise independence. 25:57 26:22 29:17
The binary-tree construction
- Build a perfect binary tree over the array of size
m(a power of 2); each node corresponds to the interval of memory locations in its subtree.27:5529:17 - A node at height
his dangerous if at least(3/4)·2^hitems hash into it.29:4530:21 - Why
3/4: withm = 2nthe expected occupancy of a length-2^hinterval is(1/2)·2^h, so a constant factor above the mean is an anomaly — any constant above1/2would work,3/4is just a convenient choice.31:0443:0443:46
Lemma prime (a second correction)
kprobes ⇒ at leastkfull intervals containingh(x), each of a different length.33:16
This restatement is what makes E[#probes] ≤ Σ_k Pr[∃ a full length-k interval containing h(x)] legitimate. 31:50 32:35
The spanning argument
- Given an interval
Iof lengthkwith2^h ≤ k < 2^{h+1}, look at the tree nodes two levels below, at heighth − 2(intervals 4–8× smaller).34:0234:39 - The number of such nodes spanning
Iis at least 4 and at most 9 — a constant.35:1146:15 - If
Iis full, everyone in the first four of those nodes hashed to pointA(the start) or later, and they collectively hold at least3·2^{h−2} + 1items — so one of the four hasL > (3/4)·2^{h−2}, i.e. is dangerous.37:5938:37 - All length-
kintervals containingh(x)fit inside a single interval of length2k − 2, which is itself spanned by a constant number of height-(h−2)nodes.38:3739:3346:15 - Therefore: if none of that constant set of nodes is dangerous, no interval under consideration can be full.
41:06
flowchart TD
A["k length-k intervals containing h(x)"] --> B["all inside one interval of length 2k−2"]
B --> C["spanned by O(1) tree nodes at height h−2<br/>(each of length ≈ k/8)"]
C --> D["full interval ⇒ some node is dangerous"]
D --> E["union bound over O(1) nodes<br/>instead of k intervals"]
E --> F["4th moment suffices ⇒ 5-wise independence"]
Closing the bound
Pr[∃ full length-k interval ∋ h(x)] ≤ O(1)·Pr[some length-k/8 interval is dangerous].41:3042:22- Dangerous means
L(I') − E[L(I')] > |I'|/4, i.e. a deviation of half the expectation, sinceE[L(I')] = |I'|/2but3|I'|/4landed there.44:12 - Fourth-moment (Markov) step:
≤ (2/|I'|)^4 · E[(L(I') − E L(I'))^4], and the moment works out to≈ |I'|^2 = Θ(k^2), leavingΘ(1/k^2)— a convergent sum overk.44:5045:1346:31 - Where 5-wise enters: conditioning on
I ∋ h(x)fixes one evaluation, leaving four more that still behave independently — five in total.46:5547:29 - The folklore one-liner Nelson quotes: 5-wise works "because when you condition on one, it's 4-wise" — cryptic until you see this argument.
47:46