The calculator will solve the given optimization problem using the simplex algorithm. It will add slack, surplus and artificial variables, if needed. In case of artificial variables, the Big M method or the two-phase method is used to determine the starting solution. Steps are available.
Solution The problem in the canonical form can be written as follows:
Z = 3 x 1 + 4 x 2 → m a x Z = 3 x_{1} + 4 x_{2} \to max Z = 3 x 1 + 4 x 2 → ma x { x 1 + 2 x 2 ≤ 8 x 1 + x 2 ≤ 6 x 1 , x 2 ≥ 0 \begin{cases} x_{1} + 2 x_{2} \leq 8 \\ x_{1} + x_{2} \leq 6 \\ x_{1}, x_{2} \geq 0 \end{cases} ⎩ ⎨ ⎧ x 1 + 2 x 2 ≤ 8 x 1 + x 2 ≤ 6 x 1 , x 2 ≥ 0 Add variables (slack or surplus) to turn all the inequalities into equalities:
Z = 3 x 1 + 4 x 2 → m a x Z = 3 x_{1} + 4 x_{2} \to max Z = 3 x 1 + 4 x 2 → ma x { x 1 + 2 x 2 + S 1 = 8 x 1 + x 2 + S 2 = 6 x 1 , x 2 , S 1 , S 2 ≥ 0 \begin{cases} x_{1} + 2 x_{2} + S_{1} = 8 \\ x_{1} + x_{2} + S_{2} = 6 \\ x_{1}, x_{2}, S_{1}, S_{2} \geq 0 \end{cases} ⎩ ⎨ ⎧ x 1 + 2 x 2 + S 1 = 8 x 1 + x 2 + S 2 = 6 x 1 , x 2 , S 1 , S 2 ≥ 0 Write down the simplex tableau:
Basic x 1 x_{1} x 1 x 2 x_{2} x 2 S 1 S_{1} S 1 S 2 S_{2} S 2 Solution Z Z Z − 3 -3 − 3 − 4 -4 − 4 0 0 0 0 0 0 0 0 0 S 1 S_{1} S 1 1 1 1 2 2 2 1 1 1 0 0 0 8 8 8 S 2 S_{2} S 2 1 1 1 1 1 1 0 0 0 1 1 1 6 6 6
The entering variable is x 2 x_{2} x 2 , because it has the most negative coefficient − 4 -4 − 4 in the Z-row.
Basic x 1 x_{1} x 1 x 2 x_{2} x 2 S 1 S_{1} S 1 S 2 S_{2} S 2 Solution Ratio Z Z Z − 3 -3 − 3 − 4 -4 − 4 0 0 0 0 0 0 0 0 0 S 1 S_{1} S 1 1 1 1 2 2 2 1 1 1 0 0 0 8 8 8 8 2 = 4 \frac{8}{2} = 4 2 8 = 4 S 2 S_{2} S 2 1 1 1 1 1 1 0 0 0 1 1 1 6 6 6 6 1 = 6 \frac{6}{1} = 6 1 6 = 6
The leaving variable is S 1 S_{1} S 1 , because it has the smallest ratio.
Divide row 1 1 1 by 2 2 2 : R 1 = R 1 2 R_{1} = \frac{R_{1}}{2} R 1 = 2 R 1 .
Basic x 1 x_{1} x 1 x 2 x_{2} x 2 S 1 S_{1} S 1 S 2 S_{2} S 2 Solution Z Z Z − 3 -3 − 3 − 4 -4 − 4 0 0 0 0 0 0 0 0 0 x 2 x_{2} x 2 1 2 \frac{1}{2} 2 1 1 1 1 1 2 \frac{1}{2} 2 1 0 0 0 4 4 4 S 2 S_{2} S 2 1 1 1 1 1 1 0 0 0 1 1 1 6 6 6
Add row 2 2 2 multiplied by 4 4 4 to row 1 1 1 : R 1 = R 1 + 4 R 2 R_{1} = R_{1} + 4 R_{2} R 1 = R 1 + 4 R 2 .
Basic x 1 x_{1} x 1 x 2 x_{2} x 2 S 1 S_{1} S 1 S 2 S_{2} S 2 Solution Z Z Z − 1 -1 − 1 0 0 0 2 2 2 0 0 0 16 16 16 x 2 x_{2} x 2 1 2 \frac{1}{2} 2 1 1 1 1 1 2 \frac{1}{2} 2 1 0 0 0 4 4 4 S 2 S_{2} S 2 1 1 1 1 1 1 0 0 0 1 1 1 6 6 6
Subtract row 2 2 2 from row 3 3 3 : R 3 = R 3 − R 2 R_{3} = R_{3} - R_{2} R 3 = R 3 − R 2 .
Basic x 1 x_{1} x 1 x 2 x_{2} x 2 S 1 S_{1} S 1 S 2 S_{2} S 2 Solution Z Z Z − 1 -1 − 1 0 0 0 2 2 2 0 0 0 16 16 16 x 2 x_{2} x 2 1 2 \frac{1}{2} 2 1 1 1 1 1 2 \frac{1}{2} 2 1 0 0 0 4 4 4 S 2 S_{2} S 2 1 2 \frac{1}{2} 2 1 0 0 0 − 1 2 - \frac{1}{2} − 2 1 1 1 1 2 2 2
The entering variable is x 1 x_{1} x 1 , because it has the most negative coefficient − 1 -1 − 1 in the Z-row.
Basic x 1 x_{1} x 1 x 2 x_{2} x 2 S 1 S_{1} S 1 S 2 S_{2} S 2 Solution Ratio Z Z Z − 1 -1 − 1 0 0 0 2 2 2 0 0 0 16 16 16 x 2 x_{2} x 2 1 2 \frac{1}{2} 2 1 1 1 1 1 2 \frac{1}{2} 2 1 0 0 0 4 4 4 4 1 2 = 8 \frac{4}{\frac{1}{2}} = 8 2 1 4 = 8 S 2 S_{2} S 2 1 2 \frac{1}{2} 2 1 0 0 0 − 1 2 - \frac{1}{2} − 2 1 1 1 1 2 2 2 2 1 2 = 4 \frac{2}{\frac{1}{2}} = 4 2 1 2 = 4
The leaving variable is S 2 S_{2} S 2 , because it has the smallest ratio.
Multiply row 2 2 2 by 2 2 2 : R 2 = 2 R 2 R_{2} = 2 R_{2} R 2 = 2 R 2 .
Basic x 1 x_{1} x 1 x 2 x_{2} x 2 S 1 S_{1} S 1 S 2 S_{2} S 2 Solution Z Z Z − 1 -1 − 1 0 0 0 2 2 2 0 0 0 16 16 16 x 2 x_{2} x 2 1 2 \frac{1}{2} 2 1 1 1 1 1 2 \frac{1}{2} 2 1 0 0 0 4 4 4 x 1 x_{1} x 1 1 1 1 0 0 0 − 1 -1 − 1 2 2 2 4 4 4
Add row 3 3 3 to row 1 1 1 : R 1 = R 1 + R 3 R_{1} = R_{1} + R_{3} R 1 = R 1 + R 3 .
Basic x 1 x_{1} x 1 x 2 x_{2} x 2 S 1 S_{1} S 1 S 2 S_{2} S 2 Solution Z Z Z 0 0 0 0 0 0 1 1 1 2 2 2 20 20 20 x 2 x_{2} x 2 1 2 \frac{1}{2} 2 1 1 1 1 1 2 \frac{1}{2} 2 1 0 0 0 4 4 4 x 1 x_{1} x 1 1 1 1 0 0 0 − 1 -1 − 1 2 2 2 4 4 4
Subtract row 3 3 3 multiplied by 1 2 \frac{1}{2} 2 1 from row 2 2 2 : R 2 = R 2 − R 3 2 R_{2} = R_{2} - \frac{R_{3}}{2} R 2 = R 2 − 2 R 3 .
Basic x 1 x_{1} x 1 x 2 x_{2} x 2 S 1 S_{1} S 1 S 2 S_{2} S 2 Solution Z Z Z 0 0 0 0 0 0 1 1 1 2 2 2 20 20 20 x 2 x_{2} x 2 0 0 0 1 1 1 1 1 1 − 1 -1 − 1 2 2 2 x 1 x_{1} x 1 1 1 1 0 0 0 − 1 -1 − 1 2 2 2 4 4 4
None of the Z-row coefficients are negative.
The optimum is reached.
The following solution is obtained: ( x 1 , x 2 , S 1 , S 2 ) = ( 4 , 2 , 0 , 0 ) \left(x_{1}, x_{2}, S_{1}, S_{2}\right) = \left(4, 2, 0, 0\right) ( x 1 , x 2 , S 1 , S 2 ) = ( 4 , 2 , 0 , 0 ) .
Answer Z = 20 Z = 20 Z = 20 A is achieved at ( x 1 , x 2 ) = ( 4 , 2 ) \left(x_{1}, x_{2}\right) = \left(4, 2\right) ( x 1 , x 2 ) = ( 4 , 2 ) A .