Saturday, April 19, 2014

INTRODUCTION TO LINEAR PROGRAMMING ---- BY. MWL. JAPHET MASATU.


INTRODUCTION    TO  LINEAR   PROGRAMMING.

This section covers Review of Inequalities, Bounded and Unbounded Regions, Inequality Word ProblemLinear Programming Terms, and Linear Programming Word Problems.
Linear Programming sounds really difficult, but it’s just a neat way to use math to find out the best way to do things – for example, how many things to make or buy.  It usually involves a system of linear inequalities, called constraints, but in the end, we want to either maximize something (like profit) or minimize something (like cost).   Whatever we’re maximizing or minimizing is called the objective function.
Linear programming was developed during the second World War for solving military logistic problems.  It is used extensively today in business to minimize costs and maximize profits.
Before we start Linear Programming, let’s review Graphing Linear Inequalities with Two Variables.

Review of Inequalities

Let’s go back and revisit graphing linear inequalities on the coordinate system.
To graph inequalities on the coordinate system, we need to get “y” by itself on the left hand side, so it’s best to use the slope-intercept or “y = mx + b” formula.  This is because we’ll easily know which way to shade the graph, and we’ll make fewer errors doing this.  The shaded areas will be where the equation “works”; in other words, where the solutions are.
When we have “y  < ”, we always shade in under the line that we draw (or to the left, if we have a vertical line).  So think of “less than” as “raining down” from the graph.
When we have “y  > ”, we always shade above the line that we draw (or to the right, if we have a vertical line).  So think of “greater than” as “raining up” from the graph.  (I know – it doesn’t really “rain up”, but I still like to explain the graphs that way.)
Note that you can always plug in an (x, y) ordered pair to see if it shows up in the shaded areas (which means it’s a solution), or the unshaded areas (which means it’s not a solution.)  For an example of this, see the first inequality below.
With “<” and “>” inequalities, we draw a dashed (or dotted) line to indicate that we’re not  including that line (but everything up to it), whereas with “Less Than or Equal To” and “Greater Than or Equal”, we draw a regular line, to indicate that we are including it in the solution.  To remember this, I think about the fact that “<” and “>” have less pencil marks than “Less Than or Equal To” and “Greater Than or Equal”, so there is less pencil used when you draw the lines on the graph.  You can also remember this by thinking the line under the “Less Than or Equal To” and “Greater Than or Equal” means you draw a solid line on the graph.
Note that the last example is a “Compound Inequality” since it involves more than one inequality.  The solution set is the ordered pairs that satisfy both inequalities; it is indicated by the darker shading.
Here are some examples:


Again, note that the last example is a “Compound Inequality” since it involves more than one inequality.  The solution set is the ordered pairs that satisfy both inequalities; it is indicated by the darker shading.

Bounded and Unbounded Regions

With our Linear Programming examples, we’ll have a set of compound inequalities, and they will be bounded inequalities, meaning the inequalities will have both maximum and minimum values.  (We’ll show examples below, but think of bounded meaning that you could draw a “circle” around the feasible region, which is the solution set to the inequalities).
Here are what some typical Systems of Linear Inequalities might look like in Linear Programming:
Bounded and Unbounded Inequalities

Inequality Word Problem:

Linear Programming problems are typically word problems – not cool.   But most will fit in the same mold: for these beginning problems, they will have two types of unknowns or variables, like earrings and necklaces, and they will involve inequalities.
You’ll just put the first variable on the x axis and the second on the y axis.  We will be solving for the number of each type that either gives the maximum profit, or minimum cost.
Jewelry
Let’s first see an example of just graphing an inequality in a real-life situation:
Lisa has an online jewelry shop where she sells earrings and necklaces.  She sells earrings for $30 and necklaces for $40.  To make a profit, she must sell at least $1200 of jewelry per month.
Define the variables, write an inequality for this situation, and graph the solutions to the inequality.
It’s best to make the first item (pairs of earrings) the x, and the second item (necklaces) y.  (Usually we can look at what the problem is asking to get these variables).   So let’s plug in some real numbers to try to get our equations.  If she sells 1 pair of earrings and 1 necklace, she’ll only make $70, which is way below her goal for a profit.  How about 20 pairs of earrings and 15 necklaces?  Do you see what we’re doing here?   The number of pairs of earrings she sells times $30 plus the number of necklaces she sells times $40 has to be greater than $1200.
Also, she can’t sell less than 0 pairs of earrings or necklaces, so we need to include those inequalities, too.
So here are the inequalities, and we’ll also draw a graph:
Jewelry Inequality Problem

Linear Programming Terms

