0% found this document useful (0 votes)
20 views

Chapter-4 Linear Programing Simplex - Copy

Uploaded by

Dejene Tsegaye
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views

Chapter-4 Linear Programing Simplex - Copy

Uploaded by

Dejene Tsegaye
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 76

4

Linear Programming: The Simplex Method


Approach
 The Simplex Method:
Standard Maximization Problems
 The Simplex Method:
Standard Minimization Problems
Applied Example 1: A Production Problem
 Furniture manufacturer wishes to produce two types of
furniture: type-A will result in a profit of $1.00, and type-
B in a profit of $1.20.
 To manufacture a type-A furniture requires 2 minutes on
machine I and 1 minute on machine II.
 A type-B furniture requires 1 minute on machine I and 3
minutes on machine II.
 There are 3 hours available on machine I and 5 hours
available on machine II.
 How many furniture of each type should the manufacturer
make in order to maximize its profit?
Applied Example 1: A Production Problem
Solution
 Let’s first tabulate the given information:

Type-A Type-B Time Available


Profit/Unit $1.00 $1.20
Machine I 2 min 1 min 180 min
Machine II 1 min 3 min 300 min

 Let x be the number of type-A furniture and y the number


of type-B furniture to be made.
Applied Example 1: A Production Problem
Solution
 Let’s first tabulate the given information:

Type-A Type-B Time Available


Profit/Unit $1.00 $1.20
Machine I 2 min 1 min 180 min
Machine II 1 min 3 min 300 min

 Then, the total profit (in dollars) is given by

P  x  1.2 y
which is the objective function to be maximized.
Applied Example 1: A Production Problem
Solution
 Let’s first tabulate the given information:

Type-A Type-B Time Available


Profit/Unit $1.00 $1.20
Machine I 2 min 1 min 180 min
Machine II 1 min 3 min 300 min

 The total amount of time that machine I is used is

2x  y
and must not exceed 180 minutes.
 Thus, we have the inequality

2 x  y 180
Applied Example 1: A Production Problem
Solution
 Let’s first tabulate the given information:

Type-A Type-B Time Available


Profit/Unit $1.00 $1.20
Machine I 2 min 1 min 180 min
Machine II 1 min 3 min 300 min

 The total amount of time that machine II is used is

x  3y
and must not exceed 300 minutes.
 Thus, we have the inequality

x  3 y 300
Applied Example 1: A Production Problem
Solution
 Let’s first tabulate the given information:

Type-A Type-B Time Available


Profit/Unit $1.00 $1.20
Machine I 2 min 1 min 180 min
Machine II 1 min 3 min 300 min

 Finally, neither x nor y can be negative, so

x 0
y 0
Applied Example 1: A Production Problem
Solution
 In short, we want to maximize the objective function

P  x  1.2 y
subject to the system of inequalities

2 x  y 180
x  3 y 300
x 0
y 0
The Simplex Method

 The simplex method is an iterative procedure.

 Beginning at a vertex of the feasible region S, each

iteration brings us to another vertex of S with an improved

value of the objective function.

 The iteration ends when the optimal solution is reached.


A Standard Linear Programming Problem

 A standard maximization problem is one in which

1. The objective function is to be maximized.

2. All the variables involved in the problem are


nonnegative.

3. All other linear constraints may be written so that the


expression involving the variables is less than or equal to
a nonnegative constant.
Setting Up the Initial Simplex Tableau

1. Transform the system of linear inequalities


into a system of linear equations by
introducing slack variables.
2. Rewrite the objective function
P c1 x1  c2 x2   cn xn
in the form
 c1 x1  c2 x2   cn xn  P 0
where all the variables are on the left and the
coefficient of P is +1. Write this equation
below the equations in step 1.
3. Write the augmented matrix associated with
this system of linear equations.
Applied Example 1: A Production Problem
 Recall the production problem discussed in section 6.3,
which required us to maximize the objective function
6
P  x  1.2 y or equivalently, P  x  y
5
subject to the system of inequalities
2 x  y 180
x  3 y 300
x, y 0
 This is a standard maximization problem and may be
solved by the simplex method.
 Set up the initial simplex tableau for this linear
programming problem.
Applied Example 1: A Production Problem
Solution
 First, introduce the slack variables u and v into the
