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

Linear Programming: Simplex Method: Dr. R. K Singh Professor, Operations Management MDI, Gurgaon

The document describes the simplex method for solving linear programming problems. It explains that the simplex method examines the extreme points of the feasible solution space in a systematic manner through an iterative algorithm to find the optimal solution. The document outlines the standard form of an LP problem and provides a 7-step process for applying the simplex method, including setting up the initial solution, testing for optimality, selecting variables to enter/leave the basis, and updating the solution at each iteration.

Uploaded by

vsyoi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
251 views

Linear Programming: Simplex Method: Dr. R. K Singh Professor, Operations Management MDI, Gurgaon

The document describes the simplex method for solving linear programming problems. It explains that the simplex method examines the extreme points of the feasible solution space in a systematic manner through an iterative algorithm to find the optimal solution. The document outlines the standard form of an LP problem and provides a 7-step process for applying the simplex method, including setting up the initial solution, testing for optimality, selecting variables to enter/leave the basis, and updating the solution at each iteration.

Uploaded by

vsyoi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 58

Linear Programming: Simplex Method

By

Dr. R. K Singh
Professor, Operations Management
MDI, Gurgaon

1-1
Simplex Method

The concept of simplex method is similar to the graphical method. In


graphical method, extreme points of the feasible solution space are
examined to search for optimal solution at one of them.

For LP problems with several variables, optimal solution will still lie at an
extreme point of the many-sided, multidimensional figure that represents
the feasible solution space.

The simplex method examines the extreme points in a systematic manner,


repeating the same set of steps of the algorithm until an optimal solution is
reached. It is for this reason that it is also called the iterative method.

1-2
Standard Form of An LP Problem

All the constraints should be expressed as equations by adding


slack or surplus and/or artificial variables.

The right-hand side of each constraint should be made non-


negative; if it is not, this should be done by multiplying both sides
of the resulting constraint by 1.

The objective function should be of the maximization type.

1-3
Standard form of the LP problem is expressed as:

Optimize (Max or Min) Z = c1 x1 + c2 x2 + . . . + cn xn + 0s1 + 0s2 + . . . + 0sm


subject to the linear constraints
a11 x1 + a12 x2 + . . . + a1n xn + s1 = b1
a21 x1 + a22 x2 + . . . + a2n xn + s2 = b2
. . .
. . .
. . .
am1 x1 + am2 x2 + . . . + amn xn + sm = bm
and x1, x2, . . . , xn, s1, s2, . . ., sm 0

1-4
Three types of additional variables, namely
slack variables (s)
surplus variables ( s), and
artificial variables (A)

are added in the given LP problem to convert it into the standard form
for the following reasons:
(a) These variables allow us to convert inequalities into equalities,
thereby converting the given LP problem into a form that is
amenable to algebraic solution.

(b) These variables permit us to make a more comprehensive


economic interpretation of a final solution.

(c) Help us to get an initial feasible solution represented by the


columns of the identity matrix.

1-5
Types of Constraint Extra Variable Coefficient of Extra Variables
Needed in the Objective Function

Max Z Min Z

Less than or A slack variable 0 0


equal to () is added

Greater than or A surplus variable 0 0


equal to () is subtracted, and
an artificial variable M +M
is added
Equal to (=) Only an artificial M +M
variable is added.

1-6
Simplex Algorithm (Maximization Case)

Step 1: Formulation of the mathematical model

a) Formulate the mathematical model of the given linear programming


problem.

b) If the objective function is of minimization, then convert it into one of


maximization by using the following relationship

Minimize Z = Maximize Z*

where Z* = Z.

c) Check whether all the bi (i = 1, 2, . . . , m) values are positive. If any


one of them is negative, then multiply the corresponding constraint
by 1 in order to make bi > 0. In doing so, remember to change
a type constraint to a type constraint, and vice versa.

1-7
d) Express the mathematical model of the given LP problem in the
standard form by adding additional variables to the left side of
each constraint and assign a zero-cost coefficient to these in the
objective function.

Step 2: Set-up the initial solution


Write down the coefficients of all the variables in the LP model in the
tabular form, as shown in Table A, to get an initial basic feasible
solution

1-8
Initial Simplex Table A
Cj c1 c2 cn 0 0 0
Coefficient of Variables Value of Basic Variables
Basic Variables in Basis Variables x1 x2 xn s1 s2 . . . sm
(cB) B b (= xB)
cB1 s1 xB1 = b1 a 11 a12 a1n 1 0 0

