Consider applications A1, A2 .. AN having properties P11, P12,... PN1, PN2.. Also consider buckets B1, B2 ... BN where each property needs to be mapped. We have the following constraints -

total number of properties >> number of applications

total number of properties >> number of buckets

number of buckets ~= number of applications

Is there a hash algorithm which minimizes the number of distinct application each bucket is mapped to while still guaranteeing even distribution of properties? In other words, if one of the buckets were to be hidden temporarily, the number of distinct applications affected should be minimal.

  • $\begingroup$ If it exists, as they are a finite number you can check all. Not exactly efficient, though. $\endgroup$ – vonbrand May 2 '20 at 15:53
  • $\begingroup$ @vonbrand did you mean to suggest going through all existing hash functions? $\endgroup$ – aandis May 3 '20 at 1:32
  • $\begingroup$ Do you really need the absolute minimum, or is something that is close to minimal acceptable? A random assignment is likely to be pretty good (close to optimal) when all three numbers are large. $\endgroup$ – D.W. May 3 '20 at 7:18
  • $\begingroup$ Close to minimum @D.W. $\endgroup$ – aandis May 3 '20 at 11:25
  • $\begingroup$ Please edit the question to incorporate that information. We want questions to stand on their own, so people don't have to read the comments to understand what you are asking. $\endgroup$ – D.W. May 3 '20 at 15:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.