Professional Documents
Culture Documents
Simplex Method
Simplex Method
Maximization:
Step 1: Convert the linear program into standard form by adding slack variables
Ax + By ≤ C Ax + By ≤ C
Ax + By + S1 = C Ax + By + S2 = C
Z = Ax + By
Ax + By + s1 + s2
💡 The number of variables added into the objective function depends on the number of constraints that you have. We only
have two, so only two slack variables are added.
Step 2: Develop the initial simplex tableau with decision variables as non-basic variables
Non-basic means that both x and y are 0 and the slack variables S1 and S2 are basic variables.
Look:
💡 X and Y has a value of 0 and is therefore non-basic, S1 and S2 have a value of C and is therefore basic.
Doing Step 1:
7x + 6y + s1 + s2 Subject to:
💡
2x + 4y + s1 = 16
Two slack variables are added because there are two 3x + 2y + s2 = 12
constraints
x y s1 s2
7 6 0 0
SIMPLEX METHOD 1
Input the coefficients of the constraints
x y s1 s2
Basis Cj 7 6 0 0 Quantity
s1 0 2 4 1 0 16
s2 0 3 2 0 1 12
Zj
Cj-Zj
x y s1 s2
Basis Cj 7 6 0 0 Quantity
s1 0 2 4 1 0 16
s2 0 3 2 0 1 12
Zj 0 0 0 0 0
Cj-Zj
💡 Zj is equal to the Cj column (s1 = 0, and s2 = 0) multiplied by x, y, s1, and s2 columns then added together.
x y s1 s2
Basis Cj 7 6 0 0 Quantity
s1 0 2 4 1 0 16
s2 0 3 2 0 1 12
Zj 0 0 0 0 0
Cj-Zj 7 6 0 0
Step 3: Select the non-basic variable with the highest value in the net evaluation as the pivot column
x y s1 s2
Basis Cj 7 6 0 0 Quantity
s1 0 2 4 1 0 16
s2 0 3 2 0 1 12
Zj 0 0 0 0 0
Cj-Zj 7 6 0 0
💡 Here we have 7 in the x column as the highest value, we will use it as our pivot column.
Step 4: Calculate the ratio of the Quantity column to the pivot column values.
x y s1 s2
s1 0 2 4 1 0 16 16/2 = 8
s2 0 3 2 0 1 12 12/3 = 4
SIMPLEX METHOD 2
Zj 0 0 0 0 0
Cj-Zj 7 6 0 0
💡 The 2 and 3 divided by the quantity column comes from the pivot column.
💡 We will select the lowest ratio among the two. We now have 3 as our pivot point.
Step 5: Perform the first iteration of the tableaux by doing row operations
x y s1 s2
Basis Cj 7 6 0 0 Quantity
s1 0 2 4 1 0 16
x 7 3 2 0 1 12
Zj 0 0 0 0 0
Cj-Zj 7 6 0 0
💡 Notice that s2 is now replaced by x and its corresponding value on the Cj column is 7, which is equal to the value of x on the
objective function 7x + 6y + s1 + s2
💡 We want to make the pivot point 3 to be equal to 1. To do this we perform the row operation RowOne/3 = NewRowOne
We now have:
x y s1 s2
Basis Cj 7 6 0 0 Quantity
s1 0 2 4 1 0 16
x 7 1 2/3 0 1/3 4
Zj 0 0 0 0 0
Cj-Zj 7 6 0 0
3/3 = 1
2/3 = 2/3
0/3 = 0
1/3 = 1/3
12/3 = 4
Now, we want it so that the value above the pivot point is equal to 0 to do this we perform the row operation −2(RowOne) +
RowTwo = NewRowTwo
Now we have:
x y s1 s2
Basis Cj 7 6 0 0 Quantity
s1 0 0 8/3 1 -2/3 8
x 7 1 2/3 0 1/3 4
Zj 0 0 0 0 0
Cj-Zj 7 6 0 0
−2(1) + 2 = 0
−2(2/3) + 4 = 8/3
−2(0) + 1 = 1
SIMPLEX METHOD 3
−2(1/3) + 0 = −2/3
−2(4) + 16 = 8
Next, We will find the Zj and Cj-Zj row:
x y s1 s2
Basis Cj 7 6 0 0 Quantity
s1 0 0 8/3 1 -2/3 8
x 7 1 2/3 0 1/3 4
Zj 7 14/3 0 7/3 28
💡 We still have a non-negative and a non-zero value, therefore we will repeat Steps 3, 4, and 5.
Step 6: Repeat steps 3, 4, and 5 until we get no non-negatives and no non-zero in the Cj-Zj row.
x y s1 s2
Basis Cj 7 6 0 0 Quantity
y 6 0 1 3/8 -1/4 3
x 7 1 0 -1/4 1/2 2
Zj 7 6 1/2 2 32
Cj-Zj 0 0 -1/2 -2
y=3
x=2
z = 32
s1 = 0
s2 = 0
💡 You can now substitute these values in the objective function to get the value of Z
SIMPLEX METHOD 4