0% found this document useful (0 votes)
113 views190 pages

L2 Introduction

The ability to make high-level eye contact is a skill every man should work on, as it has been shown to create some incredible benefits for the gazer. Numerous studies have shown that people who make higher-levels of eye contact with others are perceived as being: More dominant and powerful. More warm and personable.

Uploaded by

Manu Mittal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
113 views190 pages

L2 Introduction

The ability to make high-level eye contact is a skill every man should work on, as it has been shown to create some incredible benefits for the gazer. Numerous studies have shown that people who make higher-levels of eye contact with others are perceived as being: More dominant and powerful. More warm and personable.

Uploaded by

Manu Mittal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 190

Linear Programming

Lecture 2: Introduction to Linear Programming

Lecture 2: Introduction to Linear Programming Linear Programming 1 / 46


1 Math 407: Introduction
2 What is linear programming?
3 Applications of Linear Programing
4 Example: Plastic Cup Factory
5 Introduction to LP Modeling
6 Graphical Solution of 2D LPs
7 Introduction to Sensitivity Analysis
8 The Theory of Linear Economic Models
Production Models
The Optimal Value Function and Marginal Values
Duality: The Hidden Hand of the Market Place
9 LP Duality
The Weak Duality Theorem of Linear Programming

Lecture 2: Introduction to Linear Programming Linear Programming 2 / 46


What is optimization?

Lecture 2: Introduction to Linear Programming Linear Programming 3 / 46


What is optimization?

A mathematical optimization problem is one in which some function is either


maximized or minimized relative to a given set of alternatives.

Lecture 2: Introduction to Linear Programming Linear Programming 3 / 46


What is optimization?

A mathematical optimization problem is one in which some function is either


maximized or minimized relative to a given set of alternatives.
The function to be minimized or maximized is called the objective function.

Lecture 2: Introduction to Linear Programming Linear Programming 3 / 46


What is optimization?

A mathematical optimization problem is one in which some function is either


maximized or minimized relative to a given set of alternatives.
The function to be minimized or maximized is called the objective function.
The set of alternatives is called the feasible region (or constraint region).

Lecture 2: Introduction to Linear Programming Linear Programming 3 / 46


What is optimization?

A mathematical optimization problem is one in which some function is either


maximized or minimized relative to a given set of alternatives.
The function to be minimized or maximized is called the objective function.
The set of alternatives is called the feasible region (or constraint region).
In this course, the feasible region is always taken to be a subset of Rn (real
n-dimensional space) and the objective function is a function from Rn to R.

Lecture 2: Introduction to Linear Programming Linear Programming 3 / 46


What is linear programming (LP)?

Lecture 2: Introduction to Linear Programming Linear Programming 4 / 46


What is linear programming (LP)?

A linear program is an optimization problem in finitely many variables


having a linear objective function and a constraint region determined
by a finite number of linear equality and/or inequality constraints.

Lecture 2: Introduction to Linear Programming Linear Programming 4 / 46


What is linear programming (LP)?

Lecture 2: Introduction to Linear Programming Linear Programming 5 / 46


What is linear programming (LP)?

A linear program is an optimization problem

Lecture 2: Introduction to Linear Programming Linear Programming 5 / 46


What is linear programming (LP)?

A linear program is an optimization problem


in finitely many variables

Lecture 2: Introduction to Linear Programming Linear Programming 5 / 46


What is linear programming (LP)?

A linear program is an optimization problem


in finitely many variables
having a linear objective function

Lecture 2: Introduction to Linear Programming Linear Programming 5 / 46


What is linear programming (LP)?

A linear program is an optimization problem


in finitely many variables
having a linear objective function
and a constraint region determined by a
finite number of constraints

Lecture 2: Introduction to Linear Programming Linear Programming 5 / 46


What is linear programming (LP)?

A linear program is an optimization problem


in finitely many variables
having a linear objective function
and a constraint region determined by a
finite number of constraints
that are linear equality and/or linear inequality constraints.

Lecture 2: Introduction to Linear Programming Linear Programming 5 / 46


A linear function of the variables x1 , x2 , . . . , xn is any function f of the form

f (x) = c1 x1 + c2 x2 + · · · + cn xn

for fixed ci ∈ R i = 1, . . . , n.

Lecture 2: Introduction to Linear Programming Linear Programming 6 / 46


A linear function of the variables x1 , x2 , . . . , xn is any function f of the form

f (x) = c1 x1 + c2 x2 + · · · + cn xn

for fixed ci ∈ R i = 1, . . . , n.
A linear equality constraint is any equation of the form

a1 x1 + a2 x2 + · · · + an xn = α,

where α, a1 , a2 , . . . , an ∈ R.

Lecture 2: Introduction to Linear Programming Linear Programming 6 / 46


A linear function of the variables x1 , x2 , . . . , xn is any function f of the form

f (x) = c1 x1 + c2 x2 + · · · + cn xn

for fixed ci ∈ R i = 1, . . . , n.
A linear equality constraint is any equation of the form

a1 x1 + a2 x2 + · · · + an xn = α,

where α, a1 , a2 , . . . , an ∈ R.
A linear inequality constraint is any inequality of the form

a1 x1 + a2 x2 + · · · + an xn ≤ α,

or
a1 x1 + a2 x2 + · · · + an xn ≥ α,
where α, a1 , a2 , . . . , an ∈ R.

Lecture 2: Introduction to Linear Programming Linear Programming 6 / 46


Compact Representation

maximize c 1 x1 + c 2 x2 + · · · + c n xn

subject to ai1 xi + ai2 x2 + · · · + ain xn ≤ αi i = 1, . . . , s

bi1 xi + bi2 x2 + · · · + bin xn = βi i = 1, . . . , r .

Lecture 2: Introduction to Linear Programming Linear Programming 7 / 46


Vector Inequalities: Componentwise

Let x, y ∈ Rn .    
x1 y1
 x2   y2 
   
x = ..  y = .. 
 .   . 
xn yn

We write x ≤ y if and only if

xi ≤ yi , i = 1, 2, . . . , n .

Lecture 2: Introduction to Linear Programming Linear Programming 8 / 46


Matrix Notation

c 1 x1 + c 2 x2 + · · · + c n xn = c T x

   
c1 x1
 c2   x2 
   
c= ..  x = .. 
 .   . 
cn xn

Lecture 2: Introduction to Linear Programming Linear Programming 9 / 46


Matrix Notation

ai1 xi + ai2 x2 + · · · + ain xn ≤ αi i = 1, . . . , s


⇐⇒
Ax ≤ a

   
a11 a12 ... a1n α1
 a21 a22 ... a2n   α2 
   
A= .. .. .. ..  a= .. 
 . . . .   . 
as1 as2 ... asn αs

Lecture 2: Introduction to Linear Programming Linear Programming 10 / 46


Matrix Notation

bi1 xi + bi2 x2 + · · · + bin xn = βi i = 1, . . . , r


⇐⇒
Bx = b

   
b11 b12 ... b1n β1
 b21 b22 ... b2n   β2 
   
B= .. .. .. ..  b= .. 
 . . . .   . 
br 1 br 2 ... brn βr

Lecture 2: Introduction to Linear Programming Linear Programming 11 / 46


LP’s Matrix Notation

maximize cT x
subject to Ax ≤ a and Bx = b

Lecture 2: Introduction to Linear Programming Linear Programming 12 / 46


LP’s Matrix Notation

maximize cT x
subject to Ax ≤ a and Bx = b

     
c1 α1 β1
 ..   ..   . 
c =  . , a =  .  , b =  ..  .
cn αs βr
   
a11 . . . a1n b11 . . . b1n
 ..   .. 
A= . , B = . 
as1 ... asn br 1 . . . brn

Lecture 2: Introduction to Linear Programming Linear Programming 12 / 46


Applications of Linear Programing

A very short list:

Lecture 2: Introduction to Linear Programming Linear Programming 13 / 46


Applications of Linear Programing

A very short list:


resource allocation

Lecture 2: Introduction to Linear Programming Linear Programming 13 / 46


Applications of Linear Programing

A very short list:


resource allocation
production scheduling

Lecture 2: Introduction to Linear Programming Linear Programming 13 / 46


Applications of Linear Programing

A very short list:


resource allocation
production scheduling
warehousing

Lecture 2: Introduction to Linear Programming Linear Programming 13 / 46


Applications of Linear Programing

A very short list:


resource allocation
production scheduling
warehousing
layout design

Lecture 2: Introduction to Linear Programming Linear Programming 13 / 46


Applications of Linear Programing

A very short list:


resource allocation
production scheduling
warehousing
layout design
transportation scheduling

Lecture 2: Introduction to Linear Programming Linear Programming 13 / 46


Applications of Linear Programing

A very short list:


resource allocation
production scheduling
warehousing
layout design
transportation scheduling
facility location

