Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

TD2 Opt Sol 10

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

OPTIMIZATION - 3AGI3 & 1A Mastère GSI ENIT 2010-2011

Solution
Homework Assignment #2

Exercise 1.

Modify the network by creating one super source, S, and one super sink, T:

(8) (6)
(8) 6 6
12 9 (8)
1 3 5
10
2 (2) (2)
3 (3) 10
S 6 5 7 T
8
7
15 (3) 4 6
(9) 20 9 (6)
2 4 8
(9) (9)

1. Start with the flow shown on the network; use the labeling algorithm of Ford-
Fulkerson.

+S (8) +1 (6)
(8) 6 6
12 9 (8)
1 3 5
10
2 (2) (2) +5
* S 6
3
5 7
(3) 10
T +7
8
7
15 +4 (3) 4 6
(9) 20 9 (6)
2 4 8
(9) (9)
+S +2

Flow augmenting path: S → 2 → 4 → 5 → 7 → T;


δ = min {15-9; 20-9; 7; 8; 10-3}= 6
New flow on the following network:

+S (8) (6)
+1
(8) 6 6
12 9 (8)
1 3
10 (2) 5
2(2) +5
* S 6
3
5
(6)
7
(9) 10
T +7
8
(6) 7
15 +4 (3) 4 6
(15) 20 9 (6)
2 4 8
(15) (9)
+3

1/6
OPTIMIZATION - 3AGI3 & 1A Mastère GSI ENIT 2010-2011

Flow augmenting path: S → 1 → 3 → 4→ 5 → 7 → T;


δ = min {10-8; 12-8; 6; 7-6; 8-6;10-9}= 1
New flow on the following network:

+S (9) (6)
+1
(9) 6 6
12 9 (8)
1 3
10 (2) 5
2(2)
* S
(1)
6
3
5
(7)
7
(10) 10
T
8
(7) 7
15 (3) 4 6
(15) 20 9 (6)
2 4 8
(15) (9)
-4 +3

Can no longer label T ⇒ Optimal flow; v(ϕ*) = 8+10+6 = 24

Demands of cities 7 and 8 are satisfied, but demand of city 9 is not fully satisfied.

2. A min capacity cut is X, Xc, such that X={S,1,2,3,4} of capacity = 2+6+7+9=24.

3. The pipes that need to be enlarged are those that belong to the cut: (3,6);
(3,5); (4,5) and/or (4,8).

4. A pipe of a capacity 5 m3/hour is created between node 4 and node 7. Starting


from the maximum value flow found in (1),

Flow augmenting path: S → 1 → 3 → 4 → 7 ← 5 → 6 → T;


δ = min {10-9; 12-9; 6-1; 5; 7; 5-2; 9-8}= 1
New flow on the following network:

(10) (6)
(10) 6 6
12 9 (9)
1 3
10
2(2) (3)5
* S
(2)
6
3
5
8 (6)
7
(10) 10
T
(7) 7
15
(15) 20 (1) 5 (3) 4 6
2 4
(15) (6)
9
(9)
8

Now, only node S can be labeled; therefore current flow is optimal (value = 25).

2/6
OPTIMIZATION - 3AGI3 & 1A Mastère GSI ENIT 2010-2011

Exercise 2.
1. This pb is equivalent to a transportation pb on bipartite network where:
N1: Set of source nodes i=1,…, m.
N2: Set of destination nodes j=1,…,n.
Each source node has a capacity= ai
An arc (xi , yi) exists only if cell(i,j) is admissible.
Each destination node has a capacity= bj
The pb is to find a maximum value flow.

X1
∞ Y1
Cap b1
Cap a1

Cap a2
X2 ∞ Y2 Cap b2
T
S

Cap am ∞ Cap bn

Xm
Yn

2. φ(X1,Y1)=20; φ(X1,Y3)=20; φ(X2,Y2)=30; φ(X2,Y4)=40; φ(X3,Y1)=20;
φ(X3,Y2)=0; φ(X3,Y3)=0; φ(X4,Y2)=0; φ(X4,Y3)=40; φ(X4,Y4)=0;
v(φ)=170

20 * 20 *
* 30 * 40
20 0 0 *
* 0 40 10

Exercise 3.

This is the scheduling problem that was studied in class. First find all possible time
intervals using all rj and dj.

0 4 8 10 20

The time intervals are [0,4]; [4,8]; [8,10] and [10,20]

3/6
OPTIMIZATION - 3AGI3 & 1A Mastère GSI ENIT 2010-2011

Construct the following network:

Flow value (4) 4


