0% found this document useful (0 votes)
6 views22 pages

Artificial Variables Techniques

The document discusses the Simplex Method for solving linear programming problems, detailing the process for minimizing objective functions under various constraints. It highlights challenges with constraints in different forms and introduces techniques like the Big M Method and Two-Phase Simplex Method to find initial basic feasible solutions. The document provides examples and outlines the use of artificial variables to facilitate the solution process.

Uploaded by

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

Artificial Variables Techniques

The document discusses the Simplex Method for solving linear programming problems, detailing the process for minimizing objective functions under various constraints. It highlights challenges with constraints in different forms and introduces techniques like the Big M Method and Two-Phase Simplex Method to find initial basic feasible solutions. The document provides examples and outlines the use of artificial variables to facilitate the solution process.

Uploaded by

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

Why it is called simplex?

Simplex Algorithm (Wiki) Simplex Structure (Wiki)


Preetam K Sur, Assistant Professor, Computer Science & Engineering Department, GCETTS 05/04/2025 1
Solve using Simplex Method
◦Minimize Z = 2.X1 – 3.X2 + 6.X3
◦Subject to,
◦ 3.X1 – X2 + 2.X3 ≤ 7
◦ 2.X1 + 4.X2 ≥ -12
◦ -4.X1 + 3.X2 + 8.X3 ≤ 10
◦ X1, X2, X3 ≥ 0

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

BIG M METHOD The bigger, the better!


Preetam K Sur, Assistant Professor, Computer Science & Engineering Department, GCETTS 9
Big M Method
◦If a LP constraint does not have a slack, an artificial variable is
added.
◦This will enable us to use all slack basic solution initially.
◦Introducing an artificial variable to a constraint violates that
constraints with respect to the original problem.
◦Artificial variables are not a part of the LP model also.
◦So, to get rid of these variables very high penalty is assigned
to the objective function for these artificial variables.
Preetam K Sur, Assistant Professor, Computer Science & Engineering Department, GCETTS 05/04/2025 10
This is why it
Penalty Rule is called Big
M Method
◦We assume a sufficiently large positive value M
◦ i.e. M → ∞
◦Coefficients of the artificial variables in objective function will be:
◦ M in case of minimization problem
Revised Model
◦ -M in case of maximization problem
Minimize z = 4.X + Y + M.R1 +
◦Minimize z = 4.X + Y
M.R2
subject to,
subject to,
3.X + Y = 3
3.X + Y + R1 = 3
4.X + 3.Y ≥ 6
4.X + 3.Y – S1 + R2 = 6
X + 2.Y ≤ 4
X + 2.Y + s1 = 4
X,Y ≥ 0
What would happen,X,Y,
had itsbeen
1, S 1, R 1, R 2 ≥ 0
a maximization
problem?
Preetam K Sur, Assistant Professor, Computer Science & Engineering Department, GCETTS 05/04/2025 11
Simply Simplex
◦Once we get the revised model with artificial variable, we will simply
use the simplex method until the optimality condition is satisfied.
◦During this process, if an artificial variable leaves, we will stop
calculating it’s coefficients further.
◦If no artificial variable appears in the solution, then the solution is an
optimal solution.
◦If at least one artificial variable appears in solution with zero value,
then the solution is also an optimal solution. (Degenerate)
◦If at least one artificial variable appears in solution with positive
value, then no feasible solution exists and it’s called pseudo optimal
solution.
Preetam K Sur, Assistant Professor, Computer Science & Engineering Department, GCETTS 05/04/2025 12
Example : Chemistry of Garden
◦Minimize Z = 3.X1 + 2.X2 Revised Model

◦Subject to, Minimize Z = 3.X1 + 2.X2 + M.R1 + M.R2 +


◦ 5.X1 + X2 ≥ 10 M.R3
◦ 2.X1 + 2.X2 ≥ 12 Subject to,
◦ X1 + 4.X2 ≥ 12 5.X1 + X2 – S1 + R1 = 10
2.X1 + 2.X2 – S2 + R2 = 12
◦ X1, X2 ≥ 0
X1 + 4.X2 – S3 + R3 = 12
X1, X2, S1, R1, S2, R2, S3, R3 ≥ 0

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

◦Subject to, Minimize Z* = R1 + R2 + R3


◦ 5.X1 + X2 ≥ 10 Subject to,
◦ 2.X1 + 2.X2 ≥ 12 5.X1 + X2 – S1 + R1 = 10

◦ X1 + 4.X2 ≥ 12 2.X1 + 2.X2 – S2 + R2 = 12


X1 + 4.X2 – S3 + R3 = 12
◦ X1, X2 ≥ 0
X1, X2, S1, R1, S2, R2, S3, R3 ≥ 0

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

You might also like