introduction à l'analyse numériqueama/courses/math0006-3/course/an2015-s4.pdf · quentin...
TRANSCRIPT
Linear optimization
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 1 / 28
Production problem
A furniture company produces two types of chairs from beech and oak wood.
The first type (basic) requires 9 boards of beech wood and 2 boards of oak wood. Abasic chair is easy to construct and requires one worker’s hour.
The second type (classic) requires 7 boards of beech wood and 5 boards of oak wood.Due to the more important completion time, the classic chair requires three worker’shours.
The price of a basic chair is 30 euros whereas a classic chair’s price is 70 euros.
The stock of boards of the entreprise is 800 boards of beech wood and 200 boards of oakwood. There are 4 workers working each 40 hours per week.
What is the number of basic and classic chairs that the entreprise must produce for thisweek ?
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 2 / 28
Production problem
A furniture company produces two types of chairs from beech and oak wood.
The first type (basic) requires 9 boards of beech wood and 2 boards of oak wood. Abasic chair is easy to construct and requires one worker’s hour.
The second type (classic) requires 7 boards of beech wood and 5 boards of oak wood.Due to the more important completion time, the classic chair requires three worker’shours.
The price of a basic chair is 30 euros whereas a classic chair’s price is 70 euros.
The stock of boards of the entreprise is 800 boards of beech wood and 200 boards of oakwood. There are 4 workers working each 40 hours per week.
What is the number of basic and classic chairs that the entreprise must produce for thisweek ?
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 2 / 28
Production problem
A furniture company produces two types of chairs from beech and oak wood.
The first type (basic) requires 9 boards of beech wood and 2 boards of oak wood. Abasic chair is easy to construct and requires one worker’s hour.
The second type (classic) requires 7 boards of beech wood and 5 boards of oak wood.Due to the more important completion time, the classic chair requires three worker’shours.
The price of a basic chair is 30 euros whereas a classic chair’s price is 70 euros.
The stock of boards of the entreprise is 800 boards of beech wood and 200 boards of oakwood. There are 4 workers working each 40 hours per week.
What is the number of basic and classic chairs that the entreprise must produce for thisweek ?
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 2 / 28
Production problem
A furniture company produces two types of chairs from beech and oak wood.
The first type (basic) requires 9 boards of beech wood and 2 boards of oak wood. Abasic chair is easy to construct and requires one worker’s hour.
The second type (classic) requires 7 boards of beech wood and 5 boards of oak wood.Due to the more important completion time, the classic chair requires three worker’shours.
The price of a basic chair is 30 euros whereas a classic chair’s price is 70 euros.
The stock of boards of the entreprise is 800 boards of beech wood and 200 boards of oakwood. There are 4 workers working each 40 hours per week.
What is the number of basic and classic chairs that the entreprise must produce for thisweek ?
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 2 / 28
Production problem
A furniture company produces two types of chairs from beech and oak wood.
The first type (basic) requires 9 boards of beech wood and 2 boards of oak wood. Abasic chair is easy to construct and requires one worker’s hour.
The second type (classic) requires 7 boards of beech wood and 5 boards of oak wood.Due to the more important completion time, the classic chair requires three worker’shours.
The price of a basic chair is 30 euros whereas a classic chair’s price is 70 euros.
The stock of boards of the entreprise is 800 boards of beech wood and 200 boards of oakwood. There are 4 workers working each 40 hours per week.
What is the number of basic and classic chairs that the entreprise must produce for thisweek ?
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 2 / 28
Production problem
A furniture company produces two types of chairs from beech and oak wood.
The first type (basic) requires 9 boards of beech wood and 2 boards of oak wood. Abasic chair is easy to construct and requires one worker’s hour.
The second type (classic) requires 7 boards of beech wood and 5 boards of oak wood.Due to the more important completion time, the classic chair requires three worker’shours.
The price of a basic chair is 30 euros whereas a classic chair’s price is 70 euros.
The stock of boards of the entreprise is 800 boards of beech wood and 200 boards of oakwood. There are 4 workers working each 40 hours per week.
What is the number of basic and classic chairs that the entreprise must produce for thisweek ?
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 2 / 28
Modeling of the problemChoice of the decision variablesxB = Number of basic chairs to construct this weekxC = Number of classic chairs to construct this week
Objective to optimizemax 30xB + 70xC
ConstraintsBeech : 9xB + 7xC ≤ 800Oak : 2xB + 5xC ≤ 200Work : xB + 3xC ≤ 160Other : xB ≥ 0, xC ≥ 0 (and xB , xC integer).
max 30xB+70xC
s.t. 9xB+ 7xC ≤1000
2xB+ 5xC ≤200
xB+ 3xC ≤160
xB , xC ≥0
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 3 / 28
Modeling of the problemChoice of the decision variablesxB = Number of basic chairs to construct this weekxC = Number of classic chairs to construct this week
Objective to optimizemax 30xB + 70xC
ConstraintsBeech : 9xB + 7xC ≤ 800Oak : 2xB + 5xC ≤ 200Work : xB + 3xC ≤ 160Other : xB ≥ 0, xC ≥ 0 (and xB , xC integer).
max 30xB+70xC
s.t. 9xB+ 7xC ≤1000
2xB+ 5xC ≤200
xB+ 3xC ≤160
xB , xC ≥0
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 3 / 28
Modeling of the problemChoice of the decision variablesxB = Number of basic chairs to construct this weekxC = Number of classic chairs to construct this week
Objective to optimizemax 30xB + 70xC
ConstraintsBeech : 9xB + 7xC ≤ 800Oak : 2xB + 5xC ≤ 200Work : xB + 3xC ≤ 160Other : xB ≥ 0, xC ≥ 0 (and xB , xC integer).
max 30xB+70xC
s.t. 9xB+ 7xC ≤1000
2xB+ 5xC ≤200
xB+ 3xC ≤160
xB , xC ≥0
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 3 / 28
Modeling of the problemChoice of the decision variablesxB = Number of basic chairs to construct this weekxC = Number of classic chairs to construct this week
Objective to optimizemax 30xB + 70xC
ConstraintsBeech : 9xB + 7xC ≤ 800Oak : 2xB + 5xC ≤ 200Work : xB + 3xC ≤ 160Other : xB ≥ 0, xC ≥ 0 (and xB , xC integer).
max 30xB+70xC
s.t. 9xB+ 7xC ≤1000
2xB+ 5xC ≤200
xB+ 3xC ≤160
xB , xC ≥0
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 3 / 28
Alloy production
The company Steel has received an order for 500 tons of steel to be used in shipbuilding.This steel must have the following characteristics
Chemical element Minimum grade Maximum gradeCarbon (C) 2 3Copper (Cu) 0.4 0.6Manganese (Mn) 1.2 1.65
The company has seven different raw materials in stock that may be used for theproduction of this steel. The following Table lists the grades, available amounts andprices for all raw materials.
Raw material C % Cu % Mn % Availability in t Cost in e/tIron alloy 1 2.5 0 1.3 400 200Iron alloy 2 3 0 0.8 300 250Iron alloy 3 0 0.3 0 600 150Copper alloy 1 0 90 0 500 220Copper alloy 2 0 96 4 200 240Aluminum alloy 1 0 0.4 1.2 300 200Aluminum alloy 2 0 0.6 0 250 165
The objective is to determine the composition of the steel that minimizes the productioncost.
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 4 / 28
Alloy production
The company Steel has received an order for 500 tons of steel to be used in shipbuilding.This steel must have the following characteristics
Chemical element Minimum grade Maximum gradeCarbon (C) 2 3Copper (Cu) 0.4 0.6Manganese (Mn) 1.2 1.65
The company has seven different raw materials in stock that may be used for theproduction of this steel. The following Table lists the grades, available amounts andprices for all raw materials.
Raw material C % Cu % Mn % Availability in t Cost in e/tIron alloy 1 2.5 0 1.3 400 200Iron alloy 2 3 0 0.8 300 250Iron alloy 3 0 0.3 0 600 150Copper alloy 1 0 90 0 500 220Copper alloy 2 0 96 4 200 240Aluminum alloy 1 0 0.4 1.2 300 200Aluminum alloy 2 0 0.6 0 250 165
The objective is to determine the composition of the steel that minimizes the productioncost.
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 4 / 28
Alloy production
The company Steel has received an order for 500 tons of steel to be used in shipbuilding.This steel must have the following characteristics
Chemical element Minimum grade Maximum gradeCarbon (C) 2 3Copper (Cu) 0.4 0.6Manganese (Mn) 1.2 1.65
The company has seven different raw materials in stock that may be used for theproduction of this steel. The following Table lists the grades, available amounts andprices for all raw materials.
Raw material C % Cu % Mn % Availability in t Cost in e/tIron alloy 1 2.5 0 1.3 400 200Iron alloy 2 3 0 0.8 300 250Iron alloy 3 0 0.3 0 600 150Copper alloy 1 0 90 0 500 220Copper alloy 2 0 96 4 200 240Aluminum alloy 1 0 0.4 1.2 300 200Aluminum alloy 2 0 0.6 0 250 165
The objective is to determine the composition of the steel that minimizes the productioncost.
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 4 / 28
Formulation
Decision Variables
usei : Quantity of alloy i used (i ∈ I )
Objective to optimize
min∑i∈I
pricei usei
Constraints
Carbon : LBC ≤∑
i∈I Ci usei ≤ UBC
Copper : LBCu ≤∑
i∈I Cui usei ≤ UBCu
Manganese :LBMn ≤∑
i∈I Mni usei ≤ UBMn
Availability : 0 ≤ usei ≤ StockiProduction :
∑i∈I usei = Demand
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 5 / 28
Formulation
Decision Variables
usei : Quantity of alloy i used (i ∈ I )
Objective to optimize
min∑i∈I
pricei usei
Constraints
Carbon : LBC ≤∑
i∈I Ci usei ≤ UBC
Copper : LBCu ≤∑
i∈I Cui usei ≤ UBCu
Manganese :LBMn ≤∑
i∈I Mni usei ≤ UBMn
Availability : 0 ≤ usei ≤ StockiProduction :
∑i∈I usei = Demand
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 5 / 28
Formulation
Decision Variables
usei : Quantity of alloy i used (i ∈ I )
Objective to optimize
min∑i∈I
pricei usei
Constraints
Carbon : LBC ≤∑
i∈I Ci usei ≤ UBC
Copper : LBCu ≤∑
i∈I Cui usei ≤ UBCu
Manganese :LBMn ≤∑
i∈I Mni usei ≤ UBMn
Availability : 0 ≤ usei ≤ StockiProduction :
∑i∈I usei = Demand
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 5 / 28
Formulation
Decision Variables
usei : Quantity of alloy i used (i ∈ I )
Objective to optimize
min∑i∈I
pricei usei
Constraints
Carbon : LBC ≤∑
i∈I Ci usei ≤ UBC
Copper : LBCu ≤∑
i∈I Cui usei ≤ UBCu
Manganese :LBMn ≤∑
i∈I Mni usei ≤ UBMn
Availability : 0 ≤ usei ≤ StockiProduction :
∑i∈I usei = Demand
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 5 / 28
Different forms of linear programming
max 2x1 + 3x2
s.t. 3x1 + x2 ≤ 3
x1 − x2 = 2
x1, x2 ≥ 0
min − 2x1 + 3x2
s.t. 3x1 + 4x2 ≥ 3
x1 − 2x2 ≤ 2
x1 ≥ 0,
− 3 ≤ x2 ≤ 0
min 2x1 − 3x2
s.t. 7x1 − x2 ≤ 3
x1 + 2x2 = 5
x1 ≥ 0, x2 ∈ R
Objective : min ou maxConstraints : ≥,≤,=Bounds : ≥ 0,≤ 0, [l , u],R
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 6 / 28
Different forms of linear programming
max 2x1 + 3x2
s.t. 3x1 + x2 ≤ 3
x1 − x2 = 2
x1, x2 ≥ 0
min − 2x1 + 3x2
s.t. 3x1 + 4x2 ≥ 3
x1 − 2x2 ≤ 2
x1 ≥ 0,
− 3 ≤ x2 ≤ 0
min 2x1 − 3x2
s.t. 7x1 − x2 ≤ 3
x1 + 2x2 = 5
x1 ≥ 0, x2 ∈ R
Objective : min ou maxConstraints : ≥,≤,=Bounds : ≥ 0,≤ 0, [l , u],R
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 6 / 28
Different forms of linear programming
max 2x1 + 3x2
s.t. 3x1 + x2 ≤ 3
x1 − x2 = 2
x1, x2 ≥ 0
min − 2x1 + 3x2
s.t. 3x1 + 4x2 ≥ 3
x1 − 2x2 ≤ 2
x1 ≥ 0,
− 3 ≤ x2 ≤ 0
min 2x1 − 3x2
s.t. 7x1 − x2 ≤ 3
x1 + 2x2 = 5
x1 ≥ 0, x2 ∈ R
Objective : min ou maxConstraints : ≥,≤,=Bounds : ≥ 0,≤ 0, [l , u],R
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 6 / 28
Different forms of linear programming
max 2x1 + 3x2
s.t. 3x1 + x2 ≤ 3
x1 − x2 = 2
x1, x2 ≥ 0
min − 2x1 + 3x2
s.t. 3x1 + 4x2 ≥ 3
x1 − 2x2 ≤ 2
x1 ≥ 0,
− 3 ≤ x2 ≤ 0
min 2x1 − 3x2
s.t. 7x1 − x2 ≤ 3
x1 + 2x2 = 5
x1 ≥ 0, x2 ∈ R
Objective : min ou maxConstraints : ≥,≤,=Bounds : ≥ 0,≤ 0, [l , u],R
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 6 / 28
Different forms of linear programming
max 2x1 + 3x2
s.t. 3x1 + x2 ≤ 3
x1 − x2 = 2
x1, x2 ≥ 0
min − 2x1 + 3x2
s.t. 3x1 + 4x2 ≥ 3
x1 − 2x2 ≤ 2
x1 ≥ 0,
− 3 ≤ x2 ≤ 0
min 2x1 − 3x2
s.t. 7x1 − x2 ≤ 3
x1 + 2x2 = 5
x1 ≥ 0, x2 ∈ R
Objective : min ou maxConstraints : ≥,≤,=Bounds : ≥ 0,≤ 0, [l , u],R
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 6 / 28
Different forms of linear programmingWe can go equivalently from one form to the other
Objective :max f (x) ≡ −min −f (x)
max 2x1 − 7x2 ≡ −min−2x1 + 7x2
Constraints :
f (x) ≤ b ≡ −f (x) ≥ −b 2x1 − x2 ≤ 1 ≡ −2x1 + x2 ≥ −1
f (x) = b ≡ f (x) ≤ b et f (x) ≥ b 3x1 − x2 = 3 ≡ 3x1 − x2 ≤ 3 et 3x1 − x2 ≥ 3
f (x) ≤ b ≡ f (x) + s = b, with s ≥ 0 3x1 − 2x2 ≥ 0 ≡ 3x1 − 2x2 − s ≥ 0 with s ≥ 0
Bounds :x ≤ 0 ≡ x := −x et x ≥ 0
y ∈ R → y = y+ − y− and y+, y− ≥ 0 !Not equivalent !
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 7 / 28
Different forms of linear programmingWe can go equivalently from one form to the other
Objective :max f (x) ≡ −min −f (x)
max 2x1 − 7x2 ≡ −min−2x1 + 7x2
Constraints :
f (x) ≤ b ≡ −f (x) ≥ −b 2x1 − x2 ≤ 1 ≡ −2x1 + x2 ≥ −1
f (x) = b ≡ f (x) ≤ b et f (x) ≥ b 3x1 − x2 = 3 ≡ 3x1 − x2 ≤ 3 et 3x1 − x2 ≥ 3
f (x) ≤ b ≡ f (x) + s = b, with s ≥ 0 3x1 − 2x2 ≥ 0 ≡ 3x1 − 2x2 − s ≥ 0 with s ≥ 0
Bounds :x ≤ 0 ≡ x := −x et x ≥ 0
y ∈ R → y = y+ − y− and y+, y− ≥ 0 !Not equivalent !
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 7 / 28
Different forms of linear programmingWe can go equivalently from one form to the other
Objective :max f (x) ≡ −min −f (x)
max 2x1 − 7x2 ≡ −min−2x1 + 7x2
Constraints :
f (x) ≤ b ≡ −f (x) ≥ −b 2x1 − x2 ≤ 1 ≡ −2x1 + x2 ≥ −1
f (x) = b ≡ f (x) ≤ b et f (x) ≥ b 3x1 − x2 = 3 ≡ 3x1 − x2 ≤ 3 et 3x1 − x2 ≥ 3
f (x) ≤ b ≡ f (x) + s = b, with s ≥ 0 3x1 − 2x2 ≥ 0 ≡ 3x1 − 2x2 − s ≥ 0 with s ≥ 0
Bounds :x ≤ 0 ≡ x := −x et x ≥ 0
y ∈ R → y = y+ − y− and y+, y− ≥ 0 !Not equivalent !
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 7 / 28
Different forms of linear programmingWe can go equivalently from one form to the other
Objective :max f (x) ≡ −min −f (x)
max 2x1 − 7x2 ≡ −min−2x1 + 7x2
Constraints :
f (x) ≤ b ≡ −f (x) ≥ −b 2x1 − x2 ≤ 1 ≡ −2x1 + x2 ≥ −1
f (x) = b ≡ f (x) ≤ b et f (x) ≥ b 3x1 − x2 = 3 ≡ 3x1 − x2 ≤ 3 et 3x1 − x2 ≥ 3
f (x) ≤ b ≡ f (x) + s = b, with s ≥ 0 3x1 − 2x2 ≥ 0 ≡ 3x1 − 2x2 − s ≥ 0 with s ≥ 0
Bounds :x ≤ 0 ≡ x := −x et x ≥ 0
y ∈ R → y = y+ − y− and y+, y− ≥ 0 !Not equivalent !
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 7 / 28
Different forms of linear programmingWe can go equivalently from one form to the other
Objective :max f (x) ≡ −min −f (x)
max 2x1 − 7x2 ≡ −min−2x1 + 7x2
Constraints :
f (x) ≤ b ≡ −f (x) ≥ −b 2x1 − x2 ≤ 1 ≡ −2x1 + x2 ≥ −1
f (x) = b ≡ f (x) ≤ b et f (x) ≥ b 3x1 − x2 = 3 ≡ 3x1 − x2 ≤ 3 et 3x1 − x2 ≥ 3
f (x) ≤ b ≡ f (x) + s = b, with s ≥ 0 3x1 − 2x2 ≥ 0 ≡ 3x1 − 2x2 − s ≥ 0 with s ≥ 0
Bounds :x ≤ 0 ≡ x := −x et x ≥ 0
y ∈ R → y = y+ − y− and y+, y− ≥ 0 !Not equivalent !
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 7 / 28
Different forms of linear programmingWe can go equivalently from one form to the other
Objective :max f (x) ≡ −min −f (x)
max 2x1 − 7x2 ≡ −min−2x1 + 7x2
Constraints :
f (x) ≤ b ≡ −f (x) ≥ −b 2x1 − x2 ≤ 1 ≡ −2x1 + x2 ≥ −1
f (x) = b ≡ f (x) ≤ b et f (x) ≥ b 3x1 − x2 = 3 ≡ 3x1 − x2 ≤ 3 et 3x1 − x2 ≥ 3
f (x) ≤ b ≡ f (x) + s = b, with s ≥ 0 3x1 − 2x2 ≥ 0 ≡ 3x1 − 2x2 − s ≥ 0 with s ≥ 0
Bounds :x ≤ 0 ≡ x := −x et x ≥ 0
y ∈ R → y = y+ − y− and y+, y− ≥ 0 !Not equivalent !
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 7 / 28
Standard form
The standard form consists in
Objective : minimization
Constraints : equalities
Bounds : Nonnegative variables
min cT x
s.t. Ax = b
x ∈ Rn+
Exercise : Reduce a given problem into standard form
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 8 / 28
Standard form
The standard form consists in
Objective : minimization
Constraints : equalities
Bounds : Nonnegative variables
min cT x
s.t. Ax = b
x ∈ Rn+
Exercise : Reduce a given problem into standard form
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 8 / 28
Standard form
The standard form consists in
Objective : minimization
Constraints : equalities
Bounds : Nonnegative variables
min cT x
s.t. Ax = b
x ∈ Rn+
Exercise : Reduce a given problem into standard form
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 8 / 28
Standard form
The standard form consists in
Objective : minimization
Constraints : equalities
Bounds : Nonnegative variables
min cT x
s.t. Ax = b
x ∈ Rn+
Exercise : Reduce a given problem into standard form
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 8 / 28
Graphic representationWe can represent a problem in two dimensions graphically.Example :
max x1+2x2 (1)
−x1+2x2 ≤ 1 (2)
−x1+ x2 ≤ 0 (3)
4x1+3x2 ≤ 12 (4)
x1, x2 ≥ 0 (5)
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 9 / 28
Graphic representation
max x1+2x2 (1)
−x1+2x2 ≤ 1 (2)
−x1+ x2 ≤ 0 (3)
4x1+3x2 ≤ 12 (4)
x1, x2 ≥ 0 (5)
1
(3)
(2)
(4)
x
x2
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 9 / 28
Graphic representation
max x1+2x2 (1)
−x1+2x2 ≤ 1 (2)
−x1+ x2 ≤ 0 (3)
4x1+3x2 ≤ 12 (4)
x1, x2 ≥ 0 (5)
������������������������������������������������������������������������������������������������������������������������������������������������
������������������������������������������������������������������������������������������������������������������������������������������������
(3)
(2)
(4)
x
x2
1Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 9 / 28
Graphic representation
max x1+2x2 (1)
−x1+2x2 ≤ 1 (2)
−x1+ x2 ≤ 0 (3)
4x1+3x2 ≤ 12 (4)
x1, x2 ≥ 0 (5)
������������������������������������������������������������������������������������������������������������������������������������������������
������������������������������������������������������������������������������������������������������������������������������������������������
(3)
(2)
(4)
x
x2
1+2xx1 =22
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 9 / 28
Graphic representation
max x1+2x2 (1)
−x1+2x2 ≤ 1 (2)
−x1+ x2 ≤ 0 (3)
4x1+3x2 ≤ 12 (4)
x1, x2 ≥ 0 (5)
������������������������������������������������������������������������������������������������������������������������������������������������
������������������������������������������������������������������������������������������������������������������������������������������������
(3)
(2)
(4)
x
x2
1+2xx1 =42
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 9 / 28
Graphic representation
max x1+2x2 (1)
−x1+2x2 ≤ 1 (2)
−x1+ x2 ≤ 0 (3)
4x1+3x2 ≤ 12 (4)
x1, x2 ≥ 0 (5)
������������������������������������������������������������������������������������������������������������������������������������������������
������������������������������������������������������������������������������������������������������������������������������������������������
(3)
(2)
(4)
x
x2
1+2xx1 2=4.8
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 9 / 28
Degenerate cases
In the example we had a unique solution at a vertex of the polyhedron.Some degenerate cases can lead to different solutions.
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 10 / 28
Degenerate cases
In the example we had a unique solution at a vertex of the polyhedron.Some degenerate cases can lead to different solutions.
min x1 + x2
s.t. − x1 + x2 ≤ 1
x1, x2 ≥ 0
x
x2
1
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 10 / 28
Degenerate cases
In the example we had a unique solution at a vertex of the polyhedron.Some degenerate cases can lead to different solutions.
min x1
s.t. − x1 + x2 ≤ 1
x1, x2 ≥ 0
1x
x2
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 10 / 28
Degenerate cases
In the example we had a unique solution at a vertex of the polyhedron.Some degenerate cases can lead to different solutions.
max − x1 + x2
s.t. − x1 + x2 ≤ 1
x1, x2 ≥ 0
1x
x2
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 10 / 28
Degenerate cases
In the example we had a unique solution at a vertex of the polyhedron.Some degenerate cases can lead to different solutions.
max x1 + x2
s.t. − x1 + x2 ≤ 1
x1, x2 ≥ 0
x
x2
1
5
12
3
4
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 10 / 28
Degenerate cases
In the example we had a unique solution at a vertex of the polyhedron.Some degenerate cases can lead to different solutions.
max x1 + 2x2
s.t. − x1 + x2 ≤ 1
− x1 + x2 ≥ 2
x1, x2 ≥ 0x2
1x
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 10 / 28
Polyhedra
Definition
A polyhedron is a set {x ∈ Rn|Ax ≥ b}
A set of the form Ax ≤ b is also a polyhedron.A set {x ∈ Rn|Ax = b, x ≥ 0} is a polyhedron in standard form.
Definition
Let a ∈ Rn \ {0}.(a) The set {x ∈ Rn|aT x = b} is a hyperplane
(b) The set {x ∈ Rn|aT x ≥ b} is a halfspace
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 11 / 28
Polyhedra
Definition
A polyhedron is a set {x ∈ Rn|Ax ≥ b}
A set of the form Ax ≤ b is also a polyhedron.A set {x ∈ Rn|Ax = b, x ≥ 0} is a polyhedron in standard form.
Definition
Let a ∈ Rn \ {0}.(a) The set {x ∈ Rn|aT x = b} is a hyperplane
(b) The set {x ∈ Rn|aT x ≥ b} is a halfspace
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 11 / 28
Convex Sets
Definition
A set S ⊆ Rn is convex if for all x , y ∈ S and all λ ∈ [0, 1], λx + (1− λ)y ∈ S .
Definition
Let x1, . . . , xk be vectors of Rn.
(i) λ1x1 + · · ·+ λkx
k is a conic combination if λ1, . . . , λk ≥ 0
(ii) λ1x1 + · · ·+ λkx
k is a convex combination if λ1, . . . , λk ≥ 0 and λ1 + · · ·+ λk = 1
(iii) The convex hull of x1, . . . , xk is the set of all convex combinations of x1, . . . , xk .
Theorem
(a) The intersection of two convex sets is convex
(b) Every polyhedron is convex
(c) The convex hull of a finite number of points is a polyhedron.
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 12 / 28
Convex Sets
Definition
A set S ⊆ Rn is convex if for all x , y ∈ S and all λ ∈ [0, 1], λx + (1− λ)y ∈ S .
Definition
Let x1, . . . , xk be vectors of Rn.
(i) λ1x1 + · · ·+ λkx
k is a conic combination if λ1, . . . , λk ≥ 0
(ii) λ1x1 + · · ·+ λkx
k is a convex combination if λ1, . . . , λk ≥ 0 and λ1 + · · ·+ λk = 1
(iii) The convex hull of x1, . . . , xk is the set of all convex combinations of x1, . . . , xk .
Theorem
(a) The intersection of two convex sets is convex
(b) Every polyhedron is convex
(c) The convex hull of a finite number of points is a polyhedron.
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 12 / 28
Convex Sets
Definition
A set S ⊆ Rn is convex if for all x , y ∈ S and all λ ∈ [0, 1], λx + (1− λ)y ∈ S .
Definition
Let x1, . . . , xk be vectors of Rn.
(i) λ1x1 + · · ·+ λkx
k is a conic combination if λ1, . . . , λk ≥ 0
(ii) λ1x1 + · · ·+ λkx
k is a convex combination if λ1, . . . , λk ≥ 0 and λ1 + · · ·+ λk = 1
(iii) The convex hull of x1, . . . , xk is the set of all convex combinations of x1, . . . , xk .
Theorem
(a) The intersection of two convex sets is convex
(b) Every polyhedron is convex
(c) The convex hull of a finite number of points is a polyhedron.
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 12 / 28
Extreme points and vertices
Definition
Let P be a polyhedron. A point x ∈ P is an extreme point of P if there do not exist twopoints y , z ∈ P such that x is a convex combination of y and z .
Definition
Let P be a polyhedron. A point x ∈ P is a vertex of P if there exists c ∈ Rn such thatcT x < cT y for all y ∈ P and y 6= x .
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 13 / 28
Extreme points and vertices
Definition
Let P be a polyhedron. A point x ∈ P is an extreme point of P if there do not exist twopoints y , z ∈ P such that x is a convex combination of y and z .
Definition
Let P be a polyhedron. A point x ∈ P is a vertex of P if there exists c ∈ Rn such thatcT x < cT y for all y ∈ P and y 6= x .
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 13 / 28
Bases of a polyhedron
We subdivide the equalities and inequalities into three categories :
aTi x ≥ bi i ∈ M≥
aTi x ≤ bi i ∈ M≤
aTi x = bi i ∈ M=
Definition
Let x be a point satisfying aTi x = bi for some i ∈ M≥,M≤ or M=. The constraint i issaid to be active or tight.
Theorem
Let x ∈ Rn and let I be the set of active constraints for x . The three followingstatements are equivalent.
(i) There exist n linearly independent vectors in {ai |i ∈ I}(ii) span{ai |i ∈ I} = Rn
(iii) The system aTi x = bi , i ∈ I has a unique solution.
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 14 / 28
Bases of a polyhedron
We subdivide the equalities and inequalities into three categories :
aTi x ≥ bi i ∈ M≥
aTi x ≤ bi i ∈ M≤
aTi x = bi i ∈ M=
Definition
Let x be a point satisfying aTi x = bi for some i ∈ M≥,M≤ or M=. The constraint i issaid to be active or tight.
Theorem
Let x ∈ Rn and let I be the set of active constraints for x . The three followingstatements are equivalent.
(i) There exist n linearly independent vectors in {ai |i ∈ I}(ii) span{ai |i ∈ I} = Rn
(iii) The system aTi x = bi , i ∈ I has a unique solution.
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 14 / 28
Bases of a polyhedron
Definition
Let P be a polyhedron and let x ∈ Rn.
(a) x is a basic solution ifI all equalities (i ∈ M=) are activeI among the active constraints, there are n linearly independent
(b) if x is a basic solution that satisfies all constraints, then x is a feasible basic solution.
Theorem
Let P be a polyhedron and let x ∈ P. The three following statements are equivalent.
(i) x is a vertex
(ii) x is an extreme point
(iii) x is a basic feasible solution
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 15 / 28
Bases of a polyhedron
Definition
Let P be a polyhedron and let x ∈ Rn.
(a) x is a basic solution ifI all equalities (i ∈ M=) are activeI among the active constraints, there are n linearly independent
(b) if x is a basic solution that satisfies all constraints, then x is a feasible basic solution.
Theorem
Let P be a polyhedron and let x ∈ P. The three following statements are equivalent.
(i) x is a vertex
(ii) x is an extreme point
(iii) x is a basic feasible solution
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 15 / 28
Polyhedra in standard form
Consider P = {x ∈ Rn|Ax = b, x ≥ 0}.We assume that the rows of A are linearly independent.
Theorem
A point x is a basic feasible solution if Ax = b and if there exist m indicesB(1), . . . ,B(m) such that
(i) The columns AB(1), . . . ,AB(m) are linearly independent
(ii) If i 6= B(1), . . . ,B(m), then xi = 0
Explanation :
m rowsn rows
(AI
)x
=≥
(b0
)We have n + m constraints and n variables.A basic solution ⇒ n constraints satisfied with equality.The m equalities are automatically satisfied.There are n −m inequalities xi ≥ 0 that are active (the nonbasic variables).There are m inequalities xi ≥ 0 that are possibly not active (basic variables).
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 16 / 28
Polyhedra in standard form
Consider P = {x ∈ Rn|Ax = b, x ≥ 0}.We assume that the rows of A are linearly independent.
Theorem
A point x is a basic feasible solution if Ax = b and if there exist m indicesB(1), . . . ,B(m) such that
(i) The columns AB(1), . . . ,AB(m) are linearly independent
(ii) If i 6= B(1), . . . ,B(m), then xi = 0
Explanation :
m rowsn rows
(AI
)x
=≥
(b0
)We have n + m constraints and n variables.A basic solution ⇒ n constraints satisfied with equality.The m equalities are automatically satisfied.There are n −m inequalities xi ≥ 0 that are active (the nonbasic variables).There are m inequalities xi ≥ 0 that are possibly not active (basic variables).
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 16 / 28
Polyhedra in standard form
Consider P = {x ∈ Rn|Ax = b, x ≥ 0}.We assume that the rows of A are linearly independent.
Theorem
A point x is a basic feasible solution if Ax = b and if there exist m indicesB(1), . . . ,B(m) such that
(i) The columns AB(1), . . . ,AB(m) are linearly independent
(ii) If i 6= B(1), . . . ,B(m), then xi = 0
Explanation :
m rowsn rows
(AI
)x
=≥
(b0
)We have n + m constraints and n variables.A basic solution ⇒ n constraints satisfied with equality.The m equalities are automatically satisfied.There are n −m inequalities xi ≥ 0 that are active (the nonbasic variables).There are m inequalities xi ≥ 0 that are possibly not active (basic variables).
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 16 / 28
Construction of a basis
Procedure ( 6= Algorithm)
(i) Choose m linearly independent columns AB(1), . . . ,AB(m)
(ii) xi = 0 for all i 6= B(1), . . . ,B(m)
(iii) Solve Ax = b for the unknowns xB(1), . . . , xB(m)
If the solution x ≥ 0, then x is a basic feasible solution.We construct the basic matrix as
AB =(
AB(1) AB(2) · · · AB(m)
)The nonbasic matrix N corresponds to nonbasic indices.The basic vector is xB = (xB(1), . . . , xB(m)) and the nonbasic vector corresponds to theother indices.We have
ABxB = b
xN = 0
ABxB + ANxN = b
Example
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 17 / 28
Construction of a basis
Procedure ( 6= Algorithm)
(i) Choose m linearly independent columns AB(1), . . . ,AB(m)
(ii) xi = 0 for all i 6= B(1), . . . ,B(m)
(iii) Solve Ax = b for the unknowns xB(1), . . . , xB(m)
If the solution x ≥ 0, then x is a basic feasible solution.We construct the basic matrix as
AB =(
AB(1) AB(2) · · · AB(m)
)The nonbasic matrix N corresponds to nonbasic indices.The basic vector is xB = (xB(1), . . . , xB(m)) and the nonbasic vector corresponds to theother indices.We have
ABxB = b
xN = 0
ABxB + ANxN = b
Example
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 17 / 28
Construction of a basis
Procedure ( 6= Algorithm)
(i) Choose m linearly independent columns AB(1), . . . ,AB(m)
(ii) xi = 0 for all i 6= B(1), . . . ,B(m)
(iii) Solve Ax = b for the unknowns xB(1), . . . , xB(m)
If the solution x ≥ 0, then x is a basic feasible solution.We construct the basic matrix as
AB =(
AB(1) AB(2) · · · AB(m)
)The nonbasic matrix N corresponds to nonbasic indices.The basic vector is xB = (xB(1), . . . , xB(m)) and the nonbasic vector corresponds to theother indices.We have
ABxB = b
xN = 0
ABxB + ANxN = b
Example
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 17 / 28
Construction of a basis
Procedure ( 6= Algorithm)
(i) Choose m linearly independent columns AB(1), . . . ,AB(m)
(ii) xi = 0 for all i 6= B(1), . . . ,B(m)
(iii) Solve Ax = b for the unknowns xB(1), . . . , xB(m)
If the solution x ≥ 0, then x is a basic feasible solution.We construct the basic matrix as
AB =(
AB(1) AB(2) · · · AB(m)
)The nonbasic matrix N corresponds to nonbasic indices.The basic vector is xB = (xB(1), . . . , xB(m)) and the nonbasic vector corresponds to theother indices.We have
ABxB = b
xN = 0
ABxB + ANxN = b
Example
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 17 / 28
Construction of a basis
Procedure ( 6= Algorithm)
(i) Choose m linearly independent columns AB(1), . . . ,AB(m)
(ii) xi = 0 for all i 6= B(1), . . . ,B(m)
(iii) Solve Ax = b for the unknowns xB(1), . . . , xB(m)
If the solution x ≥ 0, then x is a basic feasible solution.We construct the basic matrix as
AB =(
AB(1) AB(2) · · · AB(m)
)The nonbasic matrix N corresponds to nonbasic indices.The basic vector is xB = (xB(1), . . . , xB(m)) and the nonbasic vector corresponds to theother indices.We have
ABxB = b
xN = 0
ABxB + ANxN = b
Example
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 17 / 28
Some important remarks
Correspondence between the base and the basic solutionTwo different bases could lead to the same solution x .
Adjacent BasesTwo bases are adjacent they differ by only one index.Differently stated they have n − 1 indices in common !
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 18 / 28
Some important remarks
Correspondence between the base and the basic solutionTwo different bases could lead to the same solution x .
Adjacent BasesTwo bases are adjacent they differ by only one index.Differently stated they have n − 1 indices in common !
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 18 / 28
Some important remarks
Correspondence between the base and the basic solutionTwo different bases could lead to the same solution x .
Adjacent BasesTwo bases are adjacent they differ by only one index.Differently stated they have n − 1 indices in common !
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 18 / 28
Some important remarks
Correspondence between the base and the basic solutionTwo different bases could lead to the same solution x .
Adjacent BasesTwo bases are adjacent they differ by only one index.Differently stated they have n − 1 indices in common !
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 18 / 28
Some important remarks
Correspondence between the base and the basic solutionTwo different bases could lead to the same solution x .
Adjacent BasesTwo bases are adjacent they differ by only one index.Differently stated they have n − 1 indices in common !
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 18 / 28
Some important remarks
Correspondence between the base and the basic solutionTwo different bases could lead to the same solution x .
Adjacent BasesTwo bases are adjacent they differ by only one index.Differently stated they have n − 1 indices in common !
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 18 / 28
Degenerescence
Definition
A basic solution x ∈ Rn is degenerate if more than n constraints are active at the solution.
Degenerescence for a standard form
Let P = {x ∈ Rn|Ax = b, x ≥ 0}, with A ∈ Rm×n. A basic solution x is degenerate if xhas more than n −m zero elements.
Remark : Degenerescence may be representation-dependent.A non degenerate basis can be degenerate in another representation of the problem andconversely.Example :
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 19 / 28
Degenerescence
Definition
A basic solution x ∈ Rn is degenerate if more than n constraints are active at the solution.
Degenerescence for a standard form
Let P = {x ∈ Rn|Ax = b, x ≥ 0}, with A ∈ Rm×n. A basic solution x is degenerate if xhas more than n −m zero elements.
Remark : Degenerescence may be representation-dependent.A non degenerate basis can be degenerate in another representation of the problem andconversely.Example :
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 19 / 28
Degenerescence
Definition
A basic solution x ∈ Rn is degenerate if more than n constraints are active at the solution.
Degenerescence for a standard form
Let P = {x ∈ Rn|Ax = b, x ≥ 0}, with A ∈ Rm×n. A basic solution x is degenerate if xhas more than n −m zero elements.
Remark : Degenerescence may be representation-dependent.A non degenerate basis can be degenerate in another representation of the problem andconversely.Example :
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 19 / 28
The simplex algorithm
Principle
Start at a feasible basic solution
Check whether the current basis is optimal
If not, find a direction of improvement
The direction of improvement leads to either . . . a better feasible basic solution
or . . . proving that the problem is unbounded
Fundamental question
Let x be a feasible basic solution.Find a direction d such that x + θd is feasible for some θ ≥ 0
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 20 / 28
The simplex algorithm
Principle
Start at a feasible basic solution
Check whether the current basis is optimal
If not, find a direction of improvement
The direction of improvement leads to either . . . a better feasible basic solution
or . . . proving that the problem is unbounded
Fundamental question
Let x be a feasible basic solution.Find a direction d such that x + θd is feasible for some θ ≥ 0
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 20 / 28
The simplex algorithm
Principle
Start at a feasible basic solution
Check whether the current basis is optimal
If not, find a direction of improvement
The direction of improvement leads to either . . . a better feasible basic solution
or . . . proving that the problem is unbounded
Fundamental question
Let x be a feasible basic solution.Find a direction d such that x + θd is feasible for some θ ≥ 0
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 20 / 28
Finding a feasible direction from a basic feasible solution
Given : x = (xB xN) ∈ PFind d such that x + dθ ∈ P
We want to change at least one nonbasic solution.Select one index j ∈ N
dj = 1 di = 0 for all i 6= j
We have Ax = b and A(x + θd) = b ⇒ Ad = 0
0 = Ad =n∑
i=1
AB(i)dB(i) + Aj
BdB + Aj
dB = −B−1Aj is the j th basic direction
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 21 / 28
Finding a feasible direction from a basic feasible solution
Given : x = (xB xN) ∈ PFind d such that x + dθ ∈ P
We want to change at least one nonbasic solution.Select one index j ∈ N
dj = 1 di = 0 for all i 6= j
We have Ax = b and A(x + θd) = b ⇒ Ad = 0
0 = Ad =n∑
i=1
AB(i)dB(i) + Aj
BdB + Aj
dB = −B−1Aj is the j th basic direction
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 21 / 28
Finding a feasible direction from a basic feasible solution
Given : x = (xB xN) ∈ PFind d such that x + dθ ∈ P
We want to change at least one nonbasic solution.Select one index j ∈ N
dj = 1 di = 0 for all i 6= j
We have Ax = b and A(x + θd) = b ⇒ Ad = 0
0 = Ad =n∑
i=1
AB(i)dB(i) + Aj
BdB + Aj
dB = −B−1Aj is the j th basic direction
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 21 / 28
Finding a feasible direction from a basic feasible solution
Given : x = (xB xN) ∈ PFind d such that x + dθ ∈ P
We want to change at least one nonbasic solution.Select one index j ∈ N
dj = 1 di = 0 for all i 6= j
We have Ax = b and A(x + θd) = b ⇒ Ad = 0
0 = Ad =n∑
i=1
AB(i)dB(i) + Aj
BdB + Aj
dB = −B−1Aj is the j th basic direction
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 21 / 28
Taking care of the nonnegativity constraints
Nonbasic variables : xi (i 6= j) : = 0 : ⇒ OK !xj : goes in the positive direction ⇒ OK !
Basic VariablesNondegenerate case : xB > 0Therefore xB + θdB ≥ 0 for θ sufficiently small
Degenerate case : xB(i) = 0 for some i2 cases(1) (dB)i = (−B−1Aj)i ≥ 0 ⇒ feasible for θ small enough(2) (dB)i = (−B−1Aj)i < 0 ⇒ not feasible for any θ
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 22 / 28
Taking care of the nonnegativity constraints
Nonbasic variables : xi (i 6= j) : = 0 : ⇒ OK !xj : goes in the positive direction ⇒ OK !
Basic VariablesNondegenerate case : xB > 0Therefore xB + θdB ≥ 0 for θ sufficiently small
Degenerate case : xB(i) = 0 for some i2 cases(1) (dB)i = (−B−1Aj)i ≥ 0 ⇒ feasible for θ small enough(2) (dB)i = (−B−1Aj)i < 0 ⇒ not feasible for any θ
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 22 / 28
Taking care of the nonnegativity constraints
Nonbasic variables : xi (i 6= j) : = 0 : ⇒ OK !xj : goes in the positive direction ⇒ OK !
Basic VariablesNondegenerate case : xB > 0Therefore xB + θdB ≥ 0 for θ sufficiently small
Degenerate case : xB(i) = 0 for some i2 cases(1) (dB)i = (−B−1Aj)i ≥ 0 ⇒ feasible for θ small enough(2) (dB)i = (−B−1Aj)i < 0 ⇒ not feasible for any θ
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 22 / 28
Checking optimality
Essential question : Is the current basis optimal or can we find a basic direction thatimproves the objective function ?Definition : cB = (cB(1), . . . , cB(m))Let us compute the rate of objective change for the j th basic direction.d = (dB dN) with dB = −B−1Aj dN = ej
cTd = cTdB + cTdN
= −cTB B−1Aj + cj
Definition
The reduced cost of the j th nonbasic variable is
cj = cj − cTB B−1Aj .
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 23 / 28
Checking optimality
Essential question : Is the current basis optimal or can we find a basic direction thatimproves the objective function ?Definition : cB = (cB(1), . . . , cB(m))Let us compute the rate of objective change for the j th basic direction.d = (dB dN) with dB = −B−1Aj dN = ej
cTd = cTdB + cTdN
= −cTB B−1Aj + cj
Definition
The reduced cost of the j th nonbasic variable is
cj = cj − cTB B−1Aj .
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 23 / 28
Optimality Criterion
Theorem
Consider a basic feasible solution x
(i) If c ≥ 0 then x is optimal
(ii) If x is optimal and nondegenerate then c ≥ 0.
Definition
A basis matrix B is said to be optimal if
(i) B−1b ≥ 0 and
(ii) c = −cTB B−1A ≥ 0
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 24 / 28
Optimality Criterion
Theorem
Consider a basic feasible solution x
(i) If c ≥ 0 then x is optimal
(ii) If x is optimal and nondegenerate then c ≥ 0.
Definition
A basis matrix B is said to be optimal if
(i) B−1b ≥ 0 and
(ii) c = −cTB B−1A ≥ 0
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 24 / 28
Simplex algorithm
Iterative step : From a basis B doIf cj ≥ 0 for all j
then the current basis is optimalelse select a nonbasic variable j with cj < 0
We bring j into the basisWe now look for θ maximal such that x + θd ∈ P
If di ≥ 0 for all i ∈ Bthen x + θd ≥ 0 for all θ ≥ 0
The problem is unbounded and OPT = −∞If di < for some i ∈ B
then θ∗ = min{i∈B|dB(i)<0}
(− xB(i)
dB(i)
).
Variable i achieving the minimum goes out of the basisWe move to the next vertex (basic feasible solution)
B ← B ∪ {j} \ {i}New point:= x + θ∗d
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 25 / 28
Simplex algorithm
Iterative step : From a basis B doIf cj ≥ 0 for all j
then the current basis is optimalelse select a nonbasic variable j with cj < 0
We bring j into the basisWe now look for θ maximal such that x + θd ∈ P
If di ≥ 0 for all i ∈ Bthen x + θd ≥ 0 for all θ ≥ 0
The problem is unbounded and OPT = −∞If di < for some i ∈ B
then θ∗ = min{i∈B|dB(i)<0}
(− xB(i)
dB(i)
).
Variable i achieving the minimum goes out of the basisWe move to the next vertex (basic feasible solution)
B ← B ∪ {j} \ {i}New point:= x + θ∗d
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 25 / 28
Simplex algorithm
Iterative step : From a basis B doIf cj ≥ 0 for all j
then the current basis is optimalelse select a nonbasic variable j with cj < 0
We bring j into the basisWe now look for θ maximal such that x + θd ∈ P
If di ≥ 0 for all i ∈ Bthen x + θd ≥ 0 for all θ ≥ 0
The problem is unbounded and OPT = −∞If di < for some i ∈ B
then θ∗ = min{i∈B|dB(i)<0}
(− xB(i)
dB(i)
).
Variable i achieving the minimum goes out of the basisWe move to the next vertex (basic feasible solution)
B ← B ∪ {j} \ {i}New point:= x + θ∗d
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 25 / 28
Simplex algorithm
Iterative step : From a basis B doIf cj ≥ 0 for all j
then the current basis is optimalelse select a nonbasic variable j with cj < 0
We bring j into the basisWe now look for θ maximal such that x + θd ∈ P
If di ≥ 0 for all i ∈ Bthen x + θd ≥ 0 for all θ ≥ 0
The problem is unbounded and OPT = −∞If di < for some i ∈ B
then θ∗ = min{i∈B|dB(i)<0}
(− xB(i)
dB(i)
).
Variable i achieving the minimum goes out of the basisWe move to the next vertex (basic feasible solution)
B ← B ∪ {j} \ {i}New point:= x + θ∗d
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 25 / 28
Simplex algorithm
Iterative step : From a basis B doIf cj ≥ 0 for all j
then the current basis is optimalelse select a nonbasic variable j with cj < 0
We bring j into the basisWe now look for θ maximal such that x + θd ∈ P
If di ≥ 0 for all i ∈ Bthen x + θd ≥ 0 for all θ ≥ 0
The problem is unbounded and OPT = −∞If di < for some i ∈ B
then θ∗ = min{i∈B|dB(i)<0}
(− xB(i)
dB(i)
).
Variable i achieving the minimum goes out of the basisWe move to the next vertex (basic feasible solution)
B ← B ∪ {j} \ {i}New point:= x + θ∗d
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 25 / 28
Simplex algorithm
Iterative step : From a basis B doIf cj ≥ 0 for all j
then the current basis is optimalelse select a nonbasic variable j with cj < 0
We bring j into the basisWe now look for θ maximal such that x + θd ∈ P
If di ≥ 0 for all i ∈ Bthen x + θd ≥ 0 for all θ ≥ 0
The problem is unbounded and OPT = −∞If di < for some i ∈ B
then θ∗ = min{i∈B|dB(i)<0}
(− xB(i)
dB(i)
).
Variable i achieving the minimum goes out of the basisWe move to the next vertex (basic feasible solution)
B ← B ∪ {j} \ {i}New point:= x + θ∗d
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 25 / 28
Simplex algorithm
Iterative step : From a basis B doIf cj ≥ 0 for all j
then the current basis is optimalelse select a nonbasic variable j with cj < 0
We bring j into the basisWe now look for θ maximal such that x + θd ∈ P
If di ≥ 0 for all i ∈ Bthen x + θd ≥ 0 for all θ ≥ 0
The problem is unbounded and OPT = −∞If di < for some i ∈ B
then θ∗ = min{i∈B|dB(i)<0}
(− xB(i)
dB(i)
).
Variable i achieving the minimum goes out of the basisWe move to the next vertex (basic feasible solution)
B ← B ∪ {j} \ {i}New point:= x + θ∗d
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 25 / 28
The operation of moving to another basis
In an iteration of the simplex algorithm, in the basis, we replace the variable i such that
i = arg min{−xB(i)
dB(i)| i ∈ B with dB(i) < 0}
by the variable j entering the basis (that was chosen with cj < 0).
Theorem
(i) The columns AB(k), k 6= i and Aj are linearly independent
(ii) The vector y = x + θ∗d is a basic feasible solution associated with the new basismatrix.
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 26 / 28
The operation of moving to another basis
In an iteration of the simplex algorithm, in the basis, we replace the variable i such that
i = arg min{−xB(i)
dB(i)| i ∈ B with dB(i) < 0}
by the variable j entering the basis (that was chosen with cj < 0).
Theorem
(i) The columns AB(k), k 6= i and Aj are linearly independent
(ii) The vector y = x + θ∗d is a basic feasible solution associated with the new basismatrix.
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 26 / 28
Finding an intial basis
2 issues : finding a feasible solution and finding the corresponding basis.
One easy case
Consider a problem of the type Ax ≤ b where b ≥ 0.The standard form, if we add the slack variables
a11x1 + · · ·+ a1nxn+s1 = b1
.... . .
am1x1 + · · ·+ amnxn +sm= bm
The point (x1 = 0, · · · , xn = 0) is a feasible solution and (s1 · · · sm) is the correspondingbasis.
In general
It is not easy to find a feasible basis.One can try any basis (choice of m variables) but there is no guarantee that it is feasible.In some cases, the problem is infeasible → it might be impossible to find a basic feasiblesolution.
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 27 / 28
Finding an intial basis
2 issues : finding a feasible solution and finding the corresponding basis.
One easy case
Consider a problem of the type Ax ≤ b where b ≥ 0.The standard form, if we add the slack variables
a11x1 + · · ·+ a1nxn+s1 = b1
.... . .
am1x1 + · · ·+ amnxn +sm= bm
The point (x1 = 0, · · · , xn = 0) is a feasible solution and (s1 · · · sm) is the correspondingbasis.
In general
It is not easy to find a feasible basis.One can try any basis (choice of m variables) but there is no guarantee that it is feasible.In some cases, the problem is infeasible → it might be impossible to find a basic feasiblesolution.
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 27 / 28
Using a linear program and the simplex algorithm to find an initial basis
Phase I
Consider a problem of the type Ax = b, x ∈ Rn+ where we assume (after suitable
multiplication of rows by −1) that b ≥ 0.
min ξ1 + · · ·+ ξm
a11x1 + · · ·+ a1nxn + ξ1 = b1
.... . .
...
am1x1 + · · ·+ amnxn + ξm = bm
If the optimal solution of the phase 1 problem is > 0 ⇒ the initial problem isinfeasible.
If the initial problem is feasible ⇒ the phase 1 problem has 0 as optimal solution
One more issue : how to obtain an initial basis for the original problem without ξivariables in it
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 28 / 28
Using a linear program and the simplex algorithm to find an initial basis
Phase I
Consider a problem of the type Ax = b, x ∈ Rn+ where we assume (after suitable
multiplication of rows by −1) that b ≥ 0.
min ξ1 + · · ·+ ξm
a11x1 + · · ·+ a1nxn + ξ1 = b1
.... . .
...
am1x1 + · · ·+ amnxn + ξm = bm
If the optimal solution of the phase 1 problem is > 0 ⇒ the initial problem isinfeasible.
If the initial problem is feasible ⇒ the phase 1 problem has 0 as optimal solution
One more issue : how to obtain an initial basis for the original problem without ξivariables in it
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 28 / 28
Using a linear program and the simplex algorithm to find an initial basis
Phase I
Consider a problem of the type Ax = b, x ∈ Rn+ where we assume (after suitable
multiplication of rows by −1) that b ≥ 0.
min ξ1 + · · ·+ ξm
a11x1 + · · ·+ a1nxn + ξ1 = b1
.... . .
...
am1x1 + · · ·+ amnxn + ξm = bm
If the optimal solution of the phase 1 problem is > 0 ⇒ the initial problem isinfeasible.
If the initial problem is feasible ⇒ the phase 1 problem has 0 as optimal solution
One more issue : how to obtain an initial basis for the original problem without ξivariables in it
Quentin Louveaux (ULg - Institut Montefiore) Introduction a l’Analyse Numerique 2013 28 / 28