0% found this document useful (0 votes)
65 views28 pages

Big M Method in Linear Programming

The Big M method is an algorithm for solving linear programming problems. It involves forming the problem into standard form, finding an initial basic feasible solution, and then iterating to test for optimality by selecting entering and leaving variables. The method uses large positive values (M) for artificial variables to ensure feasibility. Examples show setting up problems in standard form and performing the iterations of the simplex method until an optimal solution is found.

Uploaded by

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

Big M Method in Linear Programming

The Big M method is an algorithm for solving linear programming problems. It involves forming the problem into standard form, finding an initial basic feasible solution, and then iterating to test for optimality by selecting entering and leaving variables. The method uses large positive values (M) for artificial variables to ensure feasibility. Examples show setting up problems in standard form and performing the iterations of the simplex method until an optimal solution is found.

Uploaded by

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

Simplex

Method(Big M)
Eng. Shimaa Abouelenein
Agenda

• Big M Algorithm.

• Examples

2
BigM Method Steps (Rules)(1/5)
Step1: Formulate the Problem
a. Formulate the mathematical model of the given linear programming problem.

b. Convert LP problem into standard form by adding slack, surplus and artificial
variables for each constraint

c. In the objective function, assign a 0 coefficient to slack and surplus variables. Then
add -M (for Maximization case) or +M (for Minimization case) to artificial variables.
(M is very large positive value)

3
BigM Method Steps (Rules)(2/5)
Step2: Find out the Initial basic solution
a. Find the initial basic feasible solution by setting zero value to the decision variables.
That shown in the example.1

Step3: Test for Optimality


a. Calculate the values of Cj-Zj in the last row of simplex table.
b. For Maximization case:
• If all Cj-Zj ≤ 0, the current basic feasible solution is the optimal solution.

4
BigM Method Steps (Rules)(3/5)
Step3: Test for Optimality cont.
b. For Maximization case:
• In Cj-Zj > 0, then select the variable that has largest Cj-Zj and enter this variable into the
new table. This column is called key column (pivot column).
c. For Minimization case:
• If all Cj-Zj ≥ 0 , the current basic feasible solution is the optimal solution.
• In Cj-Zj < 0, then select the variable that has smallest Cj-Zj and enter this variable into the
new table. This column is called key column (pivot column).

5
BigM Method Steps (Rules)(4/5)
Step4: Test for Feasibility (variable to leave the basis)
a. Find the ratio by dividing the values of RHS column by the positive values of pivot
column.
b. Find the minimum ratio which greater than 0 and this row is called key row (pivot
row) and corresponding variable will leave the solution.
c. The intersection element of pivot row and pivot column is called key element (pivot
element).
Step5: Determine the new solution
a. Solving for new solutions by using the eliminatory row operation as following:
• New pivot row = Old pivot row / Pivot value
• New other row = Old row - (the coefficient of the row in the pivot column * (new pivot
row)).

6
BigM Method Steps (Rules)(5/5)

Step6: Repeat the procedure


a. Goto step 3 and repeat the procedure until all the values of Cj-Zj ≤ 0(For
Maximization case) or Cj-Zj ≥ 0 (For Minimization case).

7
Examples (1/20)
Example1:
Solve the following linear programming (LP) problem with BigM method,
Maximize:
C = 6x1 + 4x2
Subject to:
2x1 + 3x2 <= 30,
3x1 - 2x2 <= 24,
x1 + x2 >= 3,
and x1,x2 >= 0

8
Examples (2/20)
Solution1(1/8):
Initialization (Standard Form),
Maximize:
C = 6x1 + 4x2 + 0S1 + 0S2 +0S3 - MA1
Subject to:
2x1 + 3x2 + S1 = 30,
3x1 - 2x2 +S2 = 24,
x1 + x2 - S3 = 3,
and x1,x2,S1,S2,S3 >= 0
• Note the <= sign, so we add a slack variables S1 and S2.
• Note the >= sign, so we add a surplus variable S3 with negative sign and artificial var A1.

9
Examples (3/20)
Solution1(2/8):
1. Initialization (Initial Table)
C 6 4 0 0 0 -M

Basic X1 X2 S1 S2 S3 A1 RHS
Variables
0 S1 2 3 1 0 0 0 30

