# Maximizar $$$7 x + 2 y$$$, sujeito a $$$\begin{cases} 3 x + 5 y \geq 20 \\ 3 x + y \leq 16 \\ - 2 x + y \leq 1 \\ x \geq 0 \\ y \geq 0 \end{cases}$$$

### Sua entrada

**Maximize $$$Z = 7 x + 2 y$$$, sujeito a $$$\begin{cases} 3 x + 5 y \geq 20 \\ 3 x + y \leq 16 \\ - 2 x + y \leq 1 \\ x \geq 0 \\ y \geq 0 \end{cases}.$$$**

### Solução

O problema na forma canônica pode ser escrito da seguinte forma:

$$Z = 7 x + 2 y \to max$$$$\begin{cases} 3 x + 5 y \geq 20 \\ 3 x + y \leq 16 \\ - 2 x + y \leq 1 \\ x, y \geq 0 \end{cases}$$Adicione variáveis (folga ou excedente) para transformar todas as desigualdades em igualdades:

$$Z = 7 x + 2 y \to max$$$$\begin{cases} 3 x + 5 y - S_{1} = 20 \\ 3 x + y + S_{2} = 16 \\ - 2 x + y + S_{3} = 1 \\ x, y, S_{1}, S_{2}, S_{3} \geq 0 \end{cases}$$Como não temos uma base, adicione uma variável artificial:

$$Z = 7 x + 2 y \to max$$$$\begin{cases} 3 x + 5 y - S_{1} + Y_{1} = 20 \\ 3 x + y + S_{2} = 16 \\ - 2 x + y + S_{3} = 1 \\ x, y, S_{1}, S_{2}, S_{3}, Y_{1} \geq 0 \end{cases}$$Penalize a variável artificial na função objetivo:

$$Z = 7 x + 2 y - M Y_{1} \to max$$$$\begin{cases} 3 x + 5 y - S_{1} + Y_{1} = 20 \\ 3 x + y + S_{2} = 16 \\ - 2 x + y + S_{3} = 1 \\ x, y, S_{1}, S_{2}, S_{3}, Y_{1} \geq 0 \end{cases}$$Escreva o quadro simplex:

Basic | $$$x$$$ | $$$y$$$ | $$$S_{1}$$$ | $$$S_{2}$$$ | $$$S_{3}$$$ | $$$Y_{1}$$$ | Solução |

$$$Z$$$ | $$$-7$$$ | $$$-2$$$ | $$$0$$$ | $$$0$$$ | $$$0$$$ | $$$M$$$ | $$$0$$$ |

$$$Y_{1}$$$ | $$$3$$$ | $$$5$$$ | $$$-1$$$ | $$$0$$$ | $$$0$$$ | $$$1$$$ | $$$20$$$ |

$$$S_{2}$$$ | $$$3$$$ | $$$1$$$ | $$$0$$$ | $$$1$$$ | $$$0$$$ | $$$0$$$ | $$$16$$$ |

$$$S_{3}$$$ | $$$-2$$$ | $$$1$$$ | $$$0$$$ | $$$0$$$ | $$$1$$$ | $$$0$$$ | $$$1$$$ |

Torne a linha Z consistente com o resto do quadro.

Subtraia a linha $$$2$$$ multiplicada por $$$M$$$ da linha $$$1$$$: $$$R_{1} = R_{1} - M R_{2}$$$.

Basic | $$$x$$$ | $$$y$$$ | $$$S_{1}$$$ | $$$S_{2}$$$ | $$$S_{3}$$$ | $$$Y_{1}$$$ | Solução |

$$$Z$$$ | $$$- 3 M - 7$$$ | $$$- 5 M - 2$$$ | $$$M$$$ | $$$0$$$ | $$$0$$$ | $$$0$$$ | $$$- 20 M$$$ |

$$$Y_{1}$$$ | $$$3$$$ | $$$5$$$ | $$$-1$$$ | $$$0$$$ | $$$0$$$ | $$$1$$$ | $$$20$$$ |