1
Capacity
(4) [0,4]
1
5 4 (4) (12) 8
(5) 2
9 (4) 4
(9) (2) 1 [4,8] (12) 10
2(4)
(2) 2 T
3 3
S (2)
(6)
(5) 5 [8,10]
(10)
3 (4) (30)
4 10
(3)
3 (10)5
(7) (2) [10,20]
7
5 5
(2) (10)
2

Solve for the maximum value flow on the above network. The optimal flow vector
φ* is shown on the arcs, with v(φ*) = ∑jpj=31. Hence, φ* corresponds to a feasible
schedule, such as the following:

5 8 10 15
M1 1 5 4
M2 2
M3 3 6
0 4 6 8 15=Cmax t

Exercise 4.
Route
Route (300,20) Route
(150,50) 2 5 (100,40)
Rail
Route (50,10)
1 6
(200,30)
Rail Route
3 4
(150,15) Route (150,60)
(100,60)

1. Node 5 has only one predecessor and one successor. Therefore, we can delete it
by replacing arcs (2, 5) and (5, 6) by an equivalent arc (2, 6) of capacity = min
(300, 100) = 100 tons and cost = 20 + 40 = 60 (since the cost function is linear).
The hub 2 can be replaced by an arc (2, 2’) of infinite capacity and cost of 5
(since no limitation has been specified for the hub capacity). In this case, arcs

4/6
OPTIMIZATION - 3AGI3 & 1A Mastère GSI ENIT 2010-2011

(2, 4) and (2, 5) of the original network will be incident out of 2’ instead of 2.
The resulting network is the following:

150 (∞,5) 150 100


(150,50) 2 2’
(100,60)

1 0 (50,10) 6
(200,30) 50
(150,15) 100
3 4 (150,60)
100
(100,60) 150
2. Find the maximum value flow (using Ford-Fulkerson). The flow vector is shown
on the above network. v(φ*) = 250 > 200. Hence the transporters capacity will be
able to accommodate the total demand of 200 tons.

3. Find a minimum cost flow of value 200.

Step 0: Start with ϕ0 with null value v(ϕ0) = 0.


The residual network G0’(1) is identical to G. Set t = 0.
Step 1 : Apply Dijkstra to find a minimal cost path from to 1 to 6 in G0’.

The optimal path is: 1 → 3 → 2 → 2’ → 6, of unit cost = 110 D/ton.

Step 2: One can increase the flow on G by the maximum allowed quantity δ = 100
tons. The new flow ϕ1 has the value of 100.

Step 3: The residual network G1’ associated with this new flow is:
∞, 5
150, 50 2 2’ 100, -60
100, -5
100, -30
1 100, -15 100, 30 6

50, 15
3 4

Step 1: Apply Bellman-Ford to find the min cost path from 1 to 6 in G1’.
The optimal path is then: 1 → 3 → 2 → 2’ → 4 → 6, with unit cost = 120 D/ton.

Step 2: The flow on G can be increased by the maximum allowed quantity δ = 50


tons. The new flow ϕ2 has the value of 150.

Step 3: The residual network G2’ associated with this new flow is:
∞, 5
150 50 2 2 100, -60
150, -5 ’
150, -30
1 50, 30 6
50, -10 50, -60
150t, - 100, 60
3 4
100, 60

5/6
OPTIMIZATION - 3AGI3 & 1A Mastère GSI ENIT 2010-2011

Step 1: Apply Bellman-Ford to find the min cost path from 1 to 6 in G2’.

The optimal path is: 1 → 2 → 3 → 4 → 6, of unit cost = 140 D/ton.

Step 2: the flow can be increased in G by δ = 100 tons. However, we only need 50
tons more to obtain the required value of 200 tons. Therefore, the flow ϕ2 has a
value of 200.

The optimal solution is then: ϕ(1, 2) = 50, ϕ(1, 3) = 150, ϕ(3, 2) = 100, ϕ(2, 2’) =
150, ϕ(3, 4) = 50, ϕ(2’, 4) = 50, ϕ(2’, 6) = 100, ϕ(4, 6) = 100.

Total flow = 200 boxes of cost = 100*110 + 50*120 + 50*140 = 24 000 DT.

4. To find the max value min cost flow, we need to continue the algorithm until the
end.

Exercise 5.

1. This problem can be formulated as a maximum value flow on the following


bipartite network:

P1 M1
(1) (1)

(1)
P2
(1) M2
(1) (1)
(1)
(1) T
(1) P3 (1)
S M3
(1) (1)
(1) (1) (1)
P4 (1) (1)
(1) M4 (1)
(1)
P5
M5

The manager will not be able to execute all the assignments since Modules 3 and 4
can be executed only by programmer 1 who cannot take more than one module.

Note: If each programmer may take more than one project, there will be a feasible
assignment. In this case, modify the network by setting the capacity on each arc
(S,Pj) to the number of modules that programmer j can take.

6/6

You might also like