inequalities
2 x  y 180
x  3 y 300
and turn these into equations, getting

2x  y  u 180
x  3y  v 300
 Next, rewrite the objective function in the form

6
 x y  P 0
5
Applied Example 1: A Production Problem
Solution
 Placing the restated objective function below the system of
equations of the constraints we get
2x  y  u 180
x  3y v 300
6
 x y P  0
5
 Thus, the initial tableau associated with this system is

x y u v P Constant
2 1 1 0 0 180
1 3 0 1 0 300
–1 – 6/5 0 0 1 0
The Simplex Method

1. Set up the initial simplex tableau.


2. Determine whether the optimal solution has
been reached by examining all entries in the last
row to the left of the vertical line.
a. If all the entries are nonnegative, the optimal
solution has been reached. Proceed to step 4.
b. If there are one or more negative entries, the
optimal solution has not been reached.
Proceed to step 3.
3. Perform the pivot operation. Return to step 2.
4. Determine the optimal solution(s).
Applied Example 1: A Production Problem
 Recall again the production problem discussed previously.
 We have already performed step 1 obtaining the initial
simplex tableau:

x y u v P Constant
2 1 1 0 0 180
1 3 0 1 0 300
–1 – 6/5 0 0 1 0

 Now, complete the solution to the problem.


Applied Example 1: A Production Problem
Solution
x y u v P Constant
2 1 1 0 0 180
1 3 0 1 0 300
–1 – 6/5 0 0 1 0

Step 2. Determine whether the optimal solution has been


reached.
✦ Since there are negative entries in the last row of the
tableau, the initial solution is not optimal.
Applied Example 1: A Production Problem
Solution
x y u v P Constant
2 1 1 0 0 180
1 3 0 1 0 300
–1 – 6/5 0 0 1 0

Step 3. Perform the pivot operation.


✦ Since the entry – 6/5 is the most negative entry to the left
of the vertical line in the last row of the tableau, the
second column in the tableau is the pivot column.
Applied Example 1: A Production Problem
Solution
x y u v P Constant
2 1 1 0 0 180 180
1 180
1 3 0 1 0 300 300
3 100
–1 – 6/5 0 0 1 0

Step 3. Perform the pivot operation.


✦ Divide each positive number of the pivot column into the
corresponding entry in the column of constants and
compare the ratios thus obtained.
✦ We see that the ratio 300/3 = 100 is less than the ratio
180/1 = 180, so row 2 is the pivot row.
Applied Example 1: A Production Problem
Solution
x y u v P Constant
2 1 1 0 0 180
1 3 0 1 0 300
–1 – 6/5 0 0 1 0

Step 3. Perform the pivot operation.


✦ The entry 3 lying in the pivot column and the pivot row
is the pivot element.
Applied Example 1: A Production Problem
Solution
x y u v P Constant
2 1 1 0 0 180
1
3 R2
1 3 0 1 0 300
–1 – 6/5 0 0 1 0

Step 3. Perform the pivot operation.


✦ Convert the pivot element into a 1.
Applied Example 1: A Production Problem
Solution
x y u v P Constant
2 1 1 0 0 180
1
3 R2
1/3 1 0 1/3 0 100
–1 – 6/5 0 0 1 0

Step 3. Perform the pivot operation.


✦ Convert the pivot element into a 1.
Applied Example 1: A Production Problem
Solution
x y u v P Constant
R1  R2 2 1 1 0 0 180
R3  65 R2 1/3 1 0 1/3 0 100
–1 – 6/5 0 0 1 0

Step 3. Perform the pivot operation.


✦ Use elementary row operations to convert the pivot
column into a unit column.
Applied Example 1: A Production Problem
Solution
x y u v P Constant
R1  R2 5/3 0 1 –1/3 0 80
R3  65 R2 1/3 1 0 1/3 0 100
–3/5 0 0 2/5 1 120

Step 3. Perform the pivot operation.


✦ Use elementary row operations to convert the pivot
column into a unit column.
Applied Example 1: A Production Problem
Solution
x y u v P Constant
5/3 0 1 –1/3 0 80
1/3 1 0 1/3 0 100
–3/5 0 0 2/5 1 120

