My books says to choose the smallest positive ratio between the RHS value and its corresponding coefficient in the pivot column.
Apologies for the screenshots but I'm showing the exact results of a Simplex Calculator online.
The Objective function and constraints:
The solution (+ tableau steps):
In the first Table the pivot column is chosen correctly.. i.e – the most negative column in the last row (the objective function).
However as you can see leading into the second table that the Pivot row that was chosen was the top row. Which doesn't make sense to me since $\frac{1}{1}=1$ but $\frac{-1}{-4}=\frac{1}{4}<1$.
Can someone explain why they chose that pivot?
EDIT – Original Question
Best Answer
Part I: Find a BFS
OP has transformed the LP to this max problem.
\begin{array}{rrr} \max z &= -3y_1 + y_2 - 2y_3 & \\ \text{s.t.} & -2y_1 + y_2 - y_3 \le& 1 \\ & -y_1 \phantom{-y_2} - 2y_3 \le& -2 \\ & 7y_1-4y_2+6y_3 \le& -1 \\ & y_1,y_2,y_3 \ge 0 \end{array}
In the given initial tableau, the problem is actually
$$ \begin{array}{rrrr} \max z =& -3y_1 + y_2 - 2y_3 & & \\ \text{s.t.} & -2y_1 + y_2 - y_3 &+ s_1 =& 1 \\ & -y_1 \phantom{-y_2} - 2y_3 &+ s_2 =& -2 \\ & 7y_1-4y_2+6y_3 &+ s_3 =& -1 \\ & y_1,y_2,y_3,s_1,s_2,s_3 \ge 0 \end{array} \tag{1}\label{1} $$
The computer program handles positive variables, but the RHS shows that the current BFS is $s_1 = 1$, $s_2 = -2$ and $s_3 = -1$. This is the cause of error.
In fact, we should make RHS non-negative.
$$ \begin{array}{rrrr} \max z =& -3y_1 + y_2 - 2y_3 & & \\ \text{s.t.} & -2y_1 + y_2 - y_3 &+ s_1 =& 1 \\ & y_1 \phantom{+y_2} + 2y_3 &- s_2 =& 2 \\ & -7y_1+4y_2-6y_3 &- s_3 =& 1 \\ & y_1,y_2,y_3,s_1,s_2,s_3 \ge 0 \end{array} \tag{2}\label{2} $$
We need to find feasible solution first, so we add two more artificial non-negative variables $u_1$ and $u_2$ to the LP. (To apply simplex method, we can't have negative variables.) Since $u_1$ and $u_2$ aren't in the BFS of the actual problem \eqref{2}, we eliminate them by minimizing $u_1 + u_2$.
\begin{array}{rrrr} \max z= & -u_1 - u_2 & & \\ \text{s.t.} & -2y_1 + y_2 - y_3 &+ s_1 \phantom{+u_1} =& 1 \\ & y_1 \phantom{+y_2} + 2y_3 &- s_2 + u_1 =& 2 \\ & -7y_1+4y_2-6y_3 &- s_3 + u_2 =& 1 \\ & y_1,y_2,y_3,s_1,s_2,s_3,u_1,u_2 \ge 0 \end{array}
The actual intial simplex tableau
Now we've a BFS $y_2 = \frac74$, $y_3 = 1$ and $s_1 = \frac14$.
Part II: Find an optimal BFS
Return to \eqref{2}.
Hence, the optimal solution to \eqref{2} (thus the original LP) is $(y_1,y_2,y_3,s_1,s_2,s_3) = (0,2,1,0,0,1)$ with optimal value 0.