Sie sind auf Seite 1von 17

Linear Programming Problems

Steve Wilson
1. A farmer has 10 acres to plant in wheat and rye. He has to plant at least 7 acres. However, he
has only $1200 to spend and each acre of wheat costs $200 to plant and each acre of rye costs
$100 to plant. Moreover, the farmer has to get the planting done in 12 hours and it takes an hour
to plant an acre of wheat and 2 hours to plant an acre of rye. If the profit is $500 per acre of
wheat and $300 per acre of rye how many acres of each should be planted to maximize profits?

2. A gold processor has two sources of gold ore, source A and source B. In order to kep his plant
running, at least three tons of ore must be processed each day. Ore from source A costs $20 per
ton to process, and ore from source B costs $10 per ton to process. Costs must be kept to less
than $80 per day. Moreover, Federal Regulations require that the amount of ore from source B
cannot exceed twice the amount of ore from source A. If ore from source A yields 2 oz. of gold
per ton, and ore from source B yields 3 oz. of gold per ton, how many tons of ore from both
sources must be processed each day to maximize the amount of gold extracted subject to the
above constraints?

3. A publisher has orders for 600 copies of a certain text from San Francisco and 400 copies from
Sacramento. The company has 700 copies in a warehouse in Novato and 800 copies in a
warehouse in Lodi. It costs $5 to ship a text from Novato to San Francisco, but it costs $10 to
ship it to Sacramento. It costs $15 to ship a text from Lodi to San Francisco, but it costs $4 to
ship it from Lodi to Sacramento. How many copies should the company ship from each
warehouse to San Francisco and Sacramento to fill the order at the least cost?

STEVE WILSON MATH 131 LINEAR PROGRAMMING PROBLEM NUMBER 2


A gold processor has 2 sources of gold ore, source A and source B. In order to keep
his plant running, at least 3 tons of ore must be processed each day. Ore from
source A costs $20 per ton to process and ore from source B costs $10 per ton to
process. Costs must be kept to less than $80 per day. Moreover, Federal Regulations
require that the amount of ore from source B cannot exceed twice the amount of ore
from source A. If ore from source A yields 2 oz. of gold per ton, and ore from source
B yields 3 oz. of gold per ton, how many tons of ore from both sources must be
processed each day to maximize the amount of gold extracted subject to the above
constrains.
You need to find the objective equation and the constraint equations and then you
need to graph the constraint equations to find the area of compatibility within which
your answer will lie. The maximum and minimum values on this graph will always
be at the corners of the area of compatibility (the corners of the area of
compatibility are at the intersection points of the lines on the graph).
First thing to do is find the objective equation. This is the equation that contains the
variables that need to be maximized or minimized. This is sometimes also called the
objective function. A function is another term for an equation where there is only 1
value of the dependent variable for each value of the independent variable. y is
usually the dependent variable, but not always. x is usually the independent
variable, but not always.
Next thing you need to do is find the constraint equations. These are the equations
that limit the range of each of the constraint variables. These equations will be
graphed so you can find the area of compatibility. The area of compatibility is the
area on the graph that satisfies all the constraints of all the equations
simultaneously.
First figure out what variables you want to use and what they will represent.
x will represent the number of tons of source A.
y will represent the number of tons of source B.
The objective function will be:
maximum amount of gold = 2x + 3y *****
This is because each ton of ore from source A yields 2 ounces of gold and each ton
of ore from source B yields 3 ounces of gold.
the constraint equations will be:

x + y >= 3 *****
This is because at least 3 tons of ore have to be processed per day in order to keep
the processing plant running.
20x + 10y <= 80
This is because it takes 20 dollars per ton for source A and 10 dollars per ton for
source B to process the extraction of the gold from them.
y <= 2x
This is because government regulations require that the number of tons of ore from
source B cannot exceed 2 times the number of tons from source A.
x >= 0
y >= 0
This is because the number of tons of ore can never be negative.
You need to graph the constraint equations. In order to do that on most graphing
software, you need to solve for y in each of the constraint equations.
x + y >= 3 becomes y >= (3-x)
20x + 10y <= 80 becomes y <= (8 - 2x)
y <= 2x stays at y <= 2x
You now need to graph these equations. When you graph inequality equations, you
need to graph the equality portion of the equations to create the lines and then
shade the area that is compatible with the inequality portion of the equations.
In the following graph, arrows are used to show the area of compatibility with the
inequality portion of the equations. These arrows connect to the line of the equality
portion of the equation and show the direction of the area of compatibility of the
inequality portion of the equation.
The graph is shown below:

As you can see, the area of compatibility for y >- (3-x) is the area on the line of y =
(3-x) and above it. The area of compatibility for y <= 2x is the area on the line of y
= 2x and below it. The area of compatibility for y <= (8-2x) is the area on the line y
= (8-2x) and below it.
The area of compatibility that meets all the constraints of all the equations
simultaneously is the area within the quadrilateral marked ABCD. This is the area
that meets all of the constraints of all of the equations simultaneously.
The additional constaint that had to be met because the area of compatibility
crosses the x-axis is that the value of x has to be greater than or equal to 0. The x-

axis therefore provided the lower boundary of the area of compatibility.


Your answer will lie on the corners of this area which is the intersection points of the
lines that bound this area.
Those points are A (1,2), B (2,4), C (4,0), and D (3,0).
You need to evaluate the objective equation at each of these points.
The objective equation is maximum amount of gold = 2x + 3y.
At point A, x = 1 and y = 2 and the maximum amount of gold = 1*2 and 2*3 = 7.
At point B, x = 2 and y = 4 and the maximum amount of gold = 2*2 + 4*3 = 16.
At point C, x = 4 and y = 0 and the maximum amount of gold = 4*2 + 0*3 = 8.
At point D, x = 3 and y = 0 and the maximum amount of gold = 3*2 + 0*3 = 6
All the constraints have been met and your profit is maximized when x = 2 and y =
4 which is at point B.
The intersection points themselves are found by several methods, the easiest being
to use a graphing calculator that tells you what the intersection points are.
I use a TI-84 at home (TI-83 will do the same for you) and I use the Desmos
Graphing Calculator online.
You can also do it manually by following the rules for solving equations
simultaneously.
Here's a reference on linear equations that includes references and instructions on
how to solve linear equations simultaneously.

STEVE WILSON MATH 131 LINEAR PROGRAMMING PROBLEM NUMBER 3


A publisher has orders for 600 copies of a certain text from san francisco and 400
copies from sacramento. The company has 700 copies in a warehouse in novato and
800 copies in a warehouse in lodi. It costs 5 dollars to ship a text from novato to san
francisco and it costs 10 to ship a text from novato to sacramento. It costs 15
dollars to ship a text from lodi to san francisco and it costs 4 dollars to ship a text
from lodi to sacramento. How many copies should the company ship from each
warehouse to san francisco and to sacramento to fill the order at the least cost.
You need to find the objective equation and the constraint equations and then you
need to graph the constraint equations to find the area of compatibility within which
your answer will lie. The maximum and minimum values on this graph will always
be at the corners of the area of compatibility (the corners of the area of
compatibility are at the intersection points of the lines on the graph).
First thing to do is find the objective equation. This is the equation that contains the
variables that need to be maximized or minimized. This is sometimes also called the
objective function. A function is another term for an equation where there is only 1
value of the dependent variable for each value of the independent variable. y is
usually the dependent variable, but not always. x is usually the independent
variable, but not always.
Next thing you need to do is find the constraint equations. These are the equations
that limit the range of each of the constraint variables. These equations will be
graphed so you can find the area of compatibility. The area of compatibility is the
area on the graph that satisfies all the constraints of all the equations
simultaneously.
First figure out what variables you want to use and what they will represent.
Shipping to San Francisco:
x will represent the number of text shipped from novato to san francisco.
600 - x will represent the number of text shipped from lodi to san francisco.
This is because the total number of text to be shipped to San Francisco must be
equal to 600.
Shipping to Sacramento:
y will represent the number of text shipped from novato to sacramento.
400 - y will represent the number of text shipped from lodi to sacramento.

This is because the total number of text to be shipped to sacramento must be equal
to 400.
An overall summary of the variables required in the order of shipping from novato
and then shipping from lodi is shown below:
x will represent the number of text shipped from novato to san francisco.
y will represent the number of text shipped from novato to sacramento.
600 - x will represent the number of text shipped from lodi to san francisco.
400 - y will represent the number of text shipped from lodi to sacramento.
The objective function will be:
minimum cost equals 5 dollars times the number of text shipped from novato to san
francisco
plus 10 dollars times the number of text shipped from novato to sacramento
plus 15 dollars times the number of text shipped from lodi to san francisco
plus 4 dollars times the number of text shipped from lodi to sacramento.
replacing the words with the variables used to represent the words results in the
following equation:
minimum cost = 5*x + 10*y + 15*(600-x) + 4*(400-y)
the constraint equations will be:
x >=
y >=
600 400 -

