2

How many possible words of length 6 can I generate from the English lower case alphabet, if each word starts with a random consonant, and after that vowels and consonants alternate?

What if I add digits to my alphabet?

See also this question.

Community
  • 1
  • 1
coderex
  • 27,225
  • 45
  • 116
  • 170

2 Answers2

6

I assume this is related to this question/answer, if so then the numbers of possibilities is this case (6 chars) are 1 million, 157 thousand and 625:

21 * 5 * 21 * 5 * 21 * 5 = 1,157,625

7 chars:

21 * 5 * 21 * 5 * 21 * 5 * 21 = 24,310,125

8 chars:

21 * 5 * 21 * 5 * 21 * 5 * 21 * 5 = 121,550,625

You get the idea.

Community
  • 1
  • 1
Alix Axel
  • 151,645
  • 95
  • 393
  • 500
  • what would be the combination when i insert 1-9 to your array('b', 'c', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'm', 'n', 'p', 'q', 'r', 's', 't', 'v', 'w', 'x', 'y', 'z','1',....,'9'), – coderex Aug 22 '09 at 04:56
  • Simple, you just have to the calculations but instead of using 21 you should use 31 (because of the extra 10 digits), however this would make the function not mnemonic, please refer to your original question for an update (in a couple of minutes). – Alix Axel Aug 22 '09 at 05:12
  • Done, now to calculate the number of possibilities you should multiply the calculations mentioned above by 10^n (where n is the number of digits), so for 6 letters and 3 extra digits the calculation is 1157625 * 10^3 = 1157625 * 1000 = 1,157,625,000. – Alix Axel Aug 22 '09 at 05:23
0

If its only lowercase English alpha characters then the answer for combination is simply 26 to the sixth power. I don't have an answer for permutation.