I am a biologist and my math skills have become a bit rusty, so any help would be appreciated. I would like to know how to calculate how many combinations there exist any given number of combinations and how many of those are unique.
I would really like to know how to calculate this for any number of combinations (not just 0-9 but like 20 or 30) and numbers in the combinations (1-1 or 1-1-1 or 1-1-1). In this scenario 1-2-2 and 2-1-1 and 2-2-1 are all identical (= 1-2) so the position number in the digit is not important and only non-redundant numbers are counted.
example data made by brute force in R for numbers 0-9:
- 1 number in the combination (0,1,2,3,4,5,6,7,8,9):
- 10 possibilities and 10 unique possibilities
2 numbers in the combination (0-1,0-2,0-3,0-4...):
- 100 possibilities (10 combinations of 1 number only and 90 combinations where 2 different numbers are found)
- 55 unique (10 combinations of 1 and 45 of 2 (because 1-2 and 2-1 are the same)
3 numbers in the combination (0-0-1,0-0-2,0-0-3...):
- 1000 possibilities (10+270+720) and 175 unique (10+45+120)
4 numbers in combination (0-0-0-1,0-0-0-2...):
- 10000 possibilities (10+630+4320+5040) and 385 unique (10+45+120+210)
But what would the general formula be for calculating these numbers (i.e. for the 4 digit combinations on how to calculate that it was 10,630,4320,5040 for combinations and 10,45,120,210 for unique combinations with 10 numbers per digit but what is the search space for 30 numbers per digit position and 16 digits in each combination?