Again, the linear programming problems we’ll be working with have the first variable on the x axis and the second on the y axis.   In our example, x is the number of pairs of earrings and y is the number of necklaces. Typically you can look at what the problem is asking to determine what the variables are.
Typically, we will be solving for the number of each type that either gives the maximum profit, or minimum cost.  The maximum profit or minimum cost expression is called the objective function.  We’ll do an example where we want to maximize profit, so our objective function will be “Maximize 30x + 40y”.
The inequalities of the problem are called the constraints, since we are limiting what we have, such as time or resources.  We’ll do an example where we are limiting our time to make jewelry.  We also will always have our non-negative constraints, where the x and y values have to be greater than or equal to 0.  Some constraints will involve greater than inequalities, for example, if a certain number of things need to be sold.  Usually there will be a sentence or phrase in the word problem for each constraint.  
We have to make sure our inequality is bounded, in order to find a maximum profit (for minimizing cost, it doesn’t have to be bounded, but it usually is).  Again, the bounded region (solutions to the system of inequalities) is called the feasible region, which will be the double-shaded region..
After we graph the inequalities, we’ll want to find the corner points.  The corner points are the vertices of the feasible region, which are the intersections of the lines of the feasible region.   The solution to the linear programming will occur at one of the corner points.  (There is something called a Corner Point Theorem that proves this, but we won’t have to worry about it).
Then we’ll substitute our corner points into the objective function to see which point yields the largest (for maximizing profit) or smallest (for minimizing cost) value.  We can do this with a table, as we’ll see later.

Linear Programming Word Problems

Now let’s put it all together and solve “real” linear programming problems!

Problem:

Lisa has an online jewelry shop where she sells earrings and necklaces.  She sells earrings for $30 and necklaces for $40.  It takes 30 minutes to make a pair of earrings and 1 hour to make a necklace, and, since Lisa is a math tutor, she only has 10 hours a week to make jewelry.  In addition, she only has enough materials to make 15 total jewelry items per week.  She makes a profit of $15 on each pair of earrings and $20 on each necklace.  How many pairs of earrings and necklaces should Lisa make each week in order to maximize her profit, assuming she sells all her jewelry?
Define the variables, write an inequality for this situation, and graph the solutions to the inequality.

Solution:

Variables:  Let’s look at what the problem is asking: how many pairs of earrings and how many necklaces should Lisa make to make a profit?  So let’s let x = the number of pairs of earrings, and y = the number of necklaces.
Objective Function:  Since we are maximizing profit, this will be a maximum, and it will be total dollars.  So the objective function is Maximize 15x + 20y.
Constraints:   Lisa’s constraints are based on her time, and also her materials.  Always make sure all the units match; we had to change 30 minutes into .5 hours.  Also note that we didn’t need to know what the jewelry sells for; sometimes they will give you extra information!
Let’s set up a separate constraint for each sentence, and first put it in a table:
Constraint Table
Let’s turn these into inequalities, and also add the non-negative constraints:
Jewelry Graph
Corner Points:  Think of the corner points as on the outside of the shaded area, but where there is a turn in the graph (the vertices).  In this case, we can easily see what they are from the graph; if we can’t, we’ll have to solve a system of equations (see next example).
Then take these points and plug in the x and y values into the objective function.  Here is what we get:
Corner Point Table
So, in order to maximize her profits, Lisa should make 10 pair of earrings and 5 necklaces per week, and her weekly profit is $250.

Problem:

Anchor
Bountiful Boats has to produce at least 5000 cabin cruisers and 12,000 pontoons each year; they can produce at most 30,000 jet skis in a year.  The company has two factories:  one in Michigan, and one in Wisconsin; each factory is open for a maximum of 240 days per year.  The Michigan factory makes 20 cabin cruisers, 40 pontoons, and 60 jet skis per day.  The Wisconsin factory makes 10 cruisers, 30 pontoons, and 50 jet skis per day.  The cost to run the Michigan factory per day is $960,000; the cost to run the Wisconsin factory per day is $750,000.  How many days of the year should each factory run in order to meet the boat production, yet do so at a minimum cost?

Solution:

