<img src="https://d5nxst8fruw4z.cloudfront.net/atrk.gif?account=iA1Pi1a8Dy00ym" style="display:none" height="1" width="1" alt="" />
You are viewing an older version of this Concept. Go to the latest version.

# Linear Programming

## Maximize and minimize quantities using linear inequality systems

Estimated9 minsto complete
%
Progress
Practice Linear Programming
Progress
Estimated9 minsto complete
%
Linear Programming

What if you had an equation like z=x+y\begin{align*}z = x + y\end{align*} in which a set of constraints like xy4\begin{align*}x - y \le 4\end{align*}, x+y2,\begin{align*}x + y \le 2,\end{align*} and 2x+3y3\begin{align*}2x + 3y \ge -3\end{align*} were placed on it. How could you find the minimum and maximum values of z? After completing this Concept, you'll be able to analyze a system of inequalities to make the best decisions given the constraints of the situation.

### Watch This

Graphing calculators can be very useful for problems that involve this many inequalities. The following video shows a real-world linear programming problem worked through in detail on a graphing calculator, although the methods used there can also be used for pencil-and paper solving.

### Guidance

A lot of interesting real-world problems can be solved with systems of linear inequalities.

For example, you go to your favorite restaurant and you want to be served by your best friend who happens to work there. However, your friend only waits tables in a certain region of the restaurant. The restaurant is also known for its great views, so you want to sit in a certain area of the restaurant that offers a good view. Solving a system of linear inequalities will allow you to find the area in the restaurant where you can sit to get the best view and be served by your friend.

Often, systems of linear inequalities deal with problems where you are trying to find the best possible situation given a set of constraints. Most of these application problems fall in a category called linear programming problems.

Linear programming is the process of taking various linear inequalities relating to some situation, and finding the best possible value under those conditions. A typical example would be taking the limitations of materials and labor at a factory, then determining the best production levels for maximal profits under those conditions. These kinds of problems are used every day in the organization and allocation of resources. These real-life systems can have dozens or hundreds of variables, or more. In this section, we’ll only work with the simple two-variable linear case.

The general process is to:

• Graph the inequalities (called constraints) to form a bounded area on the coordinate plane (called the feasibility region).
• Figure out the coordinates of the corners (or vertices) of this feasibility region by solving the system of equations that applies to each of the intersection points.
• Test these corner points in the formula (called the optimization equation) for which you're trying to find the maximum or minimum value.

#### Example A

If z=2x+5y\begin{align*}z = 2x + 5y\end{align*}, find the maximum and minimum values of z\begin{align*}z\end{align*} given these constraints:

2xy4x+3yxy1206

Solution

First, we need to find the solution to this system of linear inequalities by graphing and shading appropriately. To graph the inequalities, we rewrite them in slope-intercept form:

yyy2x1243xx6

These three linear inequalities are called the constraints, and here is their graph:

The shaded region in the graph is called the feasibility region. All possible solutions to the system occur in that region; now we must try to find the maximum and minimum values of the variable z\begin{align*}z\end{align*} within that region. In other words, which values of x\begin{align*}x\end{align*} and y\begin{align*}y\end{align*} within the feasibility region will give us the greatest and smallest overall values for the expression 2x+5y\begin{align*}2x + 5y\end{align*}?

Fortunately, we don’t have to test every point in the region to find that out. It just so happens that the minimum or maximum value of the optimization equation in a linear system like this will always be found at one of the vertices (the corners) of the feasibility region; we just have to figure out which vertices. So for each vertex—each point where two of the lines on the graph cross—we need to solve the system of just those two equations, and then find the value of z\begin{align*}z\end{align*} at that point.

The first system consists of the equations y=2x12\begin{align*}y = 2x - 12\end{align*} and y=43x\begin{align*}y = - \frac{4}{3}x\end{align*}. We can solve this system by substitution:

43xy=2x124x=6x3610x=36x=3.6=2x12y=2(3.6)12y=4.8

The lines intersect at the point (3.6, -4.8).

The second system consists of the equations y=2x12\begin{align*}y = 2x - 12\end{align*} and y=x6\begin{align*}y = x - 6\end{align*}. Solving this system by substitution:

x6y=2x126=xx=6=x6y=66y=0

The lines intersect at the point (6, 0).

The third system consists of the equations y=43x\begin{align*}y = - \frac{4}{3}x\end{align*} and y=x6\begin{align*}y = x - 6\end{align*}. Solving this system by substitution:

x6y=43x3x18=4x7x=18x=2.57=x6y=2.576y=3.43

The lines intersect at the point (2.57, -3.43).

So now we have three different points that might give us the maximum and minimum values for z\begin{align*}z\end{align*}. To find out which ones actually do give the maximum and minimum values, we can plug the points into the optimization equation z=2x+5y\begin{align*}z = 2x + 5y\end{align*}.

When we plug in (3.6, -4.8), we get z=2(3.6)+5(4.8)=16.8\begin{align*}z = 2(3.6) +5(-4.8) = -16.8\end{align*}.

