I tried to formulate a problem as a numerical optimization, but I'm not sure how to solve it or if this is the best way to solve the problem.
Let's say for a given vector $\vec x \in \{-1,1\}^n$ and the scaler $c$, if $\sum_{i=1}^n x(i) >0 $ then we have $c=1$ otherwise $c=-1$. Also for entries of $\vec x$ we have $x(i) \in \{-1,1\}$. Now I want to find the minimum subset $I$ from entries of $\vec x$ from which I can determine if $c$ is positive or negative.
I formulate it as follows: $$ \begin{array}{lll} I = & \underset{I}{\arg \min} &|I|\\ &s.t. &sign(\sum_{i \in I} \vec x_m(i)) = c_m, \quad \forall m=1,\dots,N. \end{array} $$
So, is it the easiest way to solve this problem? and if yes, then how can I solve it?
Well, I found the solution after fiddling around with the problem a bit more. Maybe it could be useful for someone else as well.
We can formulate the problem as a binary integer programming:
$$ \begin{array}{lll} \vec I = & \underset{\vec I}{\arg \min} &\mathbf{1}^\top \vec I\\ &s.t. &\mathbf{X} \vec I \le -\mathbf{1}, \quad \forall c_m | c_m=-1\\ &&-\mathbf{X} \vec I \le -\mathbf{1}, \quad \forall c_m | c_m=1\\ && \vec I \in \{0,1\}^n \end{array} $$
in which $\vec I$ contains the binary vector which shows which entries of $\vec x$ should be always selected. Also, matrix $\mathbf{X}$ contains all rows regarding relevant constraints.