Académique Documents
Professionnel Documents
Culture Documents
Luis Goddyn
SFU Burnaby
What programming?. . .
LP—introduced in 1950’s
surprisingly not directly related to computer programming
‘programming’ was a military term for strategic planning
‘linear’—feasible plans are restricted by linear constraints (inequalities) and also
quality of the plan is measured by a linear function
solving problems in industry (minimizing cost, maximizing production), in theory
(network-flows)
programming in sense of LP—development of effective algorithms for solving
problems
So what is it?
modelling the problem—choosing variables, determining constraints, choosing
function to optimize
solving the linear program
interpreting the solution
First example
Maximize the value f (x, y ) = x + y subject to constraints
(1) x > 0
(2) y > 0 y
(3) y − x 6 1
(4) x + 6y 6 15
(5) 4x − y 6 10
(9/7, 16/7)
(3, 2)
(0, 1)
(0, 0) (5/2, 0) x
x1
f ac ul t y o f s c ie nc e MATH 895-4 Fall 2010
d ep a r t m e nt of m a t he ma t i cs Course Schedule 5 / 10
3D example
Maximize function f (x, y , z) = x − 2y − z subject to constraints
(1) 3x + 4y + 12 5
z 6 12
(2) 2y + 4z 6 8
(3) x, y , z > 0
x2
(2, 3)
line ` : ax1 + bx2 + c = 0
point T = (t1 , t2 )
point-line distance formula:
(0, 2)
|at1 + bt2 + c|
d(T , `) = √
a2 + b 2
(4, 0)
(0, 0) x1
(4, 0)
(0, 0) t1 x1