Possible combinations of a 13 letter string of words

727 Views Asked by At

How can I work out the amount of possible combinations contained within the string 'cheese > beer'. This includes all letters in the English alphabet, spaces, uppercase and lowercase letters, numbers, and all the symbols found on a standard QWERT keyboard.

This is to understand how many attempts it would take a program to 'brute force' this phrase, starting at 'a', then trying every single possible combination of letters, spaces, numbers, symbols, until it finds the phrase 'cheese < beer'.

1

There are 1 best solutions below

0
On BEST ANSWER

If the total number of allowed "letters" is $n$ there are then $13^n$ strings in all, and only $13!/(5!2!)$ are same as 'cheese > beer'.

Edit: It should be $n^{13}$ total strings, not $13^n.$