I have asked few days ago this question. Now I am simplifying the problem a little bit.
Given two sets $A=\{a_1,\ldots,a_n\}$, and $B=\{b_1,\ldots,b_n\}$ of non-negative integers, a positive integer $k<n$ and a positive integer $\Delta$. The question is: is there a subset of $S$ of $\{1,\ldots,n\}$ of size $|S|\leq k$ such that $$\left(1+\sum_{i\in S}a_i\right)\left(1+\sum_{i\in S}b_i\right)\geq\Delta$$ Say no, if no such subset exists. Note.$ \Delta$ is greater than $1$ and not big enough.
My question is:
- How do I solve this problem? I do not know if this is an NP-complete problem or not. Do you see some hardness or reduction?
My attempt: First I failed to to prove that it is a hard problem. I tried to reduce from PARTITION but no way. I give up and I tried to design an algorithm. Here is my algorithm.
- Choose $S=\emptyset$ and $P=0$
- Choose the $i$ of the largest sum $a_i+b_i$ and add it to $S$
- Let $j$ go from $1$ to $n$ except $i$ do
- 3.1. Add $j$ to $S$
- 3.2. Calculate the product above with $S=\{i,j\}$ and store it in $P$
- Pick the $j$ with the highest $P$
- Re-do this $k$ times.
In this algorithm optimal?
Note: The real question is about the hardness of the problem. Thanks.