Introduce surplus variables , slack , and artificial variables , all nonnegative. The two-phase simplex standard-form equations are
Phase I maximizes . An initial basic feasible solution has basic variables and all others zero. Its simplex dictionary is
Let enter. The simplex ratio test gives from the row and from the row, so leaves. After this pivot,
Choose to enter; the limiting ratios are and , so leaves. The resulting dictionary is
Thus , attained at with . Since for every feasible Phase I point, this proves feasibility and completes Phase I.
Delete the artificial variables and restore the original objective . The resulting Phase II dictionary is
Let enter; only decreases, and it reaches zero at . Pivoting gives
An optimal simplex tableau, with each row recording its equality, is
Both reduced costs in the maximization dictionary are negative. Setting nonbasic therefore gives
As a direct optimality check, implies ; the displayed point attains both equalities.
Use the original PDF: the objective is , and the second constraint has coefficient on . The TeX transcription corrupts both, as well as the nonnegativity condition. Introduce surplus variables , slack variables , and artificial variables , all nonnegative. The two-phase simplex Phase One problem is
The initial basis has values , and its objective dictionary is . Enter : the ratio test makes leave at . The resulting dictionary includes
with . Enter next; leaves at . Now
and . Enter ; the ratio test makes leave at . This produces , , , with both artificial variables zero. Since always, the Phase One minimum is zero, proving feasibility and providing an original-variable basis.
Delete the artificial columns. The starting Phase Two dictionary is
Enter , whose reduced gain is positive. Only decreases, and it leaves at step one. Eliminating gives the optimal dictionary
Equivalently, with row equations written as the displayed coefficients times the variables equal to the right-hand side, the optimal simplex tableau is
The objective row represents . Nonnegative nonbasic variables cannot improve the objective, so reading them as zero proves
Both nonbasic reduced costs are strictly unfavorable, so this optimal point is unique.
Use two-phase simplex to handle the constraint of the opposite inequality direction. Introduce nonnegative slack variables , a surplus variable , and an artificial variable . The equality constraints are
For Phase I maximize , initially with basis . Its initial simplex dictionary is
Choose to enter. The simplex ratio test compares , and , so leaves. The new dictionary is
Since , choose to enter. Its limiting ratios are from and from , so leaves. This gives
Now , so let enter. Its limiting ratios are from and from ; the artificial variable leaves. The simplex dictionary becomes
Setting all nonbasic variables to zero gives , a feasible original basis. Since , Phase I is optimal with value zero; delete .
For Phase II the original objective in this basis is
All nonbasic reduced costs are strictly negative, so no further improving simplex pivot exists. As the nonbasic variables are nonnegative, the dictionary also directly certifies , with equality only when . Therefore
The second original constraint has slack five and the other two are tight. As an independent linear programming optimality certificate, multiply the first constraint by and the third, after reversing it, by . This gives , and subtracting proves the same upper bound for the objective.
Use the PDF's first constraint, ; the TeX aid substitutes a different inequality. Introduce a surplus , slacks , and one artificial variable , all nonnegative. The initial simplex dictionary is
The initial basis is , with values . In two-phase simplex, Phase I maximizes . We use the Bland pivoting rule: the smallest-index nonbasic variable with positive reduced cost enters, and among minimum-ratio ties the smallest-index basic variable leaves.
First enters. The ratios for are , so leaves in a degenerate pivot. The resulting dictionary is
Next enters. It reduces and with ratios and , while increases. Thus leaves. The Phase I maximum is , with a feasible original basis; remove and obtain
In Phase II the original objective is . Bland's rule makes enter, and leaves at ratio . This gives
Finally enters. The decreasing basic variables have ratios and , so leaves. The final tableau, with the basic columns suppressed, is
Each row means its row variable plus the displayed nonbasic terms equals the right side. Since , no nonnegative choice of nonbasic variables improves the objective. Thus
The slacks are , .
A different entering rule is faster here. Selecting the largest eligible index in the initial Phase I objective makes enter and leave. The dictionary then has and . Entering makes leave at , directly reaching the final original basis . Hence two pivots suffice instead of Bland's four, and Phase II needs no further pivot. This comparison concerns this instance, not a general superiority of that entering rule.