Lecture 2: Introduction to Linear Programming Linear Programming 13 / 46


Applications of Linear Programing

A very short list:


resource allocation
production scheduling
warehousing
layout design
transportation scheduling
facility location
supply chain management

Lecture 2: Introduction to Linear Programming Linear Programming 13 / 46


Applications of Linear Programing

A very short list:


resource allocation
production scheduling
warehousing
layout design
transportation scheduling
facility location
supply chain management
Model selection

Lecture 2: Introduction to Linear Programming Linear Programming 13 / 46


Applications of Linear Programing

A very short list:


resource allocation
production scheduling
warehousing
layout design
transportation scheduling
facility location
supply chain management
Model selection
Machine Learning

Lecture 2: Introduction to Linear Programming Linear Programming 13 / 46


Applications of Linear Programing

A very short list:


resource allocation Compressed sensing
production scheduling
warehousing
layout design
transportation scheduling
facility location
supply chain management
Model selection
Machine Learning

Lecture 2: Introduction to Linear Programming Linear Programming 13 / 46


Applications of Linear Programing

A very short list:


resource allocation Compressed sensing
production scheduling flight crew scheduling
warehousing
layout design
transportation scheduling
facility location
supply chain management
Model selection
Machine Learning

Lecture 2: Introduction to Linear Programming Linear Programming 13 / 46


Applications of Linear Programing

A very short list:


resource allocation Compressed sensing
production scheduling flight crew scheduling
warehousing portfolio optimization
layout design
transportation scheduling
facility location
supply chain management
Model selection
Machine Learning

Lecture 2: Introduction to Linear Programming Linear Programming 13 / 46


Applications of Linear Programing

A very short list:


resource allocation Compressed sensing
production scheduling flight crew scheduling
warehousing portfolio optimization
layout design cash flow matching
transportation scheduling
facility location
supply chain management
Model selection
Machine Learning

Lecture 2: Introduction to Linear Programming Linear Programming 13 / 46


Applications of Linear Programing

A very short list:


resource allocation Compressed sensing
production scheduling flight crew scheduling
warehousing portfolio optimization
layout design cash flow matching
transportation scheduling currency exchange arbitrage
facility location
supply chain management
Model selection
Machine Learning

Lecture 2: Introduction to Linear Programming Linear Programming 13 / 46


Applications of Linear Programing

A very short list:


resource allocation Compressed sensing
production scheduling flight crew scheduling
warehousing portfolio optimization
layout design cash flow matching
transportation scheduling currency exchange arbitrage
facility location crop scheduling
supply chain management
Model selection
Machine Learning

Lecture 2: Introduction to Linear Programming Linear Programming 13 / 46


Applications of Linear Programing

A very short list:


resource allocation Compressed sensing
production scheduling flight crew scheduling
warehousing portfolio optimization
layout design cash flow matching
transportation scheduling currency exchange arbitrage
facility location crop scheduling
supply chain management diet balancing
Model selection
Machine Learning

Lecture 2: Introduction to Linear Programming Linear Programming 13 / 46


Applications of Linear Programing

A very short list:


resource allocation Compressed sensing
production scheduling flight crew scheduling
warehousing portfolio optimization
layout design cash flow matching
transportation scheduling currency exchange arbitrage
facility location crop scheduling
supply chain management diet balancing
Model selection parameter estimation
Machine Learning

Lecture 2: Introduction to Linear Programming Linear Programming 13 / 46


Applications of Linear Programing

A very short list:


resource allocation Compressed sensing
production scheduling flight crew scheduling
warehousing portfolio optimization
layout design cash flow matching
transportation scheduling currency exchange arbitrage
facility location crop scheduling
supply chain management diet balancing
Model selection parameter estimation
Machine Learning ...

Lecture 2: Introduction to Linear Programming Linear Programming 13 / 46


Example: Plastic Cup Factory

A local family-owned plastic cup manufacturer wants to optimize their production


mix in order to maximize their profit. They produce personalized beer mugs and
champagne glasses. The profit on a case of beer mugs is $25 while the profit on a
case of champagne glasses is $20. The cups are manufactured with a machine
called a plastic extruder which feeds on plastic resins. Each case of beer mugs
requires 20 lbs. of plastic resins to produce while champagne glasses require 12
lbs. per case. The daily supply of plastic resins is limited to at most 1800 pounds.
About 15 cases of either product can be produced per hour. At the moment the
family wants to limit their work day to 8 hours.

Lecture 2: Introduction to Linear Programming Linear Programming 14 / 46


Example: Plastic Cup Factory

A local family-owned plastic cup manufacturer wants to optimize their production


mix in order to maximize their profit. They produce personalized beer mugs and
champagne glasses. The profit on a case of beer mugs is $25 while the profit on a
case of champagne glasses is $20. The cups are manufactured with a machine
called a plastic extruder which feeds on plastic resins. Each case of beer mugs
requires 20 lbs. of plastic resins to produce while champagne glasses require 12
lbs. per case. The daily supply of plastic resins is limited to at most 1800 pounds.
About 15 cases of either product can be produced per hour. At the moment the
family wants to limit their work day to 8 hours.

Model this problem as an LP.

Lecture 2: Introduction to Linear Programming Linear Programming 14 / 46


LP Modeling

The four basic steps of LP modeling.

Lecture 2: Introduction to Linear Programming Linear Programming 15 / 46


LP Modeling

The four basic steps of LP modeling.

1 Identify and label the decision variables.

Lecture 2: Introduction to Linear Programming Linear Programming 15 / 46


LP Modeling

The four basic steps of LP modeling.

1 Identify and label the decision variables.


2 Determine the objective and use the decision variables to write an expression
for the objective function as a linear function of the decision variables.

Lecture 2: Introduction to Linear Programming Linear Programming 15 / 46


LP Modeling

The four basic steps of LP modeling.

1 Identify and label the decision variables.


2 Determine the objective and use the decision variables to write an expression
for the objective function as a linear function of the decision variables.
3 Determine the explicit constraints and write a functional expression for each
of them as a linear equation/inequality in the decision variables.

Lecture 2: Introduction to Linear Programming Linear Programming 15 / 46


LP Modeling

The four basic steps of LP modeling.

1 Identify and label the decision variables.


2 Determine the objective and use the decision variables to write an expression
for the objective function as a linear function of the decision variables.
3 Determine the explicit constraints and write a functional expression for each
of them as a linear equation/inequality in the decision variables.
4 Determine the implicit constraints and write them as a linear
equation/inequality in the decision variables.

Lecture 2: Introduction to Linear Programming Linear Programming 15 / 46


Decision Variables

Determining the decision variables is the most difficult part of modeling.

Lecture 2: Introduction to Linear Programming Linear Programming 16 / 46


Decision Variables

Determining the decision variables is the most difficult part of modeling.

To determining these variables it is helpful to put yourself in the shoes of the


decision maker, then ask What must he or she know to do their job.

Lecture 2: Introduction to Linear Programming Linear Programming 16 / 46


Decision Variables

Determining the decision variables is the most difficult part of modeling.

To determining these variables it is helpful to put yourself in the shoes of the


decision maker, then ask What must he or she know to do their job.

In the real world, the modeler often follows the decision maker around for days,
weeks, even months at a time recording all of the actions and decisions this
person must make.

Lecture 2: Introduction to Linear Programming Linear Programming 16 / 46


Decision Variables

Determining the decision variables is the most difficult part of modeling.

To determining these variables it is helpful to put yourself in the shoes of the


decision maker, then ask What must he or she know to do their job.

In the real world, the modeler often follows the decision maker around for days,
weeks, even months at a time recording all of the actions and decisions this
person must make.

In this phase of modeling, it is very important to resist the temptation to make


assumptions about the nature of the solution.

Lecture 2: Introduction to Linear Programming Linear Programming 16 / 46


Decision Variables

Determining the decision variables is the most difficult part of modeling.

To determining these variables it is helpful to put yourself in the shoes of the


decision maker, then ask What must he or she know to do their job.

In the real world, the modeler often follows the decision maker around for days,
weeks, even months at a time recording all of the actions and decisions this
person must make.

In this phase of modeling, it is very important to resist the temptation to make


assumptions about the nature of the solution.
This last point cannot be over emphasized. Even the most experienced modelers
occasionally fall into this trap since such assumptions can enter in very subtle
ways.

Lecture 2: Introduction to Linear Programming Linear Programming 16 / 46


Decision Variables

A local family-owned plastic cup manufacturer wants to optimize their production mix in
order to maximize their profit. They produce personalized beer mugs and champagne
glasses. The profit on a case of beer mugs is $25 while the profit on a case of
champagne glasses is $20. The cups are manufactured with a machine called a plastic
extruder which feeds on plastic resins. Each case of beer mugs requires 20 lbs. of plastic
resins to produce while champagne glasses require 12 lbs. per case. The daily supply of
plastic resins is limited to at most 1800 pounds. About 15 cases of either product can be
produced per hour. At the moment the family wants to limit their work day to 8 hours.

