Linear Programming _ Course, Corrected Exercises
Linear Programming _ Course, Corrected Exercises
Adil Bellabdaoui
[email protected]
www.decision.ma/ensias/
20 novembre 2016
2
96
Chapter 9
Simplex method
9.1 ´
SERIES 15 :
Exo. 15.1? Form of a linear program
Show that every linear program in standard form can be expressed in canonical form.
nonique and vice versa.
The base solution associated with the base (x1 ;x2 ;x3 Is it eligible?
1. Let the following polygon be defined by the set of points x such that:
x + 2y ≤ 2
y ≤ 3
x y ≥ 0
97
98 ´
CHAPTER 9. SIMPLEX METHOD
Exo. 15.6? Simplex algorithm for a linear programming problem with 2 variables
Solve the following linear program using the simplex algorithm:
Maxz= 36x+24y
s.c. 3x ≤16
x +y ≤ 27
2x ≤10
x, y ≥ 0
At each iteration, we will enter the candidate variable with the highest value into the database.
reduced cost. Then check graphically.
The enemy said, 'I will pursue, I will overtake, I will divide the spoil; my desire shall be satisfied upon them; I will draw my sword, my hand shall destroy them.'
Maxz = 5x1+4x2+3x3
s.c.2x1+3x2+3x3 ≤ 5
4x1 +x2+2x3≤11
Let the following linear program solve:
3x1+4x2+2x3 ≤ 8
x1 , x2 , x3 ≥ 0
Exo. 15.10
Three machines1 ,M2 ,M3can produce each two types of pieces1
etP2 The manufacturing time of a part Pi on machine Mjis reported
in the following table (time in hours):
M 1M 2M 3
Piece 1 3 4 4
Piece 2 4 6 5
We want to produce 6 pieces at the lowest cost.1and 8 pieces2 The machineM1
is available for 14 hours, the other two machines are available for 24 hours.
The hourly cost of M1is 7, that of M2is 5 and that of M3 6.
1. Write the associated linear program.
2. Solve this problem by listing all possible integer solutions.
100 ´
CHAPTER 9. SIMPLEX METHOD
9.2 ´
SERIES 16 :
Exo. 16.9 Simplex Algorithm (2-phase method)
Solve the following linear program using the two-phase method of the algorithm.
simplex rhythm:
Maxz= x + 2y
s.c. x <=1
x +y≥6
-x +y= 3
x y≥0
Exodus 16:10
Solve the following linear programming problems using the algo-
simplex rhythm. Perform the graphical interpretation of the unfolding of the sim-
plexus.
Maxz = 3/2x +y
s.c. 2x -y ≥ 4
-x +y≥ 1
-x + 2y ≤ 4
2x +y≤12
x y ≥ 0
Maxz = 2x +y
s.c.2x -y≥ 4
-x y≥ 1
-x + 2y ≤ 4
2x +y≤12
x, y≥ 0
Maxz = -x + 2y
s.c.2x -y≥ 4
-x +y≥ 1
-x + 2y ≤ 4
2x +y≤12
x y≥ 0
Exodus 11:2
Solve the following linear programming problems using the algo-
simplex method (introducing artificial variables if necessary).
Maxz= 2x−y
s.c. x + y ≥ 2
y ≤ 2
x+y≥4
x y ≥ 0
´
9.2. SERIES 16 : 101
Maxw=x+y +z
s.c. x + y + 2z = 5
x−y 1
y +z= 2
x y, z≥0
Minw= x+y +z
s.c. x+y+2z≥ 5
-x+y <= -1
y +z≥ 2
x y ≥ 0
102 ´
CHAPTER 9. SIMPLEX METHOD
9.3 ´
SERIES 17 :
Exo. ??
Solve the following problem without using artificial variables:
Maxw = -2x - 3y
s.c. 2x +y−z≥4
3x −y+5z≥5
x y, z ≥ 0
From this, derive the optimal solution of the associated dual problem.
1. The volume of the first cargo is 108 and the maximum load is 112.
How to load it to get the best ratio?
Indication: to begin with, consider only one of the two constraints.
for choosing the pivot.
The second cargo has a volume of 170 and a maximum load of 82. How
load this second ship to get the best ratio?
Intensive farmer
A farmer wants to spread on his meadows a fertilizer with a maximum content
male in nitrogen (N). The three fertilizers he has also contain
phosphorus (P) and potassium (K). The potassium content must be limited to
44 units per hectare and the one in phosphorus 66 units per hectare. The table
The following provides the quantity of N, P, K per fertilizer:
How should he make his mixture so that the quantity of nitrogen is maximized?
male? Express the problem in the form of a Programming problem
Linear.
2. Calculate the dual problem. Solve it graphically.
3. Write the conditions of the complementary gap theorem and deduce the
value of one of the variablesx1 , x2 , x3 From this, deduce the solution to the initial problem.
Exodus 11:6
We consider the problem:
´
9.3. SERIES 17 : 103
Maxz = 3x + 2y
s.c.3x+2y≤15
3x + 4y ≤ 21
y ≤ 3
x, y≥ 0
But against any of the children of Israel shall not a dog move his tongue, against man or beast: that ye may know how that the Lord doth put a difference between the Egyptians and Israel.
Exo. 11.9?
We consider the following linear programming problem (P):
104 ´
CHAPTER 9. SIMPLEX METHOD
Maxz = 3x1+4x2+8x3
s.c. x1+2x2+3x3 ≤ 15
x1 -x3less than or equal to -1
x1 , x2 , x3 ≥ 0
Exo. 11:10
We consider the problem:
Minz = 12x + 5y
s.c. 2x +y≥ 4
3x +y≥ 5
x +y≥ 0
x, y ∈ IR
1. Calculate the dual problem (do not forget that the dual of the dual is the pri-
bad).
2. Solve the dual problem using the simplex method.
3. What is the value of the objective function of the initial problem at the optimum? For what reasons?
Is this optimum reached (using the primal optimality conditions -
dual) ?
Exo. 11.11?
We consider the problem:
Minz = -3x + 2y
s.c. -x -y+e1 = 4
2x +y <=6
x +y <=0
x y <=0e1greater than or equal to 0
In each iteration, we will input the candidate variable with the highest value.
reduced cost. Verify graphically afterwards.
´
9.3. SERIES 17 : 105
We will introduce the least number of artificial variables possible. In addition, at each
iteration, will bring in base the candidate variable with the smallest index, and we
prioritize the artificial variables from the database (during phase 1).
What can we observe?