Why this problem is NP-Hard?

I'm asking about the question described here: Knapsack Problem with exact required item number constraint

Can't we iterate over $$\binom{n}{L}$$ options (which is polynomial), and for each option check if the constraints are met?

$$L$$ is given as part of the input, and can be e.g., $$n/2$$, where $$n$$ is the number of items. Then, iterating over $${n\choose L}={n\choose \frac{n}2}$$ is exponential.
Note that it doesn't matter whether $$L$$ is given in unary or binary, since $$n$$ is given in unary (as a list of the different items).
• The reduction in the answer takes $L$ to be part of the input. If $L$ is an absolute constant, then yes - you can certainly iterate over ${n\choose L}$. Jul 18 at 10:23