This is part of a homework problem. In an optimization problem, I need to have a K dimensional vector S, such that each entry of the vector is either 0 or 1, and $l_1$ norm of S is <= K. I can't find a way to write this in a succinct way. Any help?
2026-03-30 16:02:57.1774886577
how to impose binarity constraint in a vector
44 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
2
How about $S\in\{0,1\}^K,\,\|S\|_1 \leq K$?
And, BTW, the former condition implies the latter, so you just need
$S\in\{0,1\}^K$.