Assume there are 9 identical balls, and each can be placed in one of 10 numbered slots. All balls must be placed in exactly one slot (i.e., you can't leave a ball out). How many combinations are possible?
To explain a little better, I want to create a "hash" function for Social Security Numbers (SSNs). The hash will end up being a 10-digit number, where each digit is represented by the number of times that digit is found in an SSN. Each of the "balls" in the original question represents a digit from the SSN, while the slots represent a number from 0 (in the low-order position) through 9 (in the high-order position).
For example, an SSN of 123-45-6789 would result in a hash of 1111111110, since the digit "0" (zero) never appears, but each of the remaining digits appears once. Another example: 111-22-3333 would result in a hash of 0000004230, since "3" appears 4 times, "2" appears twice, and "1" appears 3 times.
I'm trying to determine the selectivity of my hash algorithm. Thanks for your help!