Sie sind auf Seite 1von 18

1

Linear Programming
COLLECTED AND PREPARED BY PRATAP C SAHA

MURAGACHHA HIGH ( H.S.) SCHOOL

https://sites.google.com/site/muragachhahighhsschool

Linear programming is the process of taking various linear inequalities relating to some situation, and
finding the "best" value obtainable under those conditions. A typical example would be taking the limitations of
materials and labor, and then determining the "best" production levels for maximal profits under those
conditions.

In "real life", linear programming is part of a very important area of mathematics called "optimization
techniques". This field of study (or at least the applied results of it) is used every day in the organization and
allocation of resources. These "real life" systems can have dozens or hundreds of variables, or more. In
algebra, though, we'll only work with the simple (and graphable) two-variable linear case.

The general process for solving linear-programming exercises is to graph the inequalities (called the
"constraints") to form a walled-off area on the x,y -plane (called the "feasibility region"). Then we figure out the
coordinates of the corners of this feasibility region (that is, we find the intersection points of the various pairs of
lines), and test these corner points in the formula (called the "optimization equation") for which we're trying to
find the highest or lowest value.

Linear Programming
Linear programming is a response to situations that require the maximization or minimization of certain
functions which are subject to limitations. These limitations are called constraints.

Its use is common in industry applications such as economics, military strategy, etc.

Objective Function

Essentially, linear programming is to optimize (maximize or minimize) an objective function (a linear function of
several variables):

f(x,y) = ax + by.

Constraints

The objective function is subject to certain constraints, expressed by linear inequalities:

a1x + b1y ≤ c1

Linear Programming COLLECTED AND PREPARED BY PRATAP C SAHA A.T. MURAGACHHA HIGH ( H.S.) SCHOOL
2
a1x + b1y ≤ c1

a2x + b2y ≤c2

... ... ...

anx + bny ≤cn

Each inequality constraint system determines a half-plane.

Feasible Solution

The intersection set of all half-planes is formed by the constraints which determine a site. This site is called the
validity region or area of feasible solutions.

Convex feasible set

In a linear programming problem, a series of linear constraints produces a convex feasible region of possible
values for those variables. In the two-variable case this region is in the shape of a convex simple polygon.

Linear Programming COLLECTED AND PREPARED BY PRATAP C SAHA A.T. MURAGACHHA HIGH ( H.S.) SCHOOL
3
A convex feasible set is one in which a line segment connecting any two feasible points goes through only
other feasible points, and not through any points outside the feasible set. Convex feasible sets arise in many
types of problems, including linear programming problems, and they are of particular interest because, if the
problem has a convex objective function that is to be maximized, it will generally be easier to solve in the
presence of a convex feasible set and any local optimum will also be a global optimum.

No feasible set

If the constraints of an optimization problem are mutually contradictory, there are no points that satisfy all the
constraints and thus the feasible region is the null set. In this case the problem has no solution and is said to
be infeasible.

Bounded and unbounded feasible sets

A bounded feasible set (top) and an unbounded feasible set (bottom). The set at the bottom continues
forever towards the right.

Feasible sets may be bounded or unbounded. For example, the feasible set defined by the constraint set {x ≥
0, y ≥ 0} is unbounded because in some directions there is no limit on how far one can go and still be in the
feasible region. In contrast, the feasible set formed by the constraint set {x ≥ 0, y ≥ 0, x + 2y ≤ 4} is bounded
because the extent of movement in any direction is limited by the constraints.

If the feasible set is unbounded, there may or may not be an optimum, depending on the specifics of the
objective function. For example, if the feasible region is defined by the constraint set {x ≥ 0, y ≥ 0}, then the
problem of maximizing x + y has no optimum since any candidate solution can be improved upon by increasing
x or y; yet if the problem is to minimize x + y, then there is an optimum (specifically at (x, y) = (0, 0)).

Linear Programming COLLECTED AND PREPARED BY PRATAP C SAHA A.T. MURAGACHHA HIGH ( H.S.) SCHOOL
4
Optimal Solution

