Download Simplex Method and Big M Method in Linear Programming and more Study Guides, Projects, Research Design history in PDF only on Docsity! Chapter 5.1 Systems of linear inequalities in two variables. In this section, we will learn how to graph linear inequalities in two variables and then apply this procedure to practical application problems. Graphing a linear inequality Our first example is to graph the linear equality 3 1 4 y x< โ The following is the procedure to graph a linear inequality in two variables: 1. Replace the inequality symbol with an equal sign 2. Construct the graph of the line. If the original inequality is a > or < sign, the graph of the line should be dotted. Otherwise, the graph of the line is solid. 3 1 4 y x= โ Graph of Example 1 Here is the complete graph of the first inequality: Example 2 For our second example, we will graph the inequality 3 5 15x yโ โฅ 1. Step 1. Replace inequality symbol with equals sign: 3x โ 5y = 15 2. Step 2. Graph the line 3x โ 5y = 15 Since 3 and -5 are divisors of 15, we will graph the line using the x and y intercepts: When x = 0 , y = -3 and y = 0 , x = 5. Plot these points and draw a solid line since the original inequality symbol is less than or equal to which means that the graph of the line itself is included. Example 2 continued: Step 3. Choose a point not on the line. Again, the origin is a good test point since it is not part of the line itself. We have the following statement which is clearly false. Therefore, we shade the region on the side of the line that does not include the origin. 3(0) 5(0) 15โ โฅ Graph of 2x>8
2x>8
Example 4: This example illustrates the type of problem in which the x- variable is missing. We will proceed the same way. Step 1. Replace the inequality symbol with an equal sign y = 2 Step 2. Graph the equation y = 2 . The line is solid since the original inequality symbol is less than or equal to. Step 3. Shade the appropriate region. Choosing again the origin as the test point, we find that is a false statement so we shade the side of the line that does not include the origin. Graph is shown in next slide. 2y โค โ 0 2โค โ Graph of Example 4. Graph of more than two linear inequalities To graph more than two linear inequalities, the same procedure is used. Graph each inequality separately. The graph of a system of linear inequalities is the area that is common to all graphs, or the intersection of the graphs of the individual inequalities. 0 0 15 8 8 160 4 12 180 x y x x y x y โฅ โฅ โค + โค + โค Application Before we graph this system of linear inequalities, we will present an application problem. Suppose a manufacturer makes two types of skis: a trick ski and a slalom ski. Suppose each trick ski requires 8 hours of design work and 4 hours of finishing. Each slalom ski 8 hours of design and 12 hours of finishing. Furthermore, the total number of hours allocated for design work is 160 and the total available hours for finishing work is 180 hours. Finally, the number of trick skis produced must be less than or equal to 15. How many trick skis and how many slalom skis can be made under these conditions? How many possible answers? Construct a set of linear inequalities that can be used for this problem. Application Let x represent the number of trick skis and y represent the number o slalom skis. Then the following system of linear inequalities describes our problem mathematically. The graph of this region gives the set of ordered pairs corresponding to the number of each type of ski that can be manufactured. Actually, only whole numbers for x and y should be used, but we will assume, for the moment that x and y can be any positive real number. Remarks: 0 0 15 8 8 160 4 12 180 x y x x y x y โฅ โฅ โค + โค + โค x and y must both be positive Number of trick skis has to be less than or equal to 15 Constraint on the total number of design hours Constraint on the number of finishing hours See next slide for graph of solution set. A familiar example We have seen this problem before. An extra condition will be added to make the example more interesting. Suppose a manufacturer makes two types of skis: a trick ski and a slalom ski. Suppose each trick ski requires 8 hours of design work and 4 hours of finishing. Each slalom ski 8 hours of design and 12 hours of finishing. Furthermore, the total number of hours allocated for design work is 160 and the total available hours for finishing work is 180 hours. Finally, the number of trick skis produced must be less than or equal to 15. How many trick skis and how many slalom skis can be made under these conditions? Now, here is the twist: Suppose the profit on each trick ski is $5 and the profit for each slalom ski is $10. How many each of each type of ski should the manufacturer produce to earn the greatest profit? Linear Programming problem This is an example of a linear programming problem. Every linear programming problem has two components: 1. A linear objective function is to be maximized or minimized. In our case the objective function is Profit = 5x + 10y (5 dollars profit for each trick ski manufactured and $10 for every slalom ski produced). 2. A collection of linear inequalities that must be satisfied simultaneously. These are called the constraints of the problem because these inequalities give limitations on the values of x and y. In our case, the linear inequalities are the constraints. 0 0 15 8 8 160 4 12 180 x y x x y x y โฅ โฅ โค + โค + โค x and y have to be positive The number of trick skis must be less than or equal to 15 Design constraint: 8 hours to design each trick ski and 8 hours to design each slalom ski. Total design hours must be less than or equal to 160Finishing constraint: Four hours for each trick ski and 12 hours for each slalom ski. Profit = 5x + 10y Linear programming 3. The feasible set is the set of all points that are possible for the solution. In this case, we want to determine the value(s) of x, the number of trick skis and y, the number of slalom skis that will yield the maximum profit. Only certain points are eligible. Those are the points within the common region of intersection of the graphs of the constraining inequalities. Letโs return to the graph of the system of linear inequalities. Notice that the feasible set is the yellow shaded region. Our task is to maximize the profit function P = 5x + 10y by producing x trick skis and y slalom skis, but use only values of x and y that are within the yellow region graphed in the next slide. Seale: Une square =5 units.
Prafรฉ=x+10y
x0
yet
x15
These first two inequalities
include only pois in the first
quadrant, ineluding the x and y
axes
The origin satishes all the
a cs By = 1 & Oo inequalites.. We shade the region to
the left ofthe vertical line x = 15
4 x+ 1 ZY < 1 BO and below the other lines. The
intersection of all graphs is the
yellow shaded region.
Various proft levels are
indicated hy the pink
lines. Each line has a
slope of โ1/2 the slope of
the line Sx + 10y =P,
1
Some possible solutions
include the points (11, (1)
where F is a constant.
C12). (0) tieans produce 1x
each tupe of ski. [21] means 3
The profit level that is
trick skis and 1 slalom ski
greatest and yet still
includes one or more
(12) means one trick ski and:
points ofthe feasible set
slalom skis produced.
is indigated,
Maximizing the Profit Thus, the manufacturer should produce 7 trick skis and 12 slalom skis to achieve maximum profit. What is the maximum profit? P = 5x + 10y P=5(7)+10(12)=35 + 120 = 155 General Result If a linear programming problem has a solution, it is located at a vertex of the set of feasible solutions. If a linear programming problem has more than one solution, at least one of them is located at a vertex of the set of feasible solutions. If the set of feasible solutions is bounded, as in our example, then it can be enclosed within a circle of a given radius. In these cases, the solutions of the linear programming problems will be unique. If the set of feasible solutions is not bounded, then the solution may or may not exist. Use the graph to determine whether a solution exists or not.
The set offeasible solutions is
unbounded. The region has tuo
vertices [0 Tl and (1 0).
xtiysze4
xtiyez=3
There ts Ho feasible port within the region that
will make 2 =x +2ythe largest. The objective
funetion has ne maciturd value BUT DOES HOE o
MURIAUE LUE
Seale:tuo squares equals one unit
5.3 Geometric Introduction to the Simplex Method The geometric method of the previous section is limited in that it is only useful for problems involving two decision variables and cannot be used for applications involving three or more decision variables. It is for this reason, that a more sophisticated method be developed for such situations. A man by the name George B. Dantzig developed such a method in 1947 while being assigned to the U.S. military. An interview with George Dantzig, inventor of the simplex method http://www.e-optimization.com/directory/trailblazers/dantzig/interview_opt.cfm How do you explain optimization to people who haven't heard of it? GEORGE I would illustrate the concept using simple examples such as the diet problem or the blending of crude oils to make high-octane gasoline. IRV What do you think has held optimization back from becoming more popular? GEORGE It is a technical idea that needs to be demonstrated over and over again. We need to show that firms that use it make more money than those who don't. IRV Can you recall when optimization started to become used as a word in the field? GEORGE From the very beginning of linear programming in 1947, terms like maximizing, minimizing, extremizing, optimizing a linear form and optimizing a linear program were used. An interview with George Dantzig, inventor of the simplex method IRV And these were great ideas that worked and still do. GEORGE Yes, I was very lucky. IRV What would you say is the most invalid criticism of optimization? GEORGE Saying: "It's a waste of time to optimize because one does not really know what are the exact values of the input data for the program." IRV Ok, let's turn this around. What would you say is the greatest potential of optimization? GEORGE It has the potential to change the world. George Dantzig An example To see how this method works, we will use a modified form of a previous example. Consider the linear programming problem of maximizing z under the constraints. The problem constraints involve inequalities with positive constants to the right of the inequality symbol. Optimization problems that satisfy this condition are called standard maximization problems. 5 10 8 8 160 4 12 180 0; 0 z x y x y x y x y = + + โค + โค โฅ โฅ โค Basic Solutions and the Feasible Region There is a association between the basic solutions and the intersection points of the boundary lines of the feasible region. This is best illustrated by an example: Consider the feasible set determined by the constraints The graph of the feasible set is shown on the next slide along with the feasible region. 5 10 8 8 160 4 12 180 0; 0 z x y x y x y x y = + + โค + โค โฅ โฅ Seale: Une square = 5 units.
Peds + 1Dy
yead
Bx +hy = 160
4x4 12y 2180
Points of intersection of lines and
feasible points
(0,0)
(0 1)
(0,20) not part offeasible set
(ES 12.5) Optinial point
(0,0)
(& 0)
Basic Solutions and the Feasible Region We will start with our linear equations containing the two slack variables. We will systematically assign two of these variables a zero (non-basic variables) value and then solve for the remaining two variables (basic variables). The result is displayed in a table. To illustrate how the table is constructed, study the example: Assign x = 0 and y = 0 as our non-basic variables. Then 8(0) + 8(0) + s1 = 160 so s1 = 160. Substitute x = 0 and y = 0 in the second equation to obtain 4(0) + 12(0) + s2 = 180 . This implies that s2 = 180 x y s1 s2 point feasible? 0 0 160 180 (0,0) yes There are six different rows of the table corresponding to six different ways you can 2 variables a value of zero out of four possible variables. The rest of the table is displayed in the next slide. 1 2 8 8 160 4 12 180 x y s x y s + + = + + = Generalization: Given a system of linear equations associated with a linear programming problem in which there will always be more variables than equations, the variables are separated into two mutually exclusive groups called basic variables and non-basic variables. Basic variables are selected arbitrarily with the restriction that there are as many basic variables as there are equations. The remaining variables are called non-basic variables. We obtain a solution by assigning the non-basic variables a value of zero and solving for the basic variables. If a basic solution has no negative values, it is a basic feasible solution. Theorem: If the optimal value of the objective function in a linear programming problem exists, then that value must occur at one ( or more ) of the basic feasible solutions. Conclusion: This is simply the first step in developing a procedure for solving a more complicated linear programming problem. But it is an important step in that we have been able to identify all the corner points (vertices) of the feasible set without drawing its graph since the graphical method will not work for systems having 3 or more variables. 5.4 Simplex method: maximization with problem constraints of the form The procedures for the simplex method will be illustrated through an example. Be sure to read the textbook to fully understand all the concepts involved. โค Represent linear system using matrix The variable y was replaced the variable 1 2 1 2 1 2 8 8 1 0 0 160 4 12 0 1 0 180 5 10 0 0 1 0 x x s s P s s P โ โ 2x Determine the pivot element In the last row, we see the most negative element is -10. Therefore, the column containing -10 is the pivot column. To determine the pivot row, we divide the coefficients above the -10 into the numbers in the rightmost column and determine the smallest quotient. Since 160 divided by 8 is 20 and 180 divided by 12 is 15, the constant 12 becomes the pivot element. 1 2 1 2 1 2 8 8 1 0 0 160 4 12 0 1 0 180 5 10 0 0 1 0 x x s s P s s P โ โ Using the pivot element and elementary row operations 1.Divide row 2 by 12 to get a 1 in the position of the pivot element. 2. Obtain zeros in the other two positions of the pivot column. 3. x2 becomes the entering variable and s2 exits. 1 2 1 2 1 2 8 8 1 0 0 160 4 0 1 0 180 5 10 0 0 1 12 0 x x s s P s s P โ โ 1 1 2 2 1 2 8 8 1 0 0 160 1 11 0 0 15 3 12 0 1 05 10 0 x x s P P x s s โ โ 2 1 2 1 2 1 16 20 1 0 40 3 3 1 11 0 0 15 3 12 55 1 1500 0 63 x x s s P P x s โ โ Find the solution Since the last row of the matrix contains no negative numbers, we can stop the procedure and find the solution. IF the slack variables are assigned a value of zero, then we have x= 7.5 and y = x2=12.5. This is the same solution we obtained geometrically. 1 2 1 2 1 2 3 11 0 0 7.5 16 8 1 10 1 0 12.5 16 8 5 5 2750 0 1 16 8 2 x x s s P x x P โ โ 5.5 Dual problem: minimization with problem constraints of the form Associated with each minimization problem with constraints is a maximization problem called the dual problem. The dual problem will be illustrated through an example. Read the textbook carefully to learn the details of this method. We wish to minimize the objective function subject to certain constraints: โฅ โฅ 1 2 3 1 2 3 1 2 3 1 2 3 16 9 21 3 12 2 16 , , 0 C x x x x x x x x x x x x = + + + + โฅ + + โฅ โฅ Initial matrix We start with an initial matrix , A, corresponds to the problem constraints: 1 1 3 12 2 1 1 16 16 9 21 1 A โก โค โข โฅ โข โฅ= โข โฅ โข โฅ โฃ โฆ Theorem 1: Fundamental principle of Duality A minimization problem has a solution if and only if its dual problem has a solution. If a solution exists, then the optimal value of the minimization problem is the same as the optimum value of the dual problem. Forming the Dual problem with slack variables x1, x2, x3 result: 1 2 1 1 2 2 1 2 3 1 2 2 16 9 3 21 12 16 0 y y x y y x y y x y y p + + = + + = + + = โ โ + = Form the simplex tableau for the dual problem and determine the pivot element The first pivot element is 2 (in red) because it is located in the column with the smallest negative number at the bottom(-16) and when divided into the rightmost constants, yields the smallest quotient (16 divided by 2 is 8) 1 2 1 2 3 1 2 3 1 1 0 0 16 1 1 0 1 0 9 3 1 0 0 1 21 1 2 0612 0 0 0 y y x x x P x x x P โโ Variable y1 becomes new entering variable Divide row 2 by 0.5 to obtain a 1 in the pivot position. 1 2 1 2 3 2 3 1 .5 1 .5 0 0 8 1 0 1 2 0 2 2.5 0 .5 0 1 13 4 0 8 0 0 128 y y x x x P y P y x โ โ โ More row operations -0.5*row2 + row1=Row1 -2.5*row 2 + row3=row3 4*row2+row4=row4 1 2 1 2 3 2 1 3 0 1 1 1 0 8 1 0 1 2 0 2 0 0 2 5 1 8 0 0 4 8 0 136 y y x x x P y y x P โ โ โ Solution: An optimal solution to a minimization problem can always be obtained from the bottom row of the final simplex tableau for the dual problem. Minimum of P is 136. It occurs at x 1 = 4 , x 2 =8, x 3 =0 1 2 1 2 3 2 1 3 0 1 1 1 0 8 1 0 1 2 0 2 0 0 2 0 0 4 8 0 13 5 1 8 6 y y x x x P P y y x โ โ โ Definition: Initial Simplex Tableau For a system tableau to be considered an initial simplex tableau, it must satisfy the following two requirements: 1. A variable can be selected as a basic variable only if it corresponds to a column in the tableau that has exactly one nonzero element and the nonzero element in the column is not in the same row as the nonzero element in the column of another basic variable. 2. The remaining variables are then selected as non- basic variables to be set equal to zero in determining a basic solution. 3. The basic solution found by setting the non-basic variables equal to zero is feasible. Key Steps of the big M method Big M Method: Introducing slack, surplus, and artificial variables to form the modified problem 1. If any problem constraints have negative constants on the right side, multiply both sides by -1 to obtain a constraint with a nonnegative constant. (remember to reverse the direction of the inequality if the constraint is an inequality). 2. Introduce a slack variable for each constraint of the form 3. Introduce a surplus variable and an artificial variable in each constraint. 4. Introduce an artificial variable in each = constraint. 5. For each artificial variable a, add โMa to the objective function. Use the same constant M for all artificial variables. โค โฅ An example: Maximize subject to : 1 2 3 1 2 3 1 2 3 1 2 3 1, 2 3 1 2 3 2 5 3 4 10 2 4 5 20 3 15 , 0 3 2 x x x x x x x x x x x x x x x P x x x โ + โฅ โ โ + โค โ + + โค โ โ = โ โฅ = โ + Solution continued: 4) Do the same procedure for the other constraint: โฅ 1 2 3 2 23 4 10x x x s a+ โ โ + = 5) Introduce surplus variable for less than or equal to constraint: 1 2 3 32 4 5 20x x x s+ + + = Solution continued: 6) Introduce the third artificial variable for the equation constraint: 1 2 3 33 15x x x aโ + + + = 7) For each of the three artificial variables, we will add โMa to the objective function: 1 2 3 1 2 33 2P x x x Ma Ma Ma= โ + โ โ โ Final result The modified problem is: 1 2 3 1 2 33 2P x x x Ma Ma Ma= โ + โ โ โ Maximize subject to the constraints: 1 2 3 1 1 1 2 3 2 2 1 2 3 3 1 2 3 3 2 5 3 4 10 2 4 5 20 3 15 x x x s a x x x s a x x x s x x x a โ + โ + = + โ โ + = + + + = โ + + + = Big M method: continued: 4. Relate the optimal solution of the modified problem to the original problem. A) if the modified problem has no optimal solution, the original problem has no optimal solution. B) if all artificial variables are 0 in the optimal solution to the modified problem, delete the artificial variables to find an optimal solution to the original problem C) if any artificial variables are nonzero in the optimal solution, the original problem has no optimal solution. An example to illustrate the Big M method: Maximize 321 24 xxxP ++= 1 6 4 321 31 32 โฅโโ =โ โค+ xxx xx xx Subject to Solution: Form the preliminary simplex tableau for the modified problem: Introduce slack variables, artificial variables and variable M. 024 1 6 4 21321 22321 131 132 =+++โโโ =+โโโ =+โ =++ PMaMaxxx asxxx axx sxx Solution: Use the following operations to solve the problem: 441 443 441 442 332 1 3 12 1 RRR)( RRMR RRR RRR)M( RRR โ+ โ+ โ+ โ++ โ+โ Solution: . 221014100 501110010 600 400 010 001 101 110 2211321 M)M( Pasasxxx + โโโโ โ Solution: 0 22 6 4 3 1 2 = = = = x P x x