Variables:  Let’s look at what the problem is asking: how many days of the year should each factory run?  So let’s let x = the number days per year that the Michigan factory should run, and y = the number days per year that the Wisconsin factory should run.
Objective Function:  Since we are minimizing cost per day, this will be a minimum, and it will be total dollars.  So the objective function is Minimize 960000x + 750000y.
Constraints:   Bountiful Boats’ constraints are based on how much they need to produce (both less than and greater than inequalities), how many days the factories are open (less than inequality), along with the non-negative constraints.
If you can’t find the constraints from sentences in the problem, we can look for another set of items (like cabin cruisers, pontoons, and jet skis), and these will usually each represent an inequality.  Let’s set up a separate constraint for each of the boats, and put them in a table.  Note that the first two inequalities are less than (“at least”), and the last one is greater than (“at most”).
Boat Problem Table
Let’s turn these into inequalities, and also add the factory days open and non-negative constraints.   Notice how we use compound inequalities for the number of days open.
Boat Linear Programming Graph
Corner Points:  Think of the corner points as on the outside of the shaded area, but where there is a turn in the graph (the vertices).  In this case, we can easily see what they are from the graph; if we can’t, we’ll have to solve a system of equations.
Let’s say we couldn’t see the exact intersection of Equations to get Intersection from the graphWe could turn the equations into equalities, and use Linear Combination of Systems to solve:
Linear Combination
Then take these points and plug in the x and y values into the objective function.  Here is what we get:
Corner Point Table Boats
Note that you can see that the point (240, 240) won’t provide a minimum since the point (240, 80) will provide a smaller amount.  So, technically, you wouldn’t even have to plug this point into the objective function.
So, in order to minimize their costs, Bountiful Boats should make boats 240 days a year at their Michigan plant, and 80 days a year at their Wisconsin plant.  This will yield a cost of $290,400,000.  So you can see that your answer may be surprising!
Learn these rules, and practice, practice, practice!
On to Rational Functions and Equations  – you are ready!

LINEAR PROGRAMMING : A WORD PROBLEM WITH FOUR VARIABLES ----- BY. MWL. JAPHET MASATU

Linear Programming:
  A Word Problem with Four Variables
.

Sections: Optimizing linear systems, Setting up word problems

