-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlatex.tex
More file actions
1 lines (1 loc) · 2.69 KB
/
latex.tex
File metadata and controls
1 lines (1 loc) · 2.69 KB
1
\documentclass{article}\usepackage{amsmath}\begin{document}\title{Simplex Method}\maketitle\begin{flushleft}\textbf{Problem}\end{flushleft}\begin{flushleft}Given the following linear system and objective function, find the optimal solution.\end{flushleft}\begin{equation*}\max{ 2x_1 + 3x_2 + x_3 } \\ \end{equation*}\[\left\{\begin{array}{c} x_1 + x_2 + x_3 $\leq$ 40 \\ 2x_1 + x_2 - x_3 $\leq$ 10 \\ - x_2 + x_3 $\leq$ 10 \\ \end{array}\right.\]\begin{flushleft}\textbf{Solution}\end{flushleft}\begin{flushleft}Add slack variables to turn all inequalities to equalities.\end{flushleft}\[\left\{\begin{array}{c} x_1 + x_2 + x_3 + s_1 = 40 \\ 2x_1 + x_2 - x_3 + s_2 = 10 \\ - x_2 + x_3 + s_3 = 10 \\ \end{array}\right.\]\begin{flushleft}Create the initial tableau of the new linear system.\end{flushleft}\begin{equation*}\begin{bmatrix}\begin{array}{cccccc|c}x_1 &x_2 &x_3 &s_1 &s_2 &s_3 &b \\ \hline1 & 1 & 1 & 1 & 0 & 0 & 40 \\2 & 1 & -1 & 0 & 1 & 0 & 10 \\0 & -1 & 1 & 0 & 0 & 1 & 10 \\ \hline-2 & -3 & -1 & 0 & 0 & 0 & 0 \\\end{array}\end{bmatrix}\begin{array}{c}\\s_1 \\s_2 \\s_3 \\\\\end{array}\end{equation*}\begin{flushleft}There are negative elements in the bottom row, so the current solution is not optimal. Thus, pivot to improve the current solution. The entering variable is $x_2$ and the departing variable is $s_2$.\end{flushleft}\begin{flushleft}Perform elementary row operations until the pivot element is 1 and all other elements in the entering column are 0.\end{flushleft}\begin{equation*}\begin{bmatrix}\begin{array}{cccccc|c}x_1 &x_2 &x_3 &s_1 &s_2 &s_3 &b \\ \hline-1 & 0 & 2 & 1 & -1 & 0 & 30 \\2 & 1 & -1 & 0 & 1 & 0 & 10 \\2 & 0 & 0 & 0 & 1 & 1 & 20 \\ \hline4 & 0 & -4 & 0 & 3 & 0 & 30 \\\end{array}\end{bmatrix}\begin{array}{c}\\s_1 \\x_2 \\s_3 \\\\\end{array}\end{equation*}\begin{flushleft}There are negative elements in the bottom row, so the current solution is not optimal. Thus, pivot to improve the current solution. The entering variable is $x_3$ and the departing variable is $s_1$.\end{flushleft}\begin{flushleft}Perform elementary row operations until the pivot element is 1 and all other elements in the entering column are 0.\end{flushleft}\begin{equation*}\begin{bmatrix}\begin{array}{cccccc|c}x_1 &x_2 &x_3 &s_1 &s_2 &s_3 &b \\ \hline-1/2 & 0 & 1 & 1/2 & -1/2 & 0 & 15 \\3/2 & 1 & 0 & 1/2 & 1/2 & 0 & 25 \\2 & 0 & 0 & 0 & 1 & 1 & 20 \\ \hline2 & 0 & 0 & 2 & 1 & 0 & 90 \\\end{array}\end{bmatrix}\begin{array}{c}\\x_3 \\x_2 \\s_3 \\\\\end{array}\end{equation*}\begin{flushleft}There are no negative elements in the bottom row, so we know the solution is optimal. Thus, the solution is: \end{flushleft}\begin{equation*}s_1 = 0, s_2 = 0, s_3 = 20, x_1 = 0, x_2 = 25, x_3 = 15, z = 90\end{equation*}\end{document}