linear programming warm up page 12- write the question and answer it you have 10 mins to complete...
TRANSCRIPT
Linear ProgrammingWarm Up
page 12- write the question and answer it you have 10 mins
to complete it. See coaching on page 85
A linear programming problem is made up of an objective function and a system of constraints.
•The objective function is an algebraic expression in two or more variables describing a quantity that must be maximized or minimized. It has the form
z = Ax + By•The system of constraints are made up of a system of linear inequalities. In applications, the variables are also limited to positive values.
The solution to the linear programming problem, if it exists, will occur at the vertices (corner points) of the solution region obtained from the system of constraints.
Linear Programming Problems
Bottled water and medical supplies are to be shipped to victims of an earth-quake by plane. Each container of bottled water will serve 10 people and each medical kit will aid 6 people. If x represents the number of bottles of water to be shipped and y represents the number of medical kits, write the objective function that describes the number of people that can be helped.
Solution Because each bottle of water serves 10 people and each medical kit aids 6 people, we have
z = 10x + 6y.Using z to represent the objective function, we have
z = 10x + 6y.Unlike the functions that we have seen so far, the objective function is an equation in three variables. For a value of x and a value of y, there is one and only one value of z. Thus, z is a function of x and y.
6 times the number of medical kits.
10 times the number of bottles of water plusis
The number ofPeople helped
Part 1Writing the objective function
ExampleWriting the objective function
Each plane can carry no more than 80,000 pounds. The bottled water weighs 20 pounds per container and each medical kit weighs 10 pounds. If x represents the number of bottles of water to be shipped and y represents the number of medical kits, write an inequality that describes this constraint .
Solution Because each plane can carry no more than 80,000 pounds,
The plane's volume constraint is described by the inequality 20x + 10y < 80,000.
20x + 10y < 80,000.
80,000 pounds
The total weight ofthe medical kits
must be less than or equal toplus
The total weight ofthe water bottles
Each bottle is 20 pounds.
Each kit is 10 pounds.
Planes can carry a total volume for supplies that does not exceed 6000 cubic feet. Each water bottle is 1 cubic foot and each medical kit also has a volume of 1 cubic foot. With x still representing the number of water bottles and y the number of medical kits, write an inequality that describes this constraint.
Solution Because each plane can carry a volume of supplies that does not exceed 6000 cubic feet, we have
The plane's volume constraint is described by the inequality x + y < 6000.
lx + ly < 6000.
6000 cubic feet.
The total volume ofthe medical kits
must be less than or equal toplus
The total volume ofthe water bottles
Each bottle is 1 cubic foot.
Each kit is 1 cubic foot.
ExampleWriting the constraint
Copyright © by Houghton Mifflin Company, Inc. All rights reserved.
6
Expressions of the type x + 2y ≤ 8 and 3x – y > 6are called linear inequalities in two variables (x and y) or constraints.
The sign (< or < or > or >) tells they are inequalities and the variables are x and y
A solution of a linear inequality in two variables is an ordered pair (x, y) which makes the inequality true.
Example: (1, 3) is a solution to x + 2y ≤ 8 since (1) + 2(3) = 7 ≤ 8.
Solution of Linear Inequalities
Part 2 Linear Inequalities (Constraints)
Before we can find the maximum or minimum values(solutions) of any system we must first find the objective function and the inequalities
(constraints)Problem 1
• A farmer can plant up to 8 acres of land with wheat and barley. He can earn $5,000 for every acre he plants with wheat and $3,000 for every acre he plants with barley. His use of a necessary pesticide is limited by federalregulations to 10 gallons for his entire 8 acres. Wheat requires 2 gallons of pesticide for every acre planted and barley requires just 1 gallon per acre.
What is the maximum profit he can make?
Objective Function (aim or purpose or goal)let x = the number of acres of wheatlet y = the number of acres of barley.
since the farmer earns $5,000 for each acre of wheat and $3,000 for each acre of barley, then the total profit the farmer can earn is 5000*x + 3000*y.
let p = total profit that can be earned. your equation for profit becomes:
p = 5000x + 3000y
that's your objective function. It's what you want to maximize/minimize or to use to gain the maximum/minimum profit.
The constraints are:• number of acres has to be greater than or equal to 0.1) x > 0 2) y > 0• number of acres has to be less than or equal to 8.3) x + y < 8• amount of pesticide has to be less than or equal to 10.4)2x + y < 10 We can use a table to find the constraints
x y
WHEAT BARLEY TOTAL
x > 0
y > 0
Acres x y < 8
Pesticide 2x y < 10
Your constraint inequalities are:
• x > 0• y > 0• x + y < 8• 2x + y < 10
PROBLEM NUMBER 2A painter has exactly 32 units of yellow dye and 54 units of green dye.He plans to mix as many gallons as possible of color A and color B.Each gallon of color A requires 4 units of yellow dye and 1 unit of green dye.Each gallon of color B requires 1 unit of yellow dye and 6 units of green dye.
Find the maximum number of gallons he can mix.
Objective Function (this is not an inequality/constraint)
let x = the number of gallons of color A.let y = the number of gallons of color B.
if we let g = the maximum gallons the painter can make, then the objective function becomes:
g = x + y
Your Constraints• make a table for color A and color B to determine the amount of each dye required.• Each gallon (color A/B) has to be greater than or equal to 0 or x and y have to each be greater than or equal to 0 because the number of gallons can't be negative.1) x > 0 2) y > 0each gallon of color A or B will require:total units of yellow dye available are 323) 4x + y < 32
total units of green dye available are 54 4) x + 6y < 54
x y
COLOR A
COLOR B
TOTAL
X > 0
y > 0
YELLOW
4x y < 32
GREEN x 6y < 54
Your Constraints/ Inequalities:
• x >= 0• y >= 0• 4x + y <= 323) 4x + y < 324) x + 6y < 54
allons can't be negative.
1) x > 0 2) y > 0
PROBLEM NUMBER 3The Bead Store sells material for customers to make their own jewelry. Customer can select beads from various bins. Grace wants to design her own Halloween necklace from orange and black beads. She wants to make a necklace that is at least 12 inches long, but no more than 24 inches long. Grace also wants her necklace to contain black beads that are at least twice the length of orange beads. Finally, she wants her necklace to have at least 5 inches of black beads.
Objective Functionlet x = the number of inches of black beads.let y = the number of inches of orange beads.
the objective function is the length of the necklacethere is a maximum length and a minimum length.
if you let n equal the length of the necklace, then the objective function becomes:
n = x + y
The constraints are:
• x > 0 is there because the number of inches of black beads can't be negative.
• y > 0 is there because the number of inches of orange beads can't be negative.
• x + y > 12 is there because the total length of the necklace has to be greater than or equal to 12 inches.
• x + y < 24 is there because the total length of the necklace has to be less than or equal to 24 inches.
• x > 2y is there because the length of the black beads has to be greater than or equal to twice the length of the orange beads.
• x > 5 is there because the number of inches of black beads has to be greater than or equal to 5.
On a table:GRACE
NECKLACE CHOICES
x y
BLACK BEADS
ORANGE BEADS
TOTAL
1st CHOICE x > 0
2nd CHOICE y > 0
3RD CHOICE x y > 12
4TH CHOICE x y < 24
5TH CHOICE x > 2y
6TH CHOICE x > 5
Constraints Since the problem is looking for the number of inches of black beads and the number of inches of orange beads, we will let:
the constraint equations for this problem are:1) x > 02) y > 03) x + y >124) x + y < 245) x > 2y6) x > 5
PROBLEM NUMBER 4A garden shop wishes to prepare a supply of special fertilizer at a minimal cost by mixing two fertilizers, A and B.The mixture is to contain:at least 45 units of phosphateat least 36 units of nitrateat least 40 units of ammoniumFertilizer A costs the shop $.97 per pound.Fertilizer B costs the shop $1.89 per pound.fertilizer A contains 5 units of phosphate and 2 units of nitrate and 2 units of ammonium.fertilizer B contains 3 units of phosphate and 3 units of nitrate and 5 units of ammonium.
how many pounds of each fertilizer should the shop use in order to minimize their cost.
Objective Equation
let x = the number of pounds of fertilizer A.let y = the number of pounds of fertilizer B.
the objective function is to minimize the cost.
the objective function becomes:
c = .97x + 1.89y
The constraints are:since the number of pounds of each fertilizer can't be negative, 2 of the constraint equations become:
x >= 0y >= 0
since the number of units of phosphate has to be at least 45, the constraint equation for phosphate becomes:
5x + 3y >= 45
since the number of units of nitrate must be at least 36, the constraint equation for nitrates becomes:
2x + 3y >= 36
since the number of units of ammonium must be at least 40, the constraint equation for ammonium becomes:
2x + 5y >= 40
Constraints Equations:
• x >= 0• y >= 0• 5x + 3y >= 45• 2x + 3y >= 36• 2x + 5y >= 40
Let’s graph :x + 2y ≤ 8
Part 3:To graph any inequality:YOU DO NOT NEED TO WRITE THE STEPS I WILL GIVE
IT TO YOU AT THE END
1.Make x = 0 and solve for y (y intercept)2.Make y = 0 and solve for x ( x intercept)3.Plot both intercepts and draw the line4.< or > tells you that the line should be broken(dotted line)5.< or > tells you that the line should not be broken 6.< or < shade up on the y axis and to the right on the x axis7.> or > shade down on the y axis and to the left of the x axis
Copyright © by Houghton Mifflin Company, Inc. All rights reserved.
26
The solution set, or feasible set, of a linear inequality is the set of all solutions (the region (shaded) that satisfies the inequality)
The solution set is a half-plane. It consists of the line
x + 2y ≤ 8 and all the points below and to its left.
The line is called the boundary line of the half-plane.
Example: The solution set for x + 2y ≤ 8 is the shaded region. x
y
2
2
Copyright © by Houghton Mifflin Company, Inc. All rights reserved.
27
x
yExample: For 2x – 3y ≤ 18 graph the boundary line. Use the previous steps to guide you.The solution set is a half-plane.
A test point can be selected to determine which side of the half-plane to shade.
Shade above and to the left of the line.
Use (0, 0) as a test point. This is where x > 0and y > 0
(0, 0) is a solution. So all points on the (0, 0) side of the boundary line are also solutions.
(0, 0)
2-2
Copyright © by Houghton Mifflin Company, Inc. All rights reserved.
28
x
y
Example: Graph the solution set for x – y > 2.
1. Graph the boundary line x – y = 2 as a dotted line.
2. Select a test point not on the line, say (0, 0).
(0) – 0 = 0 > 2 is false.
3. Since this is a not a solution, shade in the half-plane not containing (0, 0).
(0, 0)
(2, 0)
(0, -2)
Copyright © by Houghton Mifflin Company, Inc. All rights reserved.
29
Solution sets for inequalities with only one variable can be graphed in the same way.
Example: Graph the solution set for x < - 2.
x
y
4
4
- 4
- 4
x
y
4
4
- 4
- 4
Example: Graph the solution set for x ≥ 4.
Copyright © by Houghton Mifflin Company, Inc. All rights reserved.
30
A solution of a system of linear inequalities is an ordered pair that satisfies all the inequalities.
(5, 4) is a solution of x + y > 8.(5, 4) is also a solution of 2x – y ≤ 7.
Since (5, 4) is a solution of both inequalities in the system, it is a solution of the system.
Example: Find a solution for the system .
72
8
yx
yx
Copyright © by Houghton Mifflin Company, Inc. All rights reserved.
31
The set of all solutions of a system of linear inequalities is called its solution set.
1. Shade the half-plane of solutions for each inequality in the system.
To graph the solution set for a system of linear inequalities in two variables:
2. Shade in the intersection of the half-planes.
Copyright © by Houghton Mifflin Company, Inc. All rights reserved.
32
x
yGraph the solution set for x + y > 8.
The solution set is the intersection of these two half-planes. This is the wedge-shaped region at the top of the diagram.
Graph the solution set for 2x – y ≤ 7.
Example: Graph the solution set for the system
72
8
yx
yx
2
2
Copyright © by Houghton Mifflin Company, Inc. All rights reserved.
33
Example: Graph the solution set for the system of
linear inequalities:
Graph the two half-planes.
The two half-planes do not intersect; therefore, the solution set is the empty set.
x
y
2x – 3y ≥ 12
-2x + 3y ≥ 6
632
1232
yx
yx
2
2
Linear ProgrammingWarm Up
page 12- write the question and answer it you have 10 mins
to complete it. See coaching on page 85
Copyright © by Houghton Mifflin Company, Inc. All rights reserved.
35
x
y
4
4
- 4
- 4
Try this: Graph the solution set for the linear system.
Graph each linear inequality.
The solution set is the intersection of all the half-planes.
1
2
16
332
y
x
yx
yx(1)(1)
(2)
(2)
(3)
(3)
(4)
(4)
Solving a Linear Programming Problem Review
• If a maximum or minimum value of z = Ax + By exists, it can be determined as follows:
a. Find the constraints (inequalities)b. Graph the system of inequalities representing the
constraints.c. Find the value of the objective function at each corner
of the graphed region.d. Use the values that you found in the prior step to
determine the maximum or minimum value of the objective function and the values of x and y for which the maximum or minimum occurs.
Given the following constraints and an objective function of z = 10x + 6y find the maximum and minimum values. Give reasons for your answers.y> 0x >0
1
2
16
332
y
x
yx
yx
Let’s practice
Work in pairs
GRAPH THE FOLLOWING INEQUALITIES AND SHADE THE APPROPRIATE REGION. Sit and work individually. All solutions will be reviewed at the end of the warm up. label and number all axes accurately.
1. The solution set for x + 2y ≤ 8 (the shaded region).
2. The boundary line of the solution set of 3x – y ≥ 2
3. The boundary line of the solution set of x + y < 2
4. For 2x – 3y ≤ 18 graph the boundary line.
5. Graph the solution set for x – y > 2
6. Graph the solution set for x < - 2
7. Graph the solution set for x ≥ 4.
Solving a Linear Programming Problem Review
• If a maximum or minimum value of z = Ax + By exists, it can be determined as follows:
a. Find the constraints (inequalities)b. Graph the system of inequalities representing the
constraints.c. Find the value of the objective function at each corner
of the graphed region.d. Use the values that you found in the prior step to
determine the maximum or minimum value of the objective function and the values of x and y for which the maximum or minimum occurs.
Example
• Solve:
Steps:a. Write/Identify the constraintsb. Graph the system of inequalities representing the constraints.c. Find the value of the objective function at each corner of the graphed region.d. Use the values that you found in the prior step to determine the maximum value of
the objective function and the values of x and y for which the maximum occurs.
3 2
: 2 8
4
0, 0
Max z x y
subject to x y
x y
x y
Example cont.
• Graph the constraints:
0, 0
2 8
4
x y
x y
x y
-10 -8 -6 -4 -2 2 4 6 8 10
-10
-8
-6
-4
-2
2
4
6
8
10
Example cont.
x > 0
y > 0
Example cont.
2x+y<8
Example cont.
x+y>4
Example cont.
• Corners:
(4,0), (0,4), (0,8)
Example cont.
Objective function z = 3x+2y
Corners Objective function
(4,0) z = 3(4) + 2 (0) = 12
(0,4) z = 3(0) + 2(4) = 8
(0,8) z = 3(0) + 2(8) = 16
The maximum value of the objective function is 16 and it occurs when x = 0 and y = 8
-1-3 -2 1 3 4 5 6 7
5
4
2
1
-3
-4
-5
-1
-2
x – y = 2
x + 2y = 5(0, 2.5)
(0, 0)(3, 1)
(2, 0)
Find the maximum value of the objective function z = 2x + y subject to the constraints: x > 0, y > 0, x + 2y < 5, x – y < 2.
Solution We begin by graphing the region in quadrant I (x > 0, y > 0) formed by the constraints.
Thus, the maximum value of z is 7, and this occurs when x = 3 and y = 1.
Now we evaluate the objective function at the four vertices of this region.
Corners Obj. Func.: z = 2x + y(0, 0) z = 2 • 0 + 0 = 0(2, 0) z = 2 • 2 + 0 = 4(3, 1) z = 2 • 3 + 1 = 7(0, 2.5) z = 2 • 0 + 2.5 = 2.5
The maximum value of z.
Example
5 MINSNO MARK WILL BE AWARDED IF AXES ARE NOT LABELLED AND NUMBERED
1. USING ONE GRAPH SHEET DRWA UP FOUR DIFFERENT PAIRS OF AXES
2. LABEL EACH AXIS USING “x” AND “y”
3. NUMBER EACH AXIS AS FOLLOWS AND DRAW THE FOLLOWING LINES AND SHADE THEM.
- FIRST PAIR OF AXES MUST BE 4 POINTS TO ONE UNIT. DRAW AND SHADE x > -8
- SECOND PAIR OF AXES MUST BE 100 POINTS TO ONE UNIT ON BOTH AXES. DRAW AND SHADE y < 400
- THIRD PAIR OF AXES MUST BE 500 POINTS TO ONE UNIT ON BOTH AXES. DRAW AND SHADE 1000 < x > 4000
- FOURTH AXES MUST BE 1000 POINTS TO ONE UNIT ON THE “x” AXIS AND 2 POINTS TO ONE UNIT ON THE “y” AXIS.
Draw the line for the following points ( 1500, 4) and (3000, 3.5)
Lets listen:
https://www.youtube.com/watch?v=kpzIxQbLhME