I was wondering if there is a simple or known way to minimize the number of unique elements in a decision variable (vector). Note that I'm not asking for minimization of nonzero elements (rank constraint). In particular I'm searching for a penalization (soft constraint) or hard constraint in the form $$f(x) <= n_{max}$$ where $f()$ is what I'm searching for, x is the decision vector and n_max is the maximum number of unique elements that x is allowed to have. Thank you for your time, Lorenzo
1 Answer
$\begingroup$
$\endgroup$
1
While $f(x)=\sum_i \sum_j (x_i-x_j)^2$ is not quite what you might want, as it would favour vectors with small discrepancy in the entries, it's at least a very nice convex function to minimise, and could be very efficient for certain sets of feasible data. On the other hand if the entries of your $x$ are only, say, 0-1, then $f$ is exactly what you need.
-
$\begingroup$ Thank you very much for your comment! Yes, I have previously tried with $\vert\vert x_i-x_j\vert\vert$_1 which gave me exactly the same problem you have pointed out. This is probably the best solution though $\endgroup$– LorenzoCommented Mar 1, 2017 at 14:12