Learn
Lesson · Linear Programming Models · Keeping it linear

Reformulations That Keep Linearity

Four requirements that look non-linear are linear after an auxiliary variable is introduced, and all four are the same argument: the rewrite is legal exactly when the direction of optimisation forces the auxiliary variable to the value you intended. Flip the direction and three of the four stop being about the original problem at all — which is something a reader can detect, by solving both and subtracting.

x free x = x⁺ − x⁻, x⁺, x⁻ ≥ 0 |x| minimised |x| = x⁺ + x⁻ at least one is pushed to 0 min of a max t ≥ every piece, minimise t a rising price one variable per band, the cheaper band fills first legal ⇔ the direction of optimisation forces the auxiliary value the check: original by corners − rewrite by simplex = 0
Four rewrites, one condition

Core ideas

What this lesson establishes

There is one idea here and it is repeated four times. The four cases are practice at the same argument, not four things to memorise.

1

An auxiliary variable is a claim about where the optimiser will push it

Adding t with the rows t ≥ piece₁ and t ≥ piece₂ does not make t the larger piece; it makes t at least the larger piece. Minimising t squeezes it down onto that piece, and only then is the rewrite an equality in disguise.

2

Flip the direction and the same rows say something else

Maximise t in that model and nothing above it stops it climbing: the programme is unbounded while the original still has a finite answer at a corner. The rows did not change — the claim about where the optimiser pushes t did.

3

Two methods that never look at each other are the only evidence worth having

The lab optimises the original by enumerating the corners of each part of the region where one piece is the one that counts, and the rewrite by the simplex engine. Subtracting the two answers is a test that can fail, which is why it is worth running.

The material

Four rewrites, and the direction that makes each one legal

A free variable, an absolute value, a smallest largest piece, and a cost quoted in two bands — with the condition stated each time.

The rewrites below sit on one region: x + y ≤ 8, x ≤ 5, y ≤ 6 and 2x + 3y ≥ 12. For the first three, x is free to go negative as far as −4; for the price-band rewrite it is held at or above zero, because a quantity bought under a price schedule cannot be negative. What changes between them is the objective, and what each rewrite does is trade a non-linear objective for extra variables and extra rows.

A free variable, as a difference

Definition · Splitting a free variable

A variable x with no sign restriction is carried as x = x⁺ − x⁻ with x⁺ ≥ 0 and x⁻ ≥ 0. Every occurrence of x in every row and in the objective is replaced by that difference.

Any pair with the right difference gives the same objective value, so nothing needs to push either part anywhere in particular. This is the one rewrite of the four that is legal whichever way the objective is pushed.

With the objective 3x + 2y minimised, the answer is 3 at x = −3, y = 6, and the rewrite reports x⁺ = 0, x⁻ = 3: the negative value is carried by the second part. Maximised, the answer is 21 at (5, 3) with x⁻ = 0. Both agree with the original exactly, which is what “legal in either direction” means in practice.

An absolute value, when it is minimised

The same two parts serve for |x|, as their sum rather than their difference. That sum is |x| only when at least one of x⁺ and x⁻ is zero, because otherwise both could be inflated together without changing x. Minimising a non-negative multiple of x⁺ + x⁻ does push one of them to zero. Maximising does the opposite.

Example · The same rows, read twice

Minimise 2|x| + 5y: the original is 40/3 at (5, 2/3) by corner enumeration, the rewrite is 40/3 by the simplex engine with x⁺ = 5 and x⁻ = 0, and the difference is exactly zero. Now maximise the same expression: the original is 36 at (−3, 6) and the rewrite is unbounded, because x⁺ and x⁻ climb together for ever with nothing to stop them. A reader who only ran the rewrite would have no way to notice.

The smallest largest piece

Theorem · The epigraph rewrite

Let f(x) = max(p₁(x), p₂(x), …) with each pᵢ linear. Then minimising f over a region is the same problem as minimising t over the same region with the rows t ≥ pᵢ(x) added, one per piece, and t free.

The rows make t at least every piece, so t ≥ f(x) at every feasible point, and minimising cannot leave t above f(x). Maximising can and does: the rewritten programme is then unbounded, and it is a different problem rather than a worse answer to this one.

Minimise max(2x + y, −x + 5y) on the region and both routes report 132/17, at x = 48/17, y = 36/17, with t = 132/17 sitting exactly on the two pieces where they cross. The fraction is worth noting: the corner that wins is the crossing of the boundary of the region with the line where one piece overtakes the other, and nothing about it rounds.

A cost quoted in two price bands

Suppose the first 3 units of x cost 2 each and every unit after that costs 5. Split the quantity into one variable per band, cap the first at 3, and price them separately. A minimiser fills the cheaper band first — and the cheaper band is the earlier one only when the later band costs more. That condition is convexity, and it is the condition rather than the background.

Example · A falling price, and a cost no quantity achieves