0
0
x >= 0
y >= 0

This is because the number of text that are shipped can never be negative.
x + y <= 700
This is because the number of text shipped from novato has to be less than or equal
to 700.
600 - x + 400 - y <= 800
This is because the number of text shipped from lodi has to be less than or equal to
800.

You need to graph the constraint equations. In order to do that on most graphing
software, you need to solve for y in the equations that have y in them and solve for
x in the equations that only have x in them.
After solving for x in the equations that only have x in them and solving for y in the
equations that have y in them, you will get the following constraint equations:
x >= 0 becomes x >= 0
y >= 0 becomes y >= 0
600 - x >= 0 becomes x <= 600
400 - y >= 0 becomes y <= 400
x + y <= 700 becomes y <= 700 - x
600 - x + 400 - y <= 800 becomes y >= 200 - x
the equations that will be graphed are:
x
y
x
y
y
y

>=
>=
<=
<=
<=
>=

0
0
600
400
700 - x
200 - x

Some graphing software allows you to graph x = x1 directly. Other graphing


software needs you to convert this equation into a y = m * (x-x1) form of equation.
That is done as follows:
x = 0 would be converted to y = 10000 * x
x = 600 would be converted to y = 10000 * (x - 600)
The y = m*(x-x1) form of the equation is an equation where m is the slope and x1 is
a point on the x-axis.
What will happen in most graphing situations is that the line will appear vertical at
the value of x = x1. If x1 is 0, then the line will appear to be vertical at x = 0. if x1 is
600, then the line will appear to be vertical at x = 600.
The coefficient of 10000 is the slope of the line that is usually so large that the line
will appear to be vertical even though it is not.
You do not normally need to graph x = 0 because that is the y-axis and a vertical
line is already there.
You now need to graph these equations.

When you graph inequality equations, you need to graph the equality portion of the
equations to create the lines and then shade the area that is compatible with the
inequality portion of the equations.
Some graphing software allows you to graph inequalities directly but this does not
always produce a satisfactory result that is easy to visualize, so most of the time I
will graph the equality portion of the equation and then get a copy of the graph and
shade the inequality portion of the graph manually.
The equality portion of the equations is shown below:
x >= 0 does not need to be graphed because x = 0 is the y-axis and the vertical
line is already there.
y >= 0 does not need to be graphed because y = 0 is the x-axis and the horizontal
line is already there.
x <= 600 would be graphed as x = 600 or y = 10000 * (x - 600).
y <= 400 would be graphed as y = 400.
y <= 700 - x would be graphed as y = 700 - x.
y >= 200 - x would be graphed as y = 200 - x.
The equality portion of the equation is the line on the graph. The inequality portion
of the equation is the shaded area on the graph.
Another note of interest:
When you graph an inequality, if the equation is y > or y <, then the line needs to
be dashed. If the equation is y >= or y <=, then the line needs to be solid. With
graphing software that may be difficult because not all graphing software will
distinguish between these nuances, so the dashed line or the solid line would have
to be manually corrected. In that case, a dashed line might appear as a solid line
with a dashed line overlay. Since all of the inequalities in this problem are of the >=
or <= variety, dashed lines are not applicable and not shown.

In the following graph, arrows are used to show the area of compatibility with the
inequality portion of the equations. These arrows connect to the line of the equality
portion of the equation and show the direction of the area of compatibility of the
inequality portion of the equation.
The graph is shown below:

As you can see, the area of compatibility for y >= 0 is the area on the line of y = 0
and above it. The area of compatibility for x >= 0 is the area on the line of x = 0
and to the right of it.
y = 0 is the x-axis. x = 0 is the y-axis. The area of compatibility for x <= 600 is the
line x = 600 and the area to the left of it. The area of compatibility for y <= 400 is
the line y = 400 and the area below it. The area of compatibility for y <= 700 - x is
the line y = 700 - x and the area below it. The area of compatibility for y >= 200 - x
is the line y = 200 - x and the area above it.
The area of compatibility that meets all the constraints of all the equations
simultaneously is the area within the 6 sided figure marked ABCDEF. This is the area
that meets all of the constraints of all of the inequality equations simultaneously.
Your answer will lie on the corners of this area which is the intersection points of the
lines that bound this area.
Those points are:

A (0,400)
B (300,400)
C (600,100)
D (600,0)
E (200,0)
F (0,200)
You need to evaluate the objective equation at each of these points.
The objective equation is:
Minimum Cost = 5*x + 10*y + 15*(600-x) + 4*(400-y)
At point A, x = 0 and y = 400 and the cost = 5*0 + 10*400 + 15*600 + 4*(0) =
13000
At point B, x = 300 and y = 400 and the cost = 5*300 + 10*400 + 15*300 + 4*(0)
= 10000
At point C, x = 600 and y = 100 and the cost = 5*600 + 10*100 + 15*0 + 4*300 =
5200
At point D, x = 600 and y = 0 and the cost = 5*600 + 10*0 + 15*0 + 4*400 = 4600
*****
At point E, x = 200 and y = 0 and the cost = 5*200 + 10*0 + 15*400 + 4*400 =
8600
At point F, x = 0 and y = 200 and the cost = 5*0 + 10*200 + 15*600 + 4*200 =
11800
The minimum cost solution is at point D where the minimum cost is $4600.00 and
the value of x is equal to 600 and the value of y is equal to 0.
The number of text shipped from Novato is equal to x + y which is equal to 600.
The number of text shipped from Lodi is equal to (600 - x) and (400 - y) which is
equal to 400.
The total number of text shipped to San Francisco is equal to x + 600 - x which is
equal to 600.
The total number of text shipped to Sacramento is equal to y + 400 - y which is
equal to 400

Let's examine all the constraint equations when x = 600 and y = 0 to see that they
all have been met.
The constraint equations are:
x >= 0
y >= 0
600 - x >= 0
400 - y >= 0
x + y <= 700
600 - x + 400 - y <= 800
When x = 600 and y = 0, these constraint equations become:
x >= 0 becomes 600 >= 0 which is true.
y >= 0 becomes 0 >= 0 which is true.
600 - x >= 0 becomes 600 - 600 >= 0 which becomes 0 >= 0 which is true.
400 - y >= 0 becomes 400 - 0 >= 0 which becomes 400 >= 0 which is true.
x + y <= 700 becomes 600 + 0 <= 700 which becomes 600 <= 700 which is true.
600 - x + 400 - y <= 800 becomes 600 - 600 + 400 - 0 <= 800 which becomes 0 +
400 <= 800 which becomes 400 <= 800 which is true.
All the constraint equations have been met therefore the minimum cost solution is
good.
The difficulty in this problem is in the up front analysis where you are presented
with what looks like 4 variables that need to be solved.
Those variables could have been:
x will represent the number of text shipped from novato to san francisco.
y will represent the number of text shipped from novato to sacramento.
z will represent the number of text shipped from lodi to san francisco.
q will represent the number of text shipped from lodi to sacramento.
The fact that z can be made equal to 600 - x because 600 text have to be shipped
to san francisco allows the elimination of z as a variable by replacing it with 600 - x.
The fact that q can be made equal to 400 - y because 400 text have to be shipped
to sacramento allows the elimination of q as a variable by replacing it with 400 - y.
That allows you to make this a 2 variable problem rather than a 4 variable problem
which allows it to meet the requirements of solving the equations graphically on a

two dimensional plane.


You would not have been able to solve this problem graphically without making
these substitutions.
The intersection points themselves are found by several methods, the easiest being
to use a graphing calculator that tells you what the intersection points are.
I use a TI-84 at home (TI-83 will do the same for you) and I use the Desmos
Graphing Calculator online. The TI-84 will solve for the intersection points when you
ask it to. The Desmos Graphing Calculator will show you what the intersection
points are when you click on them.
You can also do it manually by following the rules for solving equations
simultaneously.
Here's a reference on linear equations that includes references and instructions on
how to solve linear equations simultaneously.

STEVE WILSON MATH 131 LINEAR PROGRAMMING PROBLEM NUMBER 1


