Uploaded by deaththekilla

Succinct Solution Homework 7

advertisement
Homework 7
(1)Exercise 14.3.1 (40%)
a) Records g through j are inserted into buckets 0 through 3, respectively.
Answer:
b) Records a and b are deleted.
Answer:
c) Records k through n are inserted into buckets 0 through 3, respectively.
Answer:
1
d) Records c and d are deleted.
Answer:
(2)Exercise 14.3.6 (60%)
a) 0000, 0001, …, 1111, and the method of hashing is extensible hashing.
Answer: i=3
2
b) 0000, 0001, …, 1111, and the method of hashing is linear hashing with a capacity threshold of 100%.
Answer: i = 3, n = 6, r = 16
000
0000
1000
001
0001
1001
1110
010
0010
0110
1010
011
0011
0111
1011
100
010
0010
0100
000
0110
1000
1100
0
101
010
0010
0101
000
0110
1000
1101
0
3
1111
c) 1111, 1110, …, 0000, and the method of hashing is extensible hashing.
Answer: i=3
4
d) 1111, 1110, …, 0000, and the methods of hashing is linear hashing with a capacity threshold of 75%.
Answer:
5
Download