Professional Documents
Culture Documents
Week 1 Lecture 2
Week 1 Lecture 2
Week 1 Lecture 2
1
Energy plant problem
I Two kinds of black coal, A and B, are pulverized and burned
I Which mix of A and B maximizes the energy production under
constraints?
I 1 ton produces. . .
Product Power (Watts) Soot (kg) Sulfur particles per million
A 240 000 0.5 1 800
B 200 000 1 3 800
Restrictions:
1. Supply by train restricted to 20 tons/hour (A and B together)
2. Pulverizing capacity of the plant is 16 ton/hour if only A is pulverized
and 24 ton/hour if only B is pulverized (any mix is possible)
3. Exhaust of soot is restricted to 12 kg per hour
4. Exhaust of sulfur is restricted to 3 000 particles per million
2
Energy plant problem LP
Define decision variables x1 as the number of tons burned per hour of
coal type A and x2 as the number of tons burned per hour of coal type
B. Then the maximization problem can be modelled by the following
LP formulation.
x1 ≥ 0, x2 ≥ 0.
3
Geometry
4
Inventory production planning
I Demand and unit production cost of commodity over the next 5
weeks:
1 2 3 4 5
Di 150 300 250 375 125
ci 15 20 20 10 25
I On time delivery: produce item for week i in or before week i
I Holding cost e 4 for every unit in stock at the end of the week (same
for all i)
I Goal: Minimize the sum of total production and inventory cost
5
Variables and objective
I Decision variables: xi is production in week i, i = 1, 2, 3, 4, 5.
I Auxiliary variables: Ii is inventory end of week i, i = 1, 2, 3, 4, 5.
P5 P5
I Objective: Minimize j=1 cj xj +4 j=1 Ij .
6
Constraints
I i = 1 : x1 = D1 + I1 → x1 − I1 = 150.
I i = 2, 3, 4, 5 : xi + Ii−1 = Di + Ii → xi − Ii + Ii−1 = Di .
I All variables xi and Ii are nonnegative.
7
LP formulation
5
X
min 15x1 + 20x2 + 20x3 + 10x4 + 25x5 + 4 Ij
j=1
s.t. x1 − I1 = 150
x2 + I1 − I2 = 300
x3 + I2 − I3 = 250
x4 + I3 − I4 = 375
x5 + I4 − I5 = 125
Ij ≥ 0 j = 1, 2, . . . , 5
xj ≥ 0 j = 1, 2, . . . , 5
8
Zero-sum games
Let M be some m × n matrix
E.g.,
1 −1
M=
−1 1
−2 0
9
Zero-sum games
Let M be some m × n matrix
E.g.,
1 −1
M=
−1 1
−2 0
I Alice and Bob play a game: Alice picks a row i, and Bob a column j.
I After these pickings Bob (the column player) has to pay Alice (the
row player) Mij euro.
I If Mij < 0 then this means that Alice pays Bob −Mij euro.
9
Rock-paper-scissors
Q: What matrix corresponds to the game of rock-paper-scissors, with a
bet of e 1?
10
Mixed strategies
Q: What is a good strategy for rock-paper-scissors?
0 −1 1
M=
1 0 −1
−1 1 0
11
Mixed strategies
Q: What is a good strategy for rock-paper-scissors?
0 −1 1
M=
1 0 −1
−1 1 0
11
Best mixed strategy as an LP
1 −1
Given payoff matrix M, what is Alice’s best
M = −1 1
mixed strategy?
−2 0
12
Mathematical model
I Decision variables: xi is probability to play strategy (row) i for
i = 1, 2, 3
Pm
I Constraints: 0 ≤ xi ≤ 1 for i = 1, 2, . . . , 3 and i=1 xi = 1.
I Objective: Maximize
min(x1 · 1 + x2 · (−1) + x3 · (−2), x1 · (−1) + x2 (1) + x3 · 0)
I This objective function is not linear!
13
Trick to obtain an LP
Introduce auxiliary variable z.
max z
s.t. z ≤ x1 − x2 − 2x3
z ≤ −x1 + x2
x1 + x2 + x3 = 1
xi ≥ 0 i = 1, 2, 3
14
LP (for general zero-sum game according to matrix M)
max z
m
X
s.t. z≤ Mij xi j = 1, 2, . . . , n
i=1
m
X
xi = 1
i=1
xi ≥ 0 i = 1, 2, . . . , m
15
Broader context: nonlinear programming
Nonlinear program
max f (x)
gi (x) ≤ bi , i = 1, . . . , m
with f , g1 , . . . , gm : Rn → R
16
Implications of linearity
I Divisibility: Variables can have fractional (non-integer) values
max Z = f (x)
|{z}
Pn
cx
j=1 j j
17
Example of a problem that can’t be modelled as an LP
18
Example of a problem that can’t be modelled as an LP
√
max 100x1 + 50x2 − 100 x1 − (x2 − (x2 /20)2 )
s.t. x1 + x2 ≤ 500
x1 , x2 ≥ 0
18
Geometry of linear programming
2
10
31 + 22 = 18
8
1 = 4
6 22 = 12
2
1
0 2 4 6 8 10
Feasible region: Set of points x ∈ Rn that satisfy all constraints
19
Geometry of linear programming
2
10
31 + 22 = 18
8
1 = 4
6 22 = 12
2
1
0 2 4 6 8 10
Feasible region: Set of points x ∈ Rn that satisfy all constraints
19
Geometry of linear programming
2
10
31 + 22 = 18
8
1 = 4
6 22 = 12
2
1
0 2 4 6 8 10
Feasible region: Set of points x ∈ Rn that satisfy all constraints
19
Geometry of linear programming
for some p ∈ Rn , b ∈ R.
20
Geometry of linear programming
for some p ∈ Rn , b ∈ R.
H1 := {x ∈ Rn : p T x ≤ b}
H2 := {x ∈ Rn : p T x ≥ b}
20
Geometry of linear programming
Feasible region of an LP
P = {x ∈ Rn : all constraints satisfied},
is a polyhedron
21
Is this a polytope?
22
Is this a polytope?
22