cB2 s2 xB2 = b2 a21 a22 a2n 0 1 0


. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
cBm sm xBm = bm am1 am2 amn 0 0 0 0
Z = S cBi xBi Zj = S cBi xj 0 0 0 0 0 0
= (B.V. = S (B.V.coefficients)
coefficients)
(Values of B.V.) ( jth column of data matrix) c1 c2 cn 0 0 0
cj zj z1 z2 zn

1-9
The Simplex Method

The values zj represent the amount by which the value of objective function
Z would be decreased (or increased) if one unit of given variable is added
to the new solution. Each of the values in the cj zj row represents the net
amount of increase (or decrease) in the objective function that would occur
when one unit of variable represented by the column head is introduced
into the solution. That is:

cj zj (net effect) = cj (incoming unit profit/cost) zj (outgoing total


profit/cost)
where zj = Coefficient of basic variables column Exchange coefficient
column j

1-10
Step 3: Test for optimality

If all cj zj 0, then the basic feasible solution is optimal.

If at least one column of the coefficients matrix (i.e. ak ) for which ck zk >
0 and all elements are negative (i.e. aik < 0), then there exists an
unbounded solution to the given problem.

If at least one cj zj > 0 and each of these has at least one positive
element (i.e. aij ) for some row, then it indicates that an improvement in
the value of objective function Z is possible.

1-11
Step 4: Select the variable to enter the basis

If Case (iii) of Step 3 holds, then select a variable that has the largest
cj zj value to enter into the new solution. That is,

ck zk = Max {(cj zj); cj zj > 0}

The column to be entered is called the key or pivot column. Obviously,


such a variable indicates the largest per unit improvement in the current
solution. Obviously, such a variable indicates the largest per unit
improvement in the current solution.

1-12
Step 5: Test for feasibility (variable to leave the basis)
Each number in xB-column (i.e. bi values) is divided by the corresponding
(but positive) number in the key column and a row is selected for which this
ratio, [(constant column)/(key column)] is non-negative and minimum. This
ratio is called the replacement (exchange) ratio. That is,

xBr xBi
arj
= Min ; arj > 0
arj

This ratio limits the number of units of incoming variable that can be
obtained from the exchange. It may be noted here that division by negative
or zero element in key column is not permitted.

1-13
Step 6: Finding the new solution
If the key element is 1, then the row remains the same in the new simplex
table.
If the key element is other than 1, then divide each element in the key
row (including elements in xB-column ) by the key element, to find the
new values for that row.
The new values of the elements in the remaining rows for the new
simplex table can be obtained by performing elementary row operations
on all rows so that all elements except the key element in the key column
are zero.
In other words, for each row other than the key row, we use the formula:

Number in
=
Number in
+ Number above or below Corresponding number in the new row,
new row old row Key element that is row replaced in Step 6 (ii)

The new entries in cB (coefficient of basic variables) and xB (value of basic


variables) columns are updated in the new simplex table of the current solution.

1-14
Step 7: Repeat the procedure

Go to Step 3 and repeat the procedure until all entries in the cj zj row
are either negative or zero.

1-15
Example 1: Use the simplex method to solve the following LP problem.
Maximize Z = 3x1 + 5x2 + 4x3

subject to the constraints

2x1 + 3x2 8
2x2 + 5x3
3x1 + 2x2 + 4x3
and x1, x2, x3 >

1-16
. . . The Simplex Method
Solution Step 1: Introducing non-negative slack variables s1, s2 and s3
to convert inequality constraints to equality. Then the LP problem
becomes

Maximize Z = 3x1 + 5x2 + 4x3 + 0s1 + 0s2 + 0s3

subject to the constraints

2x1 + 3x2 + s1 = 8
2x2 + 5x3 + s2 = 10
3x1 + 2x2 + 4x3 + s3 = 15
and x1, x2, x3, s1, s2, s3 0

1-17
Step 2: Since all bi (RHS values) > 0, (i = 1, 2, 3) we can choose initial
basic feasible solution as:
x1 = x2 = x3 = 0; s1 = 8, s2 = 10, s3 = 15 and Max Z = 0

This solution can also be read from the initial simplex Table by equating
row wise values in the basis (B) column and solution values (xB ) column.

1-18
Step 3: To see whether the current solution given in Table is optimal or
not, calculate