The set of vertices of the enclosure is called a set of basic feasible solutions and the vertex which presents the
optimal solution is called the maximum solution (or minimum).

Steps to Solve a Linear Programming Problem

1. Choose the unknowns.

2. Write the objective function.

3. Write the constraints as a system of inequalities.

4. Find the set of feasible solutions that graphically represent the constraints.

5. Calculate the coordinates of the vertices from the compound of feasible solutions.

6.Calculate the value of the objective function at each of the vertices to determine which of them has the
maximum or minimum values. It must be taken into account the possible non-existence of a solution if the
compound is not bounded.

VARIOUS PROBLEMS AND SOLUTIONS

A store has requested a manufacturer to produce pants and sports jackets.

Linear Programming COLLECTED AND PREPARED BY PRATAP C SAHA A.T. MURAGACHHA HIGH ( H.S.) SCHOOL
5
For materials, the manufacturer has 750 m2 of cotton textile and 1,000 m2 of polyester. Every pair of pants (1 unit) needs 1
m2 of cotton and 2 m2 of polyester. Every jacket needs 1.5 m2 of cotton and 1 m2 of polyester.
The price of the pants is fixed at $50 and the jacket, $40.
What is the number of pants and jackets that the manufacturer must give to the stores so that these items obtain a
maximum sale?

1 Choose the unknowns. x = number of pants and y = number of jackets

2Write the objective function. f(x,y)= 50x + 40y

3. Write the constraints as a system of inequalities.

To write the constraints, use a table:

pants jackets available


cotton 1 1,5 750
polyester 2 1 1,000

x + 1.5y ≤ 750 or, 2x+3y ≤ 1500 and 2x + y ≤ 1000

As the number of pants and jackets are natural numbers, there are two more constraints:

x≥0y≥0

4. Find the set of feasible solutions that graphically represent the constraints.

Represent the constraints graphically.

As x ≥ 0 and y ≥ 0, work in the first quadrant. Represent the straight lines from their points of intersection with
the axes.

Solve the inequation graphically: 2x +3y ≤ 1500, and take a point on the plane, for example (0,0).

2 · 0 + 3 · 0 ≤ 1,500

Linear Programming COLLECTED AND PREPARED BY PRATAP C SAHA A.T. MURAGACHHA HIGH ( H.S.) SCHOOL
6
Since 0 ≤ 1,500 then the point (0,0) is in the half plane where the inequality is satisfied.

Similarly, solve 2x + y ≤ 1,000.

2 · 0 + 0 ≤ 1,000

The area of intersection of the solutions of the inequalities would be the solution to the system of
inequalities, which is the set of feasible solutions.

5 Calculate the coordinates of the vertices from the compound of feasible solutions.

The optimal solution, if unique, is in a vertex. These are the solutions to the systems: 2x

+ 3y = 1,500; x = 0 (0, 500)

2x + y = 1,000; y = 0 (500, 0)

2x + 3y =1,500; 2x + y = 1,000 (375, 250)

Linear Programming COLLECTED AND PREPARED BY PRATAP C SAHA A.T. MURAGACHHA HIGH ( H.S.) SCHOOL
7
6 Calculate the value of the objective function at each of the vertices to determine which of them has the
maximum or minimum values. It must be taken into account the possible non-existence of a solution if the
compound is not bounded.

In the objective function, place each of the vertices that were determined in the previous step.

f(x, y) = 50x + 40y

f(0, 500) = 50·0 + 40·500 = $20,000

f(500, 0) = 50·500 + 40·0 = $25,000

f(375, 250) = 50·375 + 40·250 = $28,750 Maximum

The optimum solution is to make 375 pants and 250 jackets to obtain a benefit of $28,750.

The linear programming problems discussed in the previous section possessed unique solutions. This was
because the optimal value occurred at one of the extreme points (corner points). But situations may arise, when
the optimal solution obtained is not unique. This case may arise when the line representing the objective
function is parallel to one of the lines bounding the feasible region. The presence of multiple
solutions is illustrated through the following example.