Lecture 2: Introduction to Linear Programming Linear Programming 17 / 46


Decision Variables

A local family-owned plastic cup manufacturer wants to optimize their production mix in
order to maximize their profit. They produce personalized beer mugs and champagne
glasses. The profit on a case of beer mugs is $25 while the profit on a case of
champagne glasses is $20. The cups are manufactured with a machine called a plastic
extruder which feeds on plastic resins. Each case of beer mugs requires 20 lbs. of plastic
resins to produce while champagne glasses require 12 lbs. per case. The daily supply of
plastic resins is limited to at most 1800 pounds. About 15 cases of either product can be
produced per hour. At the moment the family wants to limit their work day to 8 hours.

B = number of cases of beer mugs produced daily

Lecture 2: Introduction to Linear Programming Linear Programming 17 / 46


Decision Variables

A local family-owned plastic cup manufacturer wants to optimize their production mix in
order to maximize their profit. They produce personalized beer mugs and champagne
glasses. The profit on a case of beer mugs is $25 while the profit on a case of
champagne glasses is $20. The cups are manufactured with a machine called a plastic
extruder which feeds on plastic resins. Each case of beer mugs requires 20 lbs. of plastic
resins to produce while champagne glasses require 12 lbs. per case. The daily supply of
plastic resins is limited to at most 1800 pounds. About 15 cases of either product can be
produced per hour. At the moment the family wants to limit their work day to 8 hours.

B = number of cases of beer mugs produced daily


C = number of cases of champagne glasses produced daily

Lecture 2: Introduction to Linear Programming Linear Programming 17 / 46


Objective Function

A local family-owned plastic cup manufacturer wants to optimize their production mix in
order to maximize their profit. They produce personalized beer mugs and champagne
glasses. The profit on a case of beer mugs is $25 while the profit on a case of
champagne glasses is $20. The cups are manufactured with a machine called a plastic
extruder which feeds on plastic resins. Each case of beer mugs requires 20 lbs. of plastic
resins to produce while champagne glasses require 12 lbs. per case. The daily supply of
plastic resins is limited to at most 1800 pounds. About 15 cases of either product can be
produced per hour. At the moment the family wants to limit their work day to 8 hours.

Lecture 2: Introduction to Linear Programming Linear Programming 18 / 46


Objective Function

A local family-owned plastic cup manufacturer wants to optimize their production mix in
order to maximize their profit. They produce personalized beer mugs and champagne
glasses. The profit on a case of beer mugs is $25 while the profit on a case of
champagne glasses is $20. The cups are manufactured with a machine called a plastic
extruder which feeds on plastic resins. Each case of beer mugs requires 20 lbs. of plastic
resins to produce while champagne glasses require 12 lbs. per case. The daily supply of
plastic resins is limited to at most 1800 pounds. About 15 cases of either product can be
produced per hour. At the moment the family wants to limit their work day to 8 hours.

Maximize Profit:

Lecture 2: Introduction to Linear Programming Linear Programming 18 / 46


Objective Function

A local family-owned plastic cup manufacturer wants to optimize their production mix in
order to maximize their profit. They produce personalized beer mugs and champagne
glasses. The profit on a case of beer mugs is $25 while the profit on a case of
champagne glasses is $20. The cups are manufactured with a machine called a plastic
extruder which feeds on plastic resins. Each case of beer mugs requires 20 lbs. of plastic
resins to produce while champagne glasses require 12 lbs. per case. The daily supply of
plastic resins is limited to at most 1800 pounds. About 15 cases of either product can be
produced per hour. At the moment the family wants to limit their work day to 8 hours.

Maximize Profit: Profit = Revenue − Costs

Lecture 2: Introduction to Linear Programming Linear Programming 18 / 46


Objective Function

A local family-owned plastic cup manufacturer wants to optimize their production mix in
order to maximize their profit. They produce personalized beer mugs and champagne
glasses. The profit on a case of beer mugs is $25 while the profit on a case of
champagne glasses is $20. The cups are manufactured with a machine called a plastic
extruder which feeds on plastic resins. Each case of beer mugs requires 20 lbs. of plastic
resins to produce while champagne glasses require 12 lbs. per case. The daily supply of
plastic resins is limited to at most 1800 pounds. About 15 cases of either product can be
produced per hour. At the moment the family wants to limit their work day to 8 hours.

Maximize Profit: Profit = Revenue − Costs

Profit = 25B + 20C

Lecture 2: Introduction to Linear Programming Linear Programming 18 / 46


Explicit Constraints

A local family-owned plastic cup manufacturer wants to optimize their production mix in
order to maximize their profit. They produce personalized beer mugs and champagne
glasses. The profit on a case of beer mugs is $25 while the profit on a case of
champagne glasses is $20. The cups are manufactured with a machine called a plastic
extruder which feeds on plastic resins. Each case of beer mugs requires 20 lbs. of plastic
resins to produce while champagne glasses require 12 lbs. per case. The daily supply of
plastic resins is limited to at most 1800 pounds. About 15 cases of either product can be
produced per hour. At the moment the family wants to limit their work day to 8 hours.

Lecture 2: Introduction to Linear Programming Linear Programming 19 / 46


Explicit Constraints

A local family-owned plastic cup manufacturer wants to optimize their production mix in
order to maximize their profit. They produce personalized beer mugs and champagne
glasses. The profit on a case of beer mugs is $25 while the profit on a case of
champagne glasses is $20. The cups are manufactured with a machine called a plastic
extruder which feeds on plastic resins. Each case of beer mugs requires 20 lbs. of plastic
resins to produce while champagne glasses require 12 lbs. per case. The daily supply of
plastic resins is limited to at most 1800 pounds. About 15 cases of either product can be
produced per hour. At the moment the family wants to limit their work day to 8 hours.

Resin:

Lecture 2: Introduction to Linear Programming Linear Programming 19 / 46


Explicit Constraints

A local family-owned plastic cup manufacturer wants to optimize their production mix in
order to maximize their profit. They produce personalized beer mugs and champagne
glasses. The profit on a case of beer mugs is $25 while the profit on a case of
champagne glasses is $20. The cups are manufactured with a machine called a plastic
extruder which feeds on plastic resins. Each case of beer mugs requires 20 lbs. of plastic
resins to produce while champagne glasses require 12 lbs. per case. The daily supply of
plastic resins is limited to at most 1800 pounds. About 15 cases of either product can be
produced per hour. At the moment the family wants to limit their work day to 8 hours.

Resin: 20B + 12C ≤ 1800

Lecture 2: Introduction to Linear Programming Linear Programming 19 / 46


Explicit Constraints

A local family-owned plastic cup manufacturer wants to optimize their production mix in
order to maximize their profit. They produce personalized beer mugs and champagne
glasses. The profit on a case of beer mugs is $25 while the profit on a case of
champagne glasses is $20. The cups are manufactured with a machine called a plastic
extruder which feeds on plastic resins. Each case of beer mugs requires 20 lbs. of plastic
resins to produce while champagne glasses require 12 lbs. per case. The daily supply of
plastic resins is limited to at most 1800 pounds. About 15 cases of either product can be
produced per hour. At the moment the family wants to limit their work day to 8 hours.

Resin: 20B + 12C ≤ 1800

Labor:

Lecture 2: Introduction to Linear Programming Linear Programming 19 / 46


Explicit Constraints

A local family-owned plastic cup manufacturer wants to optimize their production mix in
order to maximize their profit. They produce personalized beer mugs and champagne
glasses. The profit on a case of beer mugs is $25 while the profit on a case of
champagne glasses is $20. The cups are manufactured with a machine called a plastic
extruder which feeds on plastic resins. Each case of beer mugs requires 20 lbs. of plastic
resins to produce while champagne glasses require 12 lbs. per case. The daily supply of
plastic resins is limited to at most 1800 pounds. About 15 cases of either product can be
produced per hour. At the moment the family wants to limit their work day to 8 hours.

Resin: 20B + 12C ≤ 1800

Labor: B/15 + C /15 ≤ 8

Lecture 2: Introduction to Linear Programming Linear Programming 19 / 46


Implicit Constraints

A local family-owned plastic cup manufacturer wants to optimize their production mix in
order to maximize their profit. They produce personalized beer mugs and champagne
glasses. The profit on a case of beer mugs is $25 while the profit on a case of
champagne glasses is $20. The cups are manufactured with a machine called a plastic
extruder which feeds on plastic resins. Each case of beer mugs requires 20 lbs. of plastic
resins to produce while champagne glasses require 12 lbs. per case. The daily supply of
plastic resins is limited to at most 1800 pounds. About 15 cases of either product can be
produced per hour. At the moment the family wants to limit their work day to 8 hours.

