Exercises IV Classical Combinatorial Optimization Problems
Exercises IV Classical Combinatorial Optimization Problems
Exercises IV
B
8
1
5 E
1
4 1
A C
3
3 2
F
5
D
2 4
1 6 10
1
3 3 2 3 3
3
2 7 4 11 1 9
4 2
1 3 6 3 2
2
8 3 5 4
2 2 2
The knapsack problem consists in selecting a sub-set of these objects (each object cannot be
selected more than once) to be packed in the knapsack and that maximize the total value of
the knapsack.
1) Model this problem
2) Propose a method to solve this problem. Is it an exact method?
3) Solve it with a branch-and-bound. Which method is used to solve each continuous
relaxation? Is it an exact method?
Activity A B C D E F G H I J
Duration 5 15 15 10 15 20 15 15 30 5
Previous - A A B B C,D E F G,H I,H
activities
1) Model the maximum flow problem from source s to sink t in the network below, where the
arcs are valuated with their capacity, as an integer linear program.
2) How can we solve this problem?
15
A D
10
20 25
10 5
s B E t
20
10
35 10 20
5
C F
15
Exercise 18:
Let us consider the following graph where each arc is associated with its length.
1
2 6
4
3
1 2
3
1 1 4
6
8 1
2
1
5
3
4
7
We want to find paths from node 1 to node 4 with no common arc (no-adjacent paths).
3) Show that this problem comes down to a maximum flow problem in a particular
network.
4) Solve the problem.
2 2 3
2 4 7 11
5
3 2 3 2 5
4
1 4 5 8 12
3 3 3 3
5 6
3 6 9 10
2 4 2
8) Determine the maximum number of aircraft that can go across this network per time
unit between node 1 and node 12.
9) Answer the same question when node 5 is forbidden.
10) Answer the same question when arc (5,8) is forbidden.
Exercice 20:
Formulate (do not solve!) the following problem as a Mixed Integer Linear
Programming problem.
We produce two fresh juices: grape juice and apple juice. For producing them we can
use two possible industrial processes: process 1 and process 2. the cost of each process
depends upon the quantity of juice produced as follows:
– it costs G euros per liter of grape juice produced with process 1.
– it costs A euros per liter of apple juice produced with process 1.
– process 2 involves a fixed cost of K euros dedicated to buy a machine required to
process any amount of juice (the same machine can be used for both juices).
– Once the machine is bought, the remaning cost of production using process 2 is C
euros per liter of juice produced.
We can produce up to 3,000 liters of grape juice and we cannot produce more than a total of
3,500 liters of juice. We can sell our production to a supermarket that wants to buy 1,000 liters
of each juice at the cost of 2 euros per liter. The supermarket accepts to buy more than 1,000
liters of grape juice but at the reduced price of 1 euro per extra liter. However, it will not buy
any extra liter of apple juice.
Consider that the constants G, A, K and C are given data, (all positive). The problem is to
decide how many liters of each juice we should produce with each process, in order to
minimize the overall costs (overall costs = production costs-revenues).