1. Maximize z = x1 + 2x2

subject to

x1 ≤ 80
x2 ≤ 60
5x1 + 6x2 ≤ 600
x1 + 2x2 ≤ 160

x1, x2 ≥ 0.

Linear Programming COLLECTED AND PREPARED BY PRATAP C SAHA A.T. MURAGACHHA HIGH ( H.S.) SCHOOL
8
In the above figure, there is no unique outer most corner cut by the objective function line. All points from P to
Q lying on line PQ represent optimal solutions and all these will give the same optimal value (maximum profit)
of Rs. 160. This is indicated by the fact that both the points P with co-ordinates (40, 60) and Q with
co-ordinates (60, 50) are on the line x1 + 2x2 = 160. Thus, every point on the line PQ maximizes the value of the
objective function and the problem has multiple solutions.

2. Infeasible Unbounded Problem: Graphical Method

In some cases, there is no feasible solution area, i.e., there are no points that satisfy all constraints of the
problem. An infeasible LP problem with two decision variables can be identified through its graph. For
example, let us consider the following linear programming problem.

Minimize z = 200x1 + 300x2

subject to

2x1 + 3x2 ≥ 1200


x1 + x2 ≤ 400
2x1 + 1.5x2 ≥ 900

x1, x2 ≥ 0

The region located on the right of PQR includes all solutions, which satisfy the first and the third constraints.
The region located on the left of ST includes all solutions, which satisfy the second constraint. Thus, the
problem is infeasible because there is no set of points that satisfy all the three constraints.

3. Feasible Unbounded Solutions

It is a solution whose objective function is infinite. If the feasible region is unbounded then one or more
decision variables will increase indefinitely without violating feasibility, and the value of the objective
function can be made arbitrarily large. Consider the following model:

Minimize z = 40x1 + 60x2

Linear Programming COLLECTED AND PREPARED BY PRATAP C SAHA A.T. MURAGACHHA HIGH ( H.S.) SCHOOL
9
subject to

2x1 + x2 ≥ 70
x1 + x2 ≥ 40
x1 + 3x2 ≥ 90

x1, x2 ≥ 0

The point (x1, x2) must be somewhere in the solution space as shown in the figure by shaded portion.

The three extreme points (corner points) in the finite plane are:
P = (90, 0); Q = (24, 22) and R = (0, 70)
The values of the objective function at these extreme points are:
Z(P) = 3600, Z(Q) = 2280 and Z(R) = 4200

In this case, no maximum of the objective function exists because the region has no boundary for
increasing values of x1 and x2. Thus, it is not possible to maximize the objective function in this case and the
solution is unbounded.

Find the maximal and minimal value of z = 3x + 4y subject to the following constraints:

The three inequalities in the curly braces are the constraints. The area of the plane that they mark off will be the
feasibility region. The formula "z = 3x + 4y" is the optimization equation. I need to find the (x, y) corner points of
the feasibility region that return the largest and smallest values of z.

My first step is to solve each inequality for the more-easily graphed equivalent forms:

Linear Programming COLLECTED AND PREPARED BY PRATAP C SAHA A.T. MURAGACHHA HIGH ( H.S.) SCHOOL
10

It's easy to graph the system:

To find the corner points -- which aren't always clear from the graph -- I'll pair the lines (thus forming a
system of linear equations) and solve:

y = –( 1 /2 )x + 7 y = –( 1 /2 )x + 7 y = 3x
y = 3x y=x– 2 y=x– 2

–( 1 /2 )x + 7 = 3x –( 1 /2 )x + 7 = x – 2
3x = x – 2
–x + 14 = 6x –x + 14 = 2x – 4
2x = –2
14 = 7x 18 = 3x
x = –1
2 =x 6 =x

y = 3(–1) = –3
y = 3(2) = 6 y = (6) – 2 = 4

corner point at (2, 6) corner point at (6, 4) corner pt. at (–1, –3)

So the corner points are (2, 6), (6, 4), and (–1, –3) .