Lecture 2: Introduction to Linear Programming Linear Programming 20 / 46


Implicit Constraints

A local family-owned plastic cup manufacturer wants to optimize their production mix in
order to maximize their profit. They produce personalized beer mugs and champagne
glasses. The profit on a case of beer mugs is $25 while the profit on a case of
champagne glasses is $20. The cups are manufactured with a machine called a plastic
extruder which feeds on plastic resins. Each case of beer mugs requires 20 lbs. of plastic
resins to produce while champagne glasses require 12 lbs. per case. The daily supply of
plastic resins is limited to at most 1800 pounds. About 15 cases of either product can be
produced per hour. At the moment the family wants to limit their work day to 8 hours.

Lecture 2: Introduction to Linear Programming Linear Programming 20 / 46


Implicit Constraints

A local family-owned plastic cup manufacturer wants to optimize their production mix in
order to maximize their profit. They produce personalized beer mugs and champagne
glasses. The profit on a case of beer mugs is $25 while the profit on a case of
champagne glasses is $20. The cups are manufactured with a machine called a plastic
extruder which feeds on plastic resins. Each case of beer mugs requires 20 lbs. of plastic
resins to produce while champagne glasses require 12 lbs. per case. The daily supply of
plastic resins is limited to at most 1800 pounds. About 15 cases of either product can be
produced per hour. At the moment the family wants to limit their work day to 8 hours.

Implicit Constraints:
The decision variables are non-negative:

Lecture 2: Introduction to Linear Programming Linear Programming 20 / 46


Implicit Constraints

A local family-owned plastic cup manufacturer wants to optimize their production mix in
order to maximize their profit. They produce personalized beer mugs and champagne
glasses. The profit on a case of beer mugs is $25 while the profit on a case of
champagne glasses is $20. The cups are manufactured with a machine called a plastic
extruder which feeds on plastic resins. Each case of beer mugs requires 20 lbs. of plastic
resins to produce while champagne glasses require 12 lbs. per case. The daily supply of
plastic resins is limited to at most 1800 pounds. About 15 cases of either product can be
produced per hour. At the moment the family wants to limit their work day to 8 hours.

Implicit Constraints:
The decision variables are non-negative: 0 ≤ B, 0 ≤ C

Lecture 2: Introduction to Linear Programming Linear Programming 20 / 46


The Plastic Cup Factory LP Model

maximize 25B + 20C

subject to 20B + 12C ≤ 1800

1 1
15 B + 15 C ≤8

0 ≤ B, C

Lecture 2: Introduction to Linear Programming Linear Programming 21 / 46


The Hardest Part of Modeling: Decision Variables

Once again, the first step in the modeling process, identification of the decision
variables, is always the most difficult.

Lecture 2: Introduction to Linear Programming Linear Programming 22 / 46


The Hardest Part of Modeling: Decision Variables

Once again, the first step in the modeling process, identification of the decision
variables, is always the most difficult.

Never be afraid to add more decision variables either to clarify the model or
to improve its flexibility. Modern LP software easily solves problems with
thousands of variables on a laptop, tens of thousands of variables on a server, or
even tens of millions of variables on specialized hardware and networks. It is more
important to get a correct, easily interpretable, and flexible model then to provide
a compact minimalist model.

Lecture 2: Introduction to Linear Programming Linear Programming 22 / 46


The Hardest Part of Modeling: Decision Variables

Once again, the first step in the modeling process, identification of the decision
variables, is always the most difficult.

Never be afraid to add more decision variables either to clarify the model or
to improve its flexibility. Modern LP software easily solves problems with
thousands of variables on a laptop, tens of thousands of variables on a server, or
even tens of millions of variables on specialized hardware and networks. It is more
important to get a correct, easily interpretable, and flexible model then to provide
a compact minimalist model.

LP model solutions found in many texts fall into the trap of trying to provide the
most compact minimalist model with the fewest possible variables and constraints.

Lecture 2: Introduction to Linear Programming Linear Programming 22 / 46


The Hardest Part of Modeling: Decision Variables

Once again, the first step in the modeling process, identification of the decision
variables, is always the most difficult.

Never be afraid to add more decision variables either to clarify the model or
to improve its flexibility. Modern LP software easily solves problems with
thousands of variables on a laptop, tens of thousands of variables on a server, or
even tens of millions of variables on specialized hardware and networks. It is more
important to get a correct, easily interpretable, and flexible model then to provide
a compact minimalist model.

LP model solutions found in many texts fall into the trap of trying to provide the
most compact minimalist model with the fewest possible variables and constraints.
Do not repeat this error in developing your own models.

Lecture 2: Introduction to Linear Programming Linear Programming 22 / 46


Graphical Solution of 2D LPs

We now graphically solve the LP model for the Plastic Cup Factory problem.

maximize 25B + 20C

subject to 20B + 12C ≤ 1800

1 1
15 B + 15 C ≤8

0 ≤ B, C

Lecture 2: Introduction to Linear Programming Linear Programming 23 / 46


Graphical Solution of 2D LPs
C

15 20B + 12C = 1800

14
13
12

25
objective normal n = 20
11
10  
B 45
solution C = 75
9
8
optimal value = $2625
7
6 feasible region
5
4
3
1 1
15 B + 15 C =8
2
1
B
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

Lecture 2: Introduction to Linear Programming Linear Programming 24 / 46


Recap: Graphical Solution of 2D LPs

Lecture 2: Introduction to Linear Programming Linear Programming 25 / 46


Recap: Graphical Solution of 2D LPs

Step 1: Graph each of the linear constraints indicating on which side of the
constraint the feasible region must lie with an arrow. Don’t forget the implicit
constraints!

Lecture 2: Introduction to Linear Programming Linear Programming 25 / 46


Recap: Graphical Solution of 2D LPs

Step 1: Graph each of the linear constraints indicating on which side of the
constraint the feasible region must lie with an arrow. Don’t forget the implicit
constraints!

Step 2: Shade in the feasible region.

Lecture 2: Introduction to Linear Programming Linear Programming 25 / 46


Recap: Graphical Solution of 2D LPs

Step 1: Graph each of the linear constraints indicating on which side of the
constraint the feasible region must lie with an arrow. Don’t forget the implicit
constraints!

Step 2: Shade in the feasible region.

Step 3: Draw the gradient vector of the objective function.

Lecture 2: Introduction to Linear Programming Linear Programming 25 / 46


Recap: Graphical Solution of 2D LPs

Step 1: Graph each of the linear constraints indicating on which side of the
constraint the feasible region must lie with an arrow. Don’t forget the implicit
constraints!

Step 2: Shade in the feasible region.

Step 3: Draw the gradient vector of the objective function.

Step 4: Place a straight-edge perpendicular to the gradient vector.

Lecture 2: Introduction to Linear Programming Linear Programming 25 / 46


Recap: Graphical Solution of 2D LPs

Step 1: Graph each of the linear constraints indicating on which side of the
constraint the feasible region must lie with an arrow. Don’t forget the implicit
constraints!

Step 2: Shade in the feasible region.

Step 3: Draw the gradient vector of the objective function.

Step 4: Place a straight-edge perpendicular to the gradient vector.


Move the straight-edge in the direction of the gradient vector for maximization (or
in the opposite direction for minimization).

Lecture 2: Introduction to Linear Programming Linear Programming 25 / 46


Recap: Graphical Solution of 2D LPs

Step 1: Graph each of the linear constraints indicating on which side of the
constraint the feasible region must lie with an arrow. Don’t forget the implicit
constraints!

Step 2: Shade in the feasible region.

Step 3: Draw the gradient vector of the objective function.

Step 4: Place a straight-edge perpendicular to the gradient vector.


Move the straight-edge in the direction of the gradient vector for maximization (or
in the opposite direction for minimization).
Move to the last point for which the straight-edge intersects the feasible region.

Lecture 2: Introduction to Linear Programming Linear Programming 25 / 46


Recap: Graphical Solution of 2D LPs

Step 1: Graph each of the linear constraints indicating on which side of the
constraint the feasible region must lie with an arrow. Don’t forget the implicit
constraints!

Step 2: Shade in the feasible region.

Step 3: Draw the gradient vector of the objective function.

Step 4: Place a straight-edge perpendicular to the gradient vector.


Move the straight-edge in the direction of the gradient vector for maximization (or
in the opposite direction for minimization).
Move to the last point for which the straight-edge intersects the feasible region.

Step 5: The set of points of intersection between the straight-edge and the
feasible region is the set of solutions to the LP. Compute these points precisely
along with the associated optimal value.

Lecture 2: Introduction to Linear Programming Linear Programming 25 / 46


Sensitivity Analysis

Problems with the input data for real world LPs.

Lecture 2: Introduction to Linear Programming Linear Programming 26 / 46


Sensitivity Analysis

