Bit of long shot, but maybe I might get a maths genius reading this.
I'm having a bit of trouble with the nCr function to calculate the max number of permutations under specific circumstances. I can work everything out fine when only having two variable factors but when I add a third my maths seems to go wrong
Basically I have a maximum distribution of 94^7 in a string value. This means 94 characters are possible, in a string of length 7.
I then am trying to break this up based on different patterns
e.g. from this string of 7 characters, 1 is a number (10 different choices), 1 is a special character (58 choices) and the remainder are alphabetic (26 different choices)
I am currently working this out like this: P(5a + 1n + 1s) = ( (7 nCr 1) * 10) * ( (7 nCr 1) * 58) ) * (26^5).
The problem is after working out all the possible permutation distribution areas - I am never hitting the maximum distribution when toting them up. I've got a feeling it's got something to do with the way I am working out the distribution areas above, but I can't seem to find the problem.
Mucho thanks for anyone who can help me solve this problem.