Step 3. Perform the pivot operation.


✦ This completes an iteration.
✦ The last row of the tableau contains a negative number,
so an optimal solution has not been reached.
✦ Therefore, we repeat the iteration step.
Applied Example 1: A Production Problem
Solution
x y u v P Constant
5/3 0 1 –1/3 0 80
1/3 1 0 1/3 0 100
–3/5 0 0 2/5 1 120

Step 3. Perform the pivot operation again.


✦ Since the entry – 3/5 is the most negative entry to the left
of the vertical line in the last row of the tableau, the first
column in the tableau is now the pivot column.
Applied Example 1: A Production Problem
Solution
x y u v P Constant Ratio
5/3 0 1 –1/3 0 80 80
5/3 48
1/3 1 0 1/3 0 100 100
1/3 300
–3/5 0 0 2/5 1 120

Step 3. Perform the pivot operation.


✦ Divide each positive number of the pivot column into the
corresponding entry in the column of constants and
compare the ratios thus obtained.
✦ We see that the ratio 80/(5/3) = 48 is less than the ratio
100/(1/3) = 300, so row 1 is the pivot row now.
Applied Example 1: A Production Problem
Solution
x y u v P Constant
5/3 0 1 –1/3 0 80
1/3 1 0 1/3 0 100
–3/5 0 0 2/5 1 120

Step 3. Perform the pivot operation.


✦ The entry 5/3 lying in the pivot column and the pivot
row is the pivot element.
Applied Example 1: A Production Problem
Solution
x y u v P Constant
5/3 0 1 –1/3 0 80
3
5 R1
1/3 1 0 1/3 0 100
–3/5 0 0 2/5 1 120

Step 3. Perform the pivot operation.


✦ Convert the pivot element into a 1.
Applied Example 1: A Production Problem
Solution
x y u v P Constant
1 0 3/5 –1/5 0 48
3
5 R1
1/3 1 0 1/3 0 100
–3/5 0 0 2/5 1 120

Step 3. Perform the pivot operation.


✦ Convert the pivot element into a 1.
Applied Example 1: A Production Problem
Solution
x y u v P Constant
R2  13 R1 1 0 3/5 –1/5 0 48
R3  53 R1 1/3 1 0 1/3 0 100
–3/5 0 0 2/5 1 120

Step 3. Perform the pivot operation.


✦ Use elementary row operations to convert the pivot
column into a unit column.
Applied Example 1: A Production Problem
Solution
x y u v P Constant
R2  13 R1 1 0 3/5 –1/5 0 48
R3  53 R1 0 1 –1/5 2/5 0 84
0 0 9/25 7/25 1 148 4/5

Step 3. Perform the pivot operation.


✦ Use elementary row operations to convert the pivot
column into a unit column.
Applied Example 1: A Production Problem
Solution
x y u v P Constant
1 0 3/5 –1/5 0 48
0 1 –1/5 2/5 0 84
0 0 9/25 7/25 1 148 4/5

Step 3. Perform the pivot operation.


✦ The last row of the tableau contains no negative
numbers, so an optimal solution has been reached.
Applied Example 1: A Production Problem
Solution
x y u v P Constant
1 0 3/5 –1/5 0 48
0 1 –1/5 2/5 0 84
0 0 9/25 7/25 1 148 4/5

Step 4. Determine the optimal solution.


✦ Locate the basic variables in the final tableau.
In this case, the basic variables are x, y, and P.
 The optimal value for x is 48.
 The optimal value for y is 84.
 The optimal value for P is 148.8.
✦ Thus, the firm will maximize profits at $148.80 by
producing 48 type-A furniture and 84 type-B furniture.
Applied Example 1: A Production Problem
 We restated the problem as a linear programming problem
in which we wanted to maximize the objective function

subject to the system of inequalities


P  x  1.2 y

2 x  y 180
x  3 y 300
x 0
y 0
 We can now solve the problem graphically.
Applied Example 1: A Production Problem
 Now, find the values of P at the vertices and tabulate them:

Vertex P = x + 1.2 y
A(0, 0) 0
y
B(90, 0) 90
200
C(48, 84) 148.8
D(0, 100) D(0, 100) 120
100 C(48, 84)

S x  3 y 300
A(0, 0) B(90, 0)
x
100 200 300

