Probability, Statistics, Distributed Systems, Software Engineering, Interview Questions.
collision after 1st and 2nd keys inserted = N-2/N P = N/N * (N-1)/N * (N-2)/N * (N-3)/N * … *(N-M+1)/N P = N!/((N-M)!*N^M) Of course, if M > N, then by intuition you cannot have no-collision because by Pigeonhole Principle, at-least one slot will have 2 or more keys. Thus when M > N, P=0 When M ≤