Artificial Variable Methods

Work in progress. This note is still being written and incomplete.

If the starting basis needs artificial variables, either Big-M or two-phase method should be used.

Big-M Method

Solves the LP in a single simplex run by penalizing artificial variables in the objective.

  • Assign each artificial variable a coefficient M-M in the objective (maximization), where MM is an arbitrarily large positive constant.
  • Run the simplex algorithm normally. The penalty drives artificial variables out of the basis as the objective improves.

Reading the Result

  • Optimal solution
    All artificial variables are 0 in the optimal tableau.
  • Infeasible problem
    At least one artificial variable remains positive (basic with a non-zero value) in the optimal tableau.
  • Unbounded problem
    Detected by the usual minimum ratio test, same as without artificial variables.

Worked Example

minimizez=4x1+x2subject to3x1+x2=34x1+3x26x1+2x24x1,x20(1)\begin{aligned} \text{minimize} \quad & z = 4x_1 + x_2 \\ \text{subject to} \quad & 3x_1 + x_2 = 3 \\ & 4x_1 + 3x_2 \ge 6 \\ & x_1 + 2x_2 \le 4 \\ & x_1, x_2 \ge 0 \end{aligned} \tag{1}

Standard form adds a surplus s2s_2 to the \ge constraint, a slack s3s_3 to the \le constraint, and artificials a1,a2a_1, a_2 to the equality and \ge rows:

3x1+x2+a1=34x1+3x2s2+a2=6x1+2x2+s3=4(2)\begin{aligned} 3x_1 + x_2 + a_1 &= 3 \\ 4x_1 + 3x_2 - s_2 + a_2 &= 6 \\ x_1 + 2x_2 + s_3 &= 4 \end{aligned} \tag{2}

The tableau convention maximizes and stops when all objective row coefficients are 0\ge 0. Minimizing zz means maximizing z-z, so the objective is max zMa1Ma2\max\ -z - M a_1 - M a_2. The natural starting basis is (a1,a2,s3)=(3,6,4)(a_1, a_2, s_3) = (3, 6, 4), read straight off (2)(2).

1 /

entering column leaving row pivot element updated this step

Basis (a1,a2,s3)=(3,6,4)(a_1, a_2, s_3) = (3, 6, 4). But a1,a2a_1, a_2 are basic with a nonzero coefficient MM in the objective row, so it isn’t canonical yet: subtract M×(a1 row)M \times (a_1 \text{ row}) and M×(a2 row)M \times (a_2 \text{ row}) from the objective row to zero them out.

Objective row after eliminating a1,a2a_1, a_2. Its RHS is the value of the maximand z-z; negate it for zz. For large MM the coefficients 47M4 - 7M and 14M1 - 4M are both negative, so not optimal.

Most negative coefficient is 47M4 - 7M, so x1x_1 enters. Minimum ratio is 11 in row a1a_1, so a1a_1 leaves. Pivot element is 33.

Coefficient (15M)/3(-1 - 5M)/3 is the most negative, so x2x_2 enters. Minimum ratio is 1.21.2 in row a2a_2, so a2a_2 leaves. Pivot element is 5/35/3.

Both artificials are non-basic. Only 1/5-1/5 (column s2s_2) is negative, so s2s_2 enters. Minimum ratio is 11 in row s3s_3, so s3s_3 leaves. Pivot element is 11.

All objective coefficients are non-negative and no artificial is basic. Optimal at x1=2/5x_1 = 2/5, x2=9/5x_2 = 9/5, maximand z=17/5-z = -17/5, so z=17/5=3.4z = 17/5 = 3.4.

Two-Phase Method

Uses 2 separate simplex runs, avoiding the arbitrary constant MM.

Phase 1

  • Replace the original objective with minimizing the sum of all artificial variables. This is the same regardless of whether the original problem maximizes or minimizes; the original objective’s direction plays no role in phase 1.
  • Run the simplex algorithm.
  • If the minimum is 0, a basic feasible solution to the original problem was found; proceed to phase 2.
  • If the minimum is positive, the original problem is infeasible. Stop.

Phase 2

  • Drop the artificial variables and restore the original objective. The original direction only matters here: convert a minimization to max z\max\ {-z} to fit the tableau convention, or use a maximization objective as is.
  • Use the phase 1 optimal basis as the starting basic feasible solution: keep the same basic variables and the same rows (with the artificial columns dropped) from the phase 1 final tableau, and only replace the objective row with the restored objective, priced out against those same rows.
  • Run the simplex algorithm to optimize the original objective.

Unbounded and alternate/infinite optimal solutions are detected in phase 2 the same way as in the ordinary simplex algorithm.

Worked Example

Same LP (1)(1) and standard form (2)(2) as the Big-M example.

Phase 1

Objective becomes min a1+a2\min\ a_1 + a_2, i.e. max w\max\ w with w=a1a2w = -a_1 - a_2. The natural starting basis is again (a1,a2,s3)=(3,6,4)(a_1, a_2, s_3) = (3, 6, 4).

1 /

entering column leaving row pivot element updated this step

Basis (a1,a2,s3)=(3,6,4)(a_1, a_2, s_3) = (3, 6, 4). But a1,a2a_1, a_2 are basic with coefficient 11 in the ww row, so it isn’t canonical yet: subtract the a1a_1 row and the a2a_2 row from the ww row to zero them out.

ww row after eliminating a1,a2a_1, a_2: w=9w = -9. Coefficients 7-7 and 4-4 are negative, so not optimal.

Most negative is 7-7, so x1x_1 enters. Minimum ratio is 11 in row a1a_1, so a1a_1 leaves. Pivot element is 33.

Coefficient 5/3-5/3 is negative, so x2x_2 enters. Minimum ratio is 1.21.2 in row a2a_2, so a2a_2 leaves. Pivot element is 5/35/3.

w=0w = 0 and all coefficients are non-negative. Both artificials are non-basic, so (x1,x2,s3)=(3/5,6/5,1)(x_1, x_2, s_3) = (3/5, 6/5, 1) is a basic feasible solution of the original problem.

Phase 2

Drop columns a1,a2a_1, a_2. Restore max z\max\ -z with z=4x1x2-z = -4x_1 - x_2. Carry over the phase 1 final basis (x1,x2,s3)=(3/5,6/5,1)(x_1, x_2, s_3) = (3/5, 6/5, 1), columns x1,x2,s2,s3x_1, x_2, s_2, s_3 only.

1 /

entering column leaving row pivot element updated this step

Basis (x1,x2,s3)=(3/5,6/5,1)(x_1, x_2, s_3) = (3/5, 6/5, 1), carried over from the phase 1 final tableau. But x1,x2x_1, x_2 are basic with nonzero coefficients 44 and 11 in the objective row, so it isn’t canonical yet: subtract 4×(x1 row)4 \times (x_1 \text{ row}) and 1×(x2 row)1 \times (x_2 \text{ row}) to zero them out.

Objective row after eliminating x1,x2x_1, x_2. Coefficient 1/5-1/5 in column s2s_2 is negative, so not optimal.

s2s_2 enters. Minimum ratio is 11 in row s3s_3, so s3s_3 leaves. Pivot element is 11.

All objective coefficients are non-negative. Optimal at x1=2/5x_1 = 2/5, x2=9/5x_2 = 9/5, so z=17/5=3.4z = 17/5 = 3.4, matching the Big-M result.

Written by September 17, 2026 5 min read
Was this helpful?