Problems with the input data for real world LPs.


measurement error

Lecture 2: Introduction to Linear Programming Linear Programming 26 / 46


Sensitivity Analysis

Problems with the input data for real world LPs.


measurement error
changes over time

Lecture 2: Introduction to Linear Programming Linear Programming 26 / 46


Sensitivity Analysis

Problems with the input data for real world LPs.


measurement error
changes over time
only an educated guess

Lecture 2: Introduction to Linear Programming Linear Programming 26 / 46


Sensitivity Analysis

Problems with the input data for real world LPs.


measurement error
changes over time
only an educated guess
model error

Lecture 2: Introduction to Linear Programming Linear Programming 26 / 46


Sensitivity Analysis

Problems with the input data for real world LPs.


measurement error
changes over time
only an educated guess
model error
prospective studies

Lecture 2: Introduction to Linear Programming Linear Programming 26 / 46


Sensitivity Analysis

Problems with the input data for real world LPs.


measurement error
changes over time
only an educated guess
model error
prospective studies
scenario analysis

Lecture 2: Introduction to Linear Programming Linear Programming 26 / 46


Sensitivity Analysis

Problems with the input data for real world LPs.


measurement error
changes over time
only an educated guess
model error
prospective studies
scenario analysis
LP approximates and nonlinear model/problem

Lecture 2: Introduction to Linear Programming Linear Programming 26 / 46


Sensitivity Analysis

Problems with the input data for real world LPs.


measurement error
changes over time
only an educated guess
model error
prospective studies
scenario analysis
LP approximates and nonlinear model/problem
We need to be able to study how the optimal value and solution change as the
problem input data change.

Lecture 2: Introduction to Linear Programming Linear Programming 26 / 46


The Optimal Value Function

v (1 , 2 ) = maximize 25B + 20C

subject to 20B + 12C ≤ 1800 + 1

1 1
15 B + 15 C ≤ 8 + 2

0 ≤ B, C

Lecture 2: Introduction to Linear Programming Linear Programming 27 / 46


Vertex Solutions

15 20B + 12C = 1800

14
13
12

25
objective normal n = 20
11
10  
B 45
solution C = 75
9
8
optimal value = $2625
7
6 feasible region
5
4
3
1 1
15 B + 15 C =8
2
1
B
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

Lecture 2: Introduction to Linear Programming 1 Linear Programming 28 / 46


Vertex Solutions

15 20B + 12C = 1800

14
13
12

25
objective normal n = 20
11
10  
B 45
solution C = 75
9
8
optimal value = $2625
7
6 feasible region
5
4
3
1 1
15 B + 15 C =8
2
1
B
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

The optimal solution lies at a “corner point” or “vertex” of the feasible region.

Lecture 2: Introduction to Linear Programming 1 Linear Programming 28 / 46


Vertex Solutions

Conjecture: For a small range of perturbations to the resources, the vertex


associated with the current optimal solution moves but remains optimal.

v (1 , 2 ) = maximize 25B + 20C


subject to 20B + 12C ≤ 1800 + 1
1 1
15 B + 15 C ≤ 8 + 2
0 ≤ B, C

Lecture 2: Introduction to Linear Programming Linear Programming 29 / 46


Vertex Solutions

The conjecture implies that the solution to the perturbed LP lies at the
1 1
intersection of the two lines 20B + 12C = 1800 + 1 and 15 B + 15 C = 8 + 2 for
small values of 1 and 2 ; namely

Lecture 2: Introduction to Linear Programming Linear Programming 30 / 46


Vertex Solutions

The conjecture implies that the solution to the perturbed LP lies at the
1 1
intersection of the two lines 20B + 12C = 1800 + 1 and 15 B + 15 C = 8 + 2 for
small values of 1 and 2 ; namely
45 1
B = 45 − 2 + 1
2 8
75 1
C = 75 + 2 − 1
2 8

Lecture 2: Introduction to Linear Programming Linear Programming 30 / 46


Vertex Solutions

The conjecture implies that the solution to the perturbed LP lies at the
1 1
intersection of the two lines 20B + 12C = 1800 + 1 and 15 B + 15 C = 8 + 2 for
small values of 1 and 2 ; namely
45 1
B = 45 − 2 + 1
2 8
75 1
C = 75 + 2 − 1
2 8
v (1 , 2 ) = 25B + 20C

Lecture 2: Introduction to Linear Programming Linear Programming 30 / 46


Vertex Solutions

The conjecture implies that the solution to the perturbed LP lies at the
1 1
intersection of the two lines 20B + 12C = 1800 + 1 and 15 B + 15 C = 8 + 2 for
small values of 1 and 2 ; namely
45 1
B = 45 − 2 + 1
2 8
75 1
C = 75 + 2 − 1
2 8
375 5
v (1 , 2 ) = 25B + 20C = 2625 + 2 + 1 .
2 8

Lecture 2: Introduction to Linear Programming Linear Programming 30 / 46


Vertex Solutions

The conjecture implies that the solution to the perturbed LP lies at the
1 1
intersection of the two lines 20B + 12C = 1800 + 1 and 15 B + 15 C = 8 + 2 for
small values of 1 and 2 ; namely
45 1
B = 45 − 2 + 1
2 8
75 1
C = 75 + 2 − 1
2 8
375 5
v (1 , 2 ) = 25B + 20C = 2625 + 2 + 1 .
2 8
It can be verified by direct computation that this indeed yields the optimal
solution for small values of 1 and 2 .

Lecture 2: Introduction to Linear Programming Linear Programming 30 / 46


Differentiability of the Optimal Value Function!

The optimal value function is differentiable for small values of 1 and 2 .

Lecture 2: Introduction to Linear Programming Linear Programming 31 / 46


Differentiability of the Optimal Value Function!

The optimal value function is differentiable for small values of 1 and 2 .

375 5
v (1 , 2 ) = 2625 + 2 + 1
2 8

Lecture 2: Introduction to Linear Programming Linear Programming 31 / 46


Differentiability of the Optimal Value Function!

The optimal value function is differentiable for small values of 1 and 2 .

375 5
v (1 , 2 ) = 2625 + 2 + 1
2 8

 5

8
∇v (1 , 2 ) =  
375
2

Lecture 2: Introduction to Linear Programming Linear Programming 31 / 46


Differentiability of the Optimal Value Function!

The optimal value function is differentiable for small values of 1 and 2 .

375 5
v (1 , 2 ) = 2625 + 2 + 1
2 8

 5

8
∇v (1 , 2 ) =  
375
2

The components of the gradient are called the marginal values for the resources.

Lecture 2: Introduction to Linear Programming Linear Programming 31 / 46


The Theory of Linear Economic Models

Linear theory of production


John von Neumann, 1903-1957

Lecture 2: Introduction to Linear Programming Linear Programming 32 / 46


The Theory of Linear Economic Models

Linear theory of production


John von Neumann, 1903-1957
Physics, Math, CS, Econ, Stats

Lecture 2: Introduction to Linear Programming Linear Programming 32 / 46


The Theory of Linear Economic Models

Linear theory of production


John von Neumann, 1903-1957
Physics, Math, CS, Econ, Stats
Oskar Morgenstern, 1902-1977

Lecture 2: Introduction to Linear Programming Linear Programming 32 / 46


The Theory of Linear Economic Models

Linear theory of production


John von Neumann, 1903-1957
Physics, Math, CS, Econ, Stats
Oskar Morgenstern, 1902-1977
Econ (Game Theory)

Lecture 2: Introduction to Linear Programming Linear Programming 32 / 46


The Theory of Linear Economic Models

Linear theory of production


John von Neumann, 1903-1957
Physics, Math, CS, Econ, Stats
Oskar Morgenstern, 1902-1977
Econ (Game Theory)
George Danzig, 1914-2005

Lecture 2: Introduction to Linear Programming Linear Programming 32 / 46


The Theory of Linear Economic Models

Linear theory of production


John von Neumann, 1903-1957
Physics, Math, CS, Econ, Stats
Oskar Morgenstern, 1902-1977
Econ (Game Theory)
George Danzig, 1914-2005
Stats, Math, CS, Econ

Lecture 2: Introduction to Linear Programming Linear Programming 32 / 46


The Theory of Linear Economic Models

Linear theory of production


John von Neumann, 1903-1957
Physics, Math, CS, Econ, Stats
Oskar Morgenstern, 1902-1977
Econ (Game Theory)
George Danzig, 1914-2005
Stats, Math, CS, Econ
Leonid Kantorovich, 1912-1986, Nobel Prize 1975

Lecture 2: Introduction to Linear Programming Linear Programming 32 / 46


The Theory of Linear Economic Models

Linear theory of production


John von Neumann, 1903-1957
Physics, Math, CS, Econ, Stats
Oskar Morgenstern, 1902-1977
Econ (Game Theory)
George Danzig, 1914-2005
Stats, Math, CS, Econ
Leonid Kantorovich, 1912-1986, Nobel Prize 1975
Math, Physics, Econ