INTRODUCTION:

  • A building supply has two locations in town. The office receives orders from two customers, each requiring 3/4-inch plywood. Customer A needs fifty sheets and Customer B needs seventy sheets.
  • The warehouse on the east side of town has eighty sheets in stock; the west-side warehouse has forty-five sheets in stock. Delivery costs per sheet are as follows: $0.50 from the eastern warehouse to Customer A, $0.60 from the eastern warehouse to Customer B, $0.40 from the western warehouse to Customer A, and $0.55 from the western warehouse to Customer B.
    Find the shipping arrangement which minimizes costs.
    Hmm... I've got four things to consider:
      east warehouse to Customer A
      east warehouse to Customer B
      west warehouse to Customer A
      west warehouse to Customer B
    But I only have two variables. How can I handle this?
    The variables obviously need to stand for the number of sheets being shipped, but I have four different sets of sheets. This calls for subscripts and explicit labelling:
      shipped from east warehouse to Customer A: Ae
      shipped from west warehouse to Customer A:
      Aw
      shipped from east warehouse to Customer B:
      Be
      shipped from west warehouse to Customer B:
      Bw
    Since Customer A wants 50 sheets and Customer B wants 70 sheets, then:
      Ae + Aw = 50, so Aw = 50 – Ae   (I'll call this Equation I)
      Be
      + Bw = 70,
      so Bw = 70 – Be   (I'll call this Equation II)
    Since the eastern warehouse can ship no more than eighty sheets and the western warehouse can ship no more than forty-five sheets, then:
      0 < Ae + Be < 80
      0 < Aw + Bw < 45
    And the optimization equation will be the shipping cost:
      C = 0.5Ae + 0.6Be + 0.4Aw + 0.55Bw
    Where does this leave me? The equations (labelled as Equations I and II above) allow me to substitute and get rid of two of the variables in the second inequality above, so:
      0 < Ae + Be < 80
      0 < (50 – Ae) + (70 – Be) < 45




    Simplifying the second inequality above gives me the new system:
      0 < Ae + Be < 80
      0 < 120 – Ae – Be < 45
    Multiplying through by –1 (thereby flipping the inequality signs) and adding 120 to all three "sides" of the second inequality, I get the new system:
      0 < Ae + Be < 80
      120 > AeBe > 75
    Since Ae + Be is no less than 75 and is no more than 80, then these two inequalities reduce to one:

      75 < Ae + Be < 80
    I can also simplify the optimization equation:
      C = 0.5Ae + 0.6Be + 0.4Aw + 0.55Bw
          
      = 0.5Ae + 0.6Be + 0.4(50 – Ae) + 0.55(70 – Be)
          = 0.1Ae + 0.05Be + 58.50
    Due to the size of the orders, I have:
      0 < Ae < 50
      0 < Be < 70
    Since I have only two variables now, and since I'll be graphing with x and y, I'll rename the variables:   Copyright © Elizabeth Stapel 2006-2011 All Rights Reserved
      x = Ae
      y = Be
    Then entire system is as follows:
      Minimize C = 0.1x + 0.05y + 58.50, subject to the following:
        x > 0
        y > 0
        y >x + 75
        x < 50
        y < 70
        y <x + 80
    The feasibility region graphs as:
      feasibility region
When you test the corner points, (5, 70), (10, 70), (50, 30), and (50, 25), you should get the minimum cost when you ship as follows:
  5 sheets from the eastern warehouse to Customer A70 sheets from the eastern warehouse to Customer B45 sheets from the western warehouse to Customer A
  0 sheets from the western warehouse to Customer B

LINEAR PROGRAMMING: WORD PROBLEMS ----FORM FOUR BY. MWL. JAPHET MASATU.

LINEAR   PROGRAMMING: WORD   PROBLEMS.






INTRODUCTION:

  • 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 producedy: 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:   Copyright © Elizabeth Stapel 2006-2011 All Rights Reserved
      feasibility region
When you test the corner points at (100, 170), (200, 170), (200, 80), (120, 80), and (100, 100), you 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".



  • You need to buy some filing cabinets. You 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. You have been given $140 for this purchase, though you 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 you buy, in order to maximize storage volume?
  • The question ask for the number of cabinets I need to buy, so my variables will stand for that:
      x: number of model X cabinets purchasedy: 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:
      feasibility region
When you test the corner points at (8, 3), (0, 7), and (12, 0), you should obtain a maximal volume of 100 cubic feet by buying eight of model X and three of model Y .               Linear Programming: More Word Problems Sections: Optimizing linear systems, Setting up word problems



  • 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 Xy: 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.
    After rearranging the inequalities, the system graphs as:
      feasibility region
    (Note: One of the lines above is irrelevant to the system. Can you tell which one?)
When you test the corners at (0, 4), (0, 5), (3, 0), (5, 0), and (1, 2), you should get a minimum cost of sixty cents per daily serving, using three ounces of Food X only.


Sometimes you'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.

  • You 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, you decide not to invest any more than $2,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. 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 bondsy: 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
    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:   Copyright © Elizabeth Stapel 2006-2011 All Rights Reserved
      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:

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

LINEAR PROGRAMMING----- FORM FOUR.

LINEAR    PROGRAMMING-----FORM  FOUR

Sections: Optimizing linear systems, Setting up word problems

INTRODUCTION:

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) 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 algebra, though, you'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 you figure out the coordinates of the corners of this feasibility region (that is, you find the intersection points of the various pairs of lines), and test these corner points in the formula (called the "optimization equation") for which you're trying to find the highest or lowest value.




  • Find the maximal and minimal value of z = 3x + 4y subject to the following constraints:
    • x + 2y <= 14, 3x - y >= 0, x - y <= 2
    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:
      y <= -(1/2)x + 7, y <= 3x, y >= x - 2
    It's easy to graph the system:   Copyright © Elizabeth Stapel 2006-2011 All Rights Reserved
      graph of inequalities, with lines labelled and feasibility region shaded in
    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 + 7y = 3x
      y = –( 1/2 )x + 7y = x – 2
      y = 3x
      y
      = x – 2
      –( 1/2 )x + 7 = 3xx + 14 = 6x14 = 7x
      2 =
      x
      y = 3(2) = 6
      –( 1/2 )x + 7 = x – 2
      x + 14 = 2x – 4
      18 = 3
      x
      6 =
      x
      y = (6) – 2 = 4
      3x = x – 2
      2
      x = –2x = –1
      y = 3(–1) = –3
      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".
      (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.
      • x >= 0, y >= 0, x <= 5, x + y <= 7, x + 2y >= 4, y <= x + 5
      First I'll solve the fourth and fifth constraints for easier graphing:
        x >= 0, y >= 0, x <= 5, y <= -x + 7, y >= -(1/2)x + 2, y <= x + 5
      The feasibility region looks like this:
        feasibility region
      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 + 7y = x + 5
        y = –x + 7x = 5
        x = 5y = 0
        x + 7 = x + 5
        2 = 2
        x
        1 =
        x
        y = (1) + 5 = 6
        y = –(5) + 7 = 2
        [nothing to do]
        corner at (1, 6)
        corner at (5, 2)
        corner at (5, 0)

        y = 0y = –( 1/2 )x + 2
        y = –( 1/2 )x + 2x = 0
        x = 0y = x + 5
        –( 1/2 )x + 2 = 0
        2 = (1/2)x
        4 = x
        y = –( 1/2 )(0) + 2
        y = 0 + 2
        y = 2
        y = (0) + 5 = 5
        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 you have to figure out what the inequalities are. So I'll show how to set up some typical linear-programming word problems.
  • 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".

    ADVERTISEMENT


      x: gallons of gasoline producedy: 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
        Copyright © Elizabeth Stapel 2006-2011 All Rights Reserved
      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:
      feasibility region
    Taking a closer look, I can see the feasibility region a little better:
      close-up of feasibility region
When you test the corner points at (6.4m, 3.2m), (6.4m, 3m), and (6m, 3m), you should get a maximal solution of R = $16.96m at (x, y) = (6.4m, 3.2m).