2 x  y 180
Applied Example 1: A Production Problem
 Finally, identify the vertex with the highest value for P:
✦ We can see that P is maximized at the vertex C(48, 84)
and has a value of 148.8.

Vertex P = x + 1.2 y
A(0, 0) 0
y
B(90, 0) 90
200
C(48, 84) 148.8
D(0, 100) D(0, 100) 120
100 C(48, 84)

S x  3 y 300
A(0, 0) B(90, 0)
x
100 200 300

2 x  y 180
Applied Example 1: A Production Problem
 Finally, identify the vertex with the highest value for P:

✦ We can see that P is maximized at the vertex C(48, 84)


and has a value of 148.8.
✦ Recalling what the symbols x, y, and P represent, we
conclude that the furniture manufacturer would
maximize its profit at $148.80 by producing 48 type-A
furniture and 84 type-B furniture.
4
The Simplex Method:
Standard Maximization Problems

x y u v P Constant
1 0 3/5 –1/5 0 48
0 1 –1/5 2/5 0 84
0 0 9/25 7/25 1 148 4/5
4.2
The Simplex Method:
Standard Minimization Problems

u v w x y P Constant
1 0 –3/20 3/100 –1/50 0 1/50
0 1 11/10 –1/50 2/25 0 13/25
0 0 450 30 120 1 1140

Solution for the


primal problem
Minimization with  Constraints
 In the last section we developed the simplex method to
solve linear programming problems that satisfy three
conditions:
1. The objective function is to be maximized.
2. All the variables involved are nonnegative.
3. Each linear constraint may be written so that the
expression involving the variables is less than or equal to
a nonnegative constant.
 We will now see how the simplex method can be used to
solve minimization problems that meet the second and
third conditions listed above.
Example
 Solve the following linear programming problem:

Minimize C  2 x  3 y
subject to 5 x  4 y 32
x  2 y 10
x, y 0
 This problem involves the minimization of the objective
function and so is not a standard maximization problem.
 Note, however, that all the other conditions for a standard
maximization hold true.
Example
 We can use the simplex method to solve this problem by
converting the objective function from minimizing C to its
equivalent of maximizing P = – C.
 Thus, the restated linear programming problem is

Maximize P 2 x  3 y
subject to 5 x  4 y 32
x  2 y 10
x, y 0

 This problem can now be solved using the simplex method


as discussed in section 6.4.
Example
Solution
Step 1. Set up the initial simplex tableau.
✦ Turn the constraints into equations adding to them the
slack variables u and v. Also rearrange the objective
function and place it below the constraints:
5x  4 y  u 32
x 2y v 10
 2x  3y P  0

✦ Write the coefficients of the system in a tableau:


xMaximize
y u P 2vx  3 yP Constant
5 4 1 0 0 32
1 2 0 1 0 10
–2 –3 0 0 1 0
Example
Solution
x y u v P Constant
5 4 1 0 0 32
1 2 0 1 0 10
–2 –3 0 0 1 0

Step 2. Determine whether the optimal solution has been


reached.
✦ Since there are negative entries in the last row of the
tableau, the initial solution is not optimal.
Example
Solution
xMaximize
y u P 2vx  3 yP Constant
5 4 1 0 0 32
1 2 0 1 0 10
–2 –3 0 0 1 0

Step 3. Perform the pivot operation.


✦ Since the entry – 3 is the most negative entry to the left
of the vertical line in the last row of the tableau, the
second column in the tableau is the pivot column.
Example
Solution
xMaximize
y u P 2vx  3 yP Constant Ratio
5 4 1 0 0 32 32
4 8
1 2 0 1 0 10 10
2 5
–2 –3 0 0 1 0

Step 3. Perform the pivot operation.


✦ Divide each positive number of the pivot column into the
corresponding entry in the column of constants and
compare the ratios thus obtained.
✦ We see that the ratio 10/2 = 5 is less than the ratio
32/4 = 8, so row 2 is the pivot row.
Example
Solution
xMaximize
y u P 2vx  3 yP Constant
5 4 1 0 0 32
1 2 0 1 0 10
–2 –3 0 0 1 0

Step 3. Perform the pivot operation.