Lecture 2: Introduction to Linear Programming Linear Programming 32 / 46


The Theory of Linear Economic Models

Linear theory of production


John von Neumann, 1903-1957
Physics, Math, CS, Econ, Stats
Oskar Morgenstern, 1902-1977
Econ (Game Theory)
George Danzig, 1914-2005
Stats, Math, CS, Econ
Leonid Kantorovich, 1912-1986, Nobel Prize 1975
Math, Physics, Econ
Tjalling Koopmans, 1910-1985, Nobel Prize 1975

Lecture 2: Introduction to Linear Programming Linear Programming 32 / 46


The Theory of Linear Economic Models

Linear theory of production


John von Neumann, 1903-1957
Physics, Math, CS, Econ, Stats
Oskar Morgenstern, 1902-1977
Econ (Game Theory)
George Danzig, 1914-2005
Stats, Math, CS, Econ
Leonid Kantorovich, 1912-1986, Nobel Prize 1975
Math, Physics, Econ
Tjalling Koopmans, 1910-1985, Nobel Prize 1975
Econ, Physics, Math, Stats

Lecture 2: Introduction to Linear Programming Linear Programming 32 / 46


The Production Model

raw
The production products
materials
in process out

Lecture 2: Introduction to Linear Programming Linear Programming 33 / 46


The Production Model

raw
The production products
materials
in process out

The products are the raw materials reconfigured to look different.

Lecture 2: Introduction to Linear Programming Linear Programming 33 / 46


The Production Model

raw
The production products
materials
in process out

The products are the raw materials reconfigured to look different.


Profit is the difference between the purchase price of the raw materials and the
sale price of their reconfigured form as products.

Lecture 2: Introduction to Linear Programming Linear Programming 33 / 46


The Production Model

raw
The production products
materials
in process out

The products are the raw materials reconfigured to look different.


Profit is the difference between the purchase price of the raw materials and the
sale price of their reconfigured form as products.
Making a profit means that you sell the raw materials for more than you paid for
them.

Lecture 2: Introduction to Linear Programming Linear Programming 33 / 46


The Production Model

raw
The production products
materials
in process out

The products are the raw materials reconfigured to look different.


Profit is the difference between the purchase price of the raw materials and the
sale price of their reconfigured form as products.
Making a profit means that you sell the raw materials for more than you paid for
them.
On a per unit basis, by how much does the production process increase the value
of the raw materials?

Lecture 2: Introduction to Linear Programming Linear Programming 33 / 46


The Optimal Value Function and Marginal Values

On a per unit basis, by how much does the production process increase the value
of the raw materials?

Lecture 2: Introduction to Linear Programming Linear Programming 34 / 46


The Optimal Value Function and Marginal Values

On a per unit basis, by how much does the production process increase the value
of the raw materials?

v (1 , 2 ) = maximize 25B + 20C


subject to 20B + 12C ≤ 1800 + 1
1 1
15 B + 15 C ≤ 8 + 2
0 ≤ B, C

Lecture 2: Introduction to Linear Programming Linear Programming 34 / 46


The Optimal Value Function and Marginal Values

On a per unit basis, by how much does the production process increase the value
of the raw materials?

v (1 , 2 ) = maximize 25B + 20C


subject to 20B + 12C ≤ 1800 + 1
1 1
15 B + 15 C ≤ 8 + 2
0 ≤ B, C

Solution: The marginal values!


 
5/8
∇v (1 , 2 ) =
375/2

Lecture 2: Introduction to Linear Programming Linear Programming 34 / 46


Hidden Hand of the Market Place: Duality

In the market place there is competition for raw materials, or the inputs to
production. This collective competition is the hidden hand that sets the price for
goods in the market place.

Lecture 2: Introduction to Linear Programming Linear Programming 35 / 46


Hidden Hand of the Market Place: Duality

In the market place there is competition for raw materials, or the inputs to
production. This collective competition is the hidden hand that sets the price for
goods in the market place.

Is there a mathematical model for how these prices are set?

Lecture 2: Introduction to Linear Programming Linear Programming 35 / 46


Hidden Hand of the Market Place: Duality

In the market place there is competition for raw materials, or the inputs to
production. This collective competition is the hidden hand that sets the price for
goods in the market place.

Is there a mathematical model for how these prices are set?

Let us think of the market as a separate agent in the market place. It is the agent
that owns and sells the raw materials of production.

Lecture 2: Introduction to Linear Programming Linear Programming 35 / 46


Hidden Hand of the Market Place: Duality

In the market place there is competition for raw materials, or the inputs to
production. This collective competition is the hidden hand that sets the price for
goods in the market place.

Is there a mathematical model for how these prices are set?

Let us think of the market as a separate agent in the market place. It is the agent
that owns and sells the raw materials of production.

The goal of the market is to make the most money possible from its resources by
setting the highest prices possible for them.

Lecture 2: Introduction to Linear Programming Linear Programming 35 / 46


Hidden Hand of the Market Place: Duality

In the market place there is competition for raw materials, or the inputs to
production. This collective competition is the hidden hand that sets the price for
goods in the market place.

Is there a mathematical model for how these prices are set?

Let us think of the market as a separate agent in the market place. It is the agent
that owns and sells the raw materials of production.

The goal of the market is to make the most money possible from its resources by
setting the highest prices possible for them.

The market does not want to put the producers out of business, it just wants to
take all of their profit.

Lecture 2: Introduction to Linear Programming Linear Programming 35 / 46


Hidden Hand of the Market Place: Duality

In the market place there is competition for raw materials, or the inputs to
production. This collective competition is the hidden hand that sets the price for
goods in the market place.

Is there a mathematical model for how these prices are set?

Let us think of the market as a separate agent in the market place. It is the agent
that owns and sells the raw materials of production.

The goal of the market is to make the most money possible from its resources by
setting the highest prices possible for them.

The market does not want to put the producers out of business, it just wants to
take all of their profit.

How can we model this mathematically?

Lecture 2: Introduction to Linear Programming Linear Programming 35 / 46


Hidden Hand of the Market Place: Duality

We answer this question in the context of the Plastic Cup Factory.

Lecture 2: Introduction to Linear Programming Linear Programming 36 / 46


Hidden Hand of the Market Place: Duality

We answer this question in the context of the Plastic Cup Factory.

A local family-owned plastic cup manufacturer wants to optimize their production mix in
order to maximize their profit. They produce personalized beer mugs and champagne
glasses. The profit on a case of beer mugs is $25 while the profit on a case of
champagne glasses is $20. The cups are manufactured with a machine called a plastic
extruder which feeds on plastic resins. Each case of beer mugs requires 20 lbs. of plastic
resins to produce while champagne glasses require 12 lbs. per case. The daily supply of
plastic resins is limited to at most 1800 pounds. About 15 cases of either product can be
produced per hour. At the moment the family wants to limit their work day to 8 hours.

Lecture 2: Introduction to Linear Programming Linear Programming 36 / 46


Hidden Hand of the Market Place: Duality

By how much should the market increase the sale price of plastic resin and hourly
labor in order to wipe out the profit for the Plastic Cup Factory?

Lecture 2: Introduction to Linear Programming Linear Programming 37 / 46


Hidden Hand of the Market Place: Duality

By how much should the market increase the sale price of plastic resin and hourly
labor in order to wipe out the profit for the Plastic Cup Factory?

Define

0 ≤ y1 = price increase for a pound of resin


0 ≤ y2 = price increase for an hour of labor

Lecture 2: Introduction to Linear Programming Linear Programming 37 / 46


Hidden Hand of the Market Place: Duality

By how much should the market increase the sale price of plastic resin and hourly
labor in order to wipe out the profit for the Plastic Cup Factory?

Define

0 ≤ y1 = price increase for a pound of resin


0 ≤ y2 = price increase for an hour of labor

These price increases should wipe out the per unit profitability for cases of both
beer mugs and champagne glasses.

Lecture 2: Introduction to Linear Programming Linear Programming 37 / 46


Hidden Hand of the Market Place: Duality

production cost increase ≥ current profit

Lecture 2: Introduction to Linear Programming Linear Programming 38 / 46


Hidden Hand of the Market Place: Duality

production cost increase ≥ current profit

Beer Mugs: cost increase =

Lecture 2: Introduction to Linear Programming Linear Programming 38 / 46


Hidden Hand of the Market Place: Duality

production cost increase ≥ current profit

1
Beer Mugs: cost increase = 20y1 + 15 y2

Lecture 2: Introduction to Linear Programming Linear Programming 38 / 46


Hidden Hand of the Market Place: Duality

production cost increase ≥ current profit

current profit

1
Beer Mugs: cost increase = 20y1 + 15 y2 ≥ 25