$$$S_{2}$$$ | $$$3$$$ | $$$1$$$ | $$$0$$$ | $$$1$$$ | $$$0$$$ | $$$0$$$ | $$$16$$$ |

$$$S_{3}$$$ | $$$-2$$$ | $$$1$$$ | $$$0$$$ | $$$0$$$ | $$$1$$$ | $$$0$$$ | $$$1$$$ |

A variável de entrada é $$$y$$$, porque tem o coeficiente mais negativo $$$- 5 M - 2$$$ na linha Z.

Basic | $$$x$$$ | $$$y$$$ | $$$S_{1}$$$ | $$$S_{2}$$$ | $$$S_{3}$$$ | $$$Y_{1}$$$ | Solução | Ratio |

$$$Z$$$ | $$$- 3 M - 7$$$ | $$$- 5 M - 2$$$ | $$$M$$$ | $$$0$$$ | $$$0$$$ | $$$0$$$ | $$$- 20 M$$$ | |

$$$Y_{1}$$$ | $$$3$$$ | $$$5$$$ | $$$-1$$$ | $$$0$$$ | $$$0$$$ | $$$1$$$ | $$$20$$$ | $$$\frac{20}{5} = 4$$$ |

$$$S_{2}$$$ | $$$3$$$ | $$$1$$$ | $$$0$$$ | $$$1$$$ | $$$0$$$ | $$$0$$$ | $$$16$$$ | $$$\frac{16}{1} = 16$$$ |

$$$S_{3}$$$ | $$$-2$$$ | $$$1$$$ | $$$0$$$ | $$$0$$$ | $$$1$$$ | $$$0$$$ | $$$1$$$ | $$$\frac{1}{1} = 1$$$ |

A variável que sai é $$$S_{3}$$$, porque tem a menor proporção.

Adicione a linha $$$4$$$ multiplicada por $$$5 M + 2$$$ à linha $$$1$$$: $$$R_{1} = R_{1} + \left(5 M + 2\right) R_{4}$$$.

Basic | $$$x$$$ | $$$y$$$ | $$$S_{1}$$$ | $$$S_{2}$$$ | $$$S_{3}$$$ | $$$Y_{1}$$$ | Solução |

$$$Z$$$ | $$$- 13 M - 11$$$ | $$$0$$$ | $$$M$$$ | $$$0$$$ | $$$5 M + 2$$$ | $$$0$$$ | $$$2 - 15 M$$$ |

$$$Y_{1}$$$ | $$$3$$$ | $$$5$$$ | $$$-1$$$ | $$$0$$$ | $$$0$$$ | $$$1$$$ | $$$20$$$ |

$$$S_{2}$$$ | $$$3$$$ | $$$1$$$ | $$$0$$$ | $$$1$$$ | $$$0$$$ | $$$0$$$ | $$$16$$$ |

$$$y$$$ | $$$-2$$$ | $$$1$$$ | $$$0$$$ | $$$0$$$ | $$$1$$$ | $$$0$$$ | $$$1$$$ |

Subtraia a linha $$$4$$$ multiplicada por $$$5$$$ da linha $$$2$$$: $$$R_{2} = R_{2} - 5 R_{4}$$$.

Basic | $$$x$$$ | $$$y$$$ | $$$S_{1}$$$ | $$$S_{2}$$$ | $$$S_{3}$$$ | $$$Y_{1}$$$ | Solução |

$$$Z$$$ | $$$- 13 M - 11$$$ | $$$0$$$ | $$$M$$$ | $$$0$$$ | $$$5 M + 2$$$ | $$$0$$$ | $$$2 - 15 M$$$ |

$$$Y_{1}$$$ | $$$13$$$ | $$$0$$$ | $$$-1$$$ | $$$0$$$ | $$$-5$$$ | $$$1$$$ | $$$15$$$ |

$$$S_{2}$$$ | $$$3$$$ | $$$1$$$ | $$$0$$$ | $$$1$$$ | $$$0$$$ | $$$0$$$ | $$$16$$$ |