When we plug in (6, 0), we get z=2(6)+5(0)=12\begin{align*}z = 2(6) + 5(0) = 12\end{align*}.

When we plug in (2.57, -3.43), we get z=2(2.57)+5(3.43)=12.01\begin{align*}z = 2(2.57) + 5(-3.43) = -12.01\end{align*}.

So we can see that the point (6, 0) gives us the maximum possible value for z\begin{align*}z\end{align*} and the point (3.6, –4.8) gives us the minimum value.

In the previous example, we learned how to apply the method of linear programming in the abstract. In the next example, we’ll look at a real-life application.

#### Example B

You have $10,000 to invest, and three different funds to choose from. The municipal bond fund has a 5% return, the local bank's CDs have a 7% return, and a high-risk account has an expected 10% return. To minimize risk, you decide not to invest any more than$1,000 in the high-risk account. For tax reasons, you need to invest at least three times as much in the municipal bonds as in the bank CDs. What’s the best way to distribute your money given these constraints?

Solution:

Let’s define our variables:

x\begin{align*}x\end{align*} is the amount of money invested in the municipal bond at 5% return

y\begin{align*}y\end{align*} is the amount of money invested in the bank’s CD at 7% return

10000xy\begin{align*}10000 - x - y\end{align*} is the amount of money invested in the high-risk account at 10% return

z\begin{align*}z\end{align*} is the total interest returned from all the investments, so z=.05x+.07y+.1(10000xy)\begin{align*}z = .05x + .07y + .1(10000 - x - y)\end{align*} or z=10000.05x0.03y\begin{align*}z = 1000 - 0.05x - 0.03y\end{align*}. This is the amount that we are trying to maximize. Our goal is to find the values of x\begin{align*}x\end{align*} and y\begin{align*}y\end{align*} that maximizes the value of z\begin{align*}z\end{align*}.

Now, let’s write inequalities for the constraints:

You decide not to invest more than 1000 in the high-risk account—that means: 10000xy1000 You need to invest at least three times as much in the municipal bonds as in the bank CDs—that means: 3yx Also, you can’t invest less than zero dollars in each account, so: xy10000xy000 To summarize, we must maximize the expression z=1000.05x.03y\begin{align*}z = 1000 - .05x - .03y\end{align*} using the constraints: 10000xy10003yxx0y010000xy0Or in slope-intercept form:y9000xyx3x0y0y10000x Step 1: Find the solution region to the set of inequalities by graphing each line and shading appropriately. The following figure shows the overlapping region: The purple region is the feasibility region where all the possible solutions can occur. Step 2: Next we need to find the corner points of the feasibility region. Notice that there are four corners. To find their coordinates, we must pair up the relevant equations and solve each resulting system. System 1: y=x3y=10000x Substitute the first equation into the second equation: x3y=10000xx=300003x4x=30000x=7500=x3y=75003y=2500 The intersection point is (7500, 2500). System 2: y=x3y=9000x Substitute the first equation into the second equation: x3y=9000xx=270003x4x=27000x=6750=x3y=67503y=2250 The intersection point is (6750, 2250). System 3: y=0y=10000x The intersection point is (10000, 0). System 4: y=0y=9000x The intersection point is (9000, 0). Step 3: In order to find the maximum value for z\begin{align*}z\end{align*}, we need to plug all the intersection points into the equation for z\begin{align*}z\end{align*} and find which one yields the largest number. (7500, 2500): z=10000.05(7500)0.03(2500)=550\begin{align*}z = 1000 - 0.05(7500) - 0.03(2500) = 550\end{align*} (6750, 2250): z=10000.05(6750)0.03(2250)=595\begin{align*}z = 1000 - 0.05(6750) - 0.03(2250) = 595\end{align*} (10000, 0): z=10000.05(10000)0.03(0)=500\begin{align*}z = 1000 - 0.05(10000) - 0.03(0) = 500\end{align*} (9000, 0): z=10000.05(9000)0.03(0)=550\begin{align*}z = 1000 - 0.05(9000) - 0.03(0) = 550\end{align*} The maximum return on the investment of595 occurs at the point (6750, 2250). This means that:

$6,750 is invested in the municipal bonds.$2,250 is invested in the bank CDs.

