Module 5 of 6 · Lesson 1 of 4

Reduced Costs and the Optimality Test

What you will be able to do

Given a minimization program in standard form and a specified basis, the learner can compute the reduced cost of each nonbasic variable and determine whether the corresponding basic feasible solution is optimal, without a formula sheet.

Orientation

A variable's cost coefficient tells you what it costs directly. It says nothing about what the basic variables must give up to accommodate it, which is the number that actually decides whether bringing it in helps.

This is the test the simplex method runs at every iteration. The previous unit established that the search can be confined to corners; this one supplies the stopping rule. Without it an algorithm could move between corners forever with no way to recognize that it has arrived.

The reduced cost also answers a question worth asking on its own: what would it actually cost to start using a variable currently held at zero.

This unit assumes you can identify a basis and its basic feasible solution, and that you can invert a small matrix or solve a small linear system.

Intuition

Reduced cost as direct plus indirect effect

A nonbasic variable sits at zero. Ask what happens if you raise it to one.

Two things change, not one.

The direct effect is the obvious one: the objective picks up c j , the variable's own cost coefficient.

The indirect effect is the one that is easy to forget. The constraints A x = b still have to hold. Raising x j consumes resources, so the basic variables must shift to compensate, and those shifts have costs of their own.

The reduced cost is the sum of both effects. It is the net change in the objective per unit of x j , after the compensating adjustment has been paid for.

That is why a variable with an attractive-looking coefficient can still be a bad move: the adjustment it forces may cost more than the variable saves. And it is why the optimality test looks at reduced costs rather than at the cost vector directly.

Figure

Objective change along two edges leaving one vertex

Two edge directions from one vertex, one improving and one not

Minimising − x 1 + x 2 over 2 x 1 + x 2 ≤ 12 and x 1 + 2 x 2 ≤ 12 , standing at the origin with both slacks basic.

Two nonbasic variables can be raised from zero, and each raise travels along one edge of the region.

Raising x 1 moves right, in green, crossing to lower objective contours. The rate of change along that edge is the reduced cost c ¯ 1 = − 1 < 0 , so the move improves the objective and x 1 is a candidate to enter.

Raising x 2 moves up, in red, crossing to higher contours: c ¯ 2 = + 1 > 0 , and the move is worse. A minimisation stays put.

So the reduced cost is a directional rate, and the direction is not arbitrary: it is the edge the basis produces when that one variable is allowed off its bound, with the basic variables adjusting to keep A x = b . That adjustment is the indirect effect, and it is why c ¯ j is c j minus y T A j rather than c j alone.

The optimality test reads the same way: if every edge leaving the vertex goes uphill, every c ¯ j ≥ 0 , there is nowhere better to go from here. Here one such edge exists, the green one, so the origin is not optimal.

Two variables in two dimensions is the readable case. With more variables the picture stops being drawable, while the arithmetic is unchanged.

Definition

Reduced cost and the optimality condition

Let the program be

min c T x subject to A x = b , x ≥ 0 ,

and let B be a basis with basic columns A B and basic costs c B .

Reduced cost. For each variable j ,

c ¯ j = c j − c B T A B − 1 A j .

Writing y T = c B T A B − 1 , this is c ¯ j = c j − y T A j . The vector y is the dual vector associated with the basis, and y T A j is exactly the indirect cost described above.

Basic variables carry no information. For j ∈ B the column A j is a column of A B , so A B − 1 A j is a unit vector and

c ¯ B T = c B T − c B T A B − 1 A B = 0 .

Every basic variable has reduced cost zero by construction. Only the nonbasic ones are informative.

Optimality condition. If c ¯ j ≥ 0 for every j , the current basic feasible solution is optimal for the minimization program.

The reasoning is direct: any feasible move raises some nonbasic variable, each unit of which changes the objective by that variable's reduced cost. If no reduced cost is negative, no available move lowers the objective.

Procedure

Computing reduced costs and testing optimality

Given a standard-form minimization program and a basis B :

Assemble the basis data. Collect the basic columns into A B and the corresponding cost entries into c B , in the same order.

Form the dual vector. Solve

y T = c B T A B − 1 ,

which in practice means solving A B T y = c B rather than inverting A B explicitly.

Compute one reduced cost per nonbasic variable. For each j ∉ B ,

c ¯ j = c j − y T A j .

Basic variables can be skipped: their reduced costs are zero by construction.

Apply the test. If every c ¯ j ≥ 0 , the current basic feasible solution is optimal; stop. If some c ¯ j < 0 , that variable is a candidate to enter the basis, because each unit of it lowers the objective by | c ¯ j | .

