Let $a$ be vector in $R^{2m}$. And let $S_{2m}$ be group of all permutations on the set $\{1,\dots,2m\}$.
I would like to calculate $ \sup_{\pi\in S_{2m}}\sum_{d(\sigma, \pi)=2}\left(\left|\sum_{k=1}^ma_{\sigma(k)}-\sum_{k=m+1}^{2m}a_{\sigma(k)}\right|-\left|\sum_{k=1}^ma_{\pi(k)}-\sum_{k=m+1}^{2m}a_{\pi(k)}\right|\right)^2. $
Here $\sigma(\cdot),\pi(\cdot)$ are a permutations on the set $\{1,...,2m\}$ with uniform distribution.
Of course, I can open square:
\begin{align} \sum_{d(\sigma, \pi)=2}\Big(\left|\sum_{k=1}^ma_{\sigma(k)}-\sum_{k=m+1}^{2m}a_{\sigma(k)}\right|^2&-2\left|\sum_{k=1}^ma_{\pi(k)}-\sum_{k=m+1}^{2m}a_{\pi(k)}\right|\left|\sum_{k=1}^ma_{\sigma(k)}-\sum_{k=m+1}^{2m}a_{\sigma(k)}\right|\\ &+\left|\sum_{k=1}^ma_{\pi(k)}-\sum_{k=m+1}^{2m}a_{\pi(k)}\right|^2\Big), \end{align} and now for the first and for the last terms $ \left|\sum_{k=1}^ma_{\pi(k)}-\sum_{k=m+1}^{2m}a_{\pi(k)}\right|^2=\sum_{i=1}^{2m}a^2_{\pi_(i)}+2\sum_{i=1}^{2m}\sum_{i\neq k}a_{\pi(i)}a_{\pi(k)}-2\sum_{i=1}^{2m}\sum_{k=1}^{2m}a_{\pi(i)}a_{\pi(k)}. $
But I don't know what to do with the second term of the sum and how to sum everything over $d(\pi, \sigma)$. Note here, $d(\sigma, \pi)=2$ means $\sigma=\pi \tau$, where $\tau$ is a transposition. Thank you for the help.