Permutations with alphabet

59 Views Asked by At

A password must be created using only the lowercase letters of the alphabet. How many passwords can be created that are up to 9 lowercase letters in size?

For my answer, I have: $26 * 27^8$

I am unsure if my answer is correct. I have 27 as surely a NULL letter should be included? What I mean by NULL is that in case no letter is chosen (thus shortening the password size as it is up to 9 letters in size).

2

There are 2 best solutions below

0
On BEST ANSWER

I would say it is $26 + 26^2 + 26^3 + \cdots +26^9 = \frac {26(26^9-1)}{25}$

On your arguement for the null letter. If we use _ to represent the null.

Is "a_b" a viable password?

The nulls must be the front or the back of the string. (and even then with a rule, all on the front or all on the back)

0
On

Your answer appears to follow the logic of: - Pick the first letter (from one of the 26 letters). -Pick the second letter (from one of the 27 letters where you include the null character). -Pick the third letter (from one of the 27 letters where you include the null character).

Letting + represent the null character, you are counting passwords which look not only like aabbccdde, aabb+++++ and a++++++++ but you are also counting passwords which look like a++a++b+b where you have letters occurring after the null characters.

If you consider the null character to be like an empty-string then you have accidentally overcounted aabb+++++ and a++a++b+b as "different" outcomes when they are in fact both simply aabb and should have been counted as the same. If you consider the null character to be like a "space" instead, then you are counting passwords which you should not be.

What you effectively counted was instead the number of passwords of length exactly $9$ where the first character must be a letter and the remaining characters may be a letter or a +.


For a corrected approach, count how many length $1$ passwords there are. Then count how many length $2$ passwords there are, then the length $3$ and so on up until length $9$ and add these together. (Depending on your interpretation, you might even consider a length 0 password)