Need help with the following lemma about transpositions

460 Views Asked by At

If $1 \leq k <l \leq n$ and $\sigma=(k,l)$ then the number of inversions of $\sigma$ is $2(l-k)-1$. Thus every transposition is an odd transposition.

I don't understand why the number of inversions would be such expression. The transposition $\sigma$ is just a 2 cycle, so I don't see how it can have more than 1 inversion.

2

There are 2 best solutions below

9
On BEST ANSWER

A way to define the number of inversions is, the total number of pairs $i<j$ with $\sigma(i)>\sigma(j)$. So when you switch $k$ and $l$, $k$ gets moved past every number between $k$ and $l$ and so does $l$. Thus the inversions are: the pair $k,l$; and the pairs $k,i$ and $i,l$ for every $i$ strictly between $k$ and $l$. There are $l-k-1$ numbers $i$ between $k$ and $l$, and each contributes $2$ inversions ($k,i$ and $i,l$); and $k,l$ is also an inversion. So the total is $2\times (k-l-1) + 1$, which is equivalent to the formula in the OP.

0
On

the identity permutation looks like this:

$1,2,3\dots n-1,n$

After transposing $k$ and $l$ it looks like this:

$1,2,3\dots\color{red}{l,k+1,\dots,l-1,k},l+1\dots n$, notice that every pair containing $l$ and a red integer, or $k$ and a red integer, is an inversion.