$$$y$$$ | $$$-2$$$ | $$$1$$$ | $$$0$$$ | $$$0$$$ | $$$1$$$ | $$$0$$$ | $$$1$$$ |

Subtraia a linha $$$4$$$ da linha $$$3$$$: $$$R_{3} = R_{3} - R_{4}$$$.

Basic | $$$x$$$ | $$$y$$$ | $$$S_{1}$$$ | $$$S_{2}$$$ | $$$S_{3}$$$ | $$$Y_{1}$$$ | Solução |

$$$Z$$$ | $$$- 13 M - 11$$$ | $$$0$$$ | $$$M$$$ | $$$0$$$ | $$$5 M + 2$$$ | $$$0$$$ | $$$2 - 15 M$$$ |

$$$Y_{1}$$$ | $$$13$$$ | $$$0$$$ | $$$-1$$$ | $$$0$$$ | $$$-5$$$ | $$$1$$$ | $$$15$$$ |

$$$S_{2}$$$ | $$$5$$$ | $$$0$$$ | $$$0$$$ | $$$1$$$ | $$$-1$$$ | $$$0$$$ | $$$15$$$ |

$$$y$$$ | $$$-2$$$ | $$$1$$$ | $$$0$$$ | $$$0$$$ | $$$1$$$ | $$$0$$$ | $$$1$$$ |

A variável de entrada é $$$x$$$, porque tem o coeficiente mais negativo $$$- 13 M - 11$$$ na linha Z.

Basic | $$$x$$$ | $$$y$$$ | $$$S_{1}$$$ | $$$S_{2}$$$ | $$$S_{3}$$$ | $$$Y_{1}$$$ | Solução | Ratio |

$$$Z$$$ | $$$- 13 M - 11$$$ | $$$0$$$ | $$$M$$$ | $$$0$$$ | $$$5 M + 2$$$ | $$$0$$$ | $$$2 - 15 M$$$ | |

$$$Y_{1}$$$ | $$$13$$$ | $$$0$$$ | $$$-1$$$ | $$$0$$$ | $$$-5$$$ | $$$1$$$ | $$$15$$$ | $$$\frac{15}{13}$$$ |

$$$S_{2}$$$ | $$$5$$$ | $$$0$$$ | $$$0$$$ | $$$1$$$ | $$$-1$$$ | $$$0$$$ | $$$15$$$ | $$$\frac{15}{5} = 3$$$ |

$$$y$$$ | $$$-2$$$ | $$$1$$$ | $$$0$$$ | $$$0$$$ | $$$1$$$ | $$$0$$$ | $$$1$$$ | $$$\frac{1}{-2}$$$ (denominador negativo, ignore) |

A variável que sai é $$$Y_{1}$$$, porque tem a menor proporção.

Divida a linha $$$1$$$ por $$$13$$$: $$$R_{1} = \frac{R_{1}}{13}$$$.

Basic | $$$x$$$ | $$$y$$$ | $$$S_{1}$$$ | $$$S_{2}$$$ | $$$S_{3}$$$ | $$$Y_{1}$$$ | Solução |

$$$Z$$$ | $$$- 13 M - 11$$$ | $$$0$$$ | $$$M$$$ | $$$0$$$ | $$$5 M + 2$$$ | $$$0$$$ | $$$2 - 15 M$$$ |

$$$x$$$ | $$$1$$$ | $$$0$$$ | $$$- \frac{1}{13}$$$ | $$$0$$$ | $$$- \frac{5}{13}$$$ | $$$\frac{1}{13}$$$ | $$$\frac{15}{13}$$$ |

$$$S_{2}$$$ | $$$5$$$ | $$$0$$$ | $$$0$$$ | $$$1$$$ | $$$-1$$$ | $$$0$$$ | $$$15$$$ |

$$$y$$$ | $$$-2$$$ | $$$1$$$ | $$$0$$$ | $$$0$$$ | $$$1$$$ | $$$0$$$ | $$$1$$$ |

Adicione a linha $$$2$$$ multiplicada por $$$13 M + 11$$$ à linha $$$1$$$: $$$R_{1} = R_{1} + \left(13 M + 11\right) R_{2}$$$.

