0
$\begingroup$

If the password needs to be 18 random characters, where

Exactly one character is an upper-case letter (A-Z) Exactly one character is a number (0-9) All other characters are lowercase letters (a-z)

How many possible passwords are there?

I was thinking its just 26+26+10 combinations for each letter and so 62^18 as the answer but there being exactly one of the uppercase letters and exactly one number being there are throwing me off

$\endgroup$
4
  • $\begingroup$ Welcome to Math SE. What have you tried? $\endgroup$ Commented Nov 16, 2022 at 21:23
  • $\begingroup$ I was thinking its just 26+26+10 combinations for each letter and so 62^18 as the answer but there being exactly one of the uppercase letters and exactly one number being there are throwing me off $\endgroup$ Commented Nov 16, 2022 at 21:29
  • $\begingroup$ Could you edit your question to include your thoughts? Problems without context or effort made to solve them tend to be closed $\endgroup$ Commented Nov 16, 2022 at 21:36
  • $\begingroup$ Sure. I have updated it $\endgroup$ Commented Nov 16, 2022 at 21:37

2 Answers 2

1
$\begingroup$

Let $n$ be the size of the your alphabet. Assuming the password all valid passwords have precisely 18 characters, there are exactly $3060 \cdot n^{17} = (18 \cdot n) \cdot (17 \cdot 10) \cdot n^{16}$ valid passwords.

Firstly, there are $18$ possible choices for the position of the uppercase letter and $n$ choices for this letter. This is where the $18n$ factor comes from. Secondly, there are $17$ possible choices for the position of the number and $10$ choices for such a number, so we multiply by a factor of $17 \cdot 10$. Finally, there are $16$ positions left, each of which with $n$ possible choices. Hence we multiply by $n^{16}$. If you assume $n = 26$ is the size of the standard English alphabet you get $ 3060 \cdot 26^{17}$ valid passwords.

$\endgroup$
2
  • $\begingroup$ Should it be $n^{16}$? $\endgroup$ Commented Nov 16, 2022 at 21:43
  • $\begingroup$ You're right! Thanks! $\endgroup$ Commented Nov 16, 2022 at 21:48
0
$\begingroup$

Since exactly one character is Uppercase and one character is a number, you don't have 62 possibilities for each character.

First, which one is Uppercase. $${18 \choose 1}\times 26$$ Second the number $${17 \choose 1}\times 10$$ Finally the rest could be any lowercase letter $$26^{16}$$ Complete answer $${18 \choose 1}\times 26\times {17\choose 1}\times 10 \times 26^{16}=18\times17\times10\times26^{17}$$

$\endgroup$

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.