Somebody really smart proved that, for linear systems like this, the maximum and minimum values of
the optimization equation will always be on the corners of the feasibility region. So, to find the

solution to this exercise, I only need to plug these three points into " z = 3x + 4y ".

Linear Programming COLLECTED AND PREPARED BY PRATAP C SAHA A.T. MURAGACHHA HIGH ( H.S.) SCHOOL
11
(2, 6): z = 3(2) + 4(6) = 6 + 24 = 30
(6, 4): z = 3(6) + 4(4) = 18 + 16 = 34
(–1, –3): z = 3(–1) + 4(–3) = –3 – 12 = –15

Then the maximum of z = 34 occurs at (6, 4),


and the minimum of z = –15 occurs at (–1, –3).

 Given the following constraints, maximize and minimize the value of z = –0.4x + 3.2y .

First I'll solve the fourth and fifth constraints for easier graphing:

The feasibility region looks like this:

From the graph, I can see which lines cross to form the corners, so I know which lines to pair up in
order to verify the coordinates. I'll start at the "top" of the shaded area and work my way clockwise
around the edges:

y = –x + 7 y = –x + 7 x =5

Linear Programming COLLECTED AND PREPARED BY PRATAP C SAHA A.T. MURAGACHHA HIGH ( H.S.) SCHOOL
12
y=x+ 5 x =5 y =0

–x + 7 = x + 5
2 = 2x
1 =x y = –(5) + 7 = 2 [nothing to do]

y = (1) + 5 = 6

corner at (1, 6) corner at (5, 2) corner at (5, 0)

y =0 y = –( 1 /2 )x + 2 x =0
y = –( /2 )x + 2
1
x =0 y=x+ 5

–( 1 /2 )x + 2 = 0 y = –( 1 /2 )(0) + 2
2 = (1/2)x y=0+ 2 y = (0) + 5 = 5
4 =x y =2

corner at (4, 0) corner at (0, 2) corner at (0, 5)

Now I'll plug each corner point into the optimization equation, z = –0.4x + 3.2y:

(1, 6): z = –0.4(1) + 3.2(6) = –0.4 + 19.2 = 18.8


(5, 2): z = –0.4(5) + 3.2(2) = –2.0 + 6.4 = 4.4
(5, 0): z = –0.4(5) + 3.2(0) = –2.0 + 0.0 = –2.0
(4, 0): z = –0.4(4) + 3.2(0) = –1.6 + 0.0 = –1.6
(0, 2): z = –0.4(0) + 3.2(2) = –0.0 + 6.4 = 6.4
(0, 5): z = –0.4(0) + 3.2(5) = –0.0 + 16.0 = 16.0

Then the maximum is 18.8 at (1, 6) and the minimum is –2 at (5, 0).

Given the inequalities, linear-programming exercise are pretty straightforward, if sometimes a bit long. The
hard part is usually the word problems, where we have to figure out what the inequalities are.

At a certain refinery, the refining process requires the production of at least two gallons of gasoline for each
gallon of fuel oil. To meet the anticipated demands of winter, at least three million gallons of fuel oil a day will
need to be produced. The demand for gasoline, on the other hand, is not more than 6.4 million gallons a day.

If gasoline is selling for $1.90 per gallon and fuel oil sells for $1.50/gal, how much of each should be
produced in order to maximize revenue?

The question asks for the number of gallons which should be produced, so I should let my variables
stand for "gallons produced".

Linear Programming COLLECTED AND PREPARED BY PRATAP C SAHA A.T. MURAGACHHA HIGH ( H.S.) SCHOOL
13
x : gallons of gasoline produced
y : gallons of fuel oil produced

Since this is a "real world" problem, I know that I can't have negative production levels, so the
variables can't be negative. This gives me my first two constraints: namely, x > 0 and y > 0.

Since I have to have at least two gallons of gas for every gallon of oil, then
x > 2y.

For graphing, of course, I'll use the more manageable form "y < ( 1/ 2 )x ".

The winter demand says that y > 3,000,000; note that this constraint eliminates the need for the "y > 0"
constraint. The gas demand says that x < 6,400,000.