cj zj

for non-basic variables x1, x2 and x3 as follows:


zj = (Basic variable coefficients, cB ) ( jth column of data matrix)
That is, z1 = 0 (2) + 0 (0) + 0 (3) = 0 for x1-column
z2 = 0 (3) + 0 (2) + 0 (2) = 0 for x2-column
z3 = 0 (0) + 0 (5) + 0 (4) = 0 for x3-column

These zj values are now subtracted from cj values to calculate net profit from
introducing one unit of each variable x1, x2 and x3 into the new solution mix.
c1 z1 = 3 0 = 3
c2 z2 = 5 0 = 5
c3 z3 = 4 0 = 4

1-19
The zj and cj zj rows are added into the Initial Solution Table.

The values of basic variables, s1, s2 and s3 are given in the solution values
(xB ) column of Table. The remaining variables which are non-basic at the
current solution have zero value. The value of objective function at the
current solution is given by

Z = (Basic variable coefficients, cB ) (Basic variable values, xB )

= 0 (8) + 0 (10) + 0 (15) = 0

1-20
Initial Solution Table 1
cj 3 5 4 0 0 0

Solution Min
Profit Variables in
Exchange
per Unit Basis Values x1 x2 x3 s1 s2 s3
Ratio
cb B B (= xb)
xB/x2
0 s1 8 2 0 1 0 0 8/3
0 s2 10 0 2 5 0 1 0 10/2
0 s3 15 3 2 4 0 0 1 15/2
Z=0 zj 0 0 0 0 0 0
cj - zj 3 5 4 0 0 0

1-21
Since all cj zj > 0 ( j = 1, 2, 3), the current solution is not optimal.
Variable x2 is chosen to enter into the basis as c2 z2 = 5 is the largest
positive number in the x2-column, where all elements are positive. This
means that for every unit of variable x2, the objective function will
increase in value by 5.The x2-column is the key column.

Step 4: The variable to leave the basis is determined by dividing the


values in the xB- column by the corresponding elements in the key
column as shown in Initial Solution Table 1, Since the exchange ratio,
8/3 is minimum in row 1, the basic variable s1 is chosen to leave the
solution (basis).

1-22
. . . The Simplex Method
Step 5: (Iteration 1) Since the key element enclosed in the circle in Table
1 is not 1, divide all elements of the key row by 3 to obtain new values of
the elements in this row. The new values of the elements in the remaining
rows for the new Table 2 are obtained by performing the following
elementary row operations on all rows so that all elements except the key
element 1 in the key column are zero.

R1 (new) R1 (old) 3 (key element)


(8/3, 2/3, 3/3, 0/3, 1/3, 0/3, 0/3) = (8/3, 2/3, 1, 0, 1/3, 0,
0)

1-23
. . . Step 5: (Iteration 1)

R2 (new) R2 (old) 2R1 (new) R3 (new) R3 (old) 2R1 (new)

10 2 8/3 = 14/3 15 2 8/3 = 29/3


02 2/3 = 4/3 3 2 2/3 = 5/3
22 1 = 0 2 2 1 = 0
52 0 = 5 4 2 0 = 4
02 1/3 = 2/3 0 2 1/3 = 2/3
12 0 = 1 0 2 0 = 0
02 0 = 0 1 2 0 = 1

1-24
Improved Solution Table 2

cj 3 5 4 0 0 0

Profit Variables Solution x1 x2 x3 s1 s2 s3 Min Ratio


per Unit in Basis Values xB/ x3
CB B b (= xB)
5 x2 8/3 2/3 1 0 1/3 0 0 -

0 s2 14/3 - 4/3 0 - 2/3 1 0 (14/3)/5

0 s2 29/3 5/3 0 4 - 2/3 0 1 (29/3)/4

Z = 40/3 zj 10/3 5 0 5/3 0 0

cj zj - 1/3 0 4 - 5/3 0 0

1-25
. . . The Simplex Method
An improved basic feasible solution can be read from Improved Solution
Table as: x2 = 8/3, s2 = 14/3, s3 = 29/3 and x1 = x3 = s1 = 0. The improved
value of the objective function is

Z = (Basic variable coefficients, cB ) (Basic variable values, xB )


= 5 (8/3) + 0 (14/3) + 0 (29/3) = 40/3

Once again, calculate values of cj zj in the same manner as