✦ The entry 2 lying in the pivot column and the pivot row
is the pivot element.
Example
Solution
xMaximize
y u P 2vx  3 yP Constant
5 4 1 0 0 32
1
2 R2 1 2 0 1 0 10
–2 –3 0 0 1 0

Step 3. Perform the pivot operation.


✦ Convert the pivot element into a 1.
Example
Solution
xMaximize
y u P 2vx  3 yP Constant
5 4 1 0 0 32
1
2 R2 1/2 1 0 1/2 0 5
–2 –3 0 0 1 0

Step 3. Perform the pivot operation.


✦ Convert the pivot element into a 1.
Example
Solution
xMaximize
y u P 2vx  3 yP Constant
R1  4 R2 5 4 1 0 0 32
R3  3R2 1/2 1 0 1/2 0 5
–2 –3 0 0 1 0

Step 3. Perform the pivot operation.


✦ Use elementary row operations to convert the pivot
column into a unit column.
Example
Solution
xMaximize
y u P 2vx  3 yP Constant
R1  4 R2 3 0 1 –2 0 12
R3  3R2 1/2 1 0 1/2 0 5
–1/2 0 0 3/2 1 15

Step 3. Perform the pivot operation.


✦ Use elementary row operations to convert the pivot
column into a unit column.
Example
Solution
xMaximize
y u P 2vx  3 yP Constant
3 0 1 –2 0 12
1/2 1 0 1/2 0 5
–1/2 0 0 3/2 1 15

Step 3. Perform the pivot operation.


✦ This completes an iteration.
✦ The last row of the tableau contains a negative number,
so an optimal solution has not been reached.
✦ Therefore, we repeat the iteration step.
Example
Solution
xMaximize
y u P 2vx  3 yP Constant
3 0 1 –2 0 12
1/2 1 0 1/2 0 5
–1/2 0 0 3/2 1 15

Step 3. Perform the pivot operation.


✦ Since the entry –1/2 is the most negative entry to the left
of the vertical line in the last row of the tableau, the first
column in the tableau is now the pivot column.
Example
Solution
xMaximize
y u P 2vx  3 yP Constant
3 0 1 –2 0 12 12
3 4
1/2 1 0 1/2 0 5 5
1/2 10
–1/2 0 0 3/2 1 15

Step 3. Perform the pivot operation.


✦ Divide each positive number of the pivot column into the
corresponding entry in the column of constants and
compare the ratios thus obtained.
✦ We see that the ratio 12/3 = 4 is less than the ratio
5/(1/2) = 10, so row 1 is now the pivot row.
Example
Solution
x y u v P Constant
3 0 1 –2 0 12
1/2 1 0 1/2 0 5
–1/2 0 0 3/2 1 15

Step 3. Perform the pivot operation.


✦ The entry 3 lying in the pivot column and the pivot row
is the pivot element.
Example
Solution
x y u v P Constant
3 0 1 –2 0 12
1
3 R1
1/2 1 0 1/2 0 5
–1/2 0 0 3/2 1 15

Step 3. Perform the pivot operation.


✦ Convert the pivot element into a 1.
Example
Solution
x y u v P Constant
1 0 1/3 –2/3 0 4
1
3 R1
1/2 1 0 1/2 0 5
–1/2 0 0 3/2 1 15

Step 3. Perform the pivot operation.


✦ Convert the pivot element into a 1.
Example
Solution
x y u v P Constant
R2  12 R1 1 0 1/3 –2/3 0 4
R3  12 R1 1/2 1 0 1/2 0 5
–1/2 0 0 3/2 1 15

Step 3. Perform the pivot operation.


✦ Use elementary row operations to convert the pivot
column into a unit column.
Example
Solution
x y u v P Constant
R2  12 R1 1 0 1/3 –2/3 0 4
R3  12 R1 0 1 –1/6 5/6 0 3
0 0 1/6 7/6 1 17

Step 3. Perform the pivot operation.


✦ Use elementary row operations to convert the pivot
column into a unit column.
Example
Solution
x y u v P Constant
1 0 1/3 –2/3 0 4
0 1 –1/6 5/6 0 3
0 0 1/6 7/6 1 17

Step 3. Perform the pivot operation.


