3.44(a) BJS3 p.143 -x1 - 2x2 + x3 transform to: (add slack variables

3.44(a) BJS3 p.143
-x1 - 2x2 + x3
2x1 + x2 + x3 ≤ 6
2x2 - x3 ≤ 3
x1,x2,x3 ≥ 0
transform to:
(add slack variables)
-x1 - 2x2 + x3
2x1 + x2 + x3 + x4
=6
2x2 - x3
+ x5 = 3
x1,x2,x3 ,x4,x5 ≥ 0
Minimize
subject to
data:
b=
Minimize
subject to
c=
-1
-2
1
0
0
A=
2
0
1
2
1
-1
1
0
0
1
6
3
Tableau
Iteration 1
Row
Basic
Variable
z
x1
x2
x3
x4
x5
RHS
0
z
1
1
2
-1
0
0
0
Rato Test
1
2
x4
x5
0
0
2
0
1
2
0
1
6
3
6
1.5
1
0
0
1
2
0
0
0
0.5
0
6
1.5
0
1
2
1
1
-1
0
↓
Multiply row 2 by (1/pivot) = 1/2
2
1
1
Add -(2) =
Add -(1) =
Iteration 2
0
z
1
1
0
1
2
x4
x2
0
0
2
0
0
1
↓
-1
1
-0.5
↓
-2
-1
↓
0
0
1
0
times row 2 to row 0
times row 2 to row 1
0
-1
1.5
1
-0.5
-0.5
0
0.5
↓
Multiply row 1 by (1/pivot) = 1/2
↓
-3
Rato Test
4.5
1.5
2.25
-
0
1
2
1
0
0
1
1
0
0
0
1
Add -(1) =
Iteration 3
0
0.75
-0.5
↓
-1
↓
0
0.5
0
-1
-0.25
0.5
-3
2.25
1.5
times row 1 to row 0
0
z
1
0
0
-0.75
-0.5
-0.75
-5.25
1
2
x1
x2
0
0
1
0
0
1
0.75
-0.5
0.5
0
-0.25
0.5
2.25
1.5
optimal objective =
-5.25
optimal basic feasible solution = (2.25,1.5,0,0,0)
← optimal
B -1
c B =
Iteration 1
B=
1
0
0
1
-1
B =
0
1
0
0
0
1
z-c=
-1
B N=
N=
B -1
c B =
Iteration 2
B=
1
0
1
2
-1
B =
0
1
0
-1
-0.5
0.5
z-c=
-1
B N=
N=
1
2
-1
2
0
2
0
1
2
1
2
1
-1
1
-1
x1
x2
x3
1
0
0
2
0
2
0
x1
1.5
-0.5
1
-1
x3
-0.5
0.5
0
1
x5
0
0
0
-1
B -1
c B =
Iteration 3
B=
2
0
1
2
-1
B =
-0.5
0.5
0
-0.75
-0.25
0.5
z-c=
-1
B N=
N=
0
0
-0.75
0.75
-0.5
1
-1
x3
0.5
0
1
0
x4
-0.25
0.5
0
1
x5
-0.5
-0.75
4.5 BJS3 p.185
-x1 - x2
3x1 + 4x2 ≤ 12
x1 - x2 ≥ 2
x1,x2 ≥ 0
(adding a slack and a surplus variable)
transform to:
- Minimize
x1 + x2
subject to 3x1 + 4x2 + x3
= 12
x1 - x2
- x4 = 2
x1,x2,x3,x4 ≥ 0
(add an artificial for row 2)
phase 1 :
Minimize
x5
with z - ( x1 + x2 ) = 0 (minimize in phase 2)
subject to 3x1 + 4x2 + x3
= 12
x1 - x2
- x4 + x5 = 2
x1,x2,x3,x4 ≥ 0
Maximize
subject to
Tableau
Basic
Row Variable
a
00
0
1
2
z
z
x3
x5
00
0
1
2
z
z
x3
x5
Iteration 1
(in phase 1)
a
a
z
z
x1
1
0
0
0
0
1
0
0
0
-1
3
1
1
0
0
0
0
1
0
0
1
-1
3
1
x2
x3
x4
x5
RHS
0
0
0
-1
0
-1
0
0
0
0
4
1
0
0
12
-1
0
-1
1
2
↓
Pivot on x5 in row 2 (add row 2 to row 1) to form starting basic solution
↓
-1
-1
4
-1
↓
Pivot on x1 in row 2
0
0
1
0
-1
0
0
-1
0
0
0
1
2
0
12
2
a
z = 0 and all artificials (only 1) are out of the basis
↓
Iteration 2
(in phase 2)
00
0
1
2
a
z
z
x3
x1
1
0
0
0
0
1
0
0
0
0
0
1
optimal objective = -(2) = -2
optimal basic feasible solution = (2,0,6,0)
0
-2
7
-1
Rato Test
12/3 = 4
2/1 = 2
0
0
1
0
0
-1
3
-1
-1
1
-3
1
0
2
6
2
a
ignore row 00 , column x5 , and the z
← optimal
column
4.6 BJS3 p.185
5x1 - 2x2 + x3
2x1 + 4x2 + x3 ≤ 6
2x1 + 2x2 + 3x3 ≥ 2
x1,x2 ≥ 0 ; x3 free
Maximize
subject to
transform to:
- Minimize
subject to
+
-
+
-
(adding a slack and a surplus variable and substituting x3 = x3 - x3 ; x3 ,x3 ≥ 0)
+
-
-5x1 + 2x2 - x3 + x3
+
-
2x1 + 4x2 + x3 - x3 + x4
+
-
2x1 + 2x2 + 3x3 - 3x3
+
=6
- x5 = 2
-
x1,x2,x3 ,x3 ,x4,x5 ≥ 0
phase 1 :
(add an artificial for row 2)
Minimize
x6
+
-
with z - ( -5x1 + 2x2 - x3 + x3
subject to
+
)=0
(minimize z in phase 2)
-
2x1 + 4x2 + x3 - x3 + x4
+
-
2x1 + 2x2 + 3x3 - 3x3
+
=6
- x5 + x6 = 2
-
x1,x2,x3 ,x3 ,x4,x5,x6 ≥ 0
Tableau
Basic
Row Variable
a
00
0
1
2
z
z
x4
x6
00
0
1
2
z
z
x4
x6
Iteration 1
(in phase 1)
a
a
z
z
x1
1
0
0
0
0
1
0
0
0
5
2
2
1
0
0
0
0
1
0
0
2
5
2
2
x2
-
x5
x6
RHS
0
0
0
0
0
-2
1
-1
0
0
4
1
-1
1
0
2
3
-3
0
-1
↓
Pivot on x6 in row 2 (add row 2 to row 1) to form starting basic solution
↓
-1
0
0
1
0
0
6
2
0
0
0
1
2
0
6
2
2
-2
4
2
↓
x3+
3
1
1
3
x3
-3
-1
-1
-3
x4
0
0
1
0
-1
0
0
-1
Rato Test
6/1 = 6
2/3
+
Pivot on x3 in row 2
↓
Iteration 2
(in phase 2)
a
00
0
1
z
z
x4
2
x3
+
a
z = 0 and all artificials (only 1) are out of the basis
a
1
0
0
0
1
0
0
0
4.333333 -2.66667
1.333333 3.333333
0
0
0
0
0
0
0
0
1
0
-1
0
ignore row 00 , column x6 , and the z
0.333333 -0.33333 -0.66667 Rato Test
0.333333 -0.33333 5.333333 (16/3)/(4/3)=4
0
0
0.666667 0.666667
↓
Pivot on x1 in row 2
↓
1
-1
0
-0.33333 0.333333 0.666667
(2/3)/(2/3)=1
column
Iteration 3
(in phase 2)
0
1
2
z
x4
x1
1
0
0
0
0
1
-7
2
1
↓
z
Pivot on x3 in row 1
↓
1
0
-13.5
-6.5
-2
1.5
6.5
2
-1.5
0
1
0
2.5
1
-0.5
-5
4
1
0
0
-3.25
-0.75
-18
-1
0
1
0
0.5
0.75
0.5
0.25
2
4
Rato Test
4/2 = 2
-
-
0
-
0
0
x3
x1
0
1
optimal objective = -(-18) = 18
optimal basic feasible solution = (4,0,0,2,0,0)
1
2
1
2.5
+
-
optimal original variables: x1 = 4, x2 = 0, x3 = (x3 - x3 ) = (0-2) = -2
optimal slack and surplus variables: x4 = x5 = 0
← optimal