discussed earlier to see whether the solution shown in Table is optimal
or not. Since c3 z3 > 0, the current solution is not optimal.

1-26
Step 6: (Iteration 2 ) Repeat Steps 3 to 5. Table 3 is obtained by
performing following row operations to enter variable x3 into the basis
and to drive out s2 from the basis.

R2 (new) = R2 (old) 5 (key element)


= (14/15, 4/15, 0, 1, 2/15, 1/5, 0)

R3 (new) R3 (old) 4R2 (new)

29/3 4 14/15 = 89/15


5/3 4 4/15 = 41/15
04 0 = 0
44 0 = 0
2/3 4 2/15 = 2/15
0 4 1/5 = 4/5
14 0 = 0

1-27
Improved Solution Table is completed by calculating the new zj and cj zj
values and the new value of objective function:

z1 = 5 (2/3) + 4 ( 4/15) + 0 (41/15)= 34/15


z4 = 5 (1/3) + 4 ( 2/15) + 0 (2/15) = 17/15
z5 = 5 (0) + 4 (1/5) + 0 ( 4/5)= 4/5
c1 z1 = 3 34/15 = 11/15 for x1-column
c4 z4 = 0 17/15 = 17/15 for s1-column
c5 z5 = 0 4/5 = 4/5 for s2-column

The new objective function value is given by


Z = (Basic variable coefficients, cB) (Basic variable values, xB)
= 5 (8/3) + 4 (14/15) + 0 (89/15) = 256/15

The improved basic feasible solution is shown in Improved Solution Table

1-28
Improved Solution Table 3

cj 3 5 4 0 0 0
Profit Variables Solution x1 x2 x3 s1 s2 s3 Min Ratio
per in Basis Values xB/ x1
Unit B b (= xB)
CB

5 x2 8/3 2/3 1 0 1/3 0 0 (8/3)/(2/3)


4 x3 14/15 - 4/15 0 1 - 2/15 1/5 0 -
0 s3 89/15 41/15 0 0 2/15 - 4/5 1 (89/15)/(41/15)

Z = 256/15 zj 34/15 5 4 17/15 4/5 0

cj = zj 11/15 0 0 - 17/15 - 4/5 0


1-29
Iteration 3 In Improved Solution Table since, c1 z1 is still a positive value, the
current solution is not optimal. Thus, the variable x1 enters the basis and s3
leaves the basis. To get another improved solution as shown in Table 4
performing following row operations in the same manner as discussed earlier.

R3 (new) R3 (old) 15/41 (key element)

(89/15 15/41, 41/15 15/41, 0 15/41, 0 15/41,

2/15 15/41, 4/5 15/41, 1 15/41)

(89/41, 1, 0, 0, 2/41, 12/41, 15/41)

1-30
R1 (new) R1 (old) (2/3) R3 (new) R2 (new) R2 (old) + (4/15) R3 (new)

8/3 2/3 89/41 = 50/41 14/15 + 4/15 89/41 = 62/41


2/3 2/3 1 = 0 4/15 + 4/15 1 = 0
1 2/3 0 = 1 0 + 4/15 0 = 0
0 2/3 0 = 0 1 + 4/15 0 = 1
1/3 2/3 2/41 = 15/41 2/15 + 4/15 2/41 = 6/41
0 2/3 12/41 = 8/41 1/5 + 4/15 12/41 = 5/41
0 2/3 15/41 = 10/41 0 + 4/15 15/41 = 4/41

1-31
Optimal Solution Table 4

cj 3 5 4 0 0 0
Profit Variables Solution x1 x2 x3 s1 s2 s3
per Unit in Basis Values
CB B b (= xB)
5 x2 50/41 0 1 0 15/41 8/41 - 10/41
4 x3 62/41 0 0 1 - 6/41 5/41 4/41
3 x1 89/41 1 0 0 - 2/41 - 12/41 15/41
Z = 765/41 zj 3 5 4 45/41 24/41 11/41
cj zj 0 0 0 - 45/41 - 24/41 - 11/41

In Optimal Solution Table all cj zj < 0 for non-basic variables. Therefore, the
optimal solution is reached with, x1 = 89/41, x2 = 50/41, x3 = 62/41 and the
optimal value of Z = 765/41.

1-32
Simplex Algorithm (Minimization Case)

In certain cases, it is difficult to obtain an initial basic feasible solution. Such


