- #1
evinda
Gold Member
MHB
- 3,836
- 0
Hello! (Wave)
I want to solve the following linear programming problem:
$$\min (5y_1-10y_2+7y_3-3y_4) \\ y_1+y_2+7y_3+2y_4=3 \\ -2y_1-y_2+3y_3+3y_4=2 \\ 2y_1+2y_2+8y_3+y_4=4 \\ y_i \geq 0, i \in \{ 1, \dots, 4 \}$$
$\begin{bmatrix}
1 & 1 & 7 & 2 & | & 3\\
-2 & -1 & 3 & 3 & | & 2\\
2 & 2 & 8 & 1 & | & 4
\end{bmatrix} \to \begin{bmatrix}
1 & 1 & 7 & 2 & | & 3\\
0 & 1 & 17 & 7 & | & 8\\
0 & 0 & 6 & 3 & | & 2
\end{bmatrix}$
So the problem is written equivalently as follows:
$$-\max (-5y_1+10y_2-7y_3+3y_4) \\ y_1+y_2+7y_3+2y_4=3 \\ y_2+17y_3+7y_4=8 \\ 6y_3+3y_4=2 \\ y_i \geq 0, i \in \{ 1, \dots, 4 \}$$But we want the $3 \times 3$ identity matrix to appear at the matrix that represents the linear programming problem, right?
So we solve the following problem, right?$$-\max (-5y_1+10y_2-7y_3+3y_4) \\ y_1+y_2+7y_3+2y_4=3 \\ y_2+17y_3+7y_4+y_5=8 \\ 6y_3+3y_4+y_6=2 \\ y_i \geq 0, i \in \{ 1, \dots,6 \}$$Then:
$\begin{matrix}
B & c_B & b & P_1 & P_2 & P_3 & P_4 & P_5 & P_5 & \theta & \\
P_1 & -5 & 3 & 1 & 1 & 7 & 2 & 0 & 0 & \frac{3}{7} &L_1 \\
P_5 & 0 & 8 & 0 & 1 & 17 & 7 & 1 & 0 & \frac{8}{17} & L_2\\
P_6 & 0 & 2 & 0 & 0 & 6 & 3 & 0 &1 & \frac{1}{3} &L_3 \\
& z & 0 & -5 & 10 & -7 & 3 & 0 & 0 & & L_4
\end{matrix}$
$|-7|> |-5|$ so $P_3$ gets in the basis and $P_6$ gets out of the basis.
Then we get the following tableau:
$\begin{matrix}
B & c_B & b & P_1 & P_2 & P_3 & P_4 & P_5 & P_5 & \theta & \\
P_1 & -5 & \frac{2}{3} & 1 & 1 & 0 & -\frac{3}{2} & 0 & -\frac{7}{6} & &L_1'=L_1-7L_3' \\
P_5 & 0 & \frac{7}{3} & 0 & 1 & 0 & -\frac{3}{2} & 1 & -\frac{17}{6} & & L_2'=L_2-17L_3'\\
P_3 & -7 & \frac{1}{3} & 0 & 0 & 1 & \frac{1}{2} & 0 &\frac{1}{6} & &L_3'=\frac{L_3}{6} \\
& z & \frac{7}{3} & -5 & 10 & 0 & \frac{13}{2} & 0 & \frac76 & & L_4'=L_4+7L_3'
\end{matrix}$Have I maybe done something wrong? Because from the last tableau we get that $P_1$ gets out of the basis and $P_1$ gets in the basis... (Tmi)
I want to solve the following linear programming problem:
$$\min (5y_1-10y_2+7y_3-3y_4) \\ y_1+y_2+7y_3+2y_4=3 \\ -2y_1-y_2+3y_3+3y_4=2 \\ 2y_1+2y_2+8y_3+y_4=4 \\ y_i \geq 0, i \in \{ 1, \dots, 4 \}$$
$\begin{bmatrix}
1 & 1 & 7 & 2 & | & 3\\
-2 & -1 & 3 & 3 & | & 2\\
2 & 2 & 8 & 1 & | & 4
\end{bmatrix} \to \begin{bmatrix}
1 & 1 & 7 & 2 & | & 3\\
0 & 1 & 17 & 7 & | & 8\\
0 & 0 & 6 & 3 & | & 2
\end{bmatrix}$
So the problem is written equivalently as follows:
$$-\max (-5y_1+10y_2-7y_3+3y_4) \\ y_1+y_2+7y_3+2y_4=3 \\ y_2+17y_3+7y_4=8 \\ 6y_3+3y_4=2 \\ y_i \geq 0, i \in \{ 1, \dots, 4 \}$$But we want the $3 \times 3$ identity matrix to appear at the matrix that represents the linear programming problem, right?
So we solve the following problem, right?$$-\max (-5y_1+10y_2-7y_3+3y_4) \\ y_1+y_2+7y_3+2y_4=3 \\ y_2+17y_3+7y_4+y_5=8 \\ 6y_3+3y_4+y_6=2 \\ y_i \geq 0, i \in \{ 1, \dots,6 \}$$Then:
$\begin{matrix}
B & c_B & b & P_1 & P_2 & P_3 & P_4 & P_5 & P_5 & \theta & \\
P_1 & -5 & 3 & 1 & 1 & 7 & 2 & 0 & 0 & \frac{3}{7} &L_1 \\
P_5 & 0 & 8 & 0 & 1 & 17 & 7 & 1 & 0 & \frac{8}{17} & L_2\\
P_6 & 0 & 2 & 0 & 0 & 6 & 3 & 0 &1 & \frac{1}{3} &L_3 \\
& z & 0 & -5 & 10 & -7 & 3 & 0 & 0 & & L_4
\end{matrix}$
$|-7|> |-5|$ so $P_3$ gets in the basis and $P_6$ gets out of the basis.
Then we get the following tableau:
$\begin{matrix}
B & c_B & b & P_1 & P_2 & P_3 & P_4 & P_5 & P_5 & \theta & \\
P_1 & -5 & \frac{2}{3} & 1 & 1 & 0 & -\frac{3}{2} & 0 & -\frac{7}{6} & &L_1'=L_1-7L_3' \\
P_5 & 0 & \frac{7}{3} & 0 & 1 & 0 & -\frac{3}{2} & 1 & -\frac{17}{6} & & L_2'=L_2-17L_3'\\
P_3 & -7 & \frac{1}{3} & 0 & 0 & 1 & \frac{1}{2} & 0 &\frac{1}{6} & &L_3'=\frac{L_3}{6} \\
& z & \frac{7}{3} & -5 & 10 & 0 & \frac{13}{2} & 0 & \frac76 & & L_4'=L_4+7L_3'
\end{matrix}$Have I maybe done something wrong? Because from the last tableau we get that $P_1$ gets out of the basis and $P_1$ gets in the basis... (Tmi)