Could you help me to prove this: $\pi\in S_n$, we define the displacement of $\pi$ as $\mathrm{disp}(\pi)=\sum_{i=1}^n|\pi(i)-i|$. I have to prove the following:
$\mathrm{disp}(\pi)$ is always even.
Could you help me to prove this: $\pi\in S_n$, we define the displacement of $\pi$ as $\mathrm{disp}(\pi)=\sum_{i=1}^n|\pi(i)-i|$. I have to prove the following:
$\mathrm{disp}(\pi)$ is always even.
For the first part, note that the parity of $|x-y|$ equals the parity of $x-y$, so the parity of disp$(\pi)$ equals the parity of $\sum(\pi(i)-i)=\sum\pi(i)-\sum i=0$, and $0$ is even.