cases arise
(i) when the constraints are of the type

, xj 0

but some right-hand side constants are negative [i.e. bi < 0]. In this
case after adding the non-negative slack variable si (i = 1, 2, . . ., m),
the initial solution so obtained will be si = bi for some i. It is not the
feasible solution because it violates the non-negativity conditions of
slack variables (i.e. si 0).

1-33
. . . Simplex Algorithm (Minimization Case)

(ii) when the constraints are of the type

, xj 0

In this case to convert the inequalities into equation form, adding


surplus (negative slack) variables,
n
aij x j si = bi , xj 0, si 0
j 1

1-34
. . . Simplex Algorithm (Minimization Case)

Letting xj = 0 ( j = 1, 2, . . ., n), we get an initial solution si = bi or si = bi.


It is also not a feasible solution as it violates the non-negativity conditions of
surplus variables (i.e. si 0). In this case, we add artificial variables, Ai (i = 1,
2, . . ., m) to get an initial basic feasible solution. The resulting system of
equations then becomes:
= bi

xj, si, Ai 0, i = 1, 2, . . ., m

1-35
The Big-M Method

Assign a large undesirable (unacceptable penalty) coefficients to


artificial variables from the objective function point of view. If objective
function Z is to be minimized, then a very large positive price (called
penalty) is assigned to each artificial variable. Similarly, if Z is to be
maximized, then a very large negative price (also called penalty) is
assigned to each of these variables. The penalty will be designated by
M for a maximization problem and + M for a minimization problem,
where M > 0.

1-36
Steps of the algorithm
Step 1: Express the LP problem in the standard form by adding slack
variables, surplus variables and artificial variables. Assign a zero
coefficient to both slack and surplus variables and a very large positive
coefficient + M (minimization case) and M (maximization case) to artificial
variable in the objective function.

Step 2: The initial basic feasible solution is obtained by assigning zero


value to original variables.

1-37
. . . Steps of the algorithm

Step 3: Calculate the values of cj zj in last row of the simplex table and
examine these values.

If all cj zj > 0, then the current basic feasible solution is optimal.


If for a column, k, ck zk is most negative and all entries in this
column are negative, then the problem has an unbounded optimal
solution.
If one or more cj zj < 0 (minimization case), then select the variable
to enter into the basis with the largest negative cj zj value (largest
per unit reduction in the objective function value). This value also
represents opportunity cost of not having one unit of the variable in
the solution. That is,
ck zk = Min {cj zj : cj zj < 0}
1-38
. . . Steps of the algorithm
Step 4: Determine the key row and key element in the same
manner as discussed in the simplex algorithm of the maximization
case.

Step 5: Continue with the procedure to update solution at each


iteration till optimal solution is obtained.

1-39
. . . Steps of the algorithm
At any iteration of the simplex algorithm any one of the following cases
may arise:

If at least one artificial variable is present in the basis with zero


value and the coefficient of M in each cj zj ( j = 1, 2, . . ., n)
values is non-negative, then the given LP problem has no solution.
That is, the current basic feasible solution is degenerate.
If at least one artificial variable is present in the basis with positive
value and the coefficient of M in each cj zj ( j = 1, 2, . . ., n)
values is non-negative, then given LP problem has no optimum
basic feasible solution. In this case, the given LP problem has a
pseudo optimum basic feasible solution

1-40
Example: Use the penalty (Big-M) method to solve the following LP problem.
Minimize Z = 5x1 + 3x2
subject to the constraints
2x1 + 4x2 12
2x1 + 2x2 = 10
5x1 + 2x2 10
and x1, x2 0.

Solution: Introducing slack variable s1, surplus variable s2 and artificial


variables A1 and A2 in the constraints of the given LP problem. The standard
form of the LP problem is stated as follows:
Minimize Z = 5x1 + 3x2 + 0s1 + 0s2 + MA1 + MA2
subject to the constraints
2x1 + 4x2 + s1 = 12
2x1 + 2x2 + A1 = 10
5x1 + 2x2 s2 + A2 = 10
And x1, x2, s1, s2, A1, A2 0
1-41
. . . The Big-M Method
An initial basic feasible solution is obtained by letting x1 = x2 = s2 = 0.
Therefore, the initial basic feasible solution is: s1 = 12, A1 = 10, A2 = 10 and
Min Z = 10M + 10M = 20M. Here it may be noted that the columns which
corresponds to current basic variables and form the basis (identity matrix)
are s1 (slack variable), A1 and A2 (both artificial variables). The initial basic
feasible solution is given in Initial solution Table.

