卷別
資料結構與演算法
選擇國立臺灣大學 2025 · 考試 · 第 11 題
(5 points) Let be a collection of objects, each with a unique integer key . Consider hashing all the objects in into an array of size buckets. Each bucket stores a (singly) linked list of all objects hashed into the same bucket. The hashing algorithm works as follows. The algorithm first picks a hash function uniformly at random from a hash family . Then, for each object , the algorithm computes and inserts the object into the bucket . The number of collisions is defined to be the total number of (unordered) object pairs hashed into the same bucket. We focus on the choice of the hash family and the worst-case expected number of collisions . Note that the term worst-case refers to the choice of the input set . Select all statement(s) that are correct for every sufficiently large .
- (A)If is a uniform hash family, then .
- (B)If is a universal hash family, then .
- (C)If , then .
- (D)If , then .
- (E)The hash family described in (C) is a universal hash family.