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

I think there is a fundamental problem here arising from "For a random hash of "<n"> keys into "<k"> buckets,..". Presuming we can even define what random input means to the hash algorithm, the hash function will not generate random indicies.

I'll grant you the terminology is poor, but I don't see how they could possibly be referring to anything but an optimially balanced hash, one with with the same number of elements in each bucket.

It the formula was really the result of a sampling of random hashes, the formula wouldn't have been derived from "the sum of the squares of the number of entries in each bucket."

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

Replies are listed 'Best First'.
Re^3: About the expected number of comparisons for n keys into k buckets
by Marshall (Canon) on Jul 28, 2011 at 05:10 UTC
    I think I understand you and I don't see any big problem.
Re^3: About the expected number of comparisons for n keys into k buckets
by PerlOnTheWay (Monk) on Jul 29, 2011 at 09:01 UTC
    It turns out the perldoc is correct, a friend of mine gets the same result by rigorous mathematical calculation.
      Do show. The only math that's been posted shows otherwise.