I have formulated an instance of a 0-1 Integer Program (IP), which I am trying to determine the complexity of (can this instance be solved in polynomial time or not). As we know, the 0-1 IP is NP-complete, but I suspect my instance can be solved in polynomial time; which of course does not contradict the hardness of the general 0-1 IP.
Given are a set of variables $S = \{s_0, \dots, s_n\}$, a set of values $V = \{v_0, \dots, v_m\}$, a set of costs $C = \{c_0, \dots, c_m\}$ (where each $v_j, c_j \in \mathbb{Z^+}$), and a positive integer $K$. Assume the values in $V$ and costs in $C$ are sorted, so that the last value in $V$ is the highest, and has the highest corresponding cost.
The optimization version of this problem asks which assignment of $v_j$ to $s_i$ has the lowest cost, where the sum is at least $K$? In addition, each $s \in S$ can only hold one $v \in V$.
To formulate this as a 0-1 IP, we construct a set of binary decision variables. Let this set be $X=\{x_{00},x_{01}, \dots, x_{0m}, \dots, x_{nm}\}$, where $x_k \in \{0, 1\}$ denotes if $v_j$ has been assigned to $s_i$. We then get the constraints:
$$\sum_{j=0}^{m}x_{ij} \leq 1 \quad \forall i=0,1,\dots,n$$ where the last constraint makes sure the sum is at least $K$: $$\sum_{j=0}^{m}x_{ij}v_j \geq K \quad \forall i=0,1,\dots,n$$ The 0-1 IP can then be formulated in its canonical form as: \begin{align} &\text{min} & & c^Tx \\ &\text{s.t} & & Ax \leq b \\ & & & x \geq 0 \end{align} Note that in this represntation, $C$ and $X$ are denoted $c$ and $x$ as they are vectors.
The decision version of this problem asks wether there exists a solution which satisfies $Ax \leq b$. This can be done in polynomial time by setting $x_{im} = 1 \quad \forall i = 0,1,\dots, n$, i.e., every $s \in S$ is assigned the highest value. If the sum of these values are at least $K$, then the answer is "yes", i.e., there is a solution which satisfies $Ax \leq b$. If "no", then there is no solution, because the highest possible sum has been tested.
My question: Since the decision problem can be solved in polynomial time, does it imply that the optimization problem also can be solved in polynomial time? For instance, if the size of $S$ is large, there may be trillions of solutions that satisfy $Ax \leq b$. My knowledge regarding how optimization algorithms work is limited, but as far as I understand, the solution space is 'fixed', so an algorithm would 'only' have to compare the solutions against each other to find the optimal one.
Lastly, I did not use the set $C$ in my decision question. Therefore I am not 100% certain that it is the 'correct' formulation.
I have also read the follwing stackexchange posts:
- Are there any optimization problems in P whose decision version is hard?
- Optimization version of decision problems
- Can the decision version of an optimization problem in NP, be in P?
- If a poly-time solution exists for an NP-Complete (Decision) problem, then there exists a poly-time solution for the NP-hard (Optimization) flavor?