£0.00 @

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 ca…

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.

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.

Options

## All Comments

(5) Jump to unreadPost a commentStudies (not homework though lol)

Does that mean for your number you would have 10C1, for the alphanumeric you would have 26C5 and and for the special character 58C1?

Probably not!! Just thinking out loud!

The way I understand it is that nCr gives you the number of combinations possible for a given distribution. So for the situation of two numbers in any position, out of a total of 7 possible positions = 7C2 = 21.

I think I misread the question - it's a long time ago since I did maths! Sorry, I don't think I can help!

All I remember of nCr is that 10C3 means there could be 10 balls in a hat, and 10C3 would be the number of different combinations that 3 balls could be taken out! At the moment I can't see how to relate this to your problem :(

I'm sure someone will be along to help though!

Good luck.

All I remember of nCr is that 10C3 means there could be 10 balls in a hat, and 10C3 would be the number of different combinations that 3 balls could be taken out! At the moment I can't see how to relate this to your problem :(

I'm sure someone will be along to help though!

Good luck.

Thanks for that.

I just found out I've been messing up the formula all along - a true doh moment lol.