Resource Allocation and Decision Analysis (ECON 8010) - Spring 2014 "Linear Programming"
Resource Allocation and Decision Analysis (ECON 8010) - Spring 2014 "Linear Programming"
Linear Programming
Reading: Note on Linear Programming (ECON 8010 Coursepak, Page 7) and Merton Truck
Company (ECON 8010 Coursepak, Page 19)
Slack a measure of the amount of each available scarce resource that remains unused at the
solution to the linear programming problem
Shadow Price the benefit of increasing the available amount of a scarce resource,
measured by the resulting increase in the value of the objective function at the solution to the
linear programming problem
Lower Range maximum decrease in the available amount of a scarce resource for which
the calculated shadow price is valid
Upper Range maximum increase in the available amount of a scarce resource for which
the calculated shadow price is valid
Q: Is this a constrained optimization problem which fits the mold of Linear Programming?
A: It depends upon the functional form of F ( x1 , x2 )
recall, for Linear Programming we need the objective function to be a linear function
of the choice variables (which w1 x1 w2 x2 clearly is)
we also need the constraints to be linear functions of the choice variables => whether
this is the case depends upon the functional form of F ( x1 , x2 ) q
To see that our objective function is indeed linear, lets illustrate it graphically
helpful to draw the objective function for varying realized values of production costs
(e.g., c24 , c36 , c60 , and c84 )
0 x1
0
note: the slope of each isocost curve is simply w1
w
2
so, again, the Objective Function for this problem is clearly linear
the goal of the firm is to Minimize Production Costs => they want to be on the isocost
line closest to the origin, while still producing the target level of output
To illustrate combinations of x1 and x2 satisfying the constraint, we must assume a functional
form of F ( x1 , x2 ) .
0 x1
0
(ii) Perfect Complements => F ( x1 , x2 ) min{ x1 , x2 } => the constraint of min{x1 , x2 } q
actually becomes a dual restriction of x1 q and x2 q
x2
Constraints are linear
functions => Linear
Programming is
applicable Region in
which both
restrictions
are satisfied
0 x1
0
(iii) Cobb-Douglas Production Function => F ( x1 , x2 ) Ax1 x2 => the constraint becomes
Ax1 x2 q x2
0 x1
0
Example 1 Insulation Production (Coursepak, Page 7):
1. Specify the objective function of the plant manager.
2. State equations for all of the constraints facing the plant manager.
3. Formally state the Linear Programming problem.
4. Graphically illustrate the feasible set of the decision variables.
5. Determine the solution to this Linear Programming problem.
2. State equations for all of the constraints facing the plant manager.
The plant manager faces several restrictions on her choice
(i) can produce any mix of output, as long as the total weight is no more than 70
tons per dayOne truckload of Type B insulation weighs 1.4 tons; one truckload
of Type R weighs 2.8 tons. => (1.4) B (2.8) R 70
(ii) loading facilities can handle up to 30 trucks per day => B R 30
(iii) can obtain at most 65 canisters of the (flame retarding) agent per day. One
truckload of (finished) Type B insulation requires an input of three canisters of
the agent, but one truckload of Type R insulation requires only one canister. =>
3B R 65
(iv) implicit assumptions of B 0 and R 0
Subject to:
(1.4) B (2.8) R 70
B R 30
3B R 65
B0
and R 0
4. Graphically illustrate the feasible set of the decision variables.
1.4 70
R B (.5) B 25
2.8 2.8
R
Slope of line is Machine
equal to (-.5) Constraint
25
0 B
0 50
R (1) B 30
R
0 B
30
0
R (3) B 65
R
65
Flame
Slope of line is Retarding
equal to (-3) Agent
Constraint
0 B
0 65/3=21.6666
(?) What does the picture look like when we draw all three constraints in the same graph?
horizontal intercepts can be ranked from smallest to largest as blue < red < green
vertical intercepts can be ranked from smallest to largest as green < red < blue
R R
or
0 B 0 B
0 0
To figure this out, start by determining the intersection of blue and green
at this intersection R (.5) B 25 and R (3) B 65 must both be satisfied
simultaneously
( 3) B 65 ( .5) B 25 40 (2.5) B B 240.5 16
From which it follows R (.5)(16) 25 (3)(16) 65 17
And then figure out if this point is above or below red
recall, the equation for red is R (1) B 30
thus, if B 16 , then R ( 1)(16) 30 14
since 14 17 it follows that red passes below the point of intersection between blue
and green (i.e., the correct picture is the one above on the left)
From here we can determine the point of intersection between
red and green as: (1) B 30 ( .5) B 25 (.5) B 5 B 10 and R 20
red and blue as: (1) B 30 (3) B 65 2 B 35 B 17.5 and R 12.5
Thus, the feasible set is:
R
25
20
12.5
0 B
0 10
17.5 21. 6
0 B
0
then the constraint corresponding to red would be redundant
5. Determine the solution to this Linear Programming problem.
From the graphical illustration of the feasible set, it follows that the solution must be (for
a linear objective function with any arbitrary slope) at one of the four corner points
0 B
0
(ii) Intersection of green and red is optimal (if orange is steeper than green but
flatter than red)
0 B
0
(iii) Intersection of red and blue is optimal (if orange is steeper than red but flatter
than blue)
0 B
0
(iv) Horizontal Intercept is optimal (if orange is steeper than blue)
R
0 B
0
note:
mathematically, it is also possible to have multiple solutions
for example, if slope of orange had been exactly equal to slope of red...
R
0 B
0
then any point along red would be best => multiple solutions (each yielding the same
maximal value of the objective function)
For the current problem, recall that the objective function of this firm is 950B 1,200R
950 1
Setting v 950 B 1,200 R and solving for R , we obtain R B v
1,200 1,200
slope of the objective function is equal to 950 19
1,200 24
Recall, slope of green is , slope of red is 1 , and slope of blue is 3
1
2
Thus, the objective function is steeper than green but flatter than red => the
solution to the problem is B 10 and R* 20
*
R* 20
0 B
0 B 10
*
Further Insights on the Solution:
Again, observe that the solution occurs at the intersection of red and green
R
R* 20
0 B
0 B* 10
Thus, the constraints illustrated by green (i.e., the machine constraint of
(1.4) B (2.8) R 70 ) and red (i.e., the loading constraint of B R 30 ) are
both binding => there is zero slack for the associated scarce resources at the
solution => these two inputs are the bottlenecks in the operation
However, the constraint illustrated by blue (i.e., the flame retarding agent constraint
of R 3 B 65 ) is NOT BINDING => at the optimal solution, the firm is not using all
of the available flame retarding agent
More precisely, they are only using 20 3(10) 50 units of the flame retarding
agent
Slack of 15 (i.e., 65 50 15 , difference between the available amount and the
amount used) for this resource
The amount of available flame retarding agent could decrease to 50 units without
altering the solution
(?) How much would this firm value additional loading capacity?
That is, what if the loading constraint (of B R 30 ) could be altered by
increasing the value of the term on the right-hand side? By how much would the firm
value such an increase?
Visually: New red
R constraint
New
optimal
choice
0 B
0
As loading capacity is increased
some points that were not initially feasible are now feasible (illustrated by the purple
shaded area)
the intersection of green and red move down (southeast) along the green line
so long as the increase in machine capacity is sufficiently small, the solution still
occurs at the intersection of green and red => the new optimal choice is as
illustrated above
note: this occurs along an orange line that is further from the origin => value of the
objective function at the solution is indeed larger
Algebraically:
state the loading constraint in more general terms as: B R L => R B L
note, the intersection of red and green now occurs at:
B L 12 B 25 => 12 B L 25
=> B 2 L 50 and R 2 L 50 L 50 L
so long as the increase in loading capacity is sufficiently small, the solution is now
B* 2 L 50 and R* 50 L => the value of the objective function at the solution is
now
v* 9502 L 50 1,20050 L
1,900 L 47,500 60,000 1,200 L
700 L 12,500
dL 700
as L is increased, v * (i.e., optimal value of objective function) increases by dv*
the shadow price of loading capacity is $700 => the firm would be willing to pay up
to $700 to increase loading capacity from 30 up to 31
Note: in the discussion above we assumed that L was sufficiently small
if loading capacity becomes too big, then we eventually have
0 B
0
in which case the solution is at the intersection of green and blue
this cutoff value of L is the unique value for which all three constraints intersect at the
same point
for general L , the intersection between red and green occurs at B 2 L 50
recall, the intersection between green and blue occurs at B 16
thus, the previous discussion applies only if
2 L 50 16
L 33
But, we can also see that the feasible set (and therefore the solution) is qualitatively different if
L is too small. For very small L we would have
0 B
0
in which case the solution is at the vertical intercept of red
this will occur for values of L smaller than the unique value for which the intersection of
red and green occurs at B 0
that is, for
0 2 L 50
L 25
Shadow Price of $700 for Loading Capacity is valid for (all other factors fixed) 25 L 33
since we are starting with a value of L 30 , we say that the
Lower Range for Loading Capacity is equal to 5
Upper Range for Loading Capacity is equal to 3
Similarly, for machine capacity
Algebraically:
state machine constraint in more general terms as: R 12 B 1
2.8 M
note, the intersection of red and green now occurs at:
B 30 12 B 21.8 M => 12 B 30 21.8 M
=> B 60 1M.4 and R 30 60 1M.4 1M.4 30
so long as the increase in machine capacity is sufficiently small, the solution is now
B* 60 1M.4 and R * 1M.4 30 => value of the objective function at the solution is now
v* 95060 1M.4 1,2001M.4 30
21,000 250 1.4 M
(?) What about the Shadow Price for the flame retarding agent?
(A) Start by using economic intuition
recall the definition of Shadow Price (benefit of increasing the available amount of a
scarce resource, measured by the resulting increase in the value of the objective function
at the solution to the linear programming problem)
the constraint on the flame retarding agent was NOT BINDING => at the solution, the
firm was not using all of the available units of this input
thus, the solution would not change if the available amount of flame retarding agent
were increased => Shadow Price is equal to zero
further, it follows that the Upper Range for this Shadow Price is infinity (i.e., the shadow
price will still equal zero even as the available amount of the flame retarding agent is
increased to infinity)
Choose levels of production for two different types of trucks: x1 (units of Model 101) and
x2 (units of Model 102)
Constraints of:
Engine Assembly constraint: x1 2 x2 4,000
Metal Stamping constraint: 2 x1 2 x2 6,000
Model 101 Assembly constraint: 2 x1 5,000
Model 102 Assembly constraint: 3 x2 4,500
Questions:
1a. Find the best product mix for Merton.
1b. Determine the Shadow Price of engine assembly capacity.
1d. Determine the Upper Range for the shadow price of engine assembly capacity
determined in (1b).
2. Mertons production manager suggests purchasing Model 101 or Model 102 engines
form an outside supplier in order to relieve the capacity problem in the engine assembly
department. If Merton decides to pursue this alternative, it will be effectively renting
capacity: furnishing the necessary materials and engine components, and reimbursing
the outside supplier for labor and overhead. Should the company adopt this alternative?
If so, what is the maximum rent it should be willing to pay for a machine-hour of engine
assembly capacity? What is the maximum number of machine hours it should rent?
1a. Note that the constraints can be expressed as x2 1
2 x1 2,000 , x2 x1 3,000 ,
x1 2,500 , and x2 1,500 => the feasible set can be illustrated as:
x2
3,000
2,000
1,500
1,000
0 x1
0
2,000 4,000
2,500 3,000
1
Slope of green is 2 ; slope of blue is 1.
3
Slope of the objective function ( v 3,000 x1 5,000 x2 ) is 5
Optimal output combination is x1* 2,000 and x2* 1,000
1b. To determine the Shadow Price of engine assembly capacity, start by stating the Engine
Assembly constraint in more general terms as x1 2 x2 E => x2 21 x1 E2
from here, solve for the point of intersection between green and blue as:
1
2 x1 E2 x1 3,000
x1 6,000 E and x2 E 3,000
at this point, the value of the objective function is
v* 3,000(6,000 E ) 5,000( E 3,000)
3,000,000 2,000E
thus, the Shadow Price for engine assembly capacity is equal to dv*
dE 2,000
1d. As engine assembly capacity is increased, green shifts outward
the solution is still at the intersection of green and blue until green shifts out
beyond the intersection of blue and purple
the intersection of blue and purple occurs at
1,500 x1 3,000 => x1 1,500
thus, the solution is still at the intersection of green and blue so long as
6,000 E 1,500 E 4,500
starting at E 4,000 , the value of E could increase by 500 and the Shadow Price of
2,000 still applies (i.e., the Upper Range for the Shadow Price is 500)
2. Based upon the answers to (1b) and (1d), Merton should be willing to pay up to $2,000
per unit to rent additional engine assembly capacity, up to a maximum of 500 units of
engine assembly capacity.
Mathematical possibility of an empty feasible set (in which case the problem cannot be solved)
for example, suppose we had constraints of
1. x1 50 (blue)
2. x2 40 (yellow)
3. x1 x2 70 (red)
x2 x2
0 x1 0 x1
0 0
No points for which all three constraints are satisfied!
Feasible Set is an Empty Set!
When we have more than two choice variables (in which case it is not so easy to
graphically illustrate the feasible set), then this possibility is not so easy to detect
Multiple Choice Questions:
1. Which of the following is a valid Objective Function for a Linear Programming problem?
A. x1 x2
B. 500 x1 4,000 x2 10,000 x3
C. ( x1 x2 )( x3 x4 )
D. More than one (perhaps all) of the above answers is correct.
5. Which of the following is NOT one of the three general ingredients which must be
specified when stating a constrained optimization problem?
A. Decision Variables.
B. The Objective Function.
C. Slack.
D. More than one of the above answers is correct (i.e., more than one of the above is
not one of the three general ingredients).
6. _____________________ developed an algorithmic procedure (known as the Simplex
Method) for solving Linear Programming problems of any size.
A. John von Neumann
B. John Glenn
C. Glenn Danzig
D. George Dantzig
1. William runs a cattle ranch. He must choose levels of two different types of cattle feed
(denoted x and y ) in order to satisfy multiple minimal nutritional standards, while
minimizing the costs of purchasing cattle feed. Each pound of each type of feed contains
levels of three different nutrients ( A , B , and C ) as summarized in the table below:
Feed Nutrient A Nutrient B Nutrient C
x 2 units 5 units 4 units
y 2 units 1 unit 2 units
Each pound of x costs p x .60 ; and each pound of y costs p y .20 . Each day
each cow must be feed at least 60 units of Nutrient A, 50 units of Nutrient B, and 80 units
of Nutrient C.
A. What are the decision variables for William? What is his Objective Function?
B. State inequalities which summarize the restrictions on his choice of the decision
variables. Graphically illustrate the feasible set, clearly labeling all relevant
intercepts and points of intersection.
C. Determine and graphically illustrate the solution to his Linear Programming
problem. Determine the total expenditures on cattle feed at this optimal choice.
D. A new study has been released which states that cows really only need 72 units
of Nutrient C per day. How would your answer to part (C) change in light of this
new information? Explain.
E. Suppose instead that the study mentioned in part (D) had stated that cows only
need 68 units of Nutrient C per day. How would your answer to part (C)
change in light of this new information? Explain.
2. Bob must choose output levels for three different products ( x , y , and z ) in order to
maximize total contribution, subject to three constraints (an assembly line constraint, a
warehouse space constraint, and a loading dock constraint). He has formulated and
solved his problem as a Linear Programming problem. Based upon his analysis, he has
determined that the optimal levels of output are x* 435 , y* 280 , and z* 115 ,
resulting in a total contribution of $128,560. The values of slack, shadow price, lower
range, and upper range for each of the three constraints are reported below:
Slack Shadow Price Lower Range Upper Range
Assembly Line Capacity 0 4,210 10.25 8.70
Warehouse Space Capacity 200 0 200 Infinity
Loading Dock Capacity 0 890 30.10 16.50
An independent business located in the same industrial park as Bobs business is
temporarily in need of additional warehouse space.
A. They approach Bob with an offer to pay $5,000 to rent 150 units of warehouse
space from Bobs company. Should Bob accept this offer? Explain why or why
not.
B. Suppose that they had instead offered to pay only $2,000 to rent 150 units of
warehouse space. Should Bob accept this offer? Explain why or why not.
3. Laura must choose values of x and y to maximize 1,200 x 800 y . Her choice is
restricted by the following constraints: (i) 3 x 4 y 480 , (ii) 2 x y 200 , (iii)
y 90 , (iv) x 0 , and (v) y 0 .
A. Graphically illustrate the feasible set, clearly labeling all relevant intercepts and
points of intersection.
B. Determine and graphically illustrate the solution to his Linear Programming
problem. Determine the value of the objective function at this optimal choice.
C. For constraint (i), determine the value of slack, shadow price, upper range, and
lower range.
4. Hillary works for a public school district in central Texas. She is in charge of
determining which students will attend the two different existing high schools in the
district. High School Alpha has a capacity of 1,250 students; High School Beta has a
capacity of 900 students. She has divided the school district into four geographic areas
(Region A, Region B, Region C, and Region D). High School Alpha is
located within Region A, and High School Beta is located within Region B. The
table below reports the number of students residing in each of the four areas, as well as
the average distance (in miles) that a student in each area must travel to each school:
Number of Students Distance to Alpha Distance to Beta
Region A 600 1 7
Region B 800 7 1
Region C 200 10 14
Region D 400 9 2
Her goal is to assign students in each region to the two high schools in order to minimize
total transportation costs over the entire school year. There are a total of 180 school days
in her district. The daily cost of transporting each student to and from school is (.45) per
mile that the student resides from their assigned school.
Let a denote the number of students from Region A assigned to High School
Alpha (recognize that this implies 600 a students from Region A are assigned to
High School Beta). Likewise, let b denote the number of students from Region B
assigned to High School Alpha, let c denote the number of students from Region C
assigned to High School Alpha, and let d denote the number of students from Region
D assigned to High School Alpha.
A. State Hillarys Objective Function.
B. State the two restrictions that her choices of a , b , c , and d must satisfy.
C. Determine the optimal allocation of students across the two schools. Determine
the total annual transportation costs resulting from this choice.
D. Determine the value of slack at each of the two schools at this optimal allocation.
E. If the capacity of High School Alpha had been 1,350 students, how would the
solution and total annual transportation costs have differed? Explain.
F. If the capacity of High School Beta had been 1,000 students, how would the
solution and total annual transportation costs have differed? Explain.
5. Jaideep has solved a Linear Programming problem in which he had to choose the optimal
levels of two variables ( x1 and x 2 ), subject to three different constraints (Constraint I,
Constraint II, and Constraint III). He reports values for slack, shadow price, lower
range, and upper range for each of the three constraints as follows:
Slack Shadow Price Lower Range Upper Range
Constraint I 0 35 4.50 5.75
Constraint II 0 16 12.75 4.25
Constraint III 12 8 3.20 12.50
Do you have any concerns with these reported values? Explain.
Answers to Multiple Choice Questions:
1. B
2. A
3. A
4. B
5. C
6. D
7. C
8. B
1A. His decision variables are x (pounds of feed x) and y (pounds of feed y). His
Objective Function is: p x x p y y (.6) x (.2) y (the value of which he aims to
minimize).
1B. His choice is restricted by having to choose feed combinations for which the cattle get at
least 60 units of Nutrient A, at least 50 units of Nutrient B, and at least 80 units of
Nutrient C. Mathematically these constraints are: 2 x 2 y 60 , 5 x y 50 , and
4 x 2 y 80 . Graphically:
y
50
40
33. 3
30
25
20
0 x
0 5 10 20 30
3. 3
p x .6
1C. Recognize that the Objective Function has a slope of 3 , while the
py .2
50 40
slopes of the constraints are 5 (blue), 2 (green), and
10 20
30
1 (red). Thus, the solution is at the intersection of blue and green.
30
Algebraically, the optimal choice of x must satisfy 5 x 50 2 x 40 =>
x* 3. 3 . It follows that the optimal y is y* 33. 3 . Graphically:
50
33. 3
20
0 x
0 3. 3 10 30
1D. If instead this final constraint were 4 x 2 y 72 , then the red line still passes below
the intersection of green and blue. Thus, the solution is still at the intersection of
green and blue. However, this intersection now occurs at: 5 x 50 2 x 36
=> x* 14
3 4. 6 (with a corresponding value of y of y* 803 26 . 6 ).
1E. For the final constraint of 4 x 2 y Z , once the value of Z is dropped below
Z 70 , then the intersection of blue and green occurs below the red line, the
solution now occurs at the intersection of red and blue (i.e., x* 5 and y* 25 ).
2A. Note that there is slack of 200 for the Warehouse Constraint. Thus, available warehouse
space could be decreased by 150 units (which is less than 200) without altering Bobs
optimal choice. Because of this, he should be willing to accept $5,000 for these unused
150 units of warehouse space.
2B. Based upon the logic above, if he were made a take-it-or-leave-it offer for any amount
of warehouse space up to 200 units for any positive payment, then he should accept the
offer. So, he should be willing to accept this even lower amount of only $2,000 for these
150 units of warehouse space.
3A. Given the constraints of: (i) 3 x 4 y 480 , (ii) 2 x y 200 , (iii) y 90 , (iv)
x 0 , and (v) y 0 , her feasible set is:
y
200
120
90
72
0 x
0 40 55 64 100 160
1, 200
3B. Recognize that the slope of the Objective function is 800 3
2 , while the slopes of the
constraints are 0 (green), 120
160 43 (red), and 100
200
2 (blue). Thus, the
optimal choice is x* 64 and y* 72 (i.e., at the intersection of red and blue).
This choice results in v* 1,200 (64 ) 800 (72) 134,400 .
y
90
72
0 x
0 40 64 100
3C. Constraint (i) ( 3 x 4 y 480 , illustrated by the red line) is binding. Thus, slack is
equal to 0. The solution will still occur at the intersection of red and blue so long as
red intersects blue at a point with 55 x 100 . Expressing this constraint in more
general terms as 3 x 4 y Z i (or equivalently as y 3
x Zi
4 4 ), the intersection
between red and blue occurs at 3
4 x
2 x 200 => x 160 Z5i . Thus,
Zi
4
v* 1,200 160 Z5i 800 2 Zi
5
120 80 Z i 96,000 . Thus, the Shadow Price
dv*
is equal to dZ i
80 .
5. Based upon the reported values, there appear to be some mistakes in his results. First,
Upper Range specifies the maximum increase in the available amount of a scarce
resource for which the calculated shadow price is valid. The value of Upper Range
should always be greater than or equal to zero. Thus, the reported value of (5.75) for
Constraint I is not an acceptable value for Upper Range. Second, it must always be
true that if slack is positive, then the corresponding shadow price is equal to zero. This
is not true for the values reported above corresponding to Constraint III (suggesting an
additional error).