3
$\begingroup$

Suppose there are $62$ characters available for a password ($26$ uppercase letters, $26$ lowercase letters, and 10 numerals).

How many passwords are there that are exactly $12$ characters long if the passwords contain the same number of uppercase, lowercase, and numeral characters (without repetition)?

Why wouldn't the answer just be:

$(26×25×24×23)^2 + (10×9×8×7)$

Here's another: The password must be between 10 and 12 characters and may contain repetitions aside from the ith character being the same as the (i-1)th character or (i+1)th character. That is, the password cannot have immediate repetitions.

  • 0
    I edited the answer for your second question.2012-11-14

1 Answers 1

5

You're to choose $4$ upper case, $4$ lower case and $4$ numeral characters. the total possible selection is $12!\cdot \binom {26}{4}\cdot\binom {26}{4}\cdot\binom {10}{4}$

Look at it this way

  • There are $\binom {26}{4}$ ways of choosing $4$ uppercase letters from $26$
  • There are $\binom {26}{4}$ ways of choosing $4$ lowercase letters from $26$
  • There are $\binom {10}{4}$ ways of choosing $4$ numeral characters from $10$
  • Therefore, there are $\binom {26}{4}\cdot\binom {26}{4}\cdot\binom {10}{4}$ possible ways of choosing $12$ characters in total.
  • Considering that each character is distinct from the other. So we can permute each of our selection to form another password, thus we multiply by $12!$.

The second question can be simplified this way.

  • The password can be $10$, $11$ or $12$ characters long.
  • There is no fixed amount of each character type that the password must contain except that one can't have the same character side by side. So we're picking from a bowl of $62$ characters with replacement with our constraint.
  • We have $62$ choices for the first character of our password, $61$ for the second (excluding the already chosen character), and $61$ for every following character of our password since we always exclude the immediate previously chosen character.
  • It is more understandable this way. You pick a character from the bowl of $62$ and you write it down. You don't return the character because you don't want it to be the next one and then you pick a second character from the bowl of $61$, you write it down and you keep this second character(because you don't want it to be the third) while returning the first one, so you still have $61$ left in the bowl.
  • Except the first choice which is $62$, you will always have $61$ choices.
  • To choose $n$ character long password this way you have $62\cdot61^{n-1}$
  • To choose $10$, $11$, or $12$, it is $62\cdot61^{10-1}+62\cdot61^{11-1}+62\cdot61^{12-1}$
  • 1
    @user1038665: it is usually better to ask another question than to add a new one to an existing question. That way it is clearer what each answer refers to.2012-11-14