Note that there are some explanatory texts on larger screens.

plurals
  1. POPossible Combination of Knapsack problem and?
    text
    copied!<p>Alright quick overview</p> <p>I have looked into the knapsack problem</p> <p><a href="http://en.wikipedia.org/wiki/Knapsack_problem" rel="nofollow noreferrer">http://en.wikipedia.org/wiki/Knapsack_problem</a></p> <p>and i know it is what i need for my project, but the complicated part of my project would be that i need multiple sacks inside a main sack.</p> <p>The large knapsack that holds all the "bags" can only carry x amount of "bags" (lets say 9 for sake of example). Each bag has different values;</p> <ul> <li>Weight </li> <li>Cost</li> <li>Size</li> <li>Capacity</li> </ul> <p>and so on, all of those values are integer numbers. Lets assume from 0-100.</p> <p>The inner bag will also be assigned a type, and there can only be one of that type within the outer bag, although the program input will be given multiple of the same type.</p> <p>I need to assign a maximum weight that the main bag can hold, and all other properties of the smaller bags need to be grouped by weighted values.</p> <hr> <p>Example</p> <p>Outer Bag:</p> <ul> <li>Can hold 9 smaller bags</li> <li>Weight no more than 98 [Give or take 5 either side]</li> <li>Must hold one of each type, Can only hold one of each type at a time.</li> </ul> <p>Inner Bags:</p> <ul> <li>Cost, Weighted at 100%</li> <li>Size, Weighted at 67%</li> <li>Capacity, Weighted at 44%</li> </ul> <hr> <p>The program will be given an input of multiple bags, and then must work out combinations of Smaller Bags to go into the larger bag, there will be multiple solutions depending on the input, and the program would output the best solutions for me.</p> <p>I am wondering what you guys think the best way for me to approach this would be.</p> <p>I will be programming it in either Java, or C#. I would love to program it in PHP but i'm afraid the algorithm would be very inefficient for web servers.</p> <p>Thanks for any help you can give</p> <p>-Zack</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload