Chapter 10 Linear Programming Spring 2016

advertisement
Chapter 10 Linear Programming
Page
1
of
34
Chapter 10
Linear Programming
Spring 2016
(1/17/16)
Chapter 10 Linear Programming
Page
Drama in real life
(here’s why this is important)
XYZ Airlines - Aircraft operations for 850 aircraft
Safety inspections constraint
Equipment Inspections constraint
International
Flights
400
Scheduled
(500, 350)
300
Feasible area
200
Control Inspections constraint
100
100
200
300
400
500
Domestic Flights Scheduled
In above graph:
the lines are called constraints
the shaded area is called the feasible area
XYZ Airlines should only operate in the feasible area
2
of
34
Chapter 10 Linear Programming
Page
3
of
34
Solving 2 Linear Equations by Graphing- graph both of the equations on the same axes. The
coordinates of the point of intersection of the graphs are the solution. Use the “intercepts method” to
draw line.
Set y = 0, solve x (x intercept)
set x = 0, solve y (y intercept)
Example: draw x + y = 4
2x - y = -1
x +y =4
Set y = 0, solve x
x +0 =4
x=4
(4, 0) (x intercept)
2x - y = -1
Set y = 0, solve x
2x - 0 = -1
x = -0.5
( -0.5, 0) (x intercept)
x +y =4
Set x = 0, solve y
0 +y =4
y=4
(0, 4) (y intercept)
2x - y = -1
Set x = 0, solve y
2(0) - y = -1
y=1
(0, 1) (y intercept)
y
7
6
5
(0, 4) (y intercept) 4
3
2
(0, 1) (y intercept) 1
2x - y = -1
solution “looks like (.9,3.1)”
(4, 0) x intercept
x
-7 -6 -5 -4 -3 -2
-2
( -0.5, 0) (x intercept)
-3
-4
-5
-6
-7
1 2 3 4 5 6 7
x +y =4
Chapter 10 Linear Programming
Page
4
of
Solving 2 Linear Equations by Addition - use to find where 2 linear functions intersect
accurately. (Graphing not good enough)
Solve by graphing:
y
Graph:
2y = 20 + x
120 - 4x = 3y
50
40
30
20
10
looks like (19,19)?
x
10 20 30 40 50
Solve with addition
1.) re-write into form Ax + By = C
2y = 20 + x
120 - 4x = 3y
becomes
becomes
-x + 2y = 20
-4x - 3y = -120
2.) multiply either, or both, equations so that either x’s or y’s cancel when equations are
added together.
multiply X -4
-x + 2y = 20
-4x - 3y = -120
so that x’s will
cancel when added
3.) solve for y
4x - 8y = -80
-4x - 3y = -120
- 11y = -200
y = 18.18181818
4.) back-substitute y = 18.18181818 into either equation
2y = 20 + x
2(18.18181818) = 20 + x
36.36363636 - 20 = x
x = 16.36363636
These functions actually intersect at (16.36363636, 18.18181818)
Addition is more accurate!
34
Chapter 10 Linear Programming
Solve using addition:
Page
5
of
3x - 4y = 8
2x + 3y = 9
1.) re-write into form Ax + By = C
3x - 4y = 8
2x + 3y = 9
OK as is
2.) multiply either, or both, equations so that either x’s or y’s cancel when equations are
added together.
3x - 4y = 8
2x + 3y = 9
multiply by -2 (-2)(3x - 4y = 8)
(2x + 3y = 9)(3)
multiply by 3
so that x’s will
cancel in Addition
-6x + 8y = -16
6x + 9y = 27
3.) solve for y (round to 2 decimal places)
4.) back-substitute y = 0.65 into either equation
17y = 11
y = 11/17 = 0.65
2x + 3y = 9
2x + 3(0.65) = 9
2x = 9 - 1.95
x = 9 - 1.95
2
x = 7.05
2
x = 3.53
the intersection point is (3.53, 0.65)
this accuracy
not possible
by graphing
34
Chapter 10 Linear Programming
Page
SOLUTIONS Practice problems page 302
13.) Graph the equations: x = 1
y
y=3
where is intersection?
7
6
x=1
5
4
(1,3)
3
2
1
lines intersect at (1,3)
y=3
x
-7 -6 -5 -4 -3 -2
1 2 3 4 5 6 7
-2
-3
-4
19.) Solve: y = 4x - 6
y = -x + 9
draw graph to
determine intersection
Set y = 0, solve x (x intercept)
set x = 0, solve y (y intercept)
y = 4x - 6
Set y = 0, solve x
0 = 4x - 6
x = 6/4 = 1.5 (1.5, 0) (x intercept)
y = 4x - 6
Set x = 0, solve y
y = 4(0) - 6
y = -6 (0, -6) (y intercept)
y = -x + 9
Set y = 0, solve x
0 = -x + 9
x = 9 ( 9, 0) (x intercept)
y = -x + 9
Set x = 0, solve y
y = -0+9
y = 9 (0, 9) (y intercept)
y
9
y = 4x - 6
8
7
6
solution “looks like (3,6)”
5
4
3
2
1
x
-7 -6 -5 -4 -3 -2
1 2 3 4 5 6 7 8 9
-2
y = -x + 9
-3
-4
-5
-6
-7
6
of
34
Chapter 10 Linear Programming
26.) Solve: 2x - y = -3
2x + y = -9
Page
draw
graph
Set y = 0, solve x (x intercept)
set x = 0, solve y (y intercept)
2x - y = -3
Set y = 0, solve x
2x - 0 = -3
x = - 1.5 (-1.5, 0) (x intercept)
2x + y = -9
Set y = 0, solve x
2x + 0 = -9
x = -4.5 ( -4.5, 0) (x intercept)
2x - y = -3
Set x = 0, solve y
2(0) - y = -3
y = 3 (0, 3) (y intercept)
2x + y = -9
Set x = 0, solve y
2(0) + y = -9
y = -9 (0, -9) (y intercept)
y
2x + y = -9
9
8
7
6
5
4
3
2
1
2x - y = -3
x
-7 -6 -5 -4 -3 -2
-2
solution looks like (-3, -3)
-3
-4
-5
-6
-7
-8
-9
1 2 3 4 5 6 7 8 9
7
of
34
Chapter 10 Linear Programming
28.) Draw: 2x - 3y = 12
3y - 2x = 9
2x - 3y = 12
2(0) - 3y = 12
y = -4 (0,-4)
2x - 3y = 12
2x - 3(0) = 12
x = 6 (6,0)
Page
Graph both
where is intersection?
3y - 2x = 9
3(0) - 2x = 9
x = -4.5 (-4.5,0)
3y - 2x = 9
3y - 2(0) = 9
y = 3 (0,3)
(?, ?)
there is no
point of intersection
they’re parallel
y
3
(0,3)
2
1
(-4.5,0)
(6,0)
x
-5
-4
-3
-2
-1
1
-2
-3
-4
(0, -4)
2
3
4
5
6
8
of
34
Chapter 10 Linear Programming
Page
9
of
34
Practice problems on page 305
95.) Solve using ADDITION
2x + 3y = 6
5x - 4y = -8
1.) re-write into form Ax + By = C
already in correct form
2.) multiply either, or both, equations so that either x’s or y’s cancel when equations are
added together.
multiply by 5
(2x + 3y = 6) (5)
multiply by -2
(5x - 4y = -8) (-2)
3.) solve for y
10x + 15y = 30
so that x’s will cancel -10x + 8y = 16
23y = 46
y=2
4.) back-substitute y = 2 into either equation
5x - 4y = -8
5x - 4(2) = -8
5x = 0
x=0
intersect at
(0, 2)
97.) Solve using ADDITION
6x + 6y = 1
4x + 9y = 4
1.) re-write into form Ax + By = C
already in correct form
2.) multiply either, or both, equations so that either x’s or y’s cancel when equations are
added together.
multiply by 9
(6x + 6y = 1) (9)
multiply by -6
(4x + 9y = 4) (-6)
3.) solve for x
54x + 54y = 9
so that y’s will cancel -24x - 54y = -24
30x
= -15
x = - .5
4.) back-substitute x = -.5 into either equation
6x + 6y = 1
6(-.5) + 6y = 1
-3 + 6y = 1
6y = 4
y = .67
intersect at
(-0.5, 0.67)
Chapter 10 Linear Programming
Page
10
of
34
Inequalities
Often, you don’t know “exactly” what numbers go into a linear equation. Use inequalities:
< less than
> greater than
called
≤ less or equal to
inequalities
≥ greater or equal to
Examples:
How old am I? Let x = my age
x is greater than 25 (x > 25)
x is less than 100
(x < 100)
According to the NYS Fire Code, our classroom has a 30 student maximum capacity. How many in
this classroom next week?
Let x = no. Math students
x is greater or equal to 0 (x ≥ 0)
x is less or equal to 30 (x ≤ 30)
Our class has both male and female students.
Let x = no. male students
Let y = no. female students
x + y ≤ 30
I have “some” money in my wallet. How much?
Let x = money in my wallet
x is greater than $0
(x > 0)
x is less than $1,000,000 (x < 1,000,000)
XYZ Airlines will have flight line inspectors and NTSB air frame inspectors this week. Each flight
line inspector costs $1,000 and each NTSB inspector costs $1,500. The money available is a
maximum $25,000. How many each inspector will we have?
Let x = number of flight line inspectors this weekend.
y = number of NTSB air frame inspectors
1,000 x + 1,500y ≤ 25,000
You have “some” books in a backpack that holds a maximum 6 books. The books are either Math or
Public Justice. How many books are now in your pack?
Let x = number Math books
Let y = number Public Justice books
x+y>0
x+y≤6
When graphing linear inequalities –
for these symbols ≤, ≥
<, >
≤, ≥
<, >
draw solid lines
draw dashed lines
solution includes the solid line
solution doesn’t include the dashed line
Chapter 10 Linear Programming
Page
11
of
34
Constraints - are inequalities. They prevent you from maximizing profit, or minimizing cost, or
meeting your job objectives.
Reality constraints - a special constraint that says “x” and “y” must
be 0 or more and will greatly simplify a linear program problem.
Most real life problems have reality constraints!
x ≥0
y ≥0
Examples:
You’ve decided to use your car as a taxi service for students to help pay some of your school
expenses. It has 5 seats besides your driver seat. Write a system of constraints (including
reality constraints) to show how your car limits the number of guys and girls you can drive home.
Let x = number guys you can carry
y = number girls you can carry
x + y ≤ 5 seat constraint
x ≥0
Reality
y ≥0
constraints
you can’t have a negative value for x,y
i.e. x = - 3 is not possible
You’ve found that it’s simply not worthwhile to offer taxi service unless there is a minimum
of 1 passenger. Write a system of constraints (including reality constraints) to show how your
taxi service limits the number of guys and girls you can drive.
Let x = number guys you can drive home
y = number girls you can drive home
x + y ≥ 1 passenger constraint
x ≥0
Reality
y ≥0
constraints
Your nursery received a shipment of trees and shrubs. For display purposes each tree requires
2 square feet of space and each shrub requires 3 square feet. The nursery has a max
12 square feet of display space. Let x = number fruit trees
Let y = number oriental shrubs
Display space constraint:
2x + 3y ≤ 12
x≥ 0
Reality
y≥ 0
constraints
It takes 2 minutes to prepare a tree for display and 1 minute to prepare a shrub.
Your boss allows a max 8 minutes of time to prepare all.
Preparation time constraint:
2x + 1y ≤ 8
x≥ 0
y≥ 0
Reality
constraints
Chapter 10 Linear Programming
Page
12
of
34
After graduation, you start a business to produce Math and Public Justice notebooks for SUNY
students. The Math book takes 3 hours to write. The Public Justice notebook takes 4 hours
to write. Your new career demands much of your time, and allows you no more than 8 hours per
week for writing.
Let x = number Math books
Let y = number P/J books
Writing constraint:
3x + 4y ≤ 8
Reality constraints:
x≥ 0
Reality
there are no
y≥ 0
constraints
negative books
It takes 2 hours to assemble a Math book and 1 hour to assemble a P/J book. You have no more
than 6 hours per week for assembling the notebooks.
Assembly constraint:
2x + 1y ≤ 6
Reality constraints:
x≥ 0
Reality
y≥ 0
constraints
Polly, a SUNY Music major, gives music lessons to drummers and trumpet players.
Each drummer gets 2 hours of theory and 4 hours of drum playing. Each
trumpet player gets 3 hours of theory and 5 hours of trumpet playing. Her full
time recording job limits the time she can spend on theory to 10 hours and 20
hours on playing.
Let x = number drummers she can teach
Let y = number trumpeters she can teach
Write the theory and playing constraints in the form of inequalities involving x
and y.
Answer: Theory constraint:
2x + 3y ≤ 10
Playing constraint:
4x + 5y ≤ 20
Reality constraints:
x≥ 0
Reality
there can be no
y≥ 0
constraints negative musicians
Here is an alternate method that may work for you:
teach
drummer trumpet player less, more, equal Constraint
activity needs
needs
theory 2 hours
3 hours
less or equal to
10 hours
playing 4 hours
5 hours
less or equal to
20 hours
2x + 3y ≤
4x + 5y ≤
x≥
y≥
10
20
0
0
reality
constraints
Chapter 10 Linear Programming
Page
13
of
34
Objective function - an algebraic expression in 2 variables (for Math 102) describing a quantity to
be maximized or minimized. When you get into your career, the boss will give you several of these
and hold you accountable for them. XYZ Airlines was trying to maximize their profit objective
function.
Using your car as a taxi is working well for you. You decided to charge the guys $2
and the girls $1.50. Write an objective function that describes your profit.
Let x = number guys you carry
Let y = number girls you carry
Let P = profit you will receive
P = $2.00x + $1.50y….which you'd like to maximize.
You manage a team of broadcasters at your new communications job. Newscasters get $500
for a story. Sportscasters get $450 for a story. The studio has $20,000 production costs
for camera, lighting, sound, etc. crews that can’t be eliminated. The boss says to minimize
costs next week. Write an objective function that describes your costs.
Let C = cost
x = number of news stories
y = number of sports stories
$20,000 are fixed costs that can’t be eliminated
C = 500x + 450y + 20,000 ......which you'll want to minimize.
At your nursery, a tree yields $6 profit and a shrub has a profit of $7. It costs
$300,000 for payroll, tax, legal, advertising, etc. each year. The boss wants maximum
profit. Write an objective function that describes your profit on sale of trees and shrubs
and include the costs.
Let P = Profit
x = number of trees sold
y = number of shrubs sold
P = $7y + $6x - $300,000..... which you'll want to maximize
Chapter 10 Linear Programming
Page
14
of
34
The objective function operates anywhere around the feasible area, but the maximum profit or
minimum loss will be at a corner. Calculate the max or min of an objective function by determining
its value at each graph corner.
Example: find the max profit for the objective function P = $2.00x + $1.50y from your taxi
business. The feasible area graph is drawn. Calculate the profit at each graph corner.
y # girls
(4,6)
Objective function P = $2.00x + $1.50y
Graph
corner
(4,6)
(4,3)
(7,3)
Feasible service area
(4,3)
(7,3)
x
# guys
P = $2.00x + $1.50y Profit
2.00(4) + 1.50(6)
$17.00
2.00(4) + 1.50(3)
$12.50
2.00(7) + 1.50(3)
$18.50
maximum profit is $18.50 occurs at (7,3)
…7 guys, 3 girls
Example: find the minimum cost for the objective function C = 500x + 450y + 20,000 for your
broadcast business. (Calculate cost at each corner.)
y # sportscast stories
(6,8)
Example:
(2,6)
Feasible broadcast area
(3,2)
(5,1)
x # news cast stories
Objective function Cost = 500x + 450y + 20,000
Graph
corner
(2,6)
(6,8)
(5,1)
(3,2)
C = 500x + 450y + 20,000 Cost
500(2) + 450(6) + 20,000
500(6) + 450(8) + 20,000
500(5) + 450(1) + 20,000
500(3) + 450(2) + 20,000
23,700
26,600
22,950
22,400
minimum cost is 22,400 occurs at (3,2)
…3 newscast stories, 2 sports stories
Chapter 10 Linear Programming
Page
15
of
34
Practice problems from notes: write all constraints including reality constraints
After graduation, you start a business to produce Math and Public Justice notebooks for SUNY
students. The Math book takes 3 hours to write, while the P/J book takes 4 hours to write. It takes 2
hours to assemble a Math book and 1 hour to assemble a P/J book. You have a max 6 hours per week
for assembling and max 8 hours per week for writing.
Polly, a SUNY Music major, gives music lessons to drummers and trumpet players. Each drummer
gets 2 hours of theory and 4 hours of drum playing. Each trumpet player gets 3 hours of theory and
5 hours of trumpet playing. Her full time recording job limits the time she can spend on theory to 10
hours and 20 hours on playing.
.
Your nursery recently received a large truckload shipment of imported fruit treesand oriental shrubs.
For display purposes each tree requires 2 square feet of space and each shrub requires 3 square feet.
It also takes 2 minutes to prepare a tree for display and 1 minute to prepare a shrub. The nursery has
at most 12 square feet of display space available and at most 8 minutes of preparation time available.
Practice problems page 308
139a.) It takes 20 minutes to decorate a small bowl, and 30 minutes to decorate a large bowl. There
are a maximum 600 decorating minutes. Let x = number small bowls
y = number of large bowls
Constraints Decorating constraint: 20x + 30y ≤ 600
The number of small bowls must be at least twice the number of large bowls: x ≥ 2y
The number of small bowls must be at least 10: x ≥ 10
The number of large bowls must be at least 5: y ≥ 5
Reality constraints: x ≥ 0
y≥0
Chapter 10 Linear Programming
Page
16
of
140a.) Man must consume fewer than 500 calories in a meal that contains chicken and rice.
Let x = number of calories from chicken
y = number of calories from rice
Constraints Calorie constraint: x + y < 500
Meal must contain minimum 150 calories
Calorie constraint: x + y ≥ 150
Reality constraints: x ≥ 0
y≥0
163a.) Company builds 2 types washers: top-load and front-load.
Let x = number top load washers
y = number front load washers
They can manufacture a maximum 18 washers per day: x + y ≤ 18
The maximum number front load washers they can manufacture is 5: y ≤ 5
They must manufacture a minimum 2 front load washers
and a minimum 2 top load washers: x ≥ 2
y≥2
163b.) Profit is $20 each top-load and $25 each front-load machine.
Objective function: P = 20x + 25y (which they will want to maximize)
164a.) Company manufactures skateboards and in-line skates.
Let x = skateboards
y = pair in-line skates
They can manufacture maximum 20 skateboards and in-line skates
Manufacture constraint: x + y ≤ 20
Company must manufacture minimum 3 skateboards and maximum 6 skateboards
Manufacture constraint: x ≥ 3
x≤6
Company must manufacture minimum 2 in-line skates
Manufacture constraint: y ≥ 2
164b.) Profit is $20 each pair in-line skates and $25 each skate board.
Objective function: P = 20y + 25x (which they will want to maximize)
34
Chapter 10 Linear Programming
Page
Practice problems page 309
155.) Calculate maximum and minimum values of objective function
K = 2x + 3y
for following feasible area graph:
60
50
40
30
20
10
(10,40)
(50,30)
Feasible area
(10,20)
(20,10)
(50,10)
10 20 30 40 50 60
(10,40)
(50,30)
(50,10)
(20,10)
(10,20)
K = 2x + 3y
2(10) + 3(40)
2(50) + 3(30)
2(50) + 3(10)
2(20) + 3(10)
2(10) + 3(20)
K
140
190
130
70
80
maximum
minimum
156.) Calculate maximum and minimum values of objective function
K = 40x + 50y
for following feasible area graph:
6
5
4
3
2
1
(2,5)
(5,2)
(1,1)
1
(2,5)
(4,3)
(5,2)
(4,1)
(1,1)
Feasible area
(4,3)
(4,1)
2
3
K = 40x + 50y
40(2) + 50(5)
40(4) + 50(3)
40(5) + 50(2)
40(4) + 50(1)
40(1) + 50(1)
4
K
330
310
300
210
90
5
6
maximum
minimum
17
of
34
Chapter 10 Linear Programming
Page
18
of
34
Draw the feasible area graph - graph the 4 inequalities that are the constraints for your taxi business
on a coordinate set of axes, identify the corner vertices to calculate max and mins.
Constraints:
x+y≤5
x+y≥1
x ≥0
y ≥0
step 1: draw x + y = 5
draw x + y = 1
intercepts
Set x = 0, find y
Set x = 0, find y
method
Set y = 0, find x
Set y = 0, find x
x+y= 5
(0) + y = 5
y= 5
(0, 5)
x+y= 5
x + (0) = 5
x = 5 (5, 0)
x+y= 1
(0) + y = 1
y=1
x+y= 1
x + (0) = 1
x=1
(0, 1)
(1,0)
6
5
(0,5)
4
3
2
1
(0,1)
(1, 0)
(5,0)
0
0
1
2
3
4
5
6
x + y = 5 (draw solid)
x + y = 1 (draw solid)
step 2: pick a “test point” anywhere on the graph and test it. If line doesn’t go
through origin (0,0), pick (0,0) as test point.
step 3: substitute test point into each linear inequality and shade the feasible area
test point (0,0)
x + y≤5
(0) + (0) ≤ 5 true/false?
0 ≤ 5 true, shade toward test point.
shading extends forever, use one
color
test point (0,0)
x + y≥1
(0) - (0) ≥ 1 true/false?
(0) ≥ 1 false, shade away from test point.
shading extends forever, use a
different color
Chapter 10 Linear Programming
Page
step 4: Shading: determine the area that is shaded both colors combined:
6
shade
and
5
away
4
from
3
test
2
point
1
shade
0
toward
0
1
2
3
4
5
6
test
point
TEST POINT
step 5: apply reality constraints
x ≥0
y ≥0
eliminates all
negative x and y
6
5
(0,5)
4
show feasible area and all
4 corners
3
2
(0,1)
1
feasible
area
(5,0)
0
(1,0)
0
1
2
3
4
5
6
19
of
34
Chapter 10 Linear Programming
Page
Draw the feasible area graph:
Graph 4 inequalities:
x + y < 1 (dashed)
x - y < 5 (dashed)
x≥0
reality
y≥0
constraints
step 1: draw linear equality x + y = 1
20
of
draw
all 4
draw linear equality x - y = 5
Set x = 0, find y
Set y = 0, find x
Set x = 0, find y
Set y = 0, find x
x+y= 1
(0) + y = 1
y= 1
(0, 1)
x+y= 1
x + (0) = 1
x= 1
(1, 0)
x-y= 5
(0) - y = 5
y = -5
(0, -5)
x-y= 5
x - (0) = 5
x=5
(5,0)
use
intercepts
method
use
intercepts
method
Use dashed lines when needed.
y
2
x - y = 5 dashed
1
(0,1)
(1,0)
(5,0)
0
-1
x
1
2
3
4
5
6
-2
-3
-4
-5
(0,-5)
x + y = 1 dashed
step 2: pick a “test point” anywhere on the graph and test it. If line doesn’t go
through origin (0,0), pick (0,0) as test point.
step 3: substitute test point into each linear inequality and shade the feasible area
test point (0,0)
x + y < 1 (dashed)
(0) + (0) < 1 true/false?
0 < 1 true, shade toward test point.
shading extends forever
test point (0,0)
x - y < 5 (dashed)
(0) - (0) < 5 true/false?
(0) < 5 true, shade toward test point.
shading extends forever
34
Chapter 10 Linear Programming
Page
y
21
of
shaded areas extend forever
2
x - y = 5 dashed
1
(0,1)
(0,0)
(1,0)
0
-1
1
(5,0)
x
2
3
4
5
6
-2
-3
-4
-5
(0,-5)
x + y = 1 dashed
shaded areas extend forever
Step 4: Identify feasible area that is shaded both colors
y
2
x - y = 5 dashed
Feasible area
is both combined
areas
1
(0,1)
(0,0)
(1,0)
(5,0)
0
-1
1
2
3
4
5
6
-2
shaded area
extends
forever
-3
-4
-5
(0,-5)
x + y = 1 dashed
x
34
Chapter 10 Linear Programming
Page
x≥0
y≥0
Step 5: reality constraints
y
x - y = 5 dashed
1
(0,1)
(0,0)
(1,0)
0
-1
1
(5,0)
x
2
3
4
5
6
-2
-3
-4
-5
(0,-5)
x + y = 1 dashed
(0,1)
Feasible
Area
(0,0)
of
the “reality constraints”
eliminate all negative x and y areas….
This feasible area remains…..
Identify the corner vertices: (0,1) from intercepts
(1,0) “
“
(0,0) origin
2
Feasible area
has
(0,1) (1,0) (0,0)
vertices
22
(1,0)
34
Chapter 10 Linear Programming
Draw the feasible area graph:
Graph 4 linear inequalities
find feasible area
and all corners
Page
of
x - y ≥ 4 (solid)
x + y ≤ 6 (solid)
x≥0
reality
y≥0
constraints
step 1: draw linear equality x - y = 4
draw linear equality x + y = 6
Set x = 0, find y
Set y = 0, find x
Set x = 0, find y
Set y = 0, find x
x-y= 4
(0) - y = 4
y = -4
x-y= 4
x - (0) = 4
x= 4
23
x+y= 6
(0) + y = 6
y= 6
x+y= 6
x + (0) = 6
x=6
(0, -4)
(4, 0)
(0, 6)
(6,0)
step 2: pick a “test point” anywhere on the graph except on a line. If line doesn’t go
through origin (0,0), pick (0,0). I used (0,0) for both.
step 3: substitute test point into each linear inequality
test point (0,0)
test point (0,0)
x - y ≥ 4 (solid)
x + y ≤ 6 (solid)
(0) - (0) ≥ 4 true/false?
(0) + (0) ≤ 6 true/false?
0 ≥ 4 false
0 ≤ 6 true
shade away from test point
shade toward test point
y
x - y = 4 solid
extends
forever
6
5
4
3
2
1
x
-1
-2
-3
-4
-5
-6
1 2 3 4 5 6
extends
forever
x+y=6
solid
step 4: Identify feasible area that is both colors
34
Chapter 10 Linear Programming
Page
x≥0
y≥0
Step 5: reality constraints
2
(?,?)
1
(4,0)
2
3
4
5
ADDITION
x-y =4
(6,0) x + y = 6
2x
= 10
6
x=5
-1
x+y =6
5+y =6
y =1
-2
-3
(?,?) is (5,1)
-4
(5,1)
Feasible
area
(4,0)
of
the “reality constraints”
eliminate all negative x and y areas….
This feasible area remains…..
Identify the corner vertices (4,0) from intercepts
(6,0) “
“
(?,?) use Addition
y
1
24
(6,0)
34
Chapter 10 Linear Programming
Page
Draw the feasible area graph:
Graph 4 linear inequalities
and indentify feasible
area and vertices
25
of
x - y ≤ 1 (solid)
x ≥ 2 (solid)
x≥0
reality
y≥0
constraints
step 1: draw linear equality x - y = 1
(solid)
Set x = 0, find y
Set y = 0, find x
draw linear equality x = 2
(solid)
this is a vertical line at x = 2
x-y=1
(0) - y = 1
y = - 1 (0, -1)
x-y=1
x - (0) = 1
x= 1
(1, 0)
step 2: pick a “test point” anywhere on the graph except on a line. If line doesn’t go
through origin (0,0), pick (0,0). I used (0,0) for both.
step 3: substitute test point into each linear inequality
test point (0,0)
test point (0,0)
x - y ≤ 1`
x=2
(0) - (0) ≤ 1 true/false?
(0) = 2 true/false?
0 ≤ 1 true
0 = 2 false
shade toward the test point
shade away from the test point side
step 4: hi-lite the combined area
y
combined feasible area
(0,0) (1,0)
x
(0,-1)
x-y=1
x=2
34
Chapter 10 Linear Programming
Page
reality constraints eliminates all negative x and y and reduces feasible area to
y
x=2
feasible area
extends forever
x-y=1
(?,?) Use ADDITION
x
(x - y = 1)(-1)
- x + y = -1
x
= 2
y= 1
(?,?) is (2, 1)
feasible area
extends forever
(2,1)
26
of
34
Chapter 10 Linear Programming
Page
Draw the feasible area graph:
Graph the 4 inequalities on the same axes to find the feasible area, and its vertices:
x + y ≤ 5 (solid)
2x + y ≤ 8 (solid)
x≥0
reality
y≥0
constraints
step 1: draw linear equality x + y = 5
draw linear equality 2x + y = 8
Set x = 0, find y
Set y = 0, find x
Set x = 0, find y
Set y = 0, find x
x+y=5
(0) + y = 5
y= 5
(0, 5)
x+y= 5
x + (0) = 5
x= 5
(5, 0)
2x + y = 8
2(0) + y = 8
y=8
(0, 8)
2x + y = 8
2x + 0 = 8
x=4
(4,0)
2x + y = 8
(0,8)
(0,5)
(0,0)
x
(4,0)
(5,0)
x+y=5
step 2: pick a “test point” anywhere on the graph except on a line. If line doesn’t go
through origin (0,0), pick (0,0). I used (0,0) for both.
step 3: substitute test point into each linear inequality
test point (0,0)
test point (0,0)
x + y≤ 5
2x + y ≤ 8
(0) + (0) ≤ 5 true/false?
2(0) + 0 ≤ 8 true/false?
0 ≤ 5 true
0 ≤ 8 true
shade toward test point
shade toward test point
27
of
34
Chapter 10 Linear Programming
Page
2x + y = 8
feasible area both
(0,5)
x
(0,0)
(4,0)
x+y=5
now apply the reality constraints x ≥ 0
y≥0
2x + y = 8
(0,5)
feasible area has
no negative x or y areas
x
(0,0)
(4,0)
x+y=5
28
of
34
Chapter 10 Linear Programming
Page
(0,5)
2x + y = 8
(?,?) use Addition
x+y=5
(0,0)
(x + y = 5)(-1)
-x - y = -5
2x + y = 8
(4,0)
x
= 3
x+y=5
(3) + y = 5
y=2
vertex at intersection = (3,2)
y
(0,5)
(3,2)
x
(0,0)
(4,0)
29
of
34
Chapter 10 Linear Programming
Page
30
of
34
Do these practice problems: problems in text book aren’t appropriate enough for our Math 102.
1a.) The 4 constraints (inequalities) for a certain linear programming problem are given below.
Sketch and shade the feasible region for all 4 on the same set of axes.
x + y < 1 (dashed)
x - y < 5 (dashed)
x≥0
y≥0
reality
constraints
sketch
all 4
1b.) Identify all the feasible area corner points.
Answer: see page 19.
2.) Graph 4 linear inequalities
find feasible area
and all corners
x - y ≥ 4 (solid)
x + y ≤ 6 (solid)
x≥0
reality
y≥0
constraints
sketch
all 4
Answer: see page 22.
3.) Graph the 4 inequalities on the same axes to find the feasible area, and its vertices:
x + y ≤ 5 (solid)
2x + y ≤ 8 (solid)
x≥0
y≥0
Answer: see page 26.
reality
constraints
Chapter 10 Linear Programming
Page
31
of
34
Review 5 steps
Step A.) Write/draw all the inequalities (constraints) one at a time. .
Step B.) Pick a test point for each, and shade the feasible area of each inequality
(constraint). If line doesn’t go through origin (0,0), pick (0,0).
Step C.) If there are reality constraints, they will eliminate large areas of shading…the
reality constraints will eliminate all negative x and y values. Show only the
resulting combined shaded feasible area.
Step D.) Determine the (x,y) values for each vertex of the combined feasible area;
use the intercepts and/or ADDITION.
Step E.) Determine the value of the objective function at each corner of the feasible area. Some
problems require you to write the objective function first. The largest value will be the
MAXIMUM. The smallest value will be the MINIMUM
EXAMPLE: Chair Company makes 2 types rocking chairs: plain and fancy. The plain chair takes 4
hours to assemble and 4 hours to finish. The fancy chair takes 8 hours to assemble and
12 hours to finish. There are at most 160 hours for assembly and 180 hours for finishing.
Write the assembly and finishing constraints - let x = plain chairs
y = fancy chairs
Assembly: 4x + 8y ≤ 160
Finishing: 4x + 12y ≤ 180
x ≥ 0 reality
y ≥ 0 constraints
Draw linear equality 4x + 8y = 160
draw linear equality 4x + 12y = 180
Set x = 0, find y
Set y = 0, find x
Set x = 0, find y
Set y = 0, find x
4x + 8y = 160
4(0) + 8y = 160
8y = 160
y = 20 (0,20)
4x + 8y = 160
4x + 8(0) = 160
4x = 160
x = 40 (40,0)
4x + 12y = 180
4(0) + 12y = 180
y = 15 (0,15)
4x + 12y = 180
4x + 12(0) = 180
4x = 180
x = 45 (45,0)
Pick a “test point” anywhere on the graph except on a line. If line doesn’t go
through origin (0,0), pick (0,0). I used (0,0) for both.
4x + 8y = 160
25
20
15
10
5
0
(0,20)
(0,15)
5 10 15 20 25 30 35 40 45
(40,0)(45,0)
4x + 12y = 180
Chapter 10 Linear Programming
Page
32
Substitute test point into each linear inequality and shade the feasible area
test point (0,0)
test point (0,0)
4x + 8y ≤ 160
4x + 12y ≤ 180
4(0) + 8(0) ≤ 160 true/false?
4(0) + 12(0) ≤ 180 true/false?
0 ≤ 160 true
0 ≤ 180 true
shade toward test point
shade toward test point
4x + 8y = 160
25
20
15
10
5
0
(0,20)
(0,15)
5 10 15 20 25 30 35 40 45
(40,0)(45,0)
4x + 12y = 180
Apply reality constraints and find all vertices of feasible area
(0,15)
(?,?)
(0,0)
ADDITION
(4x + 12y = 180)(-1)
4x + 8y = 160
-4x - 12y = -180
- 4y = -20
y=5
Subst y = 5 into either equation
4x + 8y = 160
4x + 8(5) = 160
4x = 120
x = 30
(?,?) is (30,5)
(40,0)
(0,15)
(30,5)
(0,0)
(40,0)
of
34
Chapter 10 Linear Programming
Page
33
of
34
Find maximum profit
EXAMPLE: Chair Company profits is $40 per plain and $65 per fancy chair.
let x = plain chairs
y = fancy chairs
Objective function: Profit = 40x + 65y
Calculate profit at each vertex to find the maximum profit
(0,0)
(0,15)
(30,5)
(40,0)
P = 40x + 65y profit
40(0) + 65(0)
0
40(0) + 65(15) 975
40(30) + 65(5) 1,525
40(40) + 65(0) 1,600
Max profit occurs when they make 40 plain and 0 fancy chairs
“That’s a lot
of work”
Yes it is. During a quiz, test, or final exam, linear programming problems will be broken down
into 6 smaller parts!
Chapter 10 Linear Programming
Page
34
of
34
Practice problem 4.)
Chair Company makes 2 types rocking chairs: plain and fancy. The plain chair takes 4 hours to
assemble and 4 hours to finish. The fancy chair takes 8 hours to assemble and 12 hours to finish.
There are at most 160 hours for assembly and 180 hours for finishing.
4a.) Write the assembly and finishing constraints (including reality constraints).
let x = plain chairs
y = fancy chairs
4b.) Draw the feasible area that is defined by above constraints, show how you used test points for
shading.
4c.) Find all the corner vertices of the feasible area; express them as coordinates of the feasible area.
4d.) Chair Company profits is $40 per plain and $65 per fancy chair.
let x = plain chairs
y = fancy chairs
Write the profit objective function for profit P:
4e.) Determine the maximum profit (P) that is possible
4f.) How many of each type chair must be made to attain maximum profit.
Answer: see page 30.
Download