A farmer has 10 acres to plant in wheat and rye. He has to plant at least 7 acres.
However, he has only $1200 to spend and each acre of wheat costs $200 to plant
and each acre of rye costs $100 to plant. Moreover, the farmer has to get the
planting done in 12 hours and it takes an hour to plant an acre of wheat and 2 hours
to plant an acre of rye. If the profit is $500 per acre of wheat and $300 per acre of
rye how many acres of each should be planted to maximize profit?
You need to find the objective equation and the constraint equations and then you
need to graph the constraint equations to find the area of compatibility within which
your answer will lie. The maximum and minimum values on this graph will always
be at the corners of the area of compatibility (the corners of the area of
compatibility are at the intersection points of the lines on the graph).
First thing to do is find the objective equation. This is the equation that contains the
variables that need to be maximized or minimized. This is sometimes also called the
objective function. A function is another term for an equation where there is only 1
value of the dependent variable for each value of the independent variable. y is
usually the dependent variable, but not always. x is usually the independent
variable, but not always.
Next thing you need to do is find the constraint equations. These are the equations
that limit the range of each of the constraint variables. These equations will be
graphed so you can find the area of compatibility. The area of compatibility is the
area on the graph that satisfies all the constraints of all the equations
simultaneously.
First figure out what variables you want to use and what they will represent.
x will represent the number of acres of wheat that will be planted.
y will represent the number of acres of rye that will be planted.
The objective function will be:
profit = 500x + 300y
This is because each acre of wheat provides 500 dollars of profit and each acre of
rye provides 300 dollars of profit.
the constraint equations will be:
x + y >= 7
This is because the total number of acres planted has to be greater than or equal to
7.

x + y <= 10
This is because the total number of acres planted has to be less than or equal to 10.

x + 2y <= 12
This is because the total number of hours available for planting is 12 and it takes
twice as many hours to plant an acre of rye than an acre of wheat.
200x + 100y <= 1200
This is because it takes 200 dollars to plant an acre of wheat and 100 dollars to
plant an acre of rye and the total amount of dollars available is equal to 1200.
x >= 0
y >= 0
This is because the number of acres can never be negative.
You need to graph the constraint equations. In order to do that on most graphing
software, you need to solve for y in each of the constraint equations.
x + y >= 7 becomes y >= (7-x)
x + y <= 10 becomes y <= (10-x)
x + 2y <= 12 becomes y <= (12 - x) / 2
200x + 100y <= 1200 becomes y <= (1200 - 200x) / 100
You now need to graph these equations. When you graph inequality equations, you
need to graph the equality portion of the equations to create the lines and then
shade the area that is compatible with the inequality portion of the equations.
In the following graph, arrows are used to show the area of compatibility with the
inequality portion of the equations. These arrows connect to the line of the equality
portion of the equation and show the direction of the area of compatibility of the
inequality portion of the equation.
The graph is shown below:

As you can see:


The area of compatibility for y >=
above it.
The area of compatibility for y <=
below it.
The area of compatibility for y <=
below it.
The area of compatibility for y <=
(1200 - 200x)/100 and below it.

(7-x) is the area on the line of y = (7-x) and


(10-x) is the area on the line of y = (10-x) and
(12-x)/2 is the area on the line of y = (12-x)/2 and
(1200 - 200x)/100 is the area on the line y =

The area of compatibility that meets all the constraints of all the equations
simultaneously is the area within the triangle marked ABC. This is the area that
meets all of the constraints of all of the equations simultaneously.
Your answer will lie on the corners of this area which is the intersection points of the
lines that bound this area.

Those points are:


A(2,5)
B(4,4)
C(5,2)
You need to evaluate the objective equation at each of these points.
The objective equation is profit = 500x + 300y.
At point A, x = 2 and y = 5 and the objective function is profit = 500(2) + 300(5)
which becomes profit = 1000 + 1500 which becomes profit = 2500.
At point B, x = 4 and y = 4 and the objective function is profit = 500(4) + 300(4)
which becomes profit = 2000 + 1200 which becomes profit = 3200.
At point C, x = 5 and y = 2 and the objective function is profit = 500(5) + 300(2)
which becomes profit = 2500 + 600 which becomes profit = 3100.
All the constraints have been met and your profit is maximized when x = 4 and y =
4 which is at point B.
The intersection points themselves are found by several methods, the easiest being
to use a graphing calculator that tells you what the intersection points are.
I use a TI-84 at home (TI-83 will do the same for you) and I use the Desmos
Graphing Calculator online.
You can also do it manually by following the rules for solving equations
simultaneously.
Here's a reference on linear equations that includes references and instructions on
how to solve linear equations simultaneously.

Das könnte Ihnen auch gefallen