Let nodd be the number of odd keys and neven be the number of even keys, such that:
nodd+neven=n Under the Simple Uniform Hashing Assumption (SUHA):
Any key hashed using h1 is equally likely to hash to any of the m slots with probability m1.
Any key hashed using h2 is equally likely to hash to any of the m slots with probability m1.
For a specific slot j (1≤j≤m), let the indicator random variable Ii=1 if key i hashes to slot j, and 0 otherwise. Then E[Ii]=m1 for every key i, whether it is odd or even.
The total number of keys in slot j is Xj=∑i=1nIi.
By the linearity of expectation:
E[Xj]=i=1∑nE[Ii]=i∈odd∑E[Ii]+i∈even∑E[Ii]=nodd⋅m1+neven⋅m1=mnodd+neven=mn Hence, the expected number of keys in any slot is mn.
Therefore, option B is correct.