Lecture 2: Introduction to Linear Programming Linear Programming 38 / 46


Hidden Hand of the Market Place: Duality

production cost increase ≥ current profit

current profit

1
Beer Mugs: cost increase = 20y1 + 15 y2 ≥ 25

Champagne Glasses:

Lecture 2: Introduction to Linear Programming Linear Programming 38 / 46


Hidden Hand of the Market Place: Duality

production cost increase ≥ current profit

current profit

1
Beer Mugs: cost increase = 20y1 + 15 y2 ≥ 25

Champagne Glasses: cost increase =

Lecture 2: Introduction to Linear Programming Linear Programming 38 / 46


Hidden Hand of the Market Place: Duality

production cost increase ≥ current profit

current profit

1
Beer Mugs: cost increase = 20y1 + 15 y2 ≥ 25

1
Champagne Glasses: cost increase = 12y1 + 15 y2

Lecture 2: Introduction to Linear Programming Linear Programming 38 / 46


Hidden Hand of the Market Place: Duality

production cost increase ≥ current profit

current profit

1
Beer Mugs: cost increase = 20y1 + 15 y2 ≥ 25

1
Champagne Glasses: cost increase = 12y1 + 15 y2 ≥ 20

Lecture 2: Introduction to Linear Programming Linear Programming 38 / 46


Hidden Hand of the Market Place: Duality

Now minimize the total increase in the cost of raw materials subject to wiping out
the producer’s profit. Hopefully this will keep the Plastic Cup Factory in business.

Lecture 2: Introduction to Linear Programming Linear Programming 39 / 46


Hidden Hand of the Market Place: Duality

Now minimize the total increase in the cost of raw materials subject to wiping out
the producer’s profit. Hopefully this will keep the Plastic Cup Factory in business.
minimize 1800y1 + 8y2

Lecture 2: Introduction to Linear Programming Linear Programming 39 / 46


Hidden Hand of the Market Place: Duality

Now minimize the total increase in the cost of raw materials subject to wiping out
the producer’s profit. Hopefully this will keep the Plastic Cup Factory in business.
minimize 1800y1 + 8y2
Rewriting the Market’s price increase problem we get

Lecture 2: Introduction to Linear Programming Linear Programming 39 / 46


Hidden Hand of the Market Place: Duality

Now minimize the total increase in the cost of raw materials subject to wiping out
the producer’s profit. Hopefully this will keep the Plastic Cup Factory in business.
minimize 1800y1 + 8y2
Rewriting the Market’s price increase problem we get

minimize 1800y1 + 8y2

subject to 20y1 + y2 /15 ≥ 25


12y1 + y2 /15 ≥ 20
0 ≤ y1 , y2

Lecture 2: Introduction to Linear Programming Linear Programming 39 / 46


Hidden Hand of the Market Place: Duality

Now minimize the total increase in the cost of raw materials subject to wiping out
the producer’s profit. Hopefully this will keep the Plastic Cup Factory in business.
minimize 1800y1 + 8y2
Rewriting the Market’s price increase problem we get

minimize 1800y1 + 8y2

subject to 20y1 + y2 /15 ≥ 25


12y1 + y2 /15 ≥ 20
0 ≤ y1 , y2

This is another linear program!

Lecture 2: Introduction to Linear Programming Linear Programming 39 / 46


Hidden Hand of the Market Place: Duality

Now minimize the total increase in the cost of raw materials subject to wiping out
the producer’s profit. Hopefully this will keep the Plastic Cup Factory in business.
minimize 1800y1 + 8y2
Rewriting the Market’s price increase problem we get

minimize 1800y1 + 8y2

subject to 20y1 + y2 /15 ≥ 25


12y1 + y2 /15 ≥ 20
0 ≤ y1 , y2

This is another linear program!


Let us compare this LP with the original LP.

Lecture 2: Introduction to Linear Programming Linear Programming 39 / 46


Linear Programming Duality

Lecture 2: Introduction to Linear Programming Linear Programming 40 / 46


Linear Programming Duality

Primal:

Lecture 2: Introduction to Linear Programming Linear Programming 40 / 46


Linear Programming Duality

Primal: max 25B + 20C

s.t. 20B + 12C ≤ 1800

1 1
15 B + 15 C ≤8

0 ≤ B, C

Lecture 2: Introduction to Linear Programming Linear Programming 40 / 46


Linear Programming Duality

Primal: max 25B + 20C Dual:

s.t. 20B + 12C ≤ 1800

1 1
15 B + 15 C ≤8

0 ≤ B, C

Lecture 2: Introduction to Linear Programming Linear Programming 40 / 46


Linear Programming Duality

Primal: max 25B + 20C Dual: min 1800y1 + 8y2

1
s.t. 20B + 12C ≤ 1800 s.t. 20y1 + 15 y2 ≥ 25

1 1 1
15 B + 15 C ≤8 12y1 + 15 y2 ≥ 20

0 ≤ B, C 0 ≤ y1 , y2

Lecture 2: Introduction to Linear Programming Linear Programming 40 / 46


What is the Solution to the Dual?

Recall the goal of the Market:

Lecture 2: Introduction to Linear Programming Linear Programming 41 / 46


What is the Solution to the Dual?

Recall the goal of the Market:

The market wants to make the most money possible from its resources by setting
the highest prices it can without driving the producers out of business.

Lecture 2: Introduction to Linear Programming Linear Programming 41 / 46


What is the Solution to the Dual?

Recall the goal of the Market:

The market wants to make the most money possible from its resources by setting
the highest prices it can without driving the producers out of business.

raw
The production products
materials
in process out

Lecture 2: Introduction to Linear Programming Linear Programming 41 / 46


What is the Solution to the Dual?

Recall the goal of the Market:

The market wants to make the most money possible from its resources by setting
the highest prices it can without driving the producers out of business.

raw
The production products
materials
in process out

The marginal values give the per unit increase in the value of the resources due to
the production process.

Lecture 2: Introduction to Linear Programming Linear Programming 41 / 46


What is the Solution to the Dual?

Recall the goal of the Market:

The market wants to make the most money possible from its resources by setting
the highest prices it can without driving the producers out of business.

raw
The production products
materials
in process out

The marginal values give the per unit increase in the value of the resources due to
the production process.

The marginal values should be the solution to the dual!

Lecture 2: Introduction to Linear Programming Linear Programming 41 / 46


What is the Solution to the Dual?

Recall the goal of the Market:

The market wants to make the most money possible from its resources by setting
the highest prices it can without driving the producers out of business.

raw
The production products
materials
in process out

The marginal values give the per unit increase in the value of the resources due to
the production process.

The marginal values should be the solution to the dual!


And indeed, they are the solution!

Lecture 2: Introduction to Linear Programming Linear Programming 41 / 46


Linear Programming Duality: Matrix Notation

P D

Primal: max cT x Dual: min bT y

s.t. Ax ≤ b s.t. AT y ≥ c

0≤x 0≤y

Lecture 2: Introduction to Linear Programming Linear Programming 42 / 46


The Weak Duality Theorem of Linear Programming

Theorem: [Weak Duality Theorem]

Lecture 2: Introduction to Linear Programming Linear Programming 43 / 46


The Weak Duality Theorem of Linear Programming

Theorem: [Weak Duality Theorem]


If x ∈ Rn is feasible for P and y ∈ Rm is feasible for D, then

c T x ≤ y T Ax ≤ b T y .

Lecture 2: Introduction to Linear Programming Linear Programming 43 / 46


The Weak Duality Theorem of Linear Programming

Theorem: [Weak Duality Theorem]


If x ∈ Rn is feasible for P and y ∈ Rm is feasible for D, then

c T x ≤ y T Ax ≤ b T y .

Thus, if P is unbounded, then D is necessarily infeasible, and if D is unbounded,


then P is necessarily infeasible.

Lecture 2: Introduction to Linear Programming Linear Programming 43 / 46


The Weak Duality Theorem of Linear Programming

Theorem: [Weak Duality Theorem]


If x ∈ Rn is feasible for P and y ∈ Rm is feasible for D, then

c T x ≤ y T Ax ≤ b T y .

Thus, if P is unbounded, then D is necessarily infeasible, and if D is unbounded,


then P is necessarily infeasible.

Moreover, if c T x̄ = b T ȳ with x̄ feasible for P and ȳ feasible for D, then x̄ must


solve P and ȳ must solve D.

Lecture 2: Introduction to Linear Programming Linear Programming 43 / 46


The Weak Duality Theorem of Linear Programming

Proof:

Lecture 2: Introduction to Linear Programming Linear Programming 44 / 46


The Weak Duality Theorem of Linear Programming

Proof:
P
n
cT x = cj xj
j=1

Lecture 2: Introduction to Linear Programming Linear Programming 44 / 46


The Weak Duality Theorem of Linear Programming

