7

Find the number of permutations of $1,2,3...,n$ such that $a_{i+1}$ does not equal $a_i+1$ if $a_i$ is the $i$-th element in the permutation?

I think a good strategy would be to approach this using PIE but I am still not sure about how I could solve it with that method.

Paolo
  • 953
Anirudh
  • 734

1 Answers1

1

I have been trying to do the PIE but gets really messy(i will edit if i get something), so i am going to give this argument for a recursion.

let $c_n = |\mathbb{A}_n=\{\pi \in S_n: \not \exists i \text{ s.t.}\pi _{i+1}=\pi _i+1\}|,$ so what if take out the element $k$ on $\pi$ such that $\pi _k = n.$ Then there are just two possibilities:

$\bullet $ Either the new permutation is in $\mathbb{A}_{n-1}$ then as there are $n$ slots where $n$ can be in $\pi$ but one of those has $(n-1)$ behind, so there are $n-1$ ways to place it and $c_{n-1}$ permutations, hence $(n-1)c_{n-1}$ ways.

$\bullet$ If that is not the case, then $\pi = \pi _1\cdots kn(k+1)\cdots \pi _n,$ if we take out $n$ and $k+1$ we get $\underbrace{\pi_1\cdots k\cdots \pi_n}_{\text{length $n-2$}}.$ There are $n-2$ options ($k$ can not be $n-1$ otherwise $\pi \not \in \mathbb{A}_n$) for $k$ and this permutations is equivalent to $St(\pi_1\cdots k\cdots \pi_n)$(St is a function that takes an array and generates a permutation that preserves order of the array e.g., $St(1,7,3,34)=1324$) which just gives a permutation in $\mathbb{A}_{n-2}$, hence there are $(n-2)c_{n-2}$ ways.

Combining the two of them we get $$c_n = (n-1)c_{n-1}+(n-2)c_{n-2}.$$

Phicar
  • 14,827