Artificial Variables Techniques
Artificial Variables Techniques
Preetam K Sur, Assistant Professor, Computer Science & Engineering Department, GCETTS 05/04/2025 2
Solve using Simplex Method
◦Solve the “Chemistry of Garden” problem using simplex
method.
◦The Model was -
◦Minimize Z = 3.X1 + 2.X2
◦ Subject to,
◦ 5.X1 + X2 ≥ 10
◦ 2.X1 + 2.X2 ≥ 12
◦ X1 + 4.X2 ≥ 12
◦ X1, X2 ≥ 0
Preetam K Sur, Assistant Professor, Computer Science & Engineering Department, GCETTS 05/04/2025 3
Observation
◦ Constraints in ≤ form with non-negativity constraints and all non-negative
RHS causes no problem.
◦ Problem arises in case of constraints in ≥ or = form or having a negative RHS.
◦ The question is - What is the problem?
◦ Identifying the initial basic feasible solution.
◦ Case I : Constraints in ≥ form
◦ 6.X + 5.Y ≥ 25
◦ Converting in standard form by subtracting surplus variable as - 6.X + 5.Y – S = 25.
◦ Initial basic feasible solution by putting X = Y = 0, we get S = -25.
◦ This contradicts non-negativity constraint, S ≥ 0.
Preetam K Sur, Assistant Professor, Computer Science & Engineering Department, GCETTS 05/04/2025 4
Observation
◦ Case II : Constraints in = form
◦ 6.X + 5.Y = 25
◦ No need to convert in standard form.
◦ Initial basic feasible solution by putting X = Y = 0, we get 0 = 25.
◦ The constraints becomes inconsistent!!
◦ Case III : Negative RHS
◦ 6.X + 5.Y ≤ -25
◦ Converting in standard form by adding slack variable as, 6.X + 5.Y + s = -25.
◦ Initial basic feasible solution by putting X = Y = 0, we get s = -25
◦ This contradicts non-negativity constraint, s ≥ 0
Preetam K Sur, Assistant Professor, Computer Science & Engineering Department, GCETTS 05/04/2025 5
Oh No.. What to do!!
Preetam K Sur, Assistant Professor, Computer Science & Engineering Department, GCETTS 05/04/2025 6
ARTIFICIAL
VARIABLES
TECHNIQUE
To Solve Real Problem
Artificial Variables Technique
◦ Construct a more convenient artificial problem by introducing dummy variables
or artificial variables as required.
◦ Fictious and does not have any physical interpretation.
◦ Satisfies non-negativity constraints.
◦ Introduced only to find out the initial basic feasible solution.
◦ Disappears eventually during the iterations in simplex method.
◦ Once they disappears from the system, the original problem is solved eventually.
◦ Two techniques –
◦ Big M Method
◦ Two phase simplex method
Preetam K Sur, Assistant Professor, Computer Science & Engineering Department, GCETTS 05/04/2025 8
05/04/2025
Preetam K Sur, Assistant Professor, Computer Science & Engineering Department, GCETTS 05/04/2025 13
Iteration : 2
Cj 3 2 0 Iteration
M 0 :0
Iteration M 0 M
CBi C Solution Ratio
CBi B.V.j X3 1 X2 2 S0 1
M
R 1 S0 2
M
R2 S0
3
M
R3
Solutio
Solution Ratio
B.V. X1 X2 S1 R-1 S02 R02 S3 R3 n
3 X 1 1 0 -4/19 1/19 - 28/19 28
M R1 5 1 -1 1
- 0
-1 0
1 0
8/19 0 10 2
M R2 0 0 6/19 - 72/19 9
M R2 2 2 0 0
- -1
0 1
0 0
-5/19 0 12 6
2 X2 0 1 1/19 - 50/19 -10
M R3 1 4 0 0 0 0 -1 1 12 12
Zj 3 2 - -M M -
Zj 8M 7M -M M -M M -M M 34M
Zj - C j 0 0 - -M 0 -
Zj - C j 8M-3 7M-2 -M 0 -M 0 -M 0
Iteration
Iteration ::1
3
3 X1 1 1/5
0 -1/5
-1/4 - 0
1/8 0
- 0 0
- 2
1 10
M
0 R
S32 0 8/5
0 2/5
3/4 - -1
-19/8 1
- 0
1 0
- 8
9 5
M
2 R
X23 0 19/5
1 1/5
1/4 - 0
-5/8 0
- -1
0 1
- 10
5 50/19
Zjj
Z 3 - -M M -M M 6+18M
3 2 -1/4 - -7/8 - 0 - 13
Zjj -- C
Z Cjj 0 - -M 0 -M 0
0 0 -1/4 - -7/8 - 0 -
Preetam K Sur, Assistant Professor, Computer Science & Engineering Department, GCETTS 05/04/2025 14
05/04/2025
TWO-PHASE
SIMPLEX METHOD
একা রামে রক্ষে নেই, তায় সুগ্রীব দোসর
Preetam K Sur, Assistant Professor, Computer Science & Engineering Department, GCETTS 15
Two-Phase Simplex Method
◦This method solves LP in two phases.
◦Phase I attempts to find a initial basic feasible solution.
◦Phase II attempts to solve the original problem using the initial
basic feasible solution found in Phase I.
◦Start by rewriting the constraints as equations using slack,
surplus and artificial variables as required similar to the Big M
Method.
◦Proceed to Phase I
Preetam K Sur, Assistant Professor, Computer Science & Engineering Department, GCETTS 05/04/2025 16
Phase I
◦Why we multiplied Big M in objective function with artificial
variables?
◦ To minimize the effects of the artificial variables
◦Introduce new LPP, known as auxiliary LPP, that will minimize the
effect of artificial variables using the problem’s constraints.
◦Minimize Z* = ∑ artificial variable , subject to revised constraints.
◦Solve this auxiliary LPP using simplex method.
◦If the minimized Z* is positive, original LPP has no feasible solution.
◦Other wise proceed to Phase II.
Preetam K Sur, Assistant Professor, Computer Science & Engineering Department, GCETTS 05/04/2025 17
Example : Chemistry of Garden
◦Minimize Z = 3.X1 + 2.X2 Auxiliary Model
Preetam K Sur, Assistant Professor, Computer Science & Engineering Department, GCETTS 05/04/2025 18
0
Iteration : 2
Cj 0 0 0 1 0 1
1 0 1
CBi Solution Ratio
B.V. X1 X2 S1 R1 S2 R2 S3 R3
1
0 R
X1 5
1 1
0 -1
-4/19 1
4/19 0 0 0
1/19 0
-1/19 28/19
10 28
2
1 R2 2
0 2
0 0
6/19 0
-6/19 -1 1 0
8/19 0
-8/19 72/19
12 9
6
1
0 R
X23 1
0 4
1 0
1/19 0
-1/19 0 0 -1
-5/19 1
5/19 12
50/19 12
-10
Z j* 8
0 7
0 -1
6/19 1
-6/19
Since
-11
the
-1
8/19 1
-8/19 72/19
34
optimal Z value
Z j* - C j 8 7 -1 0 -1 0 -1 -
0
0 0 6/19 Iterationis
-25/19 -1
Iteration 1 0, we can 27/19
::3 0 8/19
0 X1 1 0
1/5 -1/4
-1/5 1/4
1/5 0 proceed
1/8 -1/8
0 to
0 0 1
2 10
0
1 S32
R 0 0
8/5 3/4
2/5 -3/4
-2/5 -1 Phase
-19/8 19/8
1 II.
1
0 -1
0 9
8 5
0
1 X23
R 0 1
19/5 1/4
1/5 -1/4
-1/5 -5/8
0 5/8
0 0
-1 0
1 5
10 50/19
Z j* 0 0
27/5 0
3/5 0
-3/5 0
-1 0
1 0
-1 0
1 0
18
Z j* - C j 0 0
27/5 0
3/5 -1
-8/5 0
-1 -1
0 0
-1 -1
0
Preetam K Sur, Assistant Professor, Computer Science & Engineering Department, GCETTS 05/04/2025 19
Log jahan par soochna band
Phase II kar dete hai ... main wahan
se soochna shuru karta
hoon…
◦Finds the optimal solution of the original problem.
[Youtube link]
◦The artificial variables can be dropped now.
◦ Since all of them has become zero now.
◦Phase II will continue from where Phase I has ended.
◦But, with the coefficients of real objective function.
Preetam K Sur, Assistant Professor, Computer Science & Engineering Department, GCETTS 05/04/2025 20
Phase I :: Iteration : 3
Cj 0 0 0 1 0 1 0 1
CBi Solution Ratio
B.V. X1 X2 S1 R1 S2 R2 S3 R3
0 X1 1 0 -1/4 1/4 1/8 -1/8 0 0 1
0 S3 0 0 3/4 -3/4 -19/8 19/8 1 -1 9
0 X2 0 1 1/4 -1/4 -5/8 5/8 0 0 5
Z j* 0 0 0 0 0 0 0 0 0
Z j* - C j 0 0 0 -1 0 -1 0 -1
Phase II :: Iteration : 1
Cj 0
3 0
2 0 0 0
CBi Solution Ratio
B.V. X1 X2 S1 S2 S3
3
0 X1 1 0 -1/4 1/8 0 1
0
S3 0 0 3/4 -19/8 1 9
2
0
X2 0 1 1/4 -5/8 0 5
Zj 3 2 -1/4 -7/8 0 13
Zj - C j 0 0 -1/4 -7/8 0
Preetam K Sur, Assistant Professor, Computer Science & Engineering Department, GCETTS 05/04/2025 21
Thank You!
Preetam K Sur, Assistant Professor, Computer Science & Engineering Department, GCETTS 05/04/2025 22