Since the value c1 z1= 5 7M is the smallest value, therefore x1 becomes


the entering variable. To decide which basic variable should leave the
basis, the minimum ratio is calculated as shown in Initial solution Table 5.

1-42
Initial solution Table 5
cj 5 3 0 0 M M
Cost Variables Solution x1 x2 s1 s2 A A2 Min Ratio
per in Basis Values 1 xB/ x1
Unit B b (= xB)
CB
0 s1 12 2 4 1 0 0 0 12/2 = 6
M A1 10 2 2 0 0 1 0 10/2 = 6
M A2 10 2 0 -1 0 1 10/5 = 2
Z = 20M zj 7M 4M 0 -M M M
cj - zj 5 7M 3 4M 0 M 0 0

1-43
. . . The Big-M Method

Iteration 1: Introduce variable x1 into the basis and remove A2 from the
basis by applying the following row operations. The new solution is shown
in Improved Solution Table 6.
R3 (new) R3 (old) 5 (key element); R2 (new) R2 (old)
2R3 (new).
R1 (new) R1 (old) 2R3 (new).

1-44
Improved Solution Table 6
cj 5 3 0 0 M
Cost Variables Solution x1 x2 s1 s2 A1 Min Ratio
per in Basis Values xB/ x2
Unit B b (= xB)
CB
0 s1 8 0 16/5 1 2/5 0 8/(16/5) = 5/2
M A1 6 0 6/5 0 2/5 1 6/(6/5) = 5
5 x1 2 1 2/5 0 - 1/5 0 2/(2/5) = 5

Z = 10 + 6M zj 5 (6M/5) + 2 0 (2M/5) 1 M
cj - zj 0 (- 6M/5) + 1 0 (- 2M/5) + 0
1

1-45
. . . The Big-M Method

Iteration 2: Since the value of c2 z2 in Table is largest negative value,


variable x2 is chosen to enter into the basis. For introducing variable x2 into
the basis and to remove s1 from the basis we apply the following row
operations. The new solution is shown in Improved Solution Table 7.
R1 (new) R1 (old) 5/16 (key element); R2 (new) R2 (old) (6/5)
R1 (new).

R3 (new) R3 (old) 2/5 R1 (new).

1-46
Improved Solution Table 7

cj 5 3 0 0 M
Cost Variables Solution x1 x2 s1 s2 A1 Min Ratio
per in Basis Values xB/ s2
Unit B b (= xB)
CB
3 x2 5/2 0 1 5/16 1/8 0 (5/2)/(1/8) = 40
M A1 3 0 0 - 3/8 1/4 1 3/(1/4) = 12
5 x1 1 1 0 - 1/8 - 1/4 0 -

Z = 25/2 + 3M zj 5 3 - 3M/8 + 5/16 M/4 7/8 M


cj - zj 0 0 - 3M/8 - 5/16 - M/4 + 7/8 0

1-47
. . . The Big-M Method

Iteration 3: As c4 z4 < 0 in s2-column, current solution is not optimal. Thus,


introduce s2 into the basis and remove A1 from the basis by apply the following
row operations:

R2 (new) R2 (old) 4 (key element); R1 (new) R1 (old) (1/8)


R2 (new)

R3 (new) R3 (old) + (1/4) R2 (new).

The new solution is shown in Optimal Solution Table 8.

1-48
Optimal Solution Table 8
cj 5 3 0 0
Cost Variables Solution x1 x2 s1 s2
per Unit in Basis Values
CB B b (= xB)

3 x2 1 0 1 1/2 0
0 s2 12 0 0 - 3/2 1
5 x1 4 1 0 - 1/2 0

Z = 23 zj 5 3 -1 0
cj - zj 0 0 1 0

In above table, all cj zj 0. Thus an optimal solution is arrived at with


value of variables as: x1 = 4, x2 = 1, s1 = 0, s2 = 12 and Min Z = 23.

1-49
. . . The Big-M Method

Example: Use penalty (Big-M) method to solve the following LP problem.


Maximize Z = x1 + 2x2 + 3x3 x4
subject to the constraints
x1 + 2x2 + 3x3 = 15
2x1 + x2 + 5x3 = 20
x1 + 2x2 + x3 + x4 = 10
and x1, x2, x3, x4 0

