Big M
Big M
Management
Goa Institute of Management
PGDM-FT 2024-2025
0 𝒔𝟏 2 1 1 0 0 50
0 𝒔𝟐 2 5 0 1 0 100
0 𝒔𝟑 2 3 0 0 1 90
𝑧𝑗 0 0 0 0 0 0
𝑐𝑗 − 𝑧𝑗 10 10 0 0 0 0
0 𝒔𝟏 1 1 2 1 0 0 8 4
0 𝒔𝟐 1 1 -1 0 1 0 2 -
0 𝒔𝟑 -1 1 1 0 0 1 4 4
𝑧𝑗 0 0 0 0 0 0 0
𝒄𝒋 -𝑧𝑗 -1 -1 4 0 0 0
Minimize Z = 4x1 + x2
S.t.
3x1 + x2 = 3
4x1 + 3x2 ≥ 6
x1 + 2x2 ≤ 3
& x1, x2 ≥0
S.t.
3x1 + x2 + a1 = 3
4x1 + 3x2 –u + a2 = 6
x1 + 2x2 + s = 3
• All artificial
& x1, x2 , u, s, a1, a2 ≥0
variables and
slack variables
Iteration-1 𝒄𝒋
will be the basic
variables in the 𝒄𝑩 𝒙𝑩 𝒙𝟏 𝒙𝟐 𝒖 𝒔 𝒂𝟏 𝒂𝟐 RHS Ratio
first iteration. N N N B B B
𝒂𝟏
𝒂𝟐
𝒔
𝑧𝑗
𝑐𝑗 -𝑧𝑗
S.t.
3x1 + x2 + a1 = 3
4x1 + 3x2 –u + a2 = 6
• Iteration 1: x1 + 2x2 + s = 3
• Entering Iteration-1 𝒄𝒋 4 1 0 0 M M
variable =?
𝒄𝑩 𝒙𝑩 𝒙𝟏 𝒙𝟐 𝒖 𝒔 𝒂𝟏 𝒂𝟐 RHS Ratio
Leaving
variable =? M 𝒂𝟏 3 1 0 0 1 0 3 1
M 𝒂𝟐 4 3 -1 0 0 1 6 1.5
0 𝒔 1 2 0 1 0 0 3 3
𝑧𝑗 7M 4M -M 0
𝑐𝑗 -𝑧𝑗 4-7M 1-4M M 0
4x1 + 3x2 –u + a2 = 6 M 𝒂𝟏 3 1 0 0 1 0 3 1
x1 + 2x2 + s = 3 M 𝒂𝟐 4 3 -1 0 0 1 6 1.5
& x1, x2 , u, s, a1, a2 ≥0
0 𝒔 1 2 0 1 0 0 3 3
𝑧𝑗 7M 4M -M 0
• Iteration 1:
• Entering variable =x1 𝑐𝑗 -𝑧𝑗 4-7M 1-4M M 0
• Leaving variable =a1 Iteration-2 𝒄𝒋 4 1 0 0 M M
𝒄𝑩 𝒙𝑩 𝒙𝟏 𝒙𝟐 𝒖 𝒔 𝒂𝟏 𝒂𝟐 RHS Ratio
• Iteration 2:
4 𝒙𝟏
• Entering variable =?
• Leaving variable =?
M 𝒂𝟐
0 𝒔
𝑧𝑗
𝑐𝑗 -𝑧𝑗
4x1 + 3x2 –u + a2 = 6 M 𝒂𝟏 3 1 0 0 1 0 3 1
x1 + 2x2 + s = 3 M 𝒂𝟐 4 3 -1 0 0 1 6 1.5
& x1, x2 , u, s, a1, a2 ≥0
0 𝒔 1 2 0 1 0 0 3 3
𝑧𝑗 7M 4M -M 0
• Iteration 1:
• Entering variable =x1 𝑐𝑗 -𝑧𝑗 4-7M 1-4M M 0
• Leaving variable =a1 Iteration-2 𝒄𝒋 4 1 0 0 M M
𝒄𝑩 𝒙𝑩 𝒙𝟏 𝒙𝟐 𝒖 𝒔 𝒂𝟏 𝒂𝟐 RHS Ratio
• Iteration 2:
4 𝒙𝟏 1 1/3 0 0 1/3 0 1 3
• Entering variable =?
• Leaving variable =?
M 𝒂𝟐 0 5/3 -1 0 -4/3 1 2 6/5
0 𝒔 0 5/3 0 1 -1/3 0 2 6/5
𝑧𝑗 4 4/3+(5/3)M -M 0 -
𝑐𝑗 -𝑧𝑗 0 -1/3-(5/3)M M 0
4x1 + 3x2 –u + a2 = 6 M 𝒂𝟏 3 1 0 0 1 0 3 1
x1 + 2x2 + s = 3 M 𝒂𝟐 4 3 -1 0 0 1 6 1.5
& x1, x2 , u, s, a1, a2 ≥0
0 𝒔 1 2 0 1 0 0 3 3
𝑧𝑗 7M 4M -M 0
• Iteration 1:
• Entering variable =x1 𝑐𝑗 -𝑧𝑗 4-7M 1-4M M 0
• Leaving variable =a1 Iteration-2 𝒄𝒋 4 1 0 0 M M
𝒄𝑩 𝒙𝑩 𝒙𝟏 𝒙𝟐 𝒖 𝒔 𝒂𝟏 𝒂𝟐 RHS Ratio
• Iteration 2:
4 𝒙𝟏 1 1/3 0 0 1 3
• Entering variable =?
• Leaving variable =?
M 𝒂𝟐 0 5/3 -1 0 2 6/5
0 𝒔 0 5/3 0 1 2 6/5
𝑧𝑗 4 4/3+(5/3)M -M 0 -
𝑐𝑗 -𝑧𝑗 0 -1/3-(5/3)M M 0
Iteration-3 𝒄𝒋 4 1 0 0 M M
𝒄𝑩 𝒙𝑩 𝒙𝟏 𝒙𝟐 𝒖 𝒔 𝒂𝟏 𝒂𝟐 RHS Ratio
• Iteration 3:
• Entering variable =? 4 𝒙𝟏
• Leaving variable =?
1 𝒙𝟐
0 𝒔
𝑧𝑗
𝑐𝑗 -𝑧𝑗
Iteration-3 𝒄𝒋 4 1 0 0 M M
𝒄𝑩 𝒙𝑩 𝒙𝟏 𝒙𝟐 𝒖 𝒔 𝒂𝟏 𝒂𝟐 RHS Ratio
• Iteration 3:
• Entering variable =u 4 𝒙𝟏 1 0 1/5 0 3/5 3
• Leaving variable =s
1 𝒙𝟐 0 1 -3/5 0 6/5
0 𝒔 0 0 1 1 0 0
𝑧𝑗 4 1 1/5 0 18/5
𝑐𝑗 -𝑧𝑗 0 0 -1/5 0
Iteration-4 𝒄𝒋 4 1 0 0 M M
𝒄𝑩 𝒙𝑩 𝒙𝟏 𝒙𝟐 𝒖 𝒔 𝒂𝟏 𝒂𝟐 RHS Ratio
• Iteration 4:
• Entering variable =? 4 𝒙𝟏
• Leaving variable =?
1 𝒙𝟐
0 𝒖
𝑧𝑗
𝑐𝑗 -𝑧𝑗
Iteration-4 𝒄𝒋 4 1 0 0 M M
• Iteration 4:
• Algorithm terminates
𝒄𝑩 𝒙𝑩 𝒙𝟏 𝒙𝟐 𝒖 𝒔 𝒂𝟏 𝒂𝟐 RHS Ratio
4 𝒙𝟏 1 0 0 -1/5 3/5
Optimal Solution: 1 𝒙𝟐 0 1 0 3/5 6/5
𝑥1 = 3/5, 𝑥2 = 6/5
0 𝒖 0 0 1 1 0
Optimal objective
function value, 𝑍 ∗ = 18/5 𝑧𝑗 4 1 0 -1/5 18/5
𝑐𝑗 -𝑧𝑗 0 0 0 1/5
• S.t.
• 2𝑥1 + 3𝑥2 – 𝑢1 + 𝑎1 = 15
• 4𝑥1 + 2𝑥2 − 𝑢2 + 𝑎2 = 8
• & 𝑥1, 𝑥2 , 𝑢1 , 𝑢2 , 𝑎1 , 𝑎2 ≥ 0
The algorithm will not terminate. There will be no leaving variable in the last iteration.
The algorithm will terminate but one of the non-basic variables will have zero value.
0 𝒔𝟏 0 3/2 1 -1/2 0 0 30 20
20 𝒙𝟏 1 -1/4 0 1/4 0 0 5 -
-M 𝒂 0 1/4 0 -1/4 -1 1 25 100
𝑧𝑗 20 -M/4-5 0 M/4+5 M -M
𝑐𝑗 -𝑧𝑗 0 M/4+35 0 -M/4-5 -M 0
05-11-2024 Dr. Deepti Mohan | Goa Institute of Management
Example 4 Iteration-2 𝒄𝒋 20 30 0 0 0 -M
Maximize 𝒄𝑩 𝒙𝑩 𝒙𝟏 𝒙𝟐 𝒔𝟏 𝒔𝟐 𝒖 𝒂 RHS Ratio
Z = 20x1 + 30x2+ 0s1+
0s2+ 0u - Ma 0 𝒔𝟏 0 3/2 1 -1/2 0 0 30 20
S.t. 20 𝒙𝟏 1 -1/4 0 1/4 0 0 5 -
-M 𝒂 0 1/4 0 -1/4 -1 1 25 100
2x1 + x2 + s1 =40
𝑧𝑗 20 -M/4-5 0 M/4+5 M
4x1 - x2 + s2 =20
𝑐𝑗 -𝑧𝑗 0 M/4+35 0 -M/4-5 -M
x1 –u + a = 30
Iteration-3 𝒄𝒋 20 30 0 0 0 -M
& x1, x2, s2, s2,u, a ≥0
𝒄𝑩 𝒙𝑩 𝒙𝟏 𝒙𝟐 𝒔𝟏 𝒔𝟐 𝒖 𝒂 RHS Ratio