I need to maximize revenue R, so the optimization equation is R = 1.9x + 1.5y. Then the model for this
word problem is as follows:

R = 1.9x + 1.5y, subject to:


x>0
x < 6,400,000
y > 3,000,000
y < ( 1 /2 )x

Using a scale that counts by millions (so "y = 3 " on the graph means "y is three million"), the above
system graphs as follows:

Taking a closer look, I can see the feasibility region a little better:

Linear Programming COLLECTED AND PREPARED BY PRATAP C SAHA A.T. MURAGACHHA HIGH ( H.S.) SCHOOL
14

When we test the corner points at (6.4m, 3.2m), (6.4m, 3m), and (6m, 3m), we should get a maximal solution of R = $16.96m at (x, y) =
(6.4m, 3.2m).

 A calculator company produces a scientific calculator and a graphing calculator. Long-term projections
indicate an expected demand of at least 100 scientific and 80 graphing calculators each day. Because
of limitations on production capacity, no more than 200 scientific and 170 graphing calculators can be
made daily. To satisfy a shipping contract, a total of at least 200 calculators much be shipped each day.

If each scientific calculator sold results in a $2 loss, but each graphing calculator produces a $5
profit, how many of each type should be made daily to maximize net profits?

The question asks for the optimal number of calculators, so my variables will stand for that:

x: number of scientific calculators produced


y: number of graphing calculators produced

Since they can't produce negative numbers of calculators, I have the two constraints, x > 0 and y > 0. But
in this case, I can ignore these constraints, because I already have that x > 100 and y > 80. The exercise
also gives maximums: x < 200 and y < 170. The minimum shipping requirement gives me x + y > 200; in
other words, y > –x + 200. The revenue relation will be my optimization equation: R = –2x
+ 5y. So the entire system is:

R = –2x + 5y, subject to:


100 < x < 200
80 < y < 170
y > –x + 200
The feasibility region graphs as:

Linear Programming COLLECTED AND PREPARED BY PRATAP C SAHA A.T. MURAGACHHA HIGH ( H.S.) SCHOOL
15

When we test the corner points at (100, 170), (200, 170), (200, 80), (120, 80) , and (100, 100) , we
should obtain the maximum value of R = 650 at (x, y) = (100, 170) . That is, the solution is " 100 scientific
calculators and 170 graphing calculators".

 We need to buy some filing cabinets. W e know that Cabinet X costs $10 per unit, requires six square
feet of floor space, and holds eight cubic feet of files. Cabinet Y costs $20 per unit, requires eight
square feet of floor space, and holds twelve cubic feet of files. We have been given $140 for this
purchase, though we don't have to spend that much. The office has room for no more than 72 square
feet of cabinets. How many of which model should we buy, in order to maximize storage volume?

The question asks for the number of cabinets I need to buy, so my variables will stand for that:

x: number of model X cabinets purchased


y: number of model Y cabinets purchased

Naturally, x > 0 and y > 0 . I have to consider costs and floor space (the "footprint" of each unit), while
maximizing the storage volume, so costs and floor space will be my constraints, while volume will be
my optimization equation.

cost: 10x + 20y < 140, or y < –( 1 /2 )x + 7


space: 6x + 8y < 72, or y < –( 3 /4 )x + 9
volume: V = 8x + 12y

This system (along with the first two constraints) graphs as:

Linear Programming COLLECTED AND PREPARED BY PRATAP C SAHA A.T. MURAGACHHA HIGH ( H.S.) SCHOOL
16

When we test the corner points at (8, 3), (0, 7) , and (12, 0), we should obtain a maximal volume of 100
cubic feet by buying eight of model X and three of model Y.

 In order to ensure optimal health (and thus accurate test results), a lab technician needs to feed the
rabbits a daily diet containing a minimum of 24 grams (g) of fat, 36 g of carbohydrates, and 4 g of
protien. But the rabbits should be fed no more than five ounces of food a day.

