1
$\begingroup$

If a string is to be generated with exactly 16 characters and it takes the following form:

aaaaa####aaaaaa

Where a is any of the 26 lower case letters and # is a number from 0-9 inclusive. How many possible combinations are there?

If they were all the same it would be 26^16 but since the the middle 4 only have 10 possible characters each how do you calculate it?

  • 1
    Well, just $26^{16-4}*10^4.$2017-01-26

1 Answers 1

3

I'm assuming its aaaaaa####aaaaaa, since otherwise it's 15 characters. There, you have 12 characters giving $26^{12}$ combinations and 4 numbers giving $10^4$. $26^{12}*10^4$ or $(26^3*10)^4$ total.

  • 0
    Thank you! That makes sense! If I had a 5 thousand word dictionary of six letter words that I used instead of every possible combination of letters would it be 5000 * 10^4 * 5000 ? The dict eliminates combos like zzzzaa and only uses english words.2017-01-27
  • 0
    @NULL Yeah, that is correct2017-01-27