Let $\mathbf{x}=[x_1,\ldots,x_K]^T$. For a fixed vector $\mathbf{a}$, I have the following optimization problem : \begin{array}{rl} \min \limits_{\mathbf{x}} & | \mathbf{a}^T \mathbf{x} | \\ \mbox{s.t.} & x_k\ge 0, \forall k \\ & \sum_k x_k=1 \end{array} The second optimization problem is: \begin{array}{rl} \min \limits_{\mathbf{x}} & ( \mathbf{a}^T \mathbf{x})^2\\ \mbox{s.t.} & x_k\ge 0, \forall k \\ & \sum_k x_k=1 \end{array}
My question: are these two problems equivalent to each other? if yes, how to solve them ? and which one is easier to solve ?
Which is easier? Neither. Both of these models can be solved analytically, and in the exact same way. First, let's knock out the easy cases:
If any $a_i=0$ for some $i$, then the optimal value of either model is clearly $0$, as demonstrated by selecting setting $x$ to be the $i$th unit vector (the vector with $1$ at position $i$ and zeros everywhere else).
If $a_i>0$ and $a_j<0$ for some pair $(i,j)$, then again the optimal value is zero. Just set $$x_i=-a_j/(a_i-a_j), \quad x_j = a_i/(a_i-a_j)$$ and the other elements of $x$ to zero.
The cases that remain are where $a$ is entirely positive or entirely negative. But if $a$ is negative, then substituting $a$ for $-a$ will not change the optimal value or the values of $x$ that achieve this value, thanks to the presence of the absolute value or square.
So we now have one case remaining: when $a$ is a positive vector. But in this case, $a^Tx$ is positive over the simplex, allowing us to drop the absolute value! \begin{array}{ll} \text{minimize} & a^T x \\ \text{subject to} & \mathbf{1}^T x = 1 \\ & x \geq 0 \end{array} We can solve this by inspection: the optimal value is $\min_i a_i$ for the first model, and $\min_i a_i^2$ for the second. If the minimizing $a_i$ is unique, then the unique solution is the $i$th unit vector. But if there are multiple elements of $a$ with the same magnitude, any convex combination of those corresponding unit vectors is a solution.
Putting it all together, the solution is $\min_i |a_i|$ or $\min_i a_i^2$ if $a\succeq 0$ or $a\preceq 0$, and $0$ otherwise. There really was no need for case 1, but it was easy to see.