Number of inversions in the permutation $(ijk)$.

57 Views Asked by At

Find the number of inversions in the permutation $\sigma= (ijk)$ where $1\leq i<j<k\leq n.$

My attempt: I counted as follows- first let's consider the tuples which are inverted with respect to $j$ then we have the following list $$(j,i+1),(j,i+2)...,(j,k)$$ of length $j-i.$ Next we look at the tuples which are inverted with respect with $k$, then we have the following list: $$(k,j+1),(k,j+2),...,(k,i)$$ which is of length $k-j.$ Finally we look at the tuples which are inverted with respect to $i$ then we have the following list $$(i,j),(i,j+1),...,(i,k-1)$$ which is of length $k-i.$ I subtract $2$ from this because I have double counted $(i,j)$ and $(i,k)$ so we get in total $$j-i+k-j+k-i-2=2(k-i-1)$$ inversions. Is this calculation correct? It gives the right answer in the sense that $(ijk)$ is a permutation of length $3$ and so the signature of $\epsilon(\sigma)=(-1)^{3-1}=(-1)^{N(\sigma)}=(-1)^{2(k-j-1)}=1.$ But I am not sure.