Linear Programming
Linear Programming
x=2 on a Graph
x<2 on a Graph
y=4 on a Graph
y>4 on a Graph
y=x+4 on a Graph
y<x+4 on a Graph
y>x+4 on a Graph
Example
• Question 1
A boy finds he can pick no more than 20kg of oranges or no more
than 16kg of grapes in a day. However he is told that he is not
allowed to pick more than 30kg of fruit in total. If he is paid $3 for
each kilogram of grapes and $5 for each kilogram of oranges,
calculate how many kilograms of grapes and oranges he needs to
pick to earn a maximum wage.
Name your Variables
• First thing we decide on the variables
Let x = the kg of oranges to be picked
Let y = the kg of grapes to be picked
Pick Inequalities from Question
Wage Equation
• Note also that there is another function, his wage equation,
sometimes called the objective function or profit function depending
on the situation it is S = 5x + 3y. We do NOT graph this function
Draw Your Graph
• The next step is to set up your graph paper and draw your graph.
Note before drawing x+y<30, it has to be rewritten as y<30 - x and
treated y = 30 -x. You don’t need more than two pairs of coordinates
to draw a straight line graph. Note that for x = 0, y = 30 - 0 = 30 so one
pair of coordinates is (0, 30). Also if x = 15, then y = 30 – 15 = 15,
which gives another coordinate as (15, 15). Those two points are
sufficient to draw this function
Example 2
gardener can plant no more than 10 rows of tomatoes in his garden
A
but he wants to plant at least one row of tomatoes. His son would like
to plant at least two rows of corn. Unfortunately the garden can only
accommodate 14 rows of plants. When they sell the vegetables they
will get $30 for each row of tomatoes and $20 for each row of corn.
How many rows of each crop should they plant to get the maximum
return for their produce?
Name your Variables
• First we designate the variables
Let x be the number of tomato rows
Let y be the number of corn rows
Pick Inequalities from Question
Solution
Solution
Solution