GATE Computer ScienceModerateGATE CS (PYQ pattern)
Twenty distinct keys are hashed independently and uniformly into 100 slots. What is the expected number of keys that share their slot with at least one other key?
- A. 1.90
- B. 3.48
- C. 3.80
- D. 2.85
Correct answer: B. 3.48
A fixed key is alone iff the other 19 keys avoid its slot: probability 0.99¹⁹ ≈ 0.826. So the expected number of keys that collide is 20·(1 − 0.99¹⁹) ≈ 3.48. 1.90 = C(20, 2)/100 is the expected number of colliding pairs, and 3.80 doubles it (overcounting keys in triple collisions).
More Algorithms questions
- The closed intervals [1,4], [2,6], [3,5], [7,10], [8,12], [9,11], [13,15], [5,8], [10,14], [0,2] are given. What is the minimum number of…
- From index 0 of the array [3, 1, 4, 1, 2, 1, 1, 5, 2, 1, 1, 3, 1, 2, 1] you may jump forward at most a[i] positions from index i. What is…
- The array [12, 7, 9, 14, 5, 11, 8, 10, 6] must be split into 3 contiguous parts so that the largest part sum is as small as possible. What…
- Coupons of 6 equally likely types are drawn with replacement. What is the expected number of draws until 4 different types have been seen?
- Counting sort (stable, processing the input from right to left with cumulative counts) is applied to a = [4, 2, 2, 8, 3, 3, 1, 4, 2]. At…
- LSD radix sort (decimal digits, stable counting sort on each digit, least significant first) is applied to [329, 457, 657, 839, 436, 720…