I want to solve the following optimization problem with respect to $\mathsf{x} = (x_1, \ldots, x_n)^\top$ $$ \min_{\mathbf{x}} \,\, \mathbf{x}^\top A \mathbf{x} \qquad\qquad\text{such that }\,\, x_i \geq 0 \,\, \forall \, i=1, \ldots, n \text{ and } \sum_{i=1}^n x_i = 1. $$ Minimizing a quadratic form subject to the conditions that all entries of $x$ are non-negative and they sum up to one.
I am interested both in analytical or numerical solutions.
- Are there analytical solutions?
- If not, how could I solve this in Python? I tried using
cvxpy.quad_over_linbut unsuccessfully
Note: I am also happy with a numerical method that does not guarantee convergence, but somehow guarantees to find a better solution than guessing.