Basic | $$$x$$$ | $$$y$$$ | $$$S_{1}$$$ | $$$S_{2}$$$ | $$$S_{3}$$$ | $$$Y_{1}$$$ | Solução |

$$$Z$$$ | $$$0$$$ | $$$0$$$ | $$$- \frac{11}{13}$$$ | $$$0$$$ | $$$- \frac{29}{13}$$$ | $$$M + \frac{11}{13}$$$ | $$$\frac{191}{13}$$$ |

$$$x$$$ | $$$1$$$ | $$$0$$$ | $$$- \frac{1}{13}$$$ | $$$0$$$ | $$$- \frac{5}{13}$$$ | $$$\frac{1}{13}$$$ | $$$\frac{15}{13}$$$ |

$$$S_{2}$$$ | $$$5$$$ | $$$0$$$ | $$$0$$$ | $$$1$$$ | $$$-1$$$ | $$$0$$$ | $$$15$$$ |

$$$y$$$ | $$$-2$$$ | $$$1$$$ | $$$0$$$ | $$$0$$$ | $$$1$$$ | $$$0$$$ | $$$1$$$ |

Subtraia a linha $$$2$$$ multiplicada por $$$5$$$ da linha $$$3$$$: $$$R_{3} = R_{3} - 5 R_{2}$$$.

Basic | $$$x$$$ | $$$y$$$ | $$$S_{1}$$$ | $$$S_{2}$$$ | $$$S_{3}$$$ | $$$Y_{1}$$$ | Solução |

$$$Z$$$ | $$$0$$$ | $$$0$$$ | $$$- \frac{11}{13}$$$ | $$$0$$$ | $$$- \frac{29}{13}$$$ | $$$M + \frac{11}{13}$$$ | $$$\frac{191}{13}$$$ |

$$$x$$$ | $$$1$$$ | $$$0$$$ | $$$- \frac{1}{13}$$$ | $$$0$$$ | $$$- \frac{5}{13}$$$ | $$$\frac{1}{13}$$$ | $$$\frac{15}{13}$$$ |

$$$S_{2}$$$ | $$$0$$$ | $$$0$$$ | $$$\frac{5}{13}$$$ | $$$1$$$ | $$$\frac{12}{13}$$$ | $$$- \frac{5}{13}$$$ | $$$\frac{120}{13}$$$ |

$$$y$$$ | $$$-2$$$ | $$$1$$$ | $$$0$$$ | $$$0$$$ | $$$1$$$ | $$$0$$$ | $$$1$$$ |

Adicione a linha $$$2$$$ multiplicada por $$$2$$$ à linha $$$4$$$: $$$R_{4} = R_{4} + 2 R_{2}$$$.

Basic | $$$x$$$ | $$$y$$$ | $$$S_{1}$$$ | $$$S_{2}$$$ | $$$S_{3}$$$ | $$$Y_{1}$$$ | Solução |

$$$Z$$$ | $$$0$$$ | $$$0$$$ | $$$- \frac{11}{13}$$$ | $$$0$$$ | $$$- \frac{29}{13}$$$ | $$$M + \frac{11}{13}$$$ | $$$\frac{191}{13}$$$ |

$$$x$$$ | $$$1$$$ | $$$0$$$ | $$$- \frac{1}{13}$$$ | $$$0$$$ | $$$- \frac{5}{13}$$$ | $$$\frac{1}{13}$$$ | $$$\frac{15}{13}$$$ |

$$$S_{2}$$$ | $$$0$$$ | $$$0$$$ | $$$\frac{5}{13}$$$ | $$$1$$$ | $$$\frac{12}{13}$$$ | $$$- \frac{5}{13}$$$ | $$$\frac{120}{13}$$$ |

$$$y$$$ | $$$0$$$ | $$$1$$$ | $$$- \frac{2}{13}$$$ | $$$0$$$ | $$$\frac{3}{13}$$$ | $$$\frac{2}{13}$$$ | $$$\frac{43}{13}$$$ |

