$\min_{\beta}\beta^{T} A \beta$
$s.t. \ \beta^{T} C \beta=1\ and\ \beta\geqslant 0$
Here $A,C\in \mathbb{R}^{M\times M}$, $\beta \in \mathbb{R}^{M}$
I saw in one paper saying that it could be solved via its semidefinite programming relaxation by adding an auxiliary variable $B \in \mathbb{R}^{M \times M}$ like this:
$\min_{\beta ,B}trace(AB)$
$s.t.trace(CB)=1$,
$\beta \geqslant 0$,
$\begin{bmatrix} 1 & \beta^{T}\\\\ \beta& B \end{bmatrix}\succeq 0$
where $\succeq 0$ means left matrix is positive semidefinite.
I don't get how this is done, and besides, how to solve such a problem using any possible C/C++ software?
Thanks. $;)$
If you set $B = \beta \beta^T$, the objective becomes $$ \beta^T A \beta = \text{trace}( \beta^T A \beta ) = \text{trace}( A \beta \beta^T ) = \text{trace}( A B ). $$
Similarly, the constraint becomes $\text{trace}(CB) = 1$.
The problem is therefore equivalent to
\begin{array}{ll} \text{Find}\ &\beta, B \\ \text{to minimize}\ &\text{trace}(AB) \\ \text{such that}\ &\text{trace}(CB) = 1 \\ & \beta \geqslant 0 \\ & B = \beta \beta^T \end{array}
The last constraint implies that $\begin{pmatrix} 1 & \beta^T \\ \beta & B \end{pmatrix} = \begin{pmatrix} 1 \\ \beta \end{pmatrix} \begin{pmatrix} 1 \\ \beta \end{pmatrix}^T \succcurlyeq 0$, hence the convex relaxation you mention. (A relaxation is not an equivalent problem: you have dropped some of the constraints to make the problem easier to solve.)
For a C/C++ implementation, you can check the coin-or project.