Content deleted Content added
Line 94:
==Numerical example==
{{seealso|Simplex method#Example}}
Consider a linear program where
Line 115 ⟶ 116:
</math>
Let
Initially, {{math|'''''B''''' {{=}} ['''''A'''''<sub>4</sub> '''''A'''''<sub>5</sub>]}}, which corresponds to a feasible vertex {{math|'''''x''''' {{=}} [0 0 0 10 15]<sup>T</sup>}}.▼
:<math>
\begin{align}
\boldsymbol{B} & =
\begin{bmatrix}
\boldsymbol{A}_4 & \boldsymbol{A}_5
\end{bmatrix}\text{,} \\
\boldsymbol{N} & =
\begin{bmatrix}
\boldsymbol{A}_1 & \boldsymbol{A}_2 & \boldsymbol{A}_3
\end{bmatrix}
\end{align}
</math>
▲
:<math>
\begin{align}
\boldsymbol{\lambda} & =
\begin{bmatrix}
10 & 15
\end{bmatrix}^{\mathrm{T}}\text{,} \\
\boldsymbol{s_N} & =
\begin{bmatrix}
-62 & -98 & -59
\end{bmatrix}^{\mathrm{T}}\text{.}
\end{align}
</math>
Choose {{math|''q'' {{=}} 3}} as the entering index. Then {{math|'''''d''''' {{=}} [1 3]<sup>T</sup>}}, which means a unit increase in {{math|''x''<sub>3</sub>}} will results in {{math|''x''<sub>4</sub>}} and {{math|''x''<sub>5</sub>}} being decreased by {{math|1}} and {{math|3}}, respectively. Therefore, {{math|''x''<sub>3</sub>}} is increased to {{math|5}}, at which point {{math|''x''<sub>5</sub>}} is reduced to zero, and {{math|''p'' {{=}} 5}} is the leaving index.
After the pivot operation,
:<math>
\begin{align}
\boldsymbol{B} & =
\begin{bmatrix}
\boldsymbol{A}_3 & \boldsymbol{A}_4
\end{bmatrix}\text{,} \\
\boldsymbol{N} & =
\begin{bmatrix}
\boldsymbol{A}_1 & \boldsymbol{A}_2 & \boldsymbol{A}_5
\end{bmatrix}\text{.}
\end{align}
</math>
Correspondingly,
:<math>
\begin{align}
\boldsymbol{x} & =
\begin{bmatrix}
0 & 0 & 5 & 5 & 0
\end{bmatrix}^{\mathrm{T}}\text{,} \\
\boldsymbol{\lambda} & =
\begin{bmatrix}
0 & -4/3
\end{bmatrix}^{\mathrm{T}}\text{,} \\
\boldsymbol{s_N} & =
\begin{bmatrix}
2/3 & 11/3 & 4
\end{bmatrix}\text{.}
\end{align}
</math>
A positive {{math|'''''s<sub>N</sub>'''''}} indicates that {{math|'''''x'''''}} is now optimal.
==Practical issues==
|