Permutations and combinations Password problem.

212 Views Asked by At

Find the number of passwords of length 10 with digits (0–9). No letters are used BUT the first four digits are not all the same AND the last four digits are not all the same, AND the 4th, 5th, 6th and 7 digits are not all the same.

I think the first four places can be filled in 10*9*8*7 ways last 4 places in 10*9*8*7. So the remaining to places i.e. 5th and 6th position can be filled in 8*7 ways.

Want to verify is this approach correct?

1

There are 1 best solutions below

16
On

Filling the first four places in $10\cdot 9 \cdot 8 \cdot 7$ ways requires that the digits be all different. Your problem requires that they not be all the same. Those are different. The problem would accept $1124$, but your calculation would not. You should compute the number of ways without restriction, then subtract the number of ways they can all be the same. The same objection applies to the last four places. Then the ways to fill the fifth and sixth depend on what has happened in the fourth and seventh. If they are the same, and nothing prevents it, the calculation is different. You should read the question more carefully and look up the inclusion-exclusion principle.