Exercises

Practice linear and integer programming.

Let’s solve some continuous and discrete linear optimization problems.

Exercise 1: Fractional knapsack

The fractional knapsack is the continuous version of the knapsack problem. In this version, we can get a fraction of the item. The value would be the same fraction of the item’s value and weight of the same fraction of the weight. For example, consider an item of value 66 and a weight of 99kg. If we decide to take one-third of the item, then we get value 136=2\frac{1}{3} * 6 = 2 ...