A variável de entrada é $$$S_{3}$$$, porque tem o coeficiente mais negativo $$$- \frac{29}{13}$$$ na linha Z.

Basic | $$$x$$$ | $$$y$$$ | $$$S_{1}$$$ | $$$S_{2}$$$ | $$$S_{3}$$$ | $$$Y_{1}$$$ | Solução | Ratio |

$$$Z$$$ | $$$0$$$ | $$$0$$$ | $$$- \frac{11}{13}$$$ | $$$0$$$ | $$$- \frac{29}{13}$$$ | $$$M + \frac{11}{13}$$$ | $$$\frac{191}{13}$$$ | |

$$$x$$$ | $$$1$$$ | $$$0$$$ | $$$- \frac{1}{13}$$$ | $$$0$$$ | $$$- \frac{5}{13}$$$ | $$$\frac{1}{13}$$$ | $$$\frac{15}{13}$$$ | $$$\frac{\frac{15}{13}}{- \frac{5}{13}}$$$ (denominador negativo, ignore) |

$$$S_{2}$$$ | $$$0$$$ | $$$0$$$ | $$$\frac{5}{13}$$$ | $$$1$$$ | $$$\frac{12}{13}$$$ | $$$- \frac{5}{13}$$$ | $$$\frac{120}{13}$$$ | $$$\frac{\frac{120}{13}}{\frac{12}{13}} = 10$$$ |

$$$y$$$ | $$$0$$$ | $$$1$$$ | $$$- \frac{2}{13}$$$ | $$$0$$$ | $$$\frac{3}{13}$$$ | $$$\frac{2}{13}$$$ | $$$\frac{43}{13}$$$ | $$$\frac{\frac{43}{13}}{\frac{3}{13}} = \frac{43}{3}$$$ |

A variável que sai é $$$S_{2}$$$, porque tem a menor proporção.

Multiplique a linha $$$2$$$ por $$$\frac{13}{12}$$$: $$$R_{2} = \frac{13 R_{2}}{12}$$$.

Basic | $$$x$$$ | $$$y$$$ | $$$S_{1}$$$ | $$$S_{2}$$$ | $$$S_{3}$$$ | $$$Y_{1}$$$ | Solução |

$$$Z$$$ | $$$0$$$ | $$$0$$$ | $$$- \frac{11}{13}$$$ | $$$0$$$ | $$$- \frac{29}{13}$$$ | $$$M + \frac{11}{13}$$$ | $$$\frac{191}{13}$$$ |

$$$x$$$ | $$$1$$$ | $$$0$$$ | $$$- \frac{1}{13}$$$ | $$$0$$$ | $$$- \frac{5}{13}$$$ | $$$\frac{1}{13}$$$ | $$$\frac{15}{13}$$$ |

$$$S_{3}$$$ | $$$0$$$ | $$$0$$$ | $$$\frac{5}{12}$$$ | $$$\frac{13}{12}$$$ | $$$1$$$ | $$$- \frac{5}{12}$$$ | $$$10$$$ |

$$$y$$$ | $$$0$$$ | $$$1$$$ | $$$- \frac{2}{13}$$$ | $$$0$$$ | $$$\frac{3}{13}$$$ | $$$\frac{2}{13}$$$ | $$$\frac{43}{13}$$$ |

Adicione a linha $$$3$$$ multiplicada por $$$\frac{29}{13}$$$ à linha $$$1$$$: $$$R_{1} = R_{1} + \frac{29 R_{3}}{13}$$$.

Basic | $$$x$$$ | $$$y$$$ | $$$S_{1}$$$ | $$$S_{2}$$$ | $$$S_{3}$$$ | $$$Y_{1}$$$ | Solução |

$$$Z$$$ | $$$0$$$ | $$$0$$$ | $$$\frac{1}{12}$$$ | $$$\frac{29}{12}$$$ | $$$0$$$ | $$$M - \frac{1}{12}$$$ | $$$37$$$ |

