Optimization of sum of squares over permutations

75 Views Asked by At

Suppose I have fixed, positive values $n_1, \cdots, n_\ell$ and $T$. I'm looking for an algorithm to optimize \begin{align*} f(\boldsymbol{n}) = T\left(\sum_{j=1}^{\ell}\left(\sum_{i=1}^{j}n_i\right)^2\right) - \left(\sum_{j=1}^{\ell}\sum_{i=1}^{j}n_i\right)^2 \end{align*} Over all permutations of the elements in $\boldsymbol{n} = (n_1, \cdots, n_\ell)$. I've figured out the coefficients in the expansion of $f(\boldsymbol{n})$, specifically \begin{align*} [n_i^2]f(\boldsymbol{n}) = T(\ell - i + 1) -(\ell - i + 1)^2 \qquad \text{and} \qquad [n_i n_j] f(\boldsymbol{n}) = 2T(\ell - i\vee j + 1) - 2(\ell - i + 1)(\ell - j + 1) \end{align*} where $[x]f(\boldsymbol{x})$ denotes the coefficient of $x$ in the expansion of $f(\boldsymbol{x})$, and $i \vee j = \max(i,j)$. How should I proceed from here?