Let $\sigma\in S_n$ for some $n\in \mathbb{N}$. I am interested in $\displaystyle \sum_{j=1}^nj\sigma(j)$. Can anyone help point me in a decent direction? If $\sigma = (1)$ in cycle notation, we have that the sum just becomes $\frac{n(n+1)(2n+1)}{6}$. Now for the fun part, I actually want to look at this sum for all of the permutations in $S_n$. We can brute force this for small $n$, but it quickly gets out of hand.
-
$\begingroup$ An interesting fact you can see using orthogonal transformations is that the value for $\sigma$ is the same as for $\sigma^{-1}$. $\endgroup$– Matt SamuelCommented Sep 7, 2023 at 1:25
-
1$\begingroup$ "want to look at this sum for all of the permutations" - please clarify. Do you mean the sum you wrote, taking $\sigma$ to be any specified permutation? Or do you mean the sum of that sum over all permutations,$$\sum_{\sigma\in S_n}\sum_{j=1}^n j\sigma(j)\ ?$$ $\endgroup$– DavidCommented Sep 7, 2023 at 1:34
-
1$\begingroup$ I am actually looking at what happens when you $\sum_{\sigma\in S_n} a^{\sum_{j=1}^nj\sigma(j)}$ $\endgroup$– Mathematical Football MatrixCommented Sep 7, 2023 at 2:24
-
$\begingroup$ please edit the question with the proper formulation. It may be closed for not having sufficient detail, but it is an interesting question. $\endgroup$– kodluCommented Sep 8, 2023 at 15:34
1 Answer
I am assuming you mean the sum over all $\sigma$ of the sum you wrote. (If you meant you want to investigate the sum you wrote for specific individual $\sigma$, that's different.)
So... reversing the sum, $$\sum_{\sigma\in S_n}\sum_{j=1}^n j\sigma(j)=\sum_{j=1}^n\sum_{\sigma\in S_n} j\sigma(j)\ .$$ The inner sum has $n!$ terms, and among those terms, each value $\sigma(j)=1,2,\ldots,n$ occurs $(n-1)!$ times. So $$\eqalign{\sum_{j=1}^n\sum_{\sigma\in S_n} j\sigma(j) &=\sum_{j=1}^nj(1+2+\cdots+n)(n-1)!\cr &=(1+2+\cdots+n)^2(n-1)!\cr &=\frac{n^2(n+1)^2}{4}(n-1)!\ .\cr}$$
-
$\begingroup$ What if $\sigma$ was chosen at random uniformly? What would be the expected value of $$\sum_{j=1}^nj\sigma (j)?$$ $\endgroup$– ShaunCommented Sep 7, 2023 at 2:21
-
$\begingroup$ Would it just be the sum in your answer, over $n$? $\endgroup$– ShaunCommented Sep 7, 2023 at 2:22
-
1
-
1$\begingroup$ +1 but the OP clarifies in a comment that they are looking for $\sum_\sigma a^{\sum \dots}$, where this trick doesn't seem to work as simply. $\endgroup$– ronnoCommented Sep 7, 2023 at 6:15
-
$\begingroup$ Thanks @ronno. I asked for clarification, didn't receive a reply for a while so decided to answer anyway. Note to OP - at least this will show that in order to work out other things, you don't necessarily need to work out the original sum over $j$. $\endgroup$– DavidCommented Sep 7, 2023 at 23:41