Convex optimization over vector space of varying dimension

This reminds me of the compressed sensing literature. Suppose that you know some upper bound for k, let that be K. Then, you can try to solve $\min||{\bf x}||_0$ subject to ${\bf 1}^T_K{\bf x}=10$ and ${\bf x}_i\in[1,2], \; \forall i\in\{1,\ldots,K\}$. The 0-norm counts the number of nonzero elements in ${\bf x}$.

This is by no means a convex problem, but there exist strong approximation schemes such as the $\ell_1$ minimization for the more general problem $\min||{\bf x}||_0, \;{\bf A}{\bf x}={\bf b},\; {\bf x}\in\mathbb{R}^{K\times 1}$, where ${\bf A}$ is fat. If you googlescholar compressed sensing you might find some interesting references.