Check the objective sense before concluding. This test is stated for minimization. For a maximization program, either convert to minimization first or reverse the condition; applying the minimization rule unchanged inverts the answer.

Worked example

Testing a basis for optimality

Problem. For the program

min 3 x 1 + 2 x 2 + 0 x 3 + 0 x 4

subject to

x 1 + x 2 + x 3 = 4 , x 1 + x 4 = 2 , x 1 , x 2 , x 3 , x 4 ≥ 0 ,

decide whether the basis B = { 3 , 4 } is optimal.

Goal. Compute the reduced costs of the nonbasic variables x 1 and x 2 and apply the test.

Relevant principle. A basis is optimal for a minimization program when no nonbasic variable has a negative reduced cost.

Step 1: assemble the basis data.
A 3 = ( 1 , 0 ) T and A 4 = ( 0 , 1 ) T , so A B = I . The basic costs are c 3 = 0 and c 4 = 0 , so c B = ( 0 , 0 ) T .
Reason: the slack columns happen to form an identity basis, which makes this the natural starting basis.

Step 2: form the dual vector.
y T = c B T A B − 1 = ( 0 , 0 ) I = ( 0 , 0 ) .
Reason: with zero basic costs there is no indirect cost to account for at this basis.

Step 3: reduced costs of the nonbasic variables.

c ¯ 1 = c 1 − y T A 1 = 3 − ( 0 , 0 ) ( 1 1 ) = 3 ,
c ¯ 2 = c 2 − y T A 2 = 2 − ( 0 , 0 ) ( 1 0 ) = 2 .

Step 4: apply the test.
Both reduced costs are positive, and the basic variables have reduced cost zero. No nonbasic variable is negative, so the basis is optimal.

Check. The basic solution here is x 3 = 4 , x 4 = 2 , with x 1 = x 2 = 0 , giving objective value 0 . Since all costs are nonnegative and all variables are constrained to be nonnegative, the objective cannot fall below 0 . The test agrees with what direct reasoning gives.

Interpretation. Both x 1 and x 2 cost something to use and neither improves the objective, so leaving them at zero is optimal. Had c 1 been negative, c ¯ 1 would have been negative too and x 1 would have been worth bringing in.

Contrast

The cost coefficient is not the reduced cost

Reading c j in place of c ¯ j is the most common way this test goes wrong, and it produces confident wrong answers in both directions.

Take

min 1 x 1 + 4 x 2 subject to x 1 + x 2 + x 3 = 3 , x 1 + x 4 = 1 , x ≥ 0 ,

with c = ( 1 , 4 , 0 , 0 ) T , and consider the basis B = { 2 , 1 } in that order.

Then

A B = ( 1 1 0 1 ) , c B = ( 4 1 ) , A B − 1 = ( 1 − 1 0 1 ) .

The dual vector is

y T = c B T A B − 1 = ( 4 , 1 ) ( 1 − 1 0 1 ) = ( 4 , − 3 ) .

Now the nonbasic variable x 3 has c 3 = 0 and A 3 = ( 1 , 0 ) T :

c ¯ 3 = 0 − ( 4 , − 3 ) ( 1 0 ) = − 4 .

The coefficient says zero; the reduced cost says − 4 . A variable that appears free in the objective is in fact the most improving move available, because bringing it in relieves the basis of expensive adjustments.

The error runs the other way too: a variable with a small positive c j can have a positive reduced cost large enough to rule it out, or a variable with a negative c j can have a positive reduced cost once the compensating adjustment is priced in.

The reliable rule is that c j alone is never sufficient. The reduced cost depends on the basis, so it must be recomputed whenever the basis changes. The same variable will have different reduced costs at different corners.

Next step

Practice Reduced Costs and the Optimality Test

Practice records what support you used, so the evidence reflects how you actually performed.

Practice this lessonSkip to One Iteration of the Simplex Method

Results update as you type. Use the up and down arrow keys to move between results, Enter to open one, and Escape to close.

Type to search.

Settings

Appearance

Interface density

Your record

Your progress is stored in this browser and nowhere else: an identifier, the answers you have given, the mastery states and review schedule derived from them, and the lesson you last opened. Clearing it makes you a new learner on this device. It cannot be undone, and it will not affect your appearance or density settings.

Focus timer

Focus--minutes remaining

Phase

Kept in this browser only, and used to label the session in your own history.

Today

Nothing recorded yet. Finish a focus session and it will appear here.

Settings

Focus sessions between long breaks.

Sessions you are aiming for in a day.

Notifications

Your history

Sessions are stored in this browser and nowhere else. They are not evidence and never reach your mastery record.