Proof:
P
n
cT x = cj xj
j=1
P P
n m P
m P
m
≤ ( aij yi )xj [0 ≤ xj , cj ≤ aij yi ⇒ cj xj ≤ ( aij yi )xj ]
j=1 i=1 i=1 i=1

Lecture 2: Introduction to Linear Programming Linear Programming 44 / 46


The Weak Duality Theorem of Linear Programming

Proof:
P
n
cT x = cj xj
j=1
P P
n m P
m P
m
≤ ( aij yi )xj [0 ≤ xj , cj ≤ aij yi ⇒ cj xj ≤ ( aij yi )xj ]
j=1 i=1 i=1 i=1
T
= y Ax

Lecture 2: Introduction to Linear Programming Linear Programming 44 / 46


The Weak Duality Theorem of Linear Programming

Proof:
P
n
cT x = cj xj
j=1
P P
n m P
m P
m
≤ ( aij yi )xj [0 ≤ xj , cj ≤ aij yi ⇒ cj xj ≤ ( aij yi )xj ]
j=1 i=1 i=1 i=1
T
= y Ax
Pm P
n
= ( aij xj )yi
i=1 j=1

Lecture 2: Introduction to Linear Programming Linear Programming 44 / 46


The Weak Duality Theorem of Linear Programming

Proof:
P
n
cT x = cj xj
j=1
P P
n m P
m P
m
≤ ( aij yi )xj [0 ≤ xj , cj ≤ aij yi ⇒ cj xj ≤ ( aij yi )xj ]
j=1 i=1 i=1 i=1
T
= y Ax
Pm P
n
= ( aij xj )yi
i=1 j=1
Pm P
n P
n
≤ b i yi [0 ≤ yi , aij xj ≤ bi ⇒ ( aij xj )yi ≤ bi yi ]
i=1 j=1 j=1

Lecture 2: Introduction to Linear Programming Linear Programming 44 / 46


The Weak Duality Theorem of Linear Programming

Proof:
P
n
cT x = cj xj
j=1
P P
n m P
m P
m
≤ ( aij yi )xj [0 ≤ xj , cj ≤ aij yi ⇒ cj xj ≤ ( aij yi )xj ]
j=1 i=1 i=1 i=1
T
= y Ax
Pm P
n
= ( aij xj )yi
i=1 j=1
Pm P
n P
n
≤ b i yi [0 ≤ yi , aij xj ≤ bi ⇒ ( aij xj )yi ≤ bi yi ]
i=1 j=1 j=1
T
= b y

Lecture 2: Introduction to Linear Programming Linear Programming 44 / 46


Test the WDT on the Plastic Cup Factory

Lecture 2: Introduction to Linear Programming Linear Programming 45 / 46


Test the WDT on the Plastic Cup Factory

 
45
Optimal Solution =
75
 
5/8
Marginal Values =
375/2

Lecture 2: Introduction to Linear Programming Linear Programming 45 / 46


Test the WDT on the Plastic Cup Factory

 
45 Dual: min 1800y1 + 8y2
Optimal Solution =
75 s.t. 20y1 + (1/15)y2 ≥ 25
 
5/8 12y1 + (1/15)y2 ≥ 20
Marginal Values = 0 ≤ y1 , y2
375/2

Lecture 2: Introduction to Linear Programming Linear Programming 45 / 46


Test the WDT on the Plastic Cup Factory

 
45 Dual: min 1800y1 + 8y2
Optimal Solution =
75 s.t. 20y1 + (1/15)y2 ≥ 25
 
5/8 12y1 + (1/15)y2 ≥ 20
Marginal Values = 0 ≤ y1 , y2
375/2
Dual feasibility of the marginal values:

Lecture 2: Introduction to Linear Programming Linear Programming 45 / 46


Test the WDT on the Plastic Cup Factory

 
45 Dual: min 1800y1 + 8y2
Optimal Solution =
75 s.t. 20y1 + (1/15)y2 ≥ 25
 
5/8 12y1 + (1/15)y2 ≥ 20
Marginal Values = 0 ≤ y1 , y2
375/2
Dual feasibility of the marginal values:
5
0≤ ,
8

Lecture 2: Introduction to Linear Programming Linear Programming 45 / 46


Test the WDT on the Plastic Cup Factory

 
45 Dual: min 1800y1 + 8y2
Optimal Solution =
75 s.t. 20y1 + (1/15)y2 ≥ 25
 
5/8 12y1 + (1/15)y2 ≥ 20
Marginal Values = 0 ≤ y1 , y2
375/2
Dual feasibility of the marginal values:
5 375
0≤ , 0≤ ,
8 2

Lecture 2: Introduction to Linear Programming Linear Programming 45 / 46


Test the WDT on the Plastic Cup Factory

 
45 Dual: min 1800y1 + 8y2
Optimal Solution =
75 s.t. 20y1 + (1/15)y2 ≥ 25
 
5/8 12y1 + (1/15)y2 ≥ 20
Marginal Values = 0 ≤ y1 , y2
375/2
Dual feasibility of the marginal values:
5 375 5 1 375
0≤ , 0≤ , 20 · + · ≥ 25,
8 2 8 15 2

Lecture 2: Introduction to Linear Programming Linear Programming 45 / 46


Test the WDT on the Plastic Cup Factory

 
45 Dual: min 1800y1 + 8y2
Optimal Solution =
75 s.t. 20y1 + (1/15)y2 ≥ 25
 
5/8 12y1 + (1/15)y2 ≥ 20
Marginal Values = 0 ≤ y1 , y2
375/2
Dual feasibility of the marginal values:
5 375 5 1 375 5 1 375
0≤ , 0≤ , 20 · + · ≥ 25, 12 · + · ≥ 20
8 2 8 15 2 8 15 2

Lecture 2: Introduction to Linear Programming Linear Programming 45 / 46


Test the WDT on the Plastic Cup Factory

 
45 Dual: min 1800y1 + 8y2
Optimal Solution =
75 s.t. 20y1 + (1/15)y2 ≥ 25
 
5/8 12y1 + (1/15)y2 ≥ 20
Marginal Values = 0 ≤ y1 , y2
375/2
Dual feasibility of the marginal values:
5 375 5 1 375 5 1 375
0≤ , 0≤ , 20 · + · ≥ 25, 12 · + · ≥ 20
8 2 8 15 2 8 15 2
Equivalence of primal-dual objectives (WDT):

Lecture 2: Introduction to Linear Programming Linear Programming 45 / 46


Test the WDT on the Plastic Cup Factory

 
45 Dual: min 1800y1 + 8y2
Optimal Solution =
75 s.t. 20y1 + (1/15)y2 ≥ 25
 
5/8 12y1 + (1/15)y2 ≥ 20
Marginal Values = 0 ≤ y1 , y2
375/2
Dual feasibility of the marginal values:
5 375 5 1 375 5 1 375
0≤ , 0≤ , 20 · + · ≥ 25, 12 · + · ≥ 20
8 2 8 15 2 8 15 2
Equivalence of primal-dual objectives (WDT):

c T x = 25 · 45 + 20 · 75 = 2625

Lecture 2: Introduction to Linear Programming Linear Programming 45 / 46


Test the WDT on the Plastic Cup Factory

 
45 Dual: min 1800y1 + 8y2
Optimal Solution =
75 s.t. 20y1 + (1/15)y2 ≥ 25
 
5/8 12y1 + (1/15)y2 ≥ 20
Marginal Values = 0 ≤ y1 , y2
375/2
Dual feasibility of the marginal values:
5 375 5 1 375 5 1 375
0≤ , 0≤ , 20 · + · ≥ 25, 12 · + · ≥ 20
8 2 8 15 2 8 15 2
Equivalence of primal-dual objectives (WDT):

5 375
c T x = 25 · 45 + 20 · 75 = 2625 = 1800 · +8· = bT y
8 2

Lecture 2: Introduction to Linear Programming Linear Programming 45 / 46


What the Weak Duality Theorem Does NOT Say

Lecture 2: Introduction to Linear Programming Linear Programming 46 / 46


What the Weak Duality Theorem Does NOT Say

Infeasibility of either P or D does not imply the unboundedness of the other.

Lecture 2: Introduction to Linear Programming Linear Programming 46 / 46


What the Weak Duality Theorem Does NOT Say

Infeasibility of either P or D does not imply the unboundedness of the other.

It is possible for both P and D to be infeasible.

Lecture 2: Introduction to Linear Programming Linear Programming 46 / 46


What the Weak Duality Theorem Does NOT Say

Infeasibility of either P or D does not imply the unboundedness of the other.

It is possible for both P and D to be infeasible.

Example:
maximize 2x1 − x2
x1 − x2 ≤ 1
−x1 + x2 ≤ −2
0 ≤ x1 , x2

Lecture 2: Introduction to Linear Programming Linear Programming 46 / 46

You might also like