Converting Linear Programs to Standard Form
What you will be able to do
Given a linear program stated with any mix of maximization or minimization, inequality or equality constraints, and sign-restricted or free variables, the learner can produce an equivalent standard-form program with a minimization objective, equality constraints, and all variables nonnegative, without a conversion checklist in view.
Orientation
In this course, standard form means a minimisation, with equality constraints, and every variable nonnegative. The definition can arrive immediately because the reason to want it is already familiar: the simplex method's basis, its reduced costs and its optimality test are all defined for that shape, so it is the representation in which those objects exist at all.
Other texts fix a maximisation, or admit inequalities, and call that standard form. None is more correct. A conversion is only well defined once the target is named.
Intuition
Why algorithms assume one canonical form
Standard form is a convention, not a restriction on which problems can be solved.
The simplex method is described in terms of a system of equations with nonnegative variables, because that is the setting in which a basis and a basic feasible solution are defined. Rather than restate the method for every possible arrangement of constraints, the program is rewritten once into the shape the method expects.
Nothing about the underlying problem changes. The conversion adds bookkeeping variables and may flip the sign of the reported objective value, but the feasible decisions and which of them are best are preserved.
Definition
Why the three conditions are the three conditions
The definition above names three conditions. Each earns its place by what the simplex method needs, and none is arbitrary.
Equality constraints exist so a basis exists. A basis is a choice of
Nonnegativity exists so a corner exists. Basic feasible solutions are the corners of the feasible region, and a variable is "at a corner" precisely when it sits at its bound of zero. Without
Minimization exists only for uniformity. Unlike the other two this one changes nothing structural; it means the optimality test can be stated once, with a single sign convention for reduced costs, rather than twice.
Why failing one condition is failing. The three are not a checklist where two out of three is nearly there. A program with equalities and nonnegative variables but a maximization objective will run through the algorithm and return the wrong sign. One with a minimization and equalities but a free variable has no basis at all for the simplex method to start from.
Note also what the definition does not require: it says nothing about
Procedure
Conversion steps
Apply these four steps in order. Each addresses one of the three standard-form conditions.
Objective direction. If the objective is
Less-than-or-equal constraints. For
The slack measures unused capacity in that constraint.
Greater-than-or-equal constraints. For
The surplus measures the amount by which the requirement is exceeded.
Variables whose restriction is not simple nonnegativity. A variable unrestricted in sign, bounded below by a nonzero constant, or restricted to be nonpositive needs a substitution rather than an added variable: the unit on transforming the variables gives the substitution for each case, the constant a shift leaves in the objective, and the rule for recovering the original value afterwards.
After the substitutions, check that every variable in the program, original, slack, surplus, and substituted, carries a nonnegativity restriction.
Worked example
A program needing all four steps
Problem. Convert to standard form:
Goal. Produce an equivalent program that is a minimization, has only equality constraints, and has only nonnegative variables.
Relevant principle. Each standard-form condition is addressed by one transformation, and each transformation must be applied everywhere the affected quantity appears.
Step 1: objective direction. The objective is a maximization, so negate it: minimize
Reason: minimizing the negation selects the same
Step 2: the
Reason: the slack absorbs the difference between the left side and the bound.
Step 3: the
Reason: the surplus is subtracted, because the left side is at least the bound and the excess must be removed to reach equality.
Step 4: the sign-unrestricted variable.
Result.
subject to
Check. The objective is a minimization; both constraints are equalities; all five variables are nonnegative. All three conditions hold.
Interpretation. If this program has minimum value
Contrast
Slack and surplus are not interchangeable
The sign on the introduced variable is determined by the direction of the inequality, and getting it wrong changes the feasible set.
Correct.
Incorrect.
Why the second fails: with
The reliable check is directional: a
Warning
Where conversions go wrong after the signs are right
The slack-and-surplus sign is the famous trap and it is treated on its own. These are the ones that survive getting that right.
A substitution applied in some places but not others. Replacing a free
A variable left without a nonnegativity restriction. Standard form requires it of every variable in the final program, introduced ones included. It is easy to convert all the constraints, introduce slacks and surpluses, and never state that they are nonnegative, at which point the program is not in standard form and the basis the simplex method expects does not exist.
The objective value reported without its sign flipped back. Maximizing
A shifted lower bound whose constant is dropped. Substituting
Each of these leaves a program that is feasible, solvable and wrong. Standard form is a claim that the converted program has the same answer as the original, and that claim is what has to be checked, not merely that the result looks like standard form.
Check your understanding
Two conversions, with less help each time
The worked conversion above showed all four steps. Here the scaffolding is removed a piece at a time.
First: the steps are named, you supply them.
(a) Is the objective already a minimization? (b) Which constraint needs a surplus, and which a slack? (c) Write the converted program and confirm every variable is nonnegative.
Answer: the objective is untouched;
Then: no steps named.
Convert it, then say how the original optimal value is recovered from the converted one.
Answer: negate the objective to
Recovering the value takes both corrections: the shift contributed