Ex 5 Discrete Math
Ex 5 Discrete Math
x1 + 3x2 + 3x3 + s 1 ⩽ 6
2x1 + x2 + 2x3 + s2 ⩽ 2
x1 + 2x2 + x3 + s3 ⩽ 3
Z X1 X2 X3 S1 S2 S3
1 -1 -3 -2 0 0 0 0
S1 0 1 3 3 1 0 0 6
S2 0 2 1 2 0 1 0 2
S3 0 1 2 1 0 0 1 3
We take the smallest number on the objective function and its variable will enter the basis (-3
= X2)
We then check which number limits the most the increase of X2 by dividing the total with the
coefficent of X2 on each row (6/3 = 2, 2/1 = 2, 3/2 = 1.5). We conclude that S3 will leave the
basis.
To construct the pivot row (highlighted in red) we divide the S3 row by the coefficient
intersecting S3 and X2. We will then want to get 0s on the remaining spots on the X2 column,
so we will multiply the pivot row by a number in order to get 0 on the X2 column.
Objective row + Pivot row * 3
S1 row + Pivot row * (-3)
S2 row + Pivot row * (-1)
Z X1 X2 X3 S1 S2 S3
We take the smallest number on the objective function and its variable will enter the basis
(-1/2 = X3)
We then check which number limits the most the increase of X3 by dividing the total with the
coefficent of X3 on each row (3/2 / 3/2 = 1, 1/2 / 3/2 = 1/3, 3/2 / 1/2 = 3). We conclude that S2
will leave the basis.
To construct the pivot row (highlighted in red) we divide the S2 row by the coefficient
intersecting S2 and X3. We will then want to get 0s on the remaining spots on the X3 column,
so we will multiply the pivot row by a number in order to get 0 on the X3 column.
Objective row + Pivot row * 1/2
S1 row + Pivot row * (-3/2)
X2 row + Pivot row * (-1/2)
Z X1 X2 X3 S1 S2 S3
S1 0 -2 0 0 1 -1 -1 1
4 1
Optimal solution = 0, , , 1, 0, 0
3 3