Number of combinations for a 4-character password with particular rules

3.4k Views Asked by At

We have a password with the following rules:

  • 4 characters, no more, no less.
  • Only normal alphabet characters (a...z)
  • Only 1 uppercase character (but we don't know in which position).

What steps should we follow to find how many possible combinations we have?

1

There are 1 best solutions below

1
On BEST ANSWER

Consider lowercase passwords first. In how many ways can you choose the first character? Well, since there are 26 valid characters, there are 26 options. We can do the same for the other characters, and we find, for the number of lowercase passwords:

$$26 \cdot 26 \cdot 26 \cdot 26 = 26^4$$

Next, we can choose one of the characters and make it uppercase. Since there are four ways to choose this character, the number of possible passwords equals:

$$4 \cdot 26^4 = 1827904$$