Let be a 4-element permutation with for and for , such that either are consecutive integers or are consecutive integers. Then the number of such permutations is equal to ______.
Solution
Core idea. Either of two conditions is counted by adding and removing the overlap.
Concept refresher. For two properties and , the number of objects with at least one of them is
and the remaining objects have neither.
Picture the situation. Here consecutive integers means that each term is one more than the term before it, as in 7, 8, 9. The first condition ties the first three terms together and leaves the fourth free; the second ties the last three and leaves the first free. A permutation such as 7, 8, 9, 10 satisfies both, so it must not be counted twice.
Approach. Count the permutations for each condition, count the overlap, and apply inclusion and exclusion.
Step 1: First three consecutive
The terms , , are fixed by , which can be any number from 1 to 98. Then is any of the other 97 numbers, giving permutations.
Step 2: Last three consecutive
In the same way fixes the last three terms and is any of the other 97 numbers, giving 9506 again.
Step 3: Both
If both hold, all four terms go up by one, fixed by from 1 to 97, which is 97 permutations. So the count is .
Answer. 18915
Sanity check. A permutation such as 5, 6, 7, 8 satisfies both conditions and would be counted twice without the correction; there are 97 of these.
Common wrong answers
- 19012: Not removing the 97 permutations counted twice gives 19012.
- 9506: Counting only one of the two conditions gives 9506.
Key takeaway
The trap. A run of four terms rising by one satisfies both conditions.
How toppers think. They identify the overlap first, before counting either condition.
Remember. Either: add the two counts, subtract the overlap.
More on Inclusion–Exclusion Principle
- The number of seven-digit numbers, that can be formed by using the digits 1, 2, 3, 5 and 7 such that each…
- The number of permutations, of the digits 1, 2, 3, …, 7 without repetition, which neither contain the string…
- The total number of 4-digit numbers whose greatest common divisor with 54 is 2, is
- All 7 on Inclusion–Exclusion Principle ›