1-50
. . . The Big-M Method

Solution: Since all constraints of the given LP problem are equations,


therefore adding only artificial variables A1 and A2 in the constraints. The
standard form of the problem is then stated as follows:
Maximize Z = x1 + 2x2 + 3x3 x4 MA1 MA2
subject to the constraints
x1 + 2x2 + 3x3 + A1 = 15
2x1 + x2 + 5x3 + A2 = 20
x1 + 2x2 + x3 + x4 = 10
and x1, x2, x3, x4, A1, A2 0

An initial basic feasible solution is given in Initial Solution Table 9.

1-51
Initial Solution Table 9
cj 1 2 3 -1 -M -M
Profit Variables Solution x1 x2 x3 x4 A1 A2 Min Ratio
per in Basis Values xB/ x3
Unit B b (= xB)
CB
-M A1 15 1 2 3 0 1 0 15/3 = 5
-M A2 20 2 1 0 0 1 20/5 = 4
-1 x4 10 1 2 1 1 0 0 10/1 = 10
Z = - 35M 10 zj - 3M - 1 - 3M - 2 - 8M - 1 -1 -M -M
cj - zj 3M + 2 3M + 4 8M + 4 0 0 0

1-52
. . . The Big-M Method

Since the value of c3 z3 in Table is largest positive, the variable x3 is chosen


to enter into the basis. To get an improved basic feasible solution, apply the
following row operations for entering variable x3 into the basis and removing
variable A2 from the basis.
R2 (new) R1 (old) 5 (key element) ; R1 (new) R1 (old)
3 R2 (new).
R3 (new) R3 (old) R2 (new)

The new solution is shown in Improved Solution Table 10.

1-53
Improved Solution Table 10
cj 1 2 3 1 M

Profit Variables Solution x1 x2 x x4 A1 Min Ratio


per in Basis Values 3 xB/ x2
Unit B b (= xB)
CB

M A1 3 1/51 7/5 0 0 1 3 = 15
7/5 7
3 x3 4 2/5 1/5 1 0 0 4 = 20
15
/
1 x4 6 3/5 9/5 0 1 0 6 = 30
9/5 9
Z = 3M + 6 zj M/5 + 3/5 7M/5 6/5 3 1 M

cj zj - M/5 2/5 7M/5 + 16/5 0 0 0



1-54
. . . The Big-M Method
The solution shown in the Table, is not optimal because c2 z2 is positive. Thus,
applying the following row operations for entering variable x2 into the basis and
removing variable A1 from the basis,

R1 (new) R1 (old) (5/7) (key element); R2 (new) R2 (old)


(1/5) R1 (new).

R3 (new) R3 (old) (9/5) R1 (new).

The new solution is shown in Improved Solution Table 11.

1-55
Improved Solution Table 11
cj 1 2 3 1
Profit Variables Solution x1 x2 x3 x4 Min Ratio
per Unit in Basis Values xB/ x1
CB B b (= xB)

2 x2 15/7 1/7 1 0 0 __

3 x3 25/7 3/7 0 1 0 25/7 X 7/3 = 25/3

1 x4 15/7 6/7 0 0 1 15/7 X 7/6 = 15/6

Z = 90/7 zj 1/7 2 3 1

cj zj 6/7 0 0 0

1-56
. . . The Big-M Method

Once again, the solution shown in theTable, is not optimal as c1 z1 > 0 in


x1column. Thus, applying the following row operations for entering variable x1
into the basis and removing variable x4 from the basis,

R3 (new) R3 (old) (7/6) (key element) ; R1 (new) R1 (old) + (1/7)


R3 (new).

R2 (new) R2 (old) (3/7) R3 (new).

The new solution is shown in optimal solution Table 12.

1-57
Optimal Solution Table 12
cj 1 2 3 1
Profit Variables Solution x1 x2 x3 x4
per Unit in Basis Values
CB B b (= xB)
2 x2 15/6 0 1 0 1/6
3 x3 15/6 0 0 1 3/6

1 x1 15/6 1 0 0 7/6

Z = 15 zj 1 2 3 0
cj zj 0 0 0 1

In Optimal Solution Table, all cj zj 0. Thus, an optimal solution has


been arrived at with values of variables as: x1 = 15/6, x2 = 15/6, x3 =
15/6 and Max Z = 15.
1-58
1-58

You might also like