in reply to Re: About the expected number of comparisons for n keys into k buckets
in thread About the expected number of comparisons for n keys into k buckets

Oh, I spot what's wrong here,it should be:

X1(X1+1)/2 + ... Xk(1+Xk)/2 = n/2 + (X1^2+X2^2+...+Xk^2)/2

Let (1) denote the above expression.

Now I've no idea how to calculate the expected value of (1)....

  • Comment on Re^2: About the expected number of comparisons for n keys into k buckets