Quote the first 3 units at 5 each and everything after at 2. The true cheapest cost on this region is 16, at (0, 4). The band model reports 38/3, with x(1) = 0 and x(2) = 5: it has bought five units out of the second band without filling the first, which the price schedule does not allow. The model is not a worse answer to the question; it is a cheaper answer to a question with no cost schedule behind it.

So the rule to carry away is not “these four tricks work”. It is that an auxiliary variable comes with a sentence — what forces it to the value I intend — and that the sentence is checkable by solving the original some other way and subtracting.

Interactive

The same problem, written twice

An auxiliary variable is legal exactly when the direction forces its value

The same problem, written twiceCorners of the original against a tableau of the rewrite
the feasible regiona boundarywhere one piece overtakes anotherthe original's best corner

Method

Checking a rewrite before trusting it

The first two steps are the argument and the last two are the evidence. Skipping the evidence is how an illegal rewrite ships.

1

Name the auxiliary variables and what each is supposed to equal

t is supposed to be the largest piece; x⁺ + x⁻ is supposed to be |x|. Writing the intention down is what makes the next step possible.

2

Say what forces that value, in one sentence about the direction

“Minimising t squeezes it onto the largest piece.” If the sentence needs the objective to be pushed the other way, the rewrite is legal the other way and not this way.

3

Solve the original by some other means

In two variables, enumerate the corners — and on a piecewise objective, the corners of each part on which one piece is the one that counts, because the objective is linear on each of those.

4

Subtract, and treat a non-zero difference as a different problem

Zero is the only acceptable answer. A rewrite that reports a better objective value than the original has not improved anything; it has escaped the constraints of the question.

Rewrites and the direction that licenses them

Score 0 / 0

Minimise the larger of two expressions, then maximise it

One model, two directions. The first is a legal rewrite and the second is a different problem, and the only visible difference is which way the objective is pushed.

the region x + y ≤ 8, x ≤ 5, y ≤ 6, 2x + 3y ≥ 12, x ≥ −4 (x free), y ≥ 0 the objective max(2x + y, −x + 5y), to be minimised the rewrite minimise t t − 2x − y ≥ 0 t is at least the first piece t + x − 5y ≥ 0 t is at least the second piece t free the original, by corners of each part where piece 1 counts (48/17, 36/17) → 132/17 (5, 2/3) → 32/3 (32/7, 24/7) → 88/7 (5, 3) → 13 where piece 2 counts (−3, 6) → 33 (2, 6) → 28 smallest of them 132/17 the rewrite, by simplex 132/17 at x = 48/17, y = 36/17, t = 132/17 the two, subtracted 0 now maximise the same objective the original, by corners 33 at (−3, 6) the rewrite, by simplex unbounded: nothing holds t down the two, subtracted there is no comparison to make

The minimised pair agree to the last fraction, and they were computed by different methods on different models. The maximised pair do not agree at all, and the reason is one sentence: minimising t squeezes it onto the largest piece, and maximising t lets it float away from every piece at once.

For a faded rehearsal, take the absolute-value rewrite with the same region and the objective 2|x| + 5y. The supplied first move is the pieces: |x| is the larger of x and −x, so 2|x| + 5y is the larger of 2x + 5y and −2x + 5y. Minimise it both ways — by the corners of the two parts, and by the split model — then flip to maximise and say, before running anything, which of the two will report a finite answer.

Common mistakes

1
Assuming a rewrite works in either directionThree of the four here do not. Applied to a maximised maximum, or to |x| in a maximised objective, the optimiser pushes the auxiliary variable the other way and the programme becomes unbounded or reports a value the original cannot reach. The detection is cheap: solve the original another way and subtract.
2
Treating a better objective value as good newsA rewrite that beats the original has not found a better plan — it has dropped part of the question. The falling-price band model reports 38/3 against a true 16 by buying out of a band it never filled, and nothing in the arithmetic objects.
3
Leaving the convexity condition unstated in the price-band rewriteSegments fill in order only when each later segment costs more than the one before. That is a condition on the data, not a property of the modelling trick, and a schedule with a volume discount in it fails it. Say the condition when you write the model, and check it against the prices in front of you.

Check your understanding

✓
Finish when every auxiliary variable you introduce arrives with a sentence about the direction.

You should be able to rewrite an absolute value and a min-max objective as linear programmes, say what forces each auxiliary variable to its intended value, solve the original another way, and read a non-zero difference as the rewrite being a different problem.

Note: Deviation variables in “Goal Programming and Deviation Variables” are the same idea once more, with a twist: there are two of them per target, only the one you mind is penalised, and the direction argument is what keeps the other from absorbing it.

Kept in this browser only, for you. Nothing is sent anywhere and nothing checks it. Carry it to another device.

Feedback and recommendations

Something to change about this lesson? Write it down, tick it off when it is handled, and export the list when you want to act on it. Kept in this browser only: nothing is sent anywhere, and nobody is notified.

No recommendations yet for this lesson.