Equality-constrained maximization of a positive semidefinite quadratic form over the positive integers

32 Views Asked by At

Let $n > 0$ and $m \geq 3$.

$$\begin{array}{ll} \text{maximize} & (x_1+x_2+\cdots+x_m)^2+(x_2+\cdots+x_m)^2+\cdots+(x_{m-1}+x_m)^2+x_m^2\\ \text{subject to} & x_1+\cdots+x_m=n\\ & x_i \in \mathbb N^+, \forall i \in [m]\end{array}$$

Then, the quadratic form can be written as $\mathbf{x}^\top \mathbf{A} \mathbf{x}$ where $\mathbf{x}=(x_1,\dots,x_m)^\top$ and

$$\mathbf{A}=[\min(i,j)]_{1\leq i,j\leq m}$$

It is known that $\mathbf{A}$ is positive definite. Here is where I am.

Can you give me some comments for finding $\mathbf{x}$ to achieve the maximum?