How many 5-digit numbers are there, so that 0,1 and 2 are NOT included, 3,4 and 5 have to be included
I have the following question. How many 5-digit numbers are there, so that the following conditions are satisfied:
- 0,1 and 2 are NOT included
- 3,4 and 5 have to be included
The list of possible numbers to choose from is (3,4,5,6,7,8,9). As we know, 3,4 and 5 have to be included in every number, for example 33475, 54339 etc.
I tried to do this as follows:
For the 1. digit, I can choose 3,4 or 5. So, I basically have choices. For the 2. digit, I have 2 numbers to choose from, for example 4 or 5 if 3 is the 1. digit, 3 or 5 if 4 is the 1. digit etc. So, that's . For the 3. digit there is 1 number to choose as per reasoning for choosing the 2. number. That's basically . For the 4. and 5. digit, there are possibilities respectively, because any number from the list can be chosen.
At the end I get possible numbers. Now, you can permute those choices between the digit places. There are 5 digits, so it would be possible permutations. In the end I got numbers. However, the problem is that there are not 120 such permutations, because for some cases one number is counted multiple times.
I know from my class that the answer is 1830. And I also got the hint from my professor to use the inclusion-exclusion principle. But with that I have problems to start.
So, could somebody help me either how to calculate this with the inclusion-exclusion principle OR with the way I tried to do this, i.e. how to NOT multiple count those numbers.