Simplex + M-Method Sheet 3 Solution
Simplex + M-Method Sheet 3 Solution
Simplex Method
It is an algebraic procedure (a sequence of steps) to solve LPP. Requires that the problem
is expressed as a standard LPP. This implies that all the constraints are expressed as
equation by adding a variable called slack variable.
بإضافة رequality الInequality منConstraint نعتمد يف هذه الطريقة عىل تحويل كل ال
متغي جديد وهو ال
s
Slack variable
Note
In equality ≥ or ≤
Equality =
ـــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــ
Slack variable
• Slack variable is used mainly to convert inequality to equality.
Example
X ≤ 70
• To convert the inequality to equality
X + 𝒔𝟏 = 70
• If 𝒔𝟏 = 𝟒𝟎 that means 𝑿 = 𝟑𝟎.
• It means that all available resources were 70 but only 30 of them is used that is
represented by 𝑿 = 𝟑𝟎 on the other hand the unused resources were 40 that is
represented by 𝒔𝟏 = 𝟒𝟎.
Basic variable
• Represent the unused resources between the left-hand side and the right-hand side of
each in equality.
• In simplex
✓ Both the basic and slack variables are the same.
• Features of basic variables are the same for both simplex and M-Method.
Solution
Steps
1. Convert the objective function to equation.
𝒁 − 𝟒𝟎𝟎𝒙𝟏 − 𝟐𝟎𝟎𝒙𝟐 = 𝟎. 𝟎
2. Convert all the inequalities in each constraint to equality by using slack variable.
• Example
✓ If X ≤ 70
➢ X +𝒔𝟏 =70, it will be solved by simplex method.
✓ If X ≥70
➢ X −𝒔𝟏 =70, it will be solved by M-method.
𝟏𝟖 + 𝟑𝒙𝟐 + 𝒔𝟏 = 𝟖𝟎𝟎
𝟗𝒙𝟏 + 𝟒𝒙𝟐 + 𝒔𝟐 = 𝟔𝟎𝟎
𝒙𝟐 + 𝒔𝟑 = 𝟏𝟓𝟎
𝒙𝟏 𝒙𝟐 𝒔𝟏 𝒔𝟐 𝒔𝟑 solution
Z −400 −200 0 0 0 0
𝒔𝟏 18 3 1 0 0 800
𝒔𝟐 9 4 0 1 0 600
𝒔𝟑 0 1 0 0 1 150
• Note
✓ Write all variables either basic (𝑺𝟏,𝟐,….. ) or non-basic (𝑿𝟏,𝟐,…..) in the first row.
✓ Write the solution (right hand side of each equation) in the first column in the right-
hand side.
✓ Write the Z label and basic variables (𝑺𝟏,𝟐,….. ) in the first column in the left-hand
side.
✓ Write the coefficients of the variable involved in each constraint in the row of its
basic variable.
➢ Example
✓ The first constraint
𝟏𝟖 + 𝟑𝒙𝟐 + 𝒔𝟏 = 𝟖𝟎𝟎
✓ in the table
𝒔𝟏 18 3 1 0 0 800
• the entering column is the one which has the most positive value in the Z row if
the objective function is Min Z.
5. Inset a new column to the right of the table which is called Ratio column.
𝒔𝒐𝒍𝒖𝒕𝒊𝒐𝒏
• 𝒓𝒂𝒕𝒊𝒐 = 𝒄𝒐𝒓𝒓𝒐𝒔𝒑𝒐𝒏𝒅𝒊𝒏𝒈 𝒗𝒂𝒍𝒖𝒆 𝒊𝒏 𝒕𝒉𝒆 𝒆𝒏𝒕𝒆𝒓𝒊𝒏𝒈 𝒄𝒐𝒍𝒖𝒎𝒏
Entering
Column
𝑥1 𝑥2 𝑠1 𝑠2 𝑠3 solution Ratio
Z −400 −200 0 0 0 0
800
𝑠1 18 3 1 0 0 800 = 44.44
18
600
𝑠2 9 4 0 1 0 600 = 66.66
9
Do not divide on
𝑠3 0 1 0 0 1 150 zero or negative
number
Pivot leaving
element Row
7. Determine the pivot element which is the intersection between the entering column
and leaving row.
• Replace 𝑺𝟏 by 𝑿𝟏 .
𝑥1 𝑥2 𝑠1 𝑠2 𝑠3 solution
Z
𝒙𝟏 1 1/6 1/18 0 0 400/9
𝑠2
𝑠3
New
Row
10. 𝒙𝟏 becomes a new basic variable so it should follow the features of basic variables
by means its value should be zero in all equations except its new row.
𝒙𝟏 𝒙𝟐 𝒔𝟏 𝒔𝟐 𝒔𝟑 solution
Z 0 −400/3 200/9 0 0 160,000/9
𝒙𝟏 1 1/6 1/18 0 0 400/9
𝒔𝟐 0 2.5 −0.5 1 0 200
𝒔𝟑 0 1 0 0 1 150
𝒙𝟏 𝒙𝟐 𝒔𝟏 𝒔𝟐 𝒔𝟑 solution Ratio
Z 0 −400/3 200/9 0 0 160,000/9
0 𝟖𝟎𝟎
𝒙𝟏 1 1/6 1/18 0 400/9 = 𝟐𝟔𝟔. 𝟔𝟕
𝟑
𝟐𝟎𝟎
𝒔𝟐 0 2.5 −0.5 1 0 200 = 𝟖𝟎
𝟐. 𝟓
𝒔𝟑 0 1 0 0 1 150 150
Pivot leaving
Element Row
𝒙𝟏 𝒙𝟐 𝒔𝟏 𝒔𝟐 𝒔𝟑 solution
Z
𝒙𝟏
𝒙𝟐 0 1 −0.2 0.4 0 80
𝒔𝟑
𝟒𝟎𝟎
• 𝑵𝒆𝒘 𝒁 𝒓𝒐𝒘 = 𝑶𝒍𝒅 𝒁 + ( ) 𝑵𝒆𝒘 𝒙𝟐 𝒓𝒐𝒘
𝟑
New Z row
𝒙𝟏 𝒙𝟐 𝒔𝟏 𝒔𝟐 𝒔𝟑 solution
Old Z 0 −400/3 200/9 0 0 160,000/9
𝟒𝟎𝟎
+( ) 𝒙𝟐 0 400/3 −80/3 160/3 0 32,000/3
𝟑
New Z 0 0 −40/3 160/3 0 256,000/9
𝒙𝟏 𝒙𝟐 𝒔𝟏 𝒔𝟐 𝒔𝟑 solution
Z 0 0 −40/3 160/3 0 256,000/9
𝒙𝟏 1 0 4/45 −1/15 0 280/9
𝒙𝟐 0 1 −0.2 0.4 0 80
𝒔𝟑 0 0 0.2 −0.4 1 70
Entering
Column
𝒙𝟏 𝒙𝟐 𝒔𝟏 𝒔𝟐 𝒔𝟑 solution Ratio
Z 0 0 −40/3 160/3 0 256,000/9
𝒙𝟏 1 0 4/45 −1/15 0 280/9 𝟑𝟓𝟎
Do not divide on negative
𝒙𝟐 0 1 −0.2 0.4 0 80 number or zero
𝒔𝟑 0 0 0.2 −0.4 1 70 350
Pivot leaving
Element Row
𝒙𝟏 𝒙𝟐 𝒔𝟏 𝒔𝟐 𝒔𝟑 solution
Z
𝒔𝟏 45/4 0 1 −3/4 0 350
𝒙𝟐
𝒔𝟑
𝟒𝟎
• 𝑵𝒆𝒘 𝒁 𝒓𝒐𝒘 = 𝑶𝒍𝒅 𝒁 + ( ) 𝑵𝒆𝒘 𝑺𝟏 𝒓𝒐𝒘
𝟗
New Z row
𝒙𝟏 𝒙𝟐 𝒔𝟏 𝒔𝟐 𝒔𝟑 solution
Old Z 0 0 −40/9 100/3 0 256,000/9
𝟒𝟎
+( ) 𝑺𝟏 50 0 40/9 −10/3 0 140,000/9
𝟗
New Z 50 0 0 30 0 30,000
14. The final table is determined as all values in the Z row is positive or zero while the
objective function is Max Z.
𝒙𝟏 𝒙𝟐 𝒔𝟏 𝒔𝟐 𝒔𝟑 solution
Z 50 0 0 30 0 30,000
𝒔𝟏 45/4 0 1 −3/4 0 350
𝒙𝟐 9/4 1 0 0.25 0 150
𝒔𝟑 −9/4 0 0 −0.25 1 0
Solution
column
Results
Max Z = 30,000
𝒙𝟐 = 𝟏𝟓𝟎 & 𝒙𝟏 = 𝟎. 𝟎
solution
𝒁 − 𝟑𝒙𝟏 − 𝟐𝒙𝟐 = 𝟎. 𝟎
𝟐𝒙𝟏 + 𝒙𝟐 + 𝒔𝟏 = 𝟔
𝒙𝟏 + 𝒙𝟐 + 𝒔𝟐 = 𝟖
−𝒙𝟏 + 𝒙𝟐 + 𝒔𝟑 = 𝟏
𝒙𝟐 + 𝒔𝟒 = 𝟐 Entering
Column
𝑥1 𝑥2 𝑠1 𝑠2 𝑠3 𝑠4 solution Ratio
Z −3 −2 0 0 0 0 0
𝑠1 1 2 1 0 0 0 6 6
𝑠2 2 1 0 1 0 0 8 4
𝑠3 −1 1 0 0 1 0 1
𝑠4 0 1 0 0 0 1 2
leaving
Row
𝑥1 𝑥2 𝑠1 𝑠2 𝑠3 𝑠4 solution Ratio
Z 0 −0.5 0 1.5 0 0 12
𝑠1 0 1.5 1 −0.5 0 0 2 4/3
𝑥1 1 0.5 0 0.5 0 0 4 8
𝑠3 0 1.5 0 0.5 1 0 5 10/3
𝑠4 0 1 0 0 0 1 2 2
leaving
Row
𝑥1 𝑥2 𝑠1 𝑠2 𝑠3 𝑠4 solution
Z 0 0 1/3 4/3 0 0 38/3
𝑥2 0 1 2/3 −1/3 0 0 4/3
𝑥1 1 0 −1/3 2/3 0 0 10/3
𝑠3 0 0 −1 1 1 0 3
𝑠4 0 0 −2/3 1/3 0 1 2/3
Results
𝟑𝟖
𝒁=
𝟑
𝟏𝟎
𝒙𝟏 =
𝟑
𝟒
𝒙𝟐 =
𝟑
solution
𝒁 − 𝟐𝒙𝟏 − 𝒙𝟐 − 𝟑𝒙𝟑 = 𝟎. 𝟎
𝒙𝟏 + 𝟓𝒙𝟐 + 𝟑𝒙𝟑 + 𝒔𝟏 = 𝟐𝟓
𝟑𝒙𝟏 − 𝒙𝟐 + 𝒙𝟑 + 𝒔𝟐 = 𝟗
𝟐𝒙𝟏 + 𝟑𝒙𝟐 − 𝒙𝟑 + 𝒔𝟑 = 𝟕
Entering
Column
𝑥1 𝑥2 𝑥3 𝑠1 𝑠2 𝑠3 solution Ratio
Z −2 −1 −3 0 0 0 0
𝑠1 1 5 3 1 0 0 25 25/3
𝑠2 3 −1 1 0 1 0 9 9
𝑠3 2 3 −1 0 0 1 7
leaving
Row
𝑥1 𝑥2 𝑥3 𝑠1 𝑠2 𝑠3 solution Ratio
Z −1 4 0 1 0 0 25
𝑥3 1/3 5/3 1 1/3 0 0 25/3 25
𝑠2 8/3 −8/3 0 −1/3 1 0 2/3 1/4
𝑠3 7/3 14/3 0 1/3 0 1 46/3 46/7
leaving
Row
𝑥1 𝑥2 𝑥3 𝑠1 𝑠2 𝑠3 solution
Z 0 3 0 7/8 3/8 0 101/4
𝑥3 0 2 1 3/8 −1/8 0 33/4
𝑥1 1 −1 0 −1/8 3/8 0 ¼
𝑠3 0 7 0 5/8 −7/8 1 59/4
Results
𝟏𝟎𝟏
𝒁=
𝟒
𝟏
𝒙𝟏 =
𝟒
𝒙𝟐 = 𝟎. 𝟎
𝟑𝟑
𝒙𝟑 =
𝟒
𝒙𝟏 + 𝒙𝟐 + 𝒙𝟑 = 𝟐 𝒙𝟑 = 𝟐 − 𝒙𝟏 − 𝒙𝟐
−𝟐𝒙𝟏 + 𝒙𝟐 + 𝒙𝟒 = 𝟎 𝒙𝟒 = 𝟐𝒙𝟏 − 𝒙𝟐
𝟎. 𝟓𝒙𝟏 + 𝒙𝟐 + 𝒙𝟓 = 𝟐 𝒙𝟓 = 𝟐 − 𝟎. 𝟓𝒙𝟏 − 𝒙𝟐
First Solution
𝒁−𝟑𝒙𝟏 = 𝟔
𝒙𝟏 + 𝒙𝟐 + 𝒙𝟑 = 𝟐
−𝟐𝒙𝟏 + 𝒙𝟐 + 𝒙𝟒 = 𝟎
𝟎. 𝟓𝒙𝟏 + 𝒙𝟐 + 𝒙𝟓 = 𝟐
𝑥1 𝑥2 𝑥3 𝑥4 𝑥5 solution Ratio
Z −3 0 0 0 0 6
𝑥3 1 1 1 0 0 2 2
𝑥4 −2 1 0 1 0 0
𝑥5 0.5 1 0 0 1 2 4
leaving
Row
new 𝑥1 1 1 1 0 0 2
Old Z −3 0 0 0 0 6
+3𝑥1 3 3 3 0 0 6
New Z 0 3 3 0 0 12
Old 𝑥4 −2 1 0 1 0 0
+2𝑥1 2 2 2 0 0 4
New 𝑥4 0 3 2 1 0 4
Old 𝑥5 0.5 1 0 0 1 2
−0.5𝑥1 −0.5 −0.5 −0.5 0 0 −1
New 𝑥5 0 0.5 −0.5 0 1 1
Results
𝒁 = 𝟏𝟐
𝒙𝟏 = 𝟐
𝒙𝟒 = 𝟒
𝒙𝟓 = 𝟏
Second Solution
𝒁 − 𝟕𝒙𝟏 − 𝟐𝒙𝟐 − 𝒙𝟑 + 𝒙𝟒 − 𝟐𝒙𝟓 = 𝟎. 𝟎
𝒙 𝟑 , 𝒙𝟒 , 𝒙𝟓
𝒙𝟏 + 𝒙𝟐 + 𝒙𝟑 = 𝟐
Are basic variable
−𝟐𝒙𝟏 + 𝒙𝟐 + 𝒙𝟒 = 𝟎. 𝟎
1. Coefficient must be 1
𝟎. 𝟓𝒙𝟏 + 𝒙𝟐 + 𝒙𝟓 = 𝟐 2. Must not be included in Z equation
𝑥1 𝑥2 𝑥3 𝑥4 𝑥5 solution
Z −7 −2 −1 1 −2 0.0
𝑥3 1 1 1 0 0 2
𝑥4 −2 1 0 1 0 0.0
𝑥5 0.5 1 0 0 1 2
𝑥1 𝑥2 𝑥3 𝑥4 𝑥5 solution
Z −7 −2 −1 1 −2 0.0
𝑥3 1 1 1 0 0 2
𝑥4 −2 1 0 1 0 0
2 × 𝑥5 1 2 0 0 2 4
Z+𝑥3 − 𝑥4 + 2𝑥5 −3 0 0 0 0 6
Entering
Column
𝑥1 𝑥2 𝑥3 𝑥4 𝑥5 solution Ratio
Z −3 0 0 0 0 6
𝑥3 1 1 1 0 0 2 2
𝑥4 −2 1 0 1 0 0
𝑥5 0.5 1 0 0 1 2 4
leaving
Row
new 𝑥1 1 1 1 0 0 2
Old Z −3 0 0 0 0 6
+3𝑥1 3 3 3 0 0 6
New Z 0 3 3 0 0 12
Old 𝑥5 0.5 1 0 0 1 2
−0.5𝑥1 −0.5 −0.5 −0.5 0 0 −1
New 𝑥5 0 0.5 −0.5 0 1 1
𝑥1 𝑥2 𝑥3 𝑥4 𝑥5 solution
Z 0 3 3 0 0 12
𝑥1 1 1 1 0 0 2
𝑥4 0 3 2 1 0 4
𝑥5 0 0.5 −0.5 0 1 1
Results
𝒁 = 𝟏𝟐
𝒙𝟏 = 𝟐
𝒙𝟒 = 𝟒
𝒙𝟓 = 𝟏
Example Results
Simplex X ≤ 70 X=70+S Basic variable
As we see, in case of simplex slack variable is added to the equation; in contrast, in case of
M-method slack variable is subtracted from the equation.
Example
• Convert the following inequality to equality
𝒙𝟏 + 𝟓𝒙𝟐 + 𝟑𝒙𝟑 ≥ 𝟐𝟓
• Result in Slack variable has a
𝒙𝟏 + 𝟓𝒙𝟐 + 𝟑𝒙𝟑 − 𝑺 = 𝟐𝟓 negative sign so it is
Non- Basic variable
Conclusion
in case of M- method, slack variable cannot be used as a basic variable so we have to add
another variable called artificial variable to be the basic variable.
2. Equality =
• Use the artificial variable in the following constraint
𝒙𝟏 + 𝟓𝒙𝟐 + 𝟑𝒙𝟑 = 𝟐𝟓
• Result in
𝒙𝟏 + 𝟓𝒙𝟐 + 𝟑𝒙𝟑 + 𝑹𝟏 = 𝟐𝟓 Artificial variable is basic
as its coefficient is +ve one
𝑴𝒊𝒏𝒁 = 𝒙𝟏 + 𝟓𝒙𝟐 + 𝑴 ∑ 𝑹
𝑴𝒊𝒏𝒁 − 𝒙𝟏 − 𝟓𝒙𝟐 − 𝑴 ∑ 𝑹 = 𝟎. 𝟎
• Note that R is the basic variable and its coefficient in objective function is not zero
so we have to convert its coefficient to zero in the first step before starting solution.
2. Max Z
• Use the artificial variable in the following constraint
𝑴𝒂𝒙𝒁 = 𝒙𝟏 + 𝟓𝒙𝟐
• Result in
𝑴𝒊𝒏𝒁 = 𝒙𝟏 + 𝟓𝒙𝟐 − 𝑴 ∑ 𝑹
𝑴𝒊𝒏𝒁 − 𝒙𝟏 − 𝟓𝒙𝟐 + 𝑴 ∑ 𝑹 = 𝟎. 𝟎
• Note that R is the basic variable and its coefficient in objective function is not zero
so we have to convert its coefficient to zero in the first step before starting solution.
𝒙𝟏 𝒙𝟐 𝒙𝟑 𝒔𝟏 𝑹𝟏 𝑹𝟐 solution
Z −4 8 −3 0 −M −M 0
𝑹𝟏 1 1 1 0 1 0 7
𝑹𝟐 2 −5 1 −1 0 1 10
𝒙𝟏 𝒙𝟐 𝒙𝟑 𝒔𝟏 𝑹𝟏 𝑹𝟐 solution
Z −4 8 −3 0 −M −M 0
𝐌 × 𝑹𝟏 M M M 0 M 0 7M
𝐌 × 𝑹𝟐 2M −5M M −M 0 M 10M
New Z 3M−4 −4M+8 2M−3 −M 0 0 17M
(𝐙 + 𝐌 × 𝑹𝟏 + 𝐌 × 𝑹𝟐 )
𝒙𝟏 𝒙𝟐 𝒙𝟑 𝒔𝟏 𝑹𝟏 𝑹𝟐 solution Ratio
Z 3M−4 −4M+8 2M−3 −M 0 0 17M
𝑹𝟏 1 1 1 0 1 0 7 7
𝑹𝟐 2 −5 1 −1 0 1 10 5
Pivot leaving
element Row
𝒙𝟏 𝒙𝟐 𝒙𝟑 𝒔𝟏 𝑹𝟏 𝑹𝟐 solution
Z
𝑹𝟏
𝒙𝟏 1 −2.5 0.5 −0.5 0 0.5 5
Entering
Column
𝒙𝟏 𝒙𝟐 𝒙𝟑 𝒔𝟏 𝑹𝟏 𝑹𝟐 solution Ratio
Z 0 3.5M−2 0.5M−1 0.5M−2 0 −1.5M+2 2M+20
𝑹𝟏 0 3.5 0.5 0.5 1 −0.5 2 4/7
𝒙𝟏 1 −2.5 0.5 −0.5 0 0.5 5
leaving
Pivot Row
element
𝒙𝟏 𝒙𝟐 𝒙𝟑 𝒔𝟏 𝑹𝟏 𝑹𝟐 solution
Z
𝒙𝟐 0 1 1/7 1/7 2/7 −1/7 4/7
𝒙𝟏
𝒙𝟏 𝒙𝟐 𝒙𝟑 𝒔𝟏 𝑹𝟏 𝑹𝟐 solution
Z 0 0 −3/7 −12/7 −4M+(22/7) −M+(12/7) 148/7
𝒙𝟐 0 1 1/7 1/7 2/7 −1/7 4/7
𝒙𝟏 1 0 6/7 −1/7 5/7 1/7 45/7
Results
𝟏𝟒𝟖 𝟒𝟓 𝟒
𝒁= 𝒙𝟏 = 𝒙𝟐 =
𝟕 𝟕 𝟕
Solution
𝒁 − 𝟐𝒙𝟏 − 𝟑𝒙𝟐 − 𝑴𝑹𝟏 − 𝑴𝑹𝟐 = 𝟎. 𝟎
𝟎. 𝟓𝒙𝟏 + 𝟎. 𝟐𝟓𝒙𝟐 + 𝒔𝟏 = 𝟒
𝒙𝟏 + 𝟑𝒙𝟐 − 𝒙𝟑 + 𝑹𝟏 = 𝟐𝟎
𝒙𝟏 + 𝟑𝒙𝟐 + 𝑹𝟐 = 𝟏𝟎
𝒙𝟏 𝒙𝟐 𝒔𝟏 𝒙𝟑 𝑹𝟏 𝑹𝟐 solution
Z −2 −3 0 0 −M −M 0
𝒔𝟏 0.5 0.25 1 0 0 0 4
𝑹𝟏 1 3 0 −1 1 0 20
𝑹𝟐 1 1 0 0 0 1 10
𝒙𝟏 𝒙𝟐 𝒔𝟏 𝒙𝟑 𝑹𝟏 𝑹𝟐 solution
Z −2 −3 0 0 −M −M 0
𝐌 × 𝑹𝟏 M 3M 0 −M M 0 20M
𝐌 × 𝑹𝟐 M M 0 0 0 M 10M
New Z 2M−2 4M−3 0 −M 0 0 30M
(𝐙 + 𝐌 × 𝑹𝟏 + 𝐌 × 𝑹𝟐 )
𝒙𝟏 𝒙𝟐 𝒔𝟏 𝒙𝟑 𝑹𝟏 𝑹𝟐 solution Ratio
Z 2M−2 4M−3 0 −M 0 0 30M
𝒔𝟏 0.5 0.25 1 0 0 0 4 16
𝑹𝟏 1 3 0 −1 1 0 20 20/3
𝑹𝟐 1 1 0 0 0 1 10 𝟏𝟎
Pivot
element leaving
Row
𝒙𝟏 𝒙𝟐 𝒔𝟏 𝒙𝟑 𝑹𝟏 𝑹𝟐 solution
Z
𝒔𝟏
𝒙𝟐 1/3 1 0 −1/3 1/3 0 20/3
𝑹𝟐
Entering
Column
𝒙𝟏 𝒙𝟐 𝒔𝟏 𝒙𝟑 𝑹𝟏 𝑹𝟐 solution Ratio
Z (2M−3)/3 0 0 (M-3)/3 (3−4M)/3 0 (10M+60)/3
𝒔𝟏 5/12 0 1 1/12 −1/12 0 7/3 28/5
𝒙𝟐 1/3 1 0 −1/3 1/3 0 20/3 20
𝑹𝟐 2/3 0 0 1/3 −1/3 1 10/3 5
leaving
Pivot Row
element
𝒙𝟏 𝒙𝟐 𝒔𝟏 𝒙𝟑 𝑹𝟏 𝑹𝟐 solution
Z
𝒔𝟏
𝒙𝟐
𝒙𝟏 1 0 0 0.5 −𝟎. 𝟓 1.5 5
𝒙𝟏 𝒙𝟐 𝒔𝟏 𝒙𝟑 𝑹𝟏 𝑹𝟐 solution
Z 0 0 0 −0.5 (1−2M)/2 (3−2M)/2 25
𝒔𝟏 0 0 1 −0.125 0.125 −5/8 0.25
𝒙𝟐 0 1 0 −0.5 0.5 −0.5 5
𝒙𝟏 1 0 0 0.5 −0.5 1.5 5
Results
𝒁 = 𝟐𝟓 𝒙𝟏 = 𝟓 𝒙𝟐 = 𝟓
Solution
𝒁 − 𝒙𝟏 − 𝒙𝟐 + 𝑴𝑹𝟏 + 𝑴𝑹𝟐 = 𝟎. 𝟎
𝟐𝒙𝟏 + 𝒙𝟐 − 𝒙𝟑 + 𝑹𝟏 = 𝟒
𝒙𝟏 + 𝟐𝒙𝟐 + 𝑹𝟐 = 𝟔
𝒙𝟏 𝒙𝟐 𝒙𝟑 𝑹𝟏 𝑹𝟐 solution
Z −1 −1 0 M M 0
𝑹𝟏 2 1 −1 1 0 4
𝑹𝟐 1 2 0 0 1 6
• Adjusting Z-row
𝒙𝟏 𝒙𝟐 𝒙𝟑 𝑹𝟏 𝑹𝟐 solution
Z −1 −1 0 M M 0
−𝐌 × 𝑹𝟏 −2M −M M −M 0 −4M
−𝐌 × 𝑹𝟐 −M −2M 0 0 −M −6M
New Z −3M−1 −3M−1 M 0 0 −10M
(𝐙 − 𝐌 × 𝑹𝟏 − 𝐌 × 𝑹𝟐 )
𝒙𝟏 𝒙𝟐 𝒙𝟑 𝑹𝟏 𝑹𝟐 solution Ratio
Z −3M−1 −3M−1 M 0 0 −10M
𝑹𝟏 2 1 −1 1 0 4 2
𝑹𝟐 1 2 0 0 1 6 6
Pivot leaving
Row
element
𝒙𝟏 𝒙𝟐 𝒙𝟑 𝑹𝟏 𝑹𝟐 solution
Z
𝒙𝟏 1 0.5 −0.5 0.5 0 2
𝑹𝟐
Entering
Column
𝒙𝟏 𝒙𝟐 𝒙𝟑 𝑹𝟏 𝑹𝟐 solution Ratio
Z 0 −1.5M−0.5 −0.5M−0.5 1.5M+0.5 0 2−4M
𝒙𝟏 1 0.5 −0.5 0.5 0 2 4
𝑹𝟐 0 1.5 0.5 −0.5 1 4 8/3
leaving
Pivot
Row
element
Entering
Column
𝒙𝟏 𝒙𝟐 𝒙𝟑 𝑹𝟏 𝑹𝟐 solution Ratio
Z 0 0 −1/3 M+(𝟏/𝟑) M+(𝟏/𝟑) 10/3
𝒙𝟏 1 0 −2/3 2/3 −1/3 2/3
𝒙𝟐 0 1 1/3 −1/3 2/3 8/3 8
Pivot leaving
element Row
𝒙𝟏 𝒙𝟐 𝒙𝟑 𝑹𝟏 𝑹𝟐 solution
Z
𝒙𝟏
𝒙𝟑 0 3 1 −1 2 8