6.5 Another Forbidden Position Problem

Goal: To derive a formula for counting the number of permutations with relative forbidden positions.

Ex: Suppose children 1, 2, 3, 4, and 5 sit in a row in class. Children 1 and 2 cannot sit next to each other or they will cause trouble.

The order in which the children sit corresponds to a permutation of {1, 2, 3, 4, 5}. If 1 is in the ith spot, then 2 cannot be in the i − 1st spot or the i + 1th spot. Thus the pattern 21 or 12 cannot appear in our permutation. This is called a relative forbidden position as certain positions for the placement of 2 are forbidden, but these forbidden positions depend on the placement of 1.

We will focus on the relative forbidden position problem in which

Let Q_{n} = the number of permutations of {1, 2, ..., n} in which none of the patterns 12, 23, 34, ..., (n − 1)n occurs.

Thm 6.5.1 Q_{n} = n! − ( \begin{matrix}n − 1 \\ 1 \end{matrix} ) (n − 1)! + ( \begin{matrix}n − 1 \\ 2 \end{matrix} ) (n − 2)! − ... +

( \begin{matrix}n − 1 \\ n − 1 \end{matrix} ) (−1)^{n−1}1!

Proof: Use inclusion-exclusion principle.

Let S = the set of permutations of {1, ..., n}. Then |S| = n!.

Let A_{j} = set of permutations which contain the pattern j(j + 1) for j = 1, ..., n − 1.

To determine |A_{j}|, we can first look at all the permutations of {1, 2, ..., j, j + 2, ..., n}. Since this set has n − 1 elements, the number of permutations of {1, 2, ..., j, j + 2, ..., n} = (n − 1)!. Note that these permutations are in 1-1 correspondence with A_{j} as any permutation in A_{j} can be formed from a permutation of {1, 2, ..., j, j + 2, ..., n} by inserting j + 1 right after j. Thus |A_{j}| = (n − 1)!

Claim: |A_{i} ∩ A_{j}| = (n − 2)! if 1 ≤ i < j ≤ n

Suppose |i − j| ≥ 2. In this case, A_{i} ∩ A_{j} is in 1-1 correspondence with permutations of a set of n − 2 elements as we can create any permutation of {1, 2, ..., i, i + 2, ..., j, j + 2, ..., n} by taking a permutation in A_{i} ∩ A_{j} and deleting i + 1 and j + 1. Thus |A_{j}| = (n − 2)! in this case.

Suppose |i − j| = 1. Thus j = i + 1 (since we assumed i < j). A_{i} ∩ A_{i+1} is the set of permutations which contain the pattern i i + 1 and the pattern i + 1 i + 2. Thus A_{i} ∩ A_{i+1} is the set of permutations which contain the pattern i i + 1 i + 2. Thus A_{i} ∩ A_{i+1} is in 1-1 correspondence with permutations of a set of n − 2 elements as we can create any permutation of {1, 2, ..., i, i + 3, ..., n} by taking a permutation in A_{i} ∩ A_{i+1} and deleting i + 1 and i + 2. Thus |A_{i} ∩ A_{i+1}| = (n − 2)! in this case as well.

Similarly, |A_{i_{1}} ∩ A_{i_{2}} ∩ ... ∩ A_{i_{k}}| = (n − k)!.

Thus by inclusion-exclusion Q_{n} = n! − Σ_{j=1}^{n−1}(n − 1)! + Σ_{i,j}(n − 2)! − ... + (−1)^{n}(n − n)!

= ( \begin{matrix}n − 1 \\ 0 \end{matrix} ) n! − ( \begin{matrix}n − 1 \\ 1 \end{matrix} ) (n − 1)! + ( \begin{matrix}n − 1 \\ 2 \end{matrix} ) (n − 2)! − ... +

( \begin{matrix}n − 1 \\ n − 1 \end{matrix} ) (−1)^{n−1}1!