Permutations Password Problem

79 Views Asked by At

Password of length $10$ to be made from letters ($a$-$z$) and numbers ($0$-$9$). No of passwords of length $10$ that can be made with $3$ letters and $7$ digits, and at most one $9$.

Is $26^3 \times 9^6 \times 1$ (for one $9$) $+ 26^3 \times 9^7$(for no $9$'s) correct?

2

There are 2 best solutions below

2
On BEST ANSWER

You can either have no 9s at all: $$ \binom{10}{3} 26^3 9^7 $$ or exactly one, in one of 10 positions in the password: $$ \binom{10}{3}26^3 9^6 \times 10 $$

0
On

You need to do the following to solve this problem:

  • Select 3 positions where you will have the letters: $^{10}C_3$ ways.
  • Select the letters that will go in those positions: $26^3$ ways.
  • Choose whether your password has 0-occurences of 1-occurence of 9.
    1. If there are 0-occurences of 9, then:
      • each of the 7 digit spots can be assigned in 9 ways giving you: $9^7$ ways.
    2. If there is 1-occurence of 9, then:
      • one of the 7 digits will be a 9, select that position and assign it: $^9C_7$ ways.
      • other 6 digits can be chosen to be any of the 9 other digits (not-9): $9^6$ ways.

So the final solution will be the product of all these counts, since each of them can be done independently. Except the one choice we have in deciding whether there will be 0 or 1 occurrences of 9. Since only 1 of these 2 cases can be taken, we will add their results.

So the final solution will be: $$^{10}C_3 \times 26^3 \times (9^7 + ^9C_7 \times 9^6) \;\text{ways}$$