Knapsack Problem Without Value

Ian Kelly ian.g.kelly at gmail.com
Fri Dec 13 06:16:29 EST 2013


On Thu, Dec 12, 2013 at 7:08 PM,  <geezle86 at gmail.com> wrote:
> Hi,
>
> I wanna ask about Knapsack. I do understand what Knapsack is about. But this one i faced is a different problem. There is no value. I mean, it's like this, for example.
>
> I have 4 beams [X0, X1, X2, X3]. Each 1, 2, 2, 3 cm long. I want to make a new 6 cm long connected-beam from these 4 beams. I can make it from some of these. The output will print:
>
> 1, 2, 3 #(X0, X1, X3)
>
> You understand what my problem is? Can you help me?

With no values, where the goal is just to make a specific sum, it's
the subset sum problem, not the knapsack problem.



More information about the Python-list mailing list