0 S2 3 2 0 1 0 0 24

-M A1 1 1 0 0 -1 1 3

Z -M -M 0 0 M -M -3M
Pivot row
C-Z 6+M 4+M 0 0 -M 0

Pivot column
10
Examples (4/20)
Note that:
• Pivot column: The most positive value in Cj - Zj row.
• Pivot row: divide the RHS values by the corresponding pivot column values
then determine the row which has the smallest value greater than 0.
• By investigating the last row (Cj - Zj row) of the initial table, we find that there
are some positive values. Therefore, the current solution is not optimal.
• The Entering variable is X1 and the Leaving variable is A1.

11
Examples (5/20)
Solution1(3/8):
2. Iteration
▪ Solving for new solutions by using the eliminatory row operation as following:
1. New pivot row = Old pivot row / Pivot value

C 6 4 0 0 0
B.V X1 X2 S1 S2 S3 RHS
0 S1
0 S2
6 X1 1 1 0 0 -1 3
Z
C-Z
Note that X1 becomes in the basic variables list instead of A1 and A1-column will be deleted.

12
Examples (6/20)
Solution1(4/8):
2. Iteration
▪ For the other row apply this rule:
2. New row = Old row - (the coefficient of the row in the pivot column * (new pivot row)).
For S1:
2 3 1 0 0 30
-(2) 1 1 0 0 -1 3
___________________________
0 1 1 0 2 24

13
Examples (7/20)
Solution1(5/8):
2. Iteration
▪ For the other row apply this rule:
2. New row = Old row - (the coefficient of the row in the pivot column * (new pivot row)).
For S2:
3 2 0 1 0 24
-(3) 1 1 0 0 -1 3
___________________________
0 -1 0 1 3 15

14
Examples (8/20)
Solution1(6/8):
2. Iteration
▪ For the Z-row apply this rule:
Zi = sum(Cj * Xj);
Z1 = (0*0) + (0*0) + (6*1) = 6
Z2 = (0*1) + (0*-1) + (6*1) = 6
Z3 = (0*1) + (0*0) + (6*0) = 0
Z4 = (0*0) + (0*1) + (6*0) = 0
Z5 = (0*2) + (0*3) + (6*-1) = -6
Z6 = (0*24) + (0*15) + (6*3) = 18

15
Examples (9/20)
Solution1(7/8):
The solution is not optimal, since there is a positive values in the Cj-Zj row (6).
The most positive value; therefore, S3 is
the Entering variable
C 6 4 0 0 0
B.V X1 X2 S1 S2 S3 RHS
0 S1 0 1 1 0 2 24
0 S2 0 -1 0 1 3 15
6 X1 1 1 0 0 -1 3
Z 6 6 0 0 -6 18 The smallest
positive ratio is
C-Z 0 -2 0 0 6 5; therefore, S2
is the leaving
variable
16
Examples (10/20)
Solution1(8/8):
Apply the same rules, we will obtain this solution:
C 6 4 0 0 0
B.V X1 X2 S1 S2 S3 RHS
0 S1 0 5/3 1 0 0 14
0 S3 0 -1/3 0 1- 1 5
6 X1 1 2/3 0 1/3 0 8
Z 6 4 0 2 0 48
C-Z 0 0 0 -2 0

This solution is optimal; since there is no positive value in the last row.
Basic variables are X1 = 8, X2 = 0 and C = 48

17
Examples (11/20)
Example2:
Solve the following linear programming (LP) problem with BigM method,
Minimize:
C = - 6X1 +7 X2 + 4X3
Subject to:
2X1 + 5X2 – X3 <= 18,
-X1 + X2 + 2X3 >= 14
3X1 + 2X2 + 2X3 = 26,
and X1, X2, X3 >= 0

18
Examples (12/20)
Solution2(1/8):
Initialization (Standard Form),
Maximize: (convert min to max by multiplying by -1)
C = 6X1 - 7X2 - 4X3 + 0S1 + 0S2 - MA1 – MA2
Subject to:
2X1 + 5X2 – X3 + S1 = 18
-X1 + X2 + 2X3 – S2 + A1 = 14
3X1 + 2X2 + 2X3 + A2 = 26
and X1,X2,X3,S1,S2,A1,A2 >= 0
• Note the <= sign, so we add a slack variables S1
• Note the >= sign, so we add a surplus variable S2 with negative sign and artificial var A1.
• Note the = sign, so we add an artificial variable A2
19
Examples (13/20)
Solution2(2/8):
1. Initialization (Initial Table)
C 6 -7 -4 0 0 -M -M

