linear programming maximize x 1 + x 2 x 1 + 3x 2 3 3x 1 + x 2 5 x 1 0 x 2 0
Post on 21-Dec-2015
225 views
TRANSCRIPT
Linear programmingmaximize x1 + x2
x1 + 3x2 33x1 + x2 5x1 0x2 0
x1
x2
optimal solution x1=1/2, x2=3/2
Can you prove it is optimal ?maximize x1 + x2
x1 + 3x2 33x1 + x2 5x1 0x2 0
x1
x2
optimal solution x1=1/2, x2=3/2
Can you prove it is optimal ?maximize x1 + x2
x1 + 3x2 33x1 + x2 5
4x1 + 4x2 8
x1
x2
optimal solution x1=1/2, x2=3/2
Can you prove it is optimal ?maximize x1 + x2
x1 + 3x2 33x1 + x2 5
x1+x2 2
x1
x2
optimal solution x1=1/2, x2=3/2
Another linear program
maximize x1 + x2
x1 + 2x2 3 *34x1 + x2 5 *1x1 0x2 0
x1=1, x2=1, optimal !
7x1 + 7x2 14
Systematic search for the proof of optimality
maximize x1 + x2
x1 + 2x2 3 * y1
4x1 + x2 5 * y2
x1 0x2 0
Systematic search for the proof of optimality
maximize x1 + x2
x1 + 2x2 3 * y1
4x1 + x2 5 * y2
x1 0x2 0
y1 0y2 0
Systematic search for the proof of optimality
maximize x1 + x2
x1 + 2x2 3 * y1
4x1 + x2 5 * y2
x1 0x2 0
y1 0y2 0
min 3y1+5y2
y1 + 4y2 12y1+y2 1
Systematic search for the proof of optimality
max x1+x2
x1 + 2x2 3 4x1 + x2 5x1 0x2 0
y1 0y2 0
min 3y1+5y2
y1 + 4y2 12y1+y2 1
dual linear programs
Systematic search for the proof of optimality
max x1+x2
x1 + 2x2 3 4x1 + x2 5x1 0x2 0
y1 0y2 0
min 3y1+5y2
y1 + 4y2 12y1+y2 1
dual linear programs
Linear programming duality
max x1+x2
x1 + 2x2 3 4x1 + x2 5x1 0x2 0
y1 0y2 0
min 3y1+5y2
y1 + 4y2 12y1+y2 1
Linear programs
variables: x1,x2,...,xn linear function: a1x1 + a2x2 + ... + anxn
linear constraint: equality
a1x1 + a2x2 + ... + anxn = b inequality
a1x1 + a2x2 + ... + anxn b
Linear programs variables: x1,x2,...,xn linear function: a1x1 + a2x2 + ... + anxn
linear constraint: equality a1x1 + a2x2 + ... + anxn = b inequality a1x1 + a2x2 + ... + anxn b
max/min of a linear functionsubject to collection of linear constraints
Linear programs variables: x1,x2,...,xn linear function: a1x1 + a2x2 + ... + anxn
linear constraint: equality a1x1 + a2x2 + ... + anxn = b inequality a1x1 + a2x2 + ... + anxn b
max/min of a linear functionsubject to collection of linear constraints
Goal: find the optimal solution
(i.e., a feasible solution with themaximum value of the objective)
Linear programs
one of the most important modeling tools oil industry manufacturing marketing circuit design
very important in theory as well
Shortest path
s
t
5
61
3
2
4
u
v
wds = 0du ds + 5dv ds + 6dw du + 3dw dv + 1dt dw + 2dt dv + 4
max dt
Linear programming dualitymaximize minimize
constraint variable equality unrestricted non-negative
variable constraint unrestricted equality non-negative
Linear programming duality
maximize minimize
constraint variable equality unrestricted non-negative
variable constraint unrestricted equality non-negative
max x1+x2
x1+x2+x3+x4=1x1+2x3 1x2+2x4 2x1 0x4 0
Linear programming duality
maximize minimize
constraint variable equality unrestricted non-negative
variable constraint unrestricted equality non-negative
max x1+x2
x1+x2+x3+x4=1x1+2x3 1x2+2x4 2x1 0x4 0
y1
y2 0y3 0
DONE
Linear programming duality
maximize minimize
constraint variable equality unrestricted non-negative
variable constraint unrestricted equality non-negative
max x1+x2
x1+x2+x3+x4=1x1+2x3 1x2+2x4 2x1 0x4 0
y1
y2 0y3 0
min y1 + y2 + 2 y3
DONE
DONE
Linear programming duality
maximize minimize
constraint variable equality unrestricted non-negative
variable constraint unrestricted equality non-negative
max x1+x2
x1+x2+x3+x4=1x1+2x3 1x2+2x4 2x1 0x4 0
y1
y2 0y3 0
min y1 + y2 + 2 y3
DONE
DONE
y1 + y2 1y1 + y3 = 1y1 + 2y2 = 0y1 + 2y3 0 DONE
Linear programming duality
max x1+x2
x1+x2+x3+x4=1x1+2x3 1x2+2x4 2x1 0x4 0
y2 0y3 0
min y1 + y2 + 2 y3
y1 + y2 1y1 + y3 = 1y1 + 2y2 = 0y1 + 2y3 0
a1 x1 + ... + an xn b
a1 x1 + ... + an xn b + y, y 0
a1 x1 + ... + an xn – y b, y 0
“” “=” and non-negativity
a1 x1 + ... + an xn b
a1 x1 + ... + an xn b a1 x1 + ... + an xn b
“” “”
a1 x1 + ... + an xn b -a1 x1 - ... - an xn -b
Max-Flow
fu,v = 0vV
fu,v c(u,v)
fu,v + fv,u=0
max fs,vvV
yu
zu,v
w{u,v}
min c(u,v)zu,vu,v
us,t:
zu,v 0
Max-Flow
fu,v = 0vV
fu,v c(u,v)
fu,v + fv,u=0
max fs,vvV
yu
zu,v
w{u,v}
min c(u,v)zu,vu,v
+
+=0
us,tus,t:
zu,v 0
Max-Flow min c(u,v)zu,vu,v
us,tyu + zu,v + w{u,v} =0
zs,v + w{s,v} =1
zt,v + w{t,v} =0
zu,v 0
ys = -1
yt = 0
Max-Flow min c(u,v)zu,vu,v
yu + zu,v + w{u,v} =0
zu,v 0
ys = -1
yt = 0
yv + zv,u + w{u,v} =0
yu - yv = zv,u - zu,v