Consider a hash table with $n$ buckets, where external(overflow) chaining is used to resolve collision. The hash function is such that the probability that a key value is hashed to a particular bucket is $\dfrac 1 n$. The hash table is initially empty and $k$ distinct values are inserted in the table.
Q) What is the probability that bucket number $1$ is empty after the $k^{th}$ insertion?
- $n$
- $(n - 1)^k$
- $((n-1)/n)^k$
- $((n-1)/k)^n$
Q). What is the probability that no collision has occurred in any of the $k$ insertions?
- $n(n - 1)(n - 2)(n - k + 1)/n^k$
- $n(n - 1)(n - 2)(n - k - 1)/n^k$
- both (a) and (b)
- none