$1,000 is invested in the high-risk account. #### Example C James is trying to expand his pastry business to include cupcakes and personal cakes. He has 40 hours available to decorate the new items and can use no more than 22 pounds of cake mix. Each personal cake requires 2 pounds of cake mix and 2 hours to decorate. Each cupcake order requires one pound of cake mix and 4 hours to decorate. If he can sell each personal cake for$14.99 and each cupcake order for 16.99, how many personal cakes and cupcake orders should James make to make the most revenue? There are four inequalities in this situation. First, state the variables. Let p=\begin{align*}p=\end{align*} the number of personal cakes and c=\begin{align*}c=\end{align*} the number of cupcake orders. Translate this into a system of inequalities. 2p+1c22\begin{align*}2p+1c \le 22\end{align*} – This is the amount of available cake mix. 2p+4c40\begin{align*}2p+4c \le 40\end{align*} – This is the available time to decorate. p0\begin{align*}p \ge 0\end{align*} – You cannot make negative personal cakes. c0\begin{align*}c \ge 0\end{align*} – You cannot make negative cupcake orders. Now graph each inequality and determine the feasible region. The feasible region has four vertices: {(0, 0),(0, 10),(11, 0),(8, 6)}. According to our theorem, the optimization answer will only occur at one of these vertices. Write the optimization equation. How much of each type of order should James make to bring in the most revenue? 14.99p+16.99c=maximum revenue Substitute each ordered pair to determine which makes the most money. (0,0)(0,10)(11,0)(8,6)0.0014.99(0)+16.99(10)=$169.9014.99(11)+16.99(0)=$164.8914.99(8)+16.99(6)=221.86 To make the most revenue, James should make 8 personal cakes and 6 cupcake orders. Watch this video for help with the Examples above. ### Vocabulary • Linear programming is the mathematical process of analyzing a system of inequalities to make the best decisions given the constraints of the situation. • Constraints are the particular restrictions of a situation due to time, money, or materials. • In an optimization problem, the goal is to locate the feasible region of the system and use it to answer a profitability, or optimization, question. • The solution for the system of inequalities is the common shaded region between all the inequalities in the system. • The common shaded region of the system of inequalities is called the feasible region. ### Guided Practice Graph the solution to the following system: xy<62y3x+17 Solution: First we will rewrite the equations in slope-intercept form in order to graph them: Inequality 1 xyyy<6Solve for y.<x6Subtract x from each side.>x+6Multiply each side by -1, flipping the inequality. Inequality 2 2yy3x+17<Solve for y.32x+8.5<Divide each side by 2. Graph each equation and shade accordingly: ### Practice Solve the following linear programming problems. 1. Given the following constraints, find the maximum and minimum values of z=x+5y\begin{align*}z = -x + 5y\end{align*}: x+3y0xy03x7y16 Santa Claus is assigning elves to work an eight-hour shift making toy trucks. Apprentice elves draw a wage of five candy canes per hour worked, but can only make four trucks an hour. Senior elves can make six trucks an hour and are paid eight candy canes per hour. There’s only room for nine elves in the truck shop, and due to a candy-makers’ strike, Santa Claus can only pay out 480 candy canes for the whole 8-hour shift. 1. How many senior elves and how many apprentice elves should work this shift to maximize the number of trucks that get made? 2. How many trucks will be made? 3. Just before the shift begins, the apprentice elves demand a wage increase; they insist on being paid seven candy canes an hour. Now how many apprentice elves and how many senior elves should Santa assign to this shift? 4. How many trucks will now get made, and how many candy canes will Santa have left over? In Adrian’s Furniture Shop, Adrian assembles both bookcases and TV cabinets. Each type of furniture takes her about the same time to assemble. She figures she has time to make at most 18 pieces of furniture by this Saturday. The materials for each bookcase cost her20 and the materials for each TV stand costs her $45. She has$600 to spend on materials. Adrian makes a profit of $60 on each bookcase and a profit of$100 on each TV stand.

1. Set up a system of inequalities. What x\begin{align*}x-\end{align*} and y\begin{align*}y-\end{align*}values do you get for the point where Adrian’s profit is maximized? Does this solution make sense in the real world?
2. What two possible real-world x\begin{align*}x-\end{align*}values and what two possible real-world y\begin{align*}y-\end{align*}values would be closest to the values in that solution?
3. With two choices each for x\begin{align*}x\end{align*} and y\begin{align*}y\end{align*}, there are four possible combinations of x\begin{align*}x-\end{align*} and y\begin{align*}y-\end{align*}values. Of those four combinations, which ones actually fall within the feasibility region of the problem?
4. Which one of those feasible combinations seems like it would generate the most profit? Test out each one to confirm your guess. How much profit will Adrian make with that combination?
5. Based on Adrian’s previous sales figures, she doesn’t think she can sell more than 8 TV stands. Now how many of each piece of furniture should she make, and what will her profit be?
6. Suppose Adrian is confident she can sell all the furniture she can make, but she doesn’t have room to display more than 7 bookcases in her shop. Now how many of each piece of furniture should she make, and what will her profit be?
7. Here’s a “linear programming” problem on a line instead of a plane: Given the constraints x5\begin{align*}x \le 5\end{align*} and x2\begin{align*}x \ge -2\end{align*}, maximize the value of y\begin{align*}y\end{align*} where y=x+3\begin{align*}y = x + 3\end{align*}.

### Texas Instruments Resources

In the CK-12 Texas Instruments Algebra I FlexBook, there are graphing calculator activities designed to supplement the objectives for some of the lessons in this chapter. See http://www.ck12.org/flexr/chapter/9617.

### Vocabulary Language: English

Constraint

Constraint

A constraint is a limitation.
Feasible region

Feasible region

The feasible region is the inner region within a set of four inequalities on a graph.
Linear Programming

Linear Programming

Linear programming uses the vertices of the feasible region (the area of overlap between multiple inequalities) to determine a maximum or minimum value.