I know it should be easy but I’m trying to determine the complexity of the following variant of Subset Sum.
Given a subset $ S$ of positive integers and integers $ k>0$ and $ N>0$ , is there a subset $ T\subset S$ such that $ |T|=k$ and the members of $ T$ sum to $ N$ ?
All of the formulations of subset sum that I’ve seen don’t specify $ k$ so I’m wondering if this problem can be solved in polynomial time. If $ k$ is fixed for all instances, then I know that the problem is in P and solvable by brute force in $ O(n^k)$ time. However, I’m allowing $ k$ to vary from instance to instance.