Rather than order rabbit food that is custom-blended, it is cheaper to order Food X and Food Y, and
blend them for an optimal mix. Food X contains 8 g of fat, 12 g of carbohydrates, and 2 g of protein per
ounce, and costs $0.20 per ounce. Food Y contains 12 g of fat, 12 g of carbohydrates, and 1 g of protein
per ounce, at a cost of $0.30 per ounce.

What is the optimal blend?

Since the exercise is asking for the number of ounces of each food required for the optimal daily
blend, my variables will stand for the number of ounces of each:

x: number of ounces of Food X


y: number of ounces of Food Y

Since I can't use negative amounts of either food, the first two constrains are the usual ones: x> 0
and y > 0 . The other constraints come from the grams of fat, carbohydrates, and protein per ounce:

fat: 8x + 12y > 24


carbs: 12x + 12y > 36
protein: 2x + 1y > 4

Also, the maximum weight of the food is five ounces, so:


x + y <5

The optimization equation will be the cost relation C = 0.2x + 0.3y , but this time I'll be finding the
minimum value, not the maximum.
Linear Programming COLLECTED AND PREPARED BY PRATAP C SAHA A.T. MURAGACHHA HIGH ( H.S.) SCHOOL
17
After rearranging the inequalities, the system graphs as:

(Note: One of the lines above is irrelevant to the system. Can we tell which one?)

When we test the corners at (0, 4), (0, 5), (3, 0), (5, 0) , and (1, 2) , we should get a minimum cost of
sixty cents per daily serving, using three ounces of Food X only.

Sometimes we'll have more than just two things to deal with. The next example has three things to juggle; the
next page provides an example of juggling four things.

 We have $12,000 to invest, and three different funds from which to choose. The municipal bond fund
has a 7% return, the local bank's CDs have an 8% return, and the high-risk account has an expected
(hoped-for) 12% return. To minimize risk, we decide not to invest any more than $2,000 in the high- risk
account. For tax reasons, we need to invest at least three times as much in the municipal bonds as in
the bank CDs. Assuming the year-end yields are as expected, what are the optimal investment
amounts?

Since the question is asking me to find the amount of money for each account, my variables will need to
stand for those amounts. Since I'd like to deal with smaller numbers, I'll count by thousands, so:

x: amount (in thousands) invested in bonds


y: amount (in thousands) invested in CDs

Um... now what? I only have two variables, but I have three accounts. To handle this, I need the "how
much is left" construction:

12 – x – y: amount (in thousands) invested in the high-risk account

Linear Programming COLLECTED AND PREPARED BY PRATAP C SAHA A.T. MURAGACHHA HIGH ( H.S.) SCHOOL
18
I can't invest negative amounts of money, so the first two constraints are the usual ones: x > 0 and y
> 0 . The amount in the high-risk account can't be negative either, so 12 – x – y > 0 , which
simplifies as: y < –x + 12

Also, the upper limit on the high-risk account gives me the inequality (12 – x – y) < 2 . This
simplifies as:

y > –x + 10

And the tax requirements give me y < ( 1/ 3 )x . The optimization equation will be the total investment
yield, Y = 0.07x + 0.08y + 0.12(12 – x – y) = 1.44 – 0.05x – 0.04y . The entire system is then as
follows:

Maximize Y = 1.44 – 0.05x – 0.04y ,

subject to:
x>0 y> 0
y > –x + 10 y < –x + 12 y < ( 1/ 3 )x

The feasibility region graphs as:

When we test the corner points at (9, 3), (12, 0), (10, 0), and (7.5, 2.5) , we should get an optimal return of
$965 when we invest $7,500 in municipal bonds, $2,500 in CDs, and the remaining $2,000 in the
high-risk account.

COLLECTED AND PREPARED BY PRATAP C SAHA A.T. MURAGACHHA HIGH ( H.S.) SCHOOL

https://sites.google.com/site/muragachhahighhsschool

Linear Programming COLLECTED AND PREPARED BY PRATAP C SAHA A.T. MURAGACHHA HIGH ( H.S.) SCHOOL

Das könnte Ihnen auch gefallen