Is this variant of the subset sum problem easier to solve?

后端 未结 8 844
旧巷少年郎
旧巷少年郎 2020-12-08 23:18

I have a problem related to the subset sum problem and am wondering if the differences make it easier, i.e. solvable in a reasonable amount of time.

Given a value V,

8条回答
  •  星月不相逢
    2020-12-09 00:19

    Well, for one thing since you're specifying size=L then even if you can't think of anything clever and just use brute force you'll have (N choose L) separate sums in the worst case, so it's a bit better than n^^L (well, L+1, as you'd then sum each subset).

提交回复
热议问题