you want to arrange digits 0 to 9 such that 1 and 2 always have 2 digits between them.in how many ways can you do this without repeating any digit
Answers
Step-by-step explanation:
There are 10! ways to arrange those digits.
There are 9! arrangements in which 0 retains its position. We need to take these out.
There are 9! arrangements in which 2 retains its position. We need to take these out.
Same for 4, 6 and 8. Overall, there are 5 such 9!'s that need to be subtracted.
But oops: those arrangements where both 0 and 2 stay put? We just subtracted those twice, and we need to add one back. There we 8! such arrangements so we need to add 8! back.
Same for (0 and 4), and (0 and 6), and so on. There are 10 such pairs.
And then... We just over-counted those where 0, 2, 4 are all in their places.
You may see a pattern here. That pattern is the principal of inclusion-exclusion.
What it means in our case is that the desired number is
N=10!−(51)9!+(52)8!−(53)7!+(54)6!−(55)5!
which comes to N=2170680 .