Top "Knapsack-problem" questions

The knapsack problem is a problem in combinatorial optimization: Given a set of items with associated weights and values, determine the number of each item to include in a collection so that the total weight is less than or equal to a given limit and it maximizes the total value.

Algorithm to Divide a list of numbers into 2 equal sum lists

There is a list of numbers. The list is to be divided into 2 equal sized lists, with a minimal difference …

python algorithm dynamic-programming np-complete knapsack-problem
How to ensure Java threads run on different cores

I am writing a multi-threaded application in Java in order to improve performance over the sequential version. It is a …

java multithreading multicore knapsack-problem
0-1 Knapsack algorithm

Is the following 0-1 Knapsack problem solvable: 'float' positive values and 'float' weights (can be positive or negative) 'float' capacity …

c# algorithm dynamic-programming knapsack-problem
Coin change with limited number of coins

I have written a program for generating subset sum which might be used in this problem which states: Suppose, you …

c algorithm dynamic-programming knapsack-problem coin-change
Python Knapsack Branch and Bound

I have spent a week working on this branch and bound code for the knapsack problem, and I have looked …

python knapsack-problem branch-and-bound
DP algorithm for bounded Knapsack?

The Wikipedia article about Knapsack problem contains lists three kinds of it: 1-0 (one item of a type) Bounded (several …

algorithm knapsack-problem
Printing Items that are in sack in knapsack

Suppose you are a thief and you invaded a house. Inside you found the following items: A vase that weights 3 …

algorithm dynamic-programming knapsack-problem
How to find which elements are in the bag, using Knapsack Algorithm [and not only the bag's value]?

Here I have code which calculates the optimal value using the knapsack algorithm (bin packing NP-hard problem): int Knapsack::knapsack(…

c++ algorithm dynamic-programming knapsack-problem
0/1 Knapsack Dynamic Programming Optimazion, from 2D matrix to 1D matrix

I need some clarification from wikipedia: Knapsack, on the part This solution will therefore run in O(nW) time and …

algorithm optimization dynamic-programming knapsack-problem
Knapsack with continuous (non distinct) constraint

I watched Dynamic Programming - Kapsack Problem (YouTube). However, I am solving a slightly different problem where the constraint is …

algorithm dynamic-programming knapsack-problem