Solución El problema en la forma canónica se puede escribir de la siguiente manera:
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 Añade variables (holgura o excedente) para convertir todas las desigualdades en igualdades:
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 Escribe la tabla simplex:
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 Solución 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
La variable de entrada es x 2 x_{2} x 2 , porque tiene el coeficiente más negativo − 4 -4 − 4 en la fila Z.
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 Solución 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
La variable de salida es S 1 S_{1} S 1 , porque tiene la relación más pequeña.
Divida la fila 1 1 1 por 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 Solución 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
Añada la fila 2 2 2 multiplicada por 4 4 4 a la fila 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 Solución 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
Restar la fila 2 2 2 de la fila 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 Solución 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
La variable de entrada es x 1 x_{1} x 1 , porque tiene el coeficiente más negativo − 1 -1 − 1 en la fila Z.
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 Solución 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
La variable de salida es S 2 S_{2} S 2 , porque tiene la relación más pequeña.
Multiplica la fila 2 2 2 por 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 Solución 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
Añada la fila 3 3 3 a la fila 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 Solución 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
Reste la fila 3 3 3 multiplicada por 1 2 \frac{1}{2} 2 1 de la fila 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 Solución 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
Ninguno de los coeficientes de la fila Z es negativo.
Se alcanza el punto óptimo.
Se obtiene la siguiente solución: ( 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 ) .