Introduce a slack variable in each constraint
2x+4y+z+s1=9,3x+4y+3z+s2=20,3x+y+3z+s3=28,s1, s2, s3≥0 Each ≤ constraint becomes an equation by adding a non-negative slack variable.
Write the objective function as the objective row
P−9x−7y−5z=0 Moving every variable to the left makes the objective-row entries the negatives of the coefficients.
Write down the initial simplex tableau
b.v.s1s2s3Px233−9y441−7z133−5s11000s20100s30010P0001Value920280 The slack variables are the initial basic variables and the origin is the initial basic feasible solution.
Iteration 1: choose the pivot column
most negative objective-row entry=−9⇒pivot column=x The rule is to pivot on the column with the most negative entry in the objective row.
Iteration 1: apply the ratio test
29=29,320=320,328=328⇒pivot row=s1 The smallest non-negative ratio picks the pivot row.
Iteration 1: state the pivot element
pivot element=2 The pivot element sits where the pivot column meets the pivot row.
Iteration 1: divide the pivot row by the pivot element
Rs1→21Rs1=(1, 2, 21, 21, 0, 0, 0, 29) This makes the pivot element equal to 1.
Iteration 1: clear the rest of the pivot column
Rs2→Rs2−3×Rpivot,Rs3→Rs3−3×Rpivot,RP→RP+9×Rpivot Row operations reduce every other entry of the pivot column to zero.
Iteration 1: write down the new tableau
b.v.xs2s3Px1000y2−2−511z212323−21s121−23−2329s20100s30010P0001Value29213229281 The variable x has entered the basis and s1 has left it.
Iteration 2: choose the pivot column
most negative objective-row entry=−21⇒pivot column=z The rule is to pivot on the column with the most negative entry in the objective row.
Iteration 2: apply the ratio test
2129=9,23213=313,23229=329⇒pivot row=s2 The smallest non-negative ratio picks the pivot row.
Iteration 2: clear the rest of the pivot column
Rx→Rx−21×Rpivot,Rs3→Rs3−23×Rpivot,RP→RP+21×Rpivot Row operations reduce every other entry of the pivot column to zero.
Iteration 2: write down the new tableau
b.v.xzs3Px1000y38−34−3331z0100s11−104s2−3132−131s30010P0001Value3731383128 The variable z has entered the basis and s2 has left it.
Check the stopping condition
objective row=(0, 331, 0, 4, 31, 0, 1)≥0 in every variable column There are no negative entries left in the objective row, so the tableau is optimal.
Read the solution from the final tableau
x=37,z=313,s3=8,y=0,s1=0,s2=0 Basic variables take the value in their row of the value column; non-basic variables are zero.
State the maximum value of P
Pmax=3128 This is the value in the bottom-right corner of the final tableau.