1

I have a problem that I can't solve. There is this table.

I have to optimaly allocate 1 million dollars among the five products. I think it looks like knapsack problem but I am not sure. If I want to solve this for what should I look? If it is knapsack how should I change an original knapsack solution to fit mine problem? Thank you.

R. Vait
  • 111

1 Answers1

1

These return functions are all monotonically increasing. Use hill-climbing.

Start with \$200k allocated to each product, an allocation of $(2,2,2,2,2)$. Your largest increment is with product E ($0.65 - 0.45 = 0.2$). Your smallest decrement is with product B ($0.30-0.18 = 0.12$). So your new allocation is $(2,1,2,2,3)$.

You have an unallocated \$80k, but that's not enough to purchase an increment. Now find the remaining largest increment and smallest decrement pair, apply them. You'll have more than \$100k unallocated with which you acquire one more largest increment (without a decrement).

Repeat until no more increment/decrement pairs remain and you do not have enough unallocated to just increment the allocation to a product.

Eric Towers
  • 67,037
  • Thank you for your comment, but how should I allocate money if there are several products which increment and decrement are the same, like A and B product increment is 15 and it is the biggest one? Should I check even further increments decrements or just try all possibilities from here? – R. Vait May 02 '16 at 13:07
  • @R.Vait : When multiple increments are possible, use the one whose subsequent increment is largest. When multiple decrements are possible, use the one whose subsequent decrement is smallest. Recurse as needed. – Eric Towers May 02 '16 at 13:12