$$$x$$$ | $$$1$$$ | $$$0$$$ | $$$- \frac{1}{13}$$$ | $$$0$$$ | $$$- \frac{5}{13}$$$ | $$$\frac{1}{13}$$$ | $$$\frac{15}{13}$$$ |

$$$S_{3}$$$ | $$$0$$$ | $$$0$$$ | $$$\frac{5}{12}$$$ | $$$\frac{13}{12}$$$ | $$$1$$$ | $$$- \frac{5}{12}$$$ | $$$10$$$ |

$$$y$$$ | $$$0$$$ | $$$1$$$ | $$$- \frac{2}{13}$$$ | $$$0$$$ | $$$\frac{3}{13}$$$ | $$$\frac{2}{13}$$$ | $$$\frac{43}{13}$$$ |

Adicione a linha $$$3$$$ multiplicada por $$$\frac{5}{13}$$$ à linha $$$2$$$: $$$R_{2} = R_{2} + \frac{5 R_{3}}{13}$$$.

Basic | $$$x$$$ | $$$y$$$ | $$$S_{1}$$$ | $$$S_{2}$$$ | $$$S_{3}$$$ | $$$Y_{1}$$$ | Solução |

$$$Z$$$ | $$$0$$$ | $$$0$$$ | $$$\frac{1}{12}$$$ | $$$\frac{29}{12}$$$ | $$$0$$$ | $$$M - \frac{1}{12}$$$ | $$$37$$$ |

$$$x$$$ | $$$1$$$ | $$$0$$$ | $$$\frac{1}{12}$$$ | $$$\frac{5}{12}$$$ | $$$0$$$ | $$$- \frac{1}{12}$$$ | $$$5$$$ |

$$$S_{3}$$$ | $$$0$$$ | $$$0$$$ | $$$\frac{5}{12}$$$ | $$$\frac{13}{12}$$$ | $$$1$$$ | $$$- \frac{5}{12}$$$ | $$$10$$$ |

$$$y$$$ | $$$0$$$ | $$$1$$$ | $$$- \frac{2}{13}$$$ | $$$0$$$ | $$$\frac{3}{13}$$$ | $$$\frac{2}{13}$$$ | $$$\frac{43}{13}$$$ |

Subtraia a linha $$$3$$$ multiplicada por $$$\frac{3}{13}$$$ da linha $$$4$$$: $$$R_{4} = R_{4} - \frac{3 R_{3}}{13}$$$.

Basic | $$$x$$$ | $$$y$$$ | $$$S_{1}$$$ | $$$S_{2}$$$ | $$$S_{3}$$$ | $$$Y_{1}$$$ | Solução |

$$$Z$$$ | $$$0$$$ | $$$0$$$ | $$$\frac{1}{12}$$$ | $$$\frac{29}{12}$$$ | $$$0$$$ | $$$M - \frac{1}{12}$$$ | $$$37$$$ |

$$$x$$$ | $$$1$$$ | $$$0$$$ | $$$\frac{1}{12}$$$ | $$$\frac{5}{12}$$$ | $$$0$$$ | $$$- \frac{1}{12}$$$ | $$$5$$$ |

$$$S_{3}$$$ | $$$0$$$ | $$$0$$$ | $$$\frac{5}{12}$$$ | $$$\frac{13}{12}$$$ | $$$1$$$ | $$$- \frac{5}{12}$$$ | $$$10$$$ |

$$$y$$$ | $$$0$$$ | $$$1$$$ | $$$- \frac{1}{4}$$$ | $$$- \frac{1}{4}$$$ | $$$0$$$ | $$$\frac{1}{4}$$$ | $$$1$$$ |

Nenhum dos coeficientes da linha Z é negativo.

O ótimo é alcançado.

A seguinte solução é obtida: $$$\left(x, y, S_{1}, S_{2}, S_{3}, Y_{1}\right) = \left(5, 1, 0, 0, 10, 0\right)$$$.

### Responder

**$$$Z = 37$$$A é alcançado em $$$\left(x, y\right) = \left(5, 1\right)$$$A.**