MHB Max Knapsack equivalent problem

  • Thread starter Thread starter JohnDoe2013
  • Start date Start date
  • Tags Tags
    Equivalent Max
AI Thread Summary
The discussion centers on finding an equivalent problem P for the decision version of the Knapsack optimization problem, which seeks a subset of items with a total value of at least V and a total weight not exceeding W. The original poster has attempted to use PARTITION and SUBSET-SUM but could only reduce them to Knapsack, not vice versa. A recommendation is made to consider the 0-1 Integer Linear Programming (ILP) problem as a suitable equivalent. The ILP problem can be reduced to Knapsack by representing its linear equations with item weights and values. Conversely, Knapsack can also be represented as an ILP problem, demonstrating the reducibility in both directions. This approach offers a promising avenue for further exploration in the context of the Knapsack problem.
JohnDoe2013
Messages
3
Reaction score
0
Hi,

I'm working on the decision version of the Knapsack optimization problem that asks whether there is a subset of the items with a total value of at least V and where the total weight of the items is at most W.

I'm looking for an equivalent problem P for this version of the knapsack problem. This means that:

1) P is reducible to Knapsack
2) Knapsack is reducible to P

I have tried PARTITION and SUBSET-SUM but I'm only able to reduce them to Knapsack. I have not been able to find a reduction from Knapsack to either of them.

Am I using the wrong problems? If so, what would be a more suitable equivalent problem?

Thanks.
 
Technology news on Phys.org


Hi there,

I would recommend looking into the 0-1 Integer Linear Programming (ILP) problem as an equivalent problem for the decision version of the Knapsack optimization problem. ILP involves finding a solution to a linear system of equations with the additional constraint that all variables must take on integer values of either 0 or 1.

To show that ILP is reducible to Knapsack, you can use the same approach as the reduction from PARTITION or SUBSET-SUM. The key is to represent the ILP problem as an instance of Knapsack, where the weight of each item corresponds to the coefficient of the variable in the linear system and the value of each item corresponds to the constant term in the linear system. This way, a solution to the Knapsack problem will also provide a solution to the ILP problem.

Similarly, to show that Knapsack is reducible to ILP, you can represent the Knapsack problem as an instance of ILP by setting up a linear system of equations with the weight and value constraints.

I hope this helps and good luck with your research!
 
Dear Peeps I have posted a few questions about programing on this sectio of the PF forum. I want to ask you veterans how you folks learn program in assembly and about computer architecture for the x86 family. In addition to finish learning C, I am also reading the book From bits to Gates to C and Beyond. In the book, it uses the mini LC3 assembly language. I also have books on assembly programming and computer architecture. The few famous ones i have are Computer Organization and...
What percentage of programmers have learned to touch type? Have you? Do you think it's important, not just for programming, but for more-than-casual computer users generally? ChatGPT didn't have much on it ("Research indicates that less than 20% of people can touch type fluently, with many relying on the hunt-and-peck method for typing ."). 'Hunt-and-peck method' made me smile. It added, "For programmers, touch typing is a valuable skill that can enhance speed, accuracy, and focus. While...
I had a Microsoft Technical interview this past Friday, the question I was asked was this : How do you find the middle value for a dataset that is too big to fit in RAM? I was not able to figure this out during the interview, but I have been look in this all weekend and I read something online that said it can be done at O(N) using something called the counting sort histogram algorithm ( I did not learn that in my advanced data structures and algorithms class). I have watched some youtube...
Back
Top