How many passwords possible? A password for a bank need to include 11 letters can be made from the $A,B,..Z$ letters (only upper case) such that the password must include the letter $A$ excatly 5 times and $Z$ exactly 3 times, how many different passwords can be made?
I find it hard to apply the conditions of the letters $A$ and $Z$, I know that in a general without conditions there is $26^{11}$ options, now I would like to understand the number of forbidden passwords.
 A: Since $8$ places of the password are fixed, let's consider the remaining $3$ places which can be filled with the remaining $24$ letters.
The number of "$3-24$" passwords is $24^3$.
Now, consider a password composed by $5$ "A", $3$ "Z" and $3$ "*". The number of these passwords is $$\frac{11!}{5!3!3!}.$$
Notice that this number is evaluated using the formula of permutations of multisets.
Therefore, the total number of passwords satisfying your requirements is:
$$24^3 \cdot \frac{11!}{5!3!3!} = 127'733'760.$$
Notice that the "*" letters corresponds to the "$3-24$" passwords.

A more effective explanation is the following:
\begin{array}{ccccccccccc}
A & A & A & A & A & Z & Z & Z & * & * & * \\
A & A & A & A & A & Z & Z & * & Z & * & * \\
A & A & A & A & A & Z & * & Z & Z & * & * \\
& & & & \vdots \\
* & * & * & Z & Z & Z & A & A & A & A & A \\
\end{array}
The number of rows of this table is $\frac{11!}{5!3!3!}$.
For each row, you can form exactly $24^3$ passwords assigning different letters to "*"s.
A: There are $11 \choose 5$ ways to choose the places for the 5 $A$s. After this is done, there are $6$ spots remaining, and so there are $6 \choose 3$ to choose the places for the 3 $Z$s.
There are now $11 - 5 - 3 = 3$ spots left. Now there are $24$ letters left to choose from (since $A$ and $Z$ have been used up), and the letters can be repeated, so there are $24^3$ ways to fill these $3$ spots.
Therefore the total is ${11 \choose 5} \cdot {6 \choose 3} \cdot 24^3 = 127 \ 733 \ 760 $.
A: First of all, note that eight of the letters are fixed. Now, the remaining three letters could be any of the letters except for $A$ and $Z$. There are ${}^{24}C_3$ combinations for this. Now, these 11 letters could interchange themselves in $11!$ ways.
But the interchanges among the $5$ $A$'s and $3$ $Z$'s are not significant. Hence, total number of permutations (interchanges) is
$$\frac{11!}{5!\cdot 3!} = 332640$$
By the multiplication principle, total number of passwords is
$${}^{24}C_3\times 332640 = 4039518160$$
Hope it helps :)