✦ The last row of the tableau contains no negative
numbers, so an optimal solution has been reached.
Example
Solution
x y u v P Constant
1 0 1/3 –2/3 0 4
0 1 –1/6 5/6 0 3
0 0 1/6 7/6 1 17

Step 4. Determine the optimal solution.


✦ Locate the basic variables in the final tableau.
In this case, the basic variables are x, y, and P.
 The optimal value for x is 4.
 The optimal value for y is 3.
 The optimal value for P is 17, which means that
the minimized value for C is –17.
The Dual Problem
 Another special class of linear programming problems we
encounter in practical applications is characterized by the
following conditions:
1. The objective function is to be minimized.
2. All the variables involved are nonnegative.
3. All other linear constraints may be written so that the
expression involving the variables is greater than or
equal to a nonnegative constant.
 Such problems are called standard minimization
problems.
The Dual Problem
 In solving this kind of linear programming problem, it
helps to note that each maximization problem is associated
with a minimization problem, and vice versa.
 The given problem is called the primal problem, and the
related problem is called the dual problem.
Example
 Write the dual problem associated with this problem:
Minimize C 6 x  8 y
subject to 40 x  10 y 2400
10 x  15 y 2100 Primal
Problem
5 x  15 y 1500
x, y 0
 We first write down a tableau for the primal problem:

x y Constant
40 10 2400
10 15 2100
5 15 1500
6 8
Example

x y Constant
40 10 2400
10 15 2100
5 15 1500
6 8

 Next, we interchange the columns and rows of the tableau


and head the three columns of the resulting array with the
three variables u, v, and w, obtaining

u v w Constant
40 10 5 6
10 15 15 8
2400 2100 1500
Example

u v w Constant
40 10 5 6
10 15 15 8
2400 2100 1500

 Consider the resulting tableau as if it were the initial


simplex tableau for a standard maximization problem.
 From it we can reconstruct the required dual problem:

Maximize P 2400u  2100v  1500 w


subject to 40u  10v  5w 6 Dual
10u  15v  15w 8 Problem

u, v, w 0
Theorem 1

The Fundamental Theorem of Duality


 A primal problem has a solution if and only if the
corresponding dual problem has a solution.
 Furthermore, if a solution exists, then:
a. The objective functions of both the primal and
the dual problem attain the same optimal value.
b. The optimal solution to the primal problem
appears under the slack variables in the last row
of the final simplex tableau associated with the
dual problem.
Example
 Complete the solution of the problem from our last example:

Maximize P 2400u  2100v  1500w


subject to 40u  10v  5w 6 Dual
10u  15v  15w 8 Problem

u, v, w 0
Example
Solution
 The dual problem associated with the given primal
problem is a standard maximization problem.
 Thus, we can proceed with the simplex method.
 First, we introduce to the system of equations the slack
variables x and y, and restate the inequalities as equations,
obtaining
40u  10v  5w  x 6
10u  15v  15w y 8
 2400u  2100v  1500w  P 0
Example
Solution
 Next, we transcribe the coefficients of the system of
equations
40u  10v  5w  x 6
10u  15v  15w y 8
 2400u  2100v  1500w  P 0
into an initial simplex tableau:

u v w x y P Constant
40 10 5 1 0 0 6
10 15 15 0 1 0 8
–2400 –2100 –1500 0 0 1 0
Example
Solution
 Continue with the simplex iterative method until a final
tableau is obtained with the solution for the problem:

u v w x y P Constant
1 0 –3/20 3/100 –1/50 0 1/50
0 1 11/10 –1/50 2/25 0 13/25
0 0 450 30 120 1 1140

Solution for the


primal problem

 The fundamental theorem of duality tells us that the


solution to the primal problem is x = 30 and y = 120, with a
minimum value for C of 1140.
Applied Example 2: Problem
Minimize the objective function
C 6 x  8 y

subject to the system of inequalities

40 x  10 y 2400
10 x  15 y 2100
5 x  15 y 1500
x 0
y 0
Graphical Solutions
of Linear Programming Problems

y
40 x  10 y 2400
A(0, 240)

200
10 x  15 y 2100
S
B(30, 120)
5 x  15 y 1500
100
C(120, 60)
D(300, 0)
x
100 200 300
End of
Chapter

You might also like