How to work out the number of ways a user can be asked to enter 3 characters from a memorable word.

27 Views Asked by At

A bank when you sign in asks for a Userid and a Password and when accepted asks for 3 characters from a previously registered memorable word. The numbers of the characters are always in ascending order. Example 1,4,7 or 5,6,7 but never 1,7,4 or 5,7,6. Research has found the normal formula P(N,k) = N!/(N-k)! but this does not cater for the ordering of the resulting sequence of numbers. My question is how can this catered for? I have iterated the list for 3 from 8, 3 from 9, 3 from 10 and 3 from 11 and get the answers 56, 84, 120, 162.

1

There are 1 best solutions below

1
On

You are looking for combinations instead of permutations. $$ C(n,k) = \frac{n!}{k!(n-k)!} $$