B.V X1 X2 X3 S1 S2 A1 A2 RHS

0 S1 2 5 -1 1 0 0 0 18

-M A1 -1 1 2 0 -1 1 0 14

-M A2 3 2 2 0 0 0 1 26
Pivot row
Z -2M -3M -4M 0 M -M -M -40M

C-Z 6+2M -7+3M -4+4M 0 -M 0 0

Pivot column 20
Examples (14/20)
Note that:
• Pivot column: The most positive value in Cj - Zj row (-4+4M).
• Pivot row: divide the RHS values by the corresponding pivot column values
then determine the row which has the smallest value greater than 0(14/2=7).
• By investigating the last row (Cj - Zj row) of the initial table, we find that there
are some positive values. Therefore, the current solution is not optimal.
• The Entering variable is X3 and the Leaving variable is A1.

21
Examples (15/20)
Solution2(3/8):
2. Iteration
▪ Solving for new solutions by using the eliminatory row operation as following:
1. New pivot row = Old pivot row / Pivot value

C 6 -7 -4 0 0 -M
B.V X1 X2 X3 S1 S2 A2 RHS
0 S1
-4 X3 -0.5 0.5 1 0 -0.5 0 7
-M A2
Z
C-Z
Note that X3 becomes in the basic variables list instead of A1 and A1-column will be deleted.

22
Examples (16/20)
Solution2(4/8):
2. Iteration
▪ For the other row apply this rule:
2. New row = Old row - (the coefficient of the row in the pivot column * (new pivot row)).
For S1:
2 5 -1 1 0 0 18
-(-1) - 0.5 0.5 1 0 0.5 0 7
_______________________________
1.5 5.5 0 1 -0.5 0 25

23
Examples (17/20)
Solution2(5/8):
2. Iteration
▪ For the other row apply this rule:
2. New row = Old row - (the coefficient of the row in the pivot column * (new pivot row)).
For A2:
3 2 2 0 0 1 26
-(2) - 0.5 0.5 1 0 0.5 0 7
_______________________________
4 1 0 0 1 1 12

24
Examples (18/20)
Solution2(6/8):
2. Iteration
▪ For the Z-row apply this rule:
Zi = sum(Cj * Xj);
Z1 = (0*0) + (0*0) + (6*1) = 6
Z2 = (0*1) + (0*-1) + (6*1) = 6
Z3 = (0*1) + (0*0) + (6*0) = 0
Z4 = (0*0) + (0*1) + (6*0) = 0
Z5 = (0*2) + (0*3) + (6*-1) = -6
Z6 = (0*24) + (0*15) + (6*3) = 18

25
Examples (19/20)
Solution2(7/8):
The solution is not optimal, since there is a positive values in the Cj-Zj row.
The most positive value; therefore, X1 is
the Entering variable

C 6 -7 -4 0 0 -M
B.V X1 X2 X3 S1 S2 A2 RHS
0 S1 1.5 5.5 0 1 -0.5 0 25
-4 X3 -0.5 0.5 1 0 -0.5 0 7
-M A2 4 1 0 0 1 1 12
The smallest
Z 2-4M -2-M -4 0 2-M -M -28-12M positive ratio is
3; therefore, A2
C-Z 4+4M -5+M 0 0 -2+M 0
is the leaving
variable
26
Examples (20/20)
Solution2(8/8):
Apply the same rules, we will obtain this solution:
C 6 -7 -4 0 0
B.V X1 X2 X3 S1 S2 RHS
0 S1 0 5.125 0 1 -0.875 20.5
-4 X3 0 0.625 1 0 -0.375 8.5
6 X1 1 0.25 0 0 0.25 3
Z 6 -1 -4 0 3 -16
C-Z 0 -6 0 0 -3

This solution is optimal; since there is no positive value in the last row.
Basic variables are X1 =3, X2 = 0, X3 = 8.5 and C = +16

27

You might also like