# What to do about equality constraints in the Simplex Tableau method

The question I've got is: Maximise $$2x-y+3z$$ subject to $$2y+z \leq 2$$ $$x+y+z=4$$ $$x-2y+z \geq 3$$ $$x,y,z \geq 0$$

Using the Simplex Tableau method. I know that for $\leq$ constraints you need slack variables, for $\geq$ you need slack and artificial variables, but what are you supposed to do with the equality constraint? I read a lecture online where it said convert it to both a $\leq$ and a $\geq$ constraint, so in this case we would have: $$x+y+z=4$$ can be written as $x+y+z\leq 4$ and $x+y+z\geq 4$ but then it went onto say that we could just neglect the second constraint which would yield $-x-y-z\leq 4$.

Could anyone give anymore clarification if this is indeed correct and if so, why we get the final result from the two inequalities?

To get an optimal solution, it is necessary to have a basic solution as a starting point. This means, that the number of constraint must be equal to the number of basic variables. Thus every constraint have to have a positive slack variable or a positive artificial variable. If the slack variable is negative or is not needed, then you add an artificial variable.

There are three cases:

$\color{blue}{\leq-\texttt{constraint}}$

If you have a $\leq$-constraint, then you have to add a slack variable for each constraint.

$2y+z \leq 2 \quad \Longrightarrow \quad 2y+z +s_1=2$

$\color{blue}{=\texttt{-constraint}}$

If you have a $=$-constraint, then you do not have to add a slack variable for each constraint. But you have to add an artificial variable for each constraint.

$x+y+z=4 \quad \Longrightarrow \quad x+y+z+a_1=4$

$\color{blue}{\geq-\texttt{constraint}}$

If you have a $\geq$-constraint, then you have to substract a slack variable for each constraint. Additionally you have to add an artificial variable for each constraint.

$x-2y+z \geq 3 \quad \Longrightarrow \quad x-2y+z-s_2+a_2 = 3$

The initial simplex tableau is

$\begin{array}{|c|c|c|c|c|c|c|c|} \hline x & y & z & s_1 & s_2 & a_1 & a_2 & RHS \\ \hline -2 & 1 & -3 & 0 & 0 & 0 & 0 & 0 \\ \hline 0 & 2 & \color{red} 1 & 1 & 0 & 0 & 0 & 2 \\ \hline 1 & 1 & 1 & 0 & 0 & 1 & 0 & 4 \\ \hline 1 & -2 & 1 & 0 & -1 & 0 & 1 & 3 \\ \hline \end{array}$

The coefficients of the objective function have to be multiplied by (-1), because the objective function has to be maximized.

The initial basic solution is $(x, y, z, s_1, s_2, a_1, a_2)=(0, 0, 0, 2, 0, 4, 3)$

The first pivot element is the red One.

• What means RHS? – FabianoLothor Mar 21 '18 at 1:37
• @FabianoLothor Right hand side. The term of an equation which is located right of the equalitiy sign. – callculus Mar 21 '18 at 7:22
• Thanks @callculus! I'm developing an app to resolve simplex problems using the bigM method. – FabianoLothor Mar 21 '18 at 17:40
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "url": "https://math.stackexchange.com/questions/1309040/what-to-do-about-equality-constraints-in-the-simplex-tableau-method", "fetch_time": 1580187204000000000, "content_mime_type": "text/html", "warc_filename": "crawl-data/CC-MAIN-2020-05/segments/1579251773463.72/warc/CC-MAIN-20200128030221-20200128060221-00351.warc.gz", "warc_record_offset": 549264904, "warc_record_length": 30841, "token_count": 892, "char_count": 2821, "score": 4.09375, "int_score": 4, "crawl": "CC-MAIN-2020-05", "snapshot_type": "latest", "language": "en", "language_score": 0.8478103876113892, "file_path": "/sailhome/yjruan/project/latent-lm/data/processed/finemath-4plus/finemath-4plus/train-00013-of-00064.parquet"}