Insert 16, 28, 49, 68, 62
H(16) = 5 H(28) = 6 H(49) = 5 H(68) = 2 H(62) = 7
What is P(68)? P(5)? P(62)?
alpha = (number of active records)/ (table size)
(density factor)
avg. no. probes = (1/2) (1 + 1/(1 - alpha))
alpha = (number of active records)/ (table size)
(density factor)
avg. no. probes = (1/2) (1 + 1/(1 - alpha)^2)
Wrote "Art of Computer Programming Vol. 1-3"
Most widely referenced CS book!
Remember Binary search - 12 probes
Prime Tablesize
alpha
success | |||
|---|---|---|---|
10000
.41
1.3
1.93 | |||
7000
.58
1.7
3.41 | |||
5000
.82
3.27
15.93 | |||
4500
.91
6.12
62.23 | |||
4200
.97
21.5
868.55 |