Practice: Contour Lines and the Direction of Improvement

Recognition · Interpretation

For min 3 x 1 + 2 x 2 , in which direction should the contour be pushed?

2 hints available, least help first.

Hint 1: Retrieval cue

Which direction does c point, for any problem?

Hint 2: Concept cue

If moving along c increases the objective, what does a minimisation want?

Direct application · Interpretation · Explanation

For each objective give the contour slope, the coefficient vector, and the direction of travel. Then say what is the same and what differs across the three.

(a) max 4 x 1 + 2 x 2
(b) min 4 x 1 + 2 x 2
(c) max 3 x 1 − x 2

Write your answer, then compare it with the worked solution.

2 hints available, least help first.

Hint 1: Retrieval cue

Write c down first, then decide travel from whether you are maximising or minimising.

Hint 2: Strategy cue

Compare (a) and (b) carefully: which of the three quantities you were asked for actually differs?

Compare with the worked solution

Comparing does not record a result. Judging your own written answer cannot show that you can do this without help.

(a) c = ( 4 , 2 ) . Contours 4 x 1 + 2 x 2 = k have slope − 4 / 2 = − 2 . Maximising, so travel along ( 4 , 2 ) : right and up.

(b) c = ( 4 , 2 ) , identical. Contours identical, slope − 2 . Minimising, so travel against ( 4 , 2 ) : left and down.

(c) c = ( 3 , − 1 ) . Contours 3 x 1 − x 2 = k have slope − 3 / ( − 1 ) = 3 . Maximising, so travel along ( 3 , − 1 ) : right and down.

What is the same. (a) and (b) have exactly the same contour family. The same lines, in the same places, with the same slope. A drawing of one is a drawing of the other.

What differs. (a) and (b) travel in opposite directions along that identical family. Nothing in the drawing distinguishes them; the difference lives entirely in whether the problem maximises or minimises.

What (c) adds. A negative coefficient means improvement involves decreasing a variable. A learner following the habit 'push away from the origin' gets (a) right, (b) wrong, and (c) wrong, and the drawing looks correct in all three cases.

The reliable statement. c points towards increase in every case. Maximise: travel along c . Minimise: travel against c . Read the sign of each coefficient to know what improving means for that variable.

A complete answer does each of these:

  • contours parallel
  • identifies increase direction
  • decides by sign
  • separates contour from constraint

Comparison · Method selection

Maximising 2 x 1 − 5 x 2 , you need to know whether moving along d = ( 2 , 1 ) improves the objective. Which check settles it with least work?

2 hints available, least help first.

Hint 1: Retrieval cue

What quantity gives the change in the objective when you move along d ?

Hint 2: Concept cue

One dot product answers this. What is its sign?

Interpretation

For the objective z = 3 x 1 + 4 x 2 , consider the family of lines 3 x 1 + 4 x 2 = c as c varies.

Select every statement that holds for this family.

Select every option that applies

Every option that applies, and only those. The set is checked as a whole.

Error diagnosis · Explanation · Evaluation

A student solving min 2 x 1 + 3 x 2 over a bounded region writes:

I drew the contour family for the objective. The lines slope down to the right, so the objective increases as you go up and to the right. I slid the contour up and to the right until it last touched the region, and read off the optimum there.

Identify the errors and say what the student should have done.

Write your answer, then compare it with the worked solution.

2 hints available, least help first.

Hint 1: Retrieval cue

Check each of the student's claims separately. Which are true?

Hint 2: Concept cue

Would the contour family look any different if the coefficients were both negated?

Compare with the worked solution

Comparing does not record a result. Judging your own written answer cannot show that you can do this without help.

What is correct. The contours do slope down to the right: c = ( 2 , 3 ) gives slope − 2 / 3 . And moving up and to the right, along c , does increase the objective. Both statements are true.

The error. The problem is a minimisation. Having correctly identified the direction of increase, the student travelled that way. Minimising means travelling against c , down and to the left, until the contour last touches the region. The student has found the point that maximises the objective over the region.

The deeper error: where the direction came from. The student says the slope told them which way the objective increases. It cannot. The family of parallel lines for c = ( 2 , 3 ) and for c = ( − 2 , − 3 ) is identical, same lines, same slope, opposite directions of increase. Orientation is not recoverable from a family of parallel lines. It comes from the coefficient vector, which must be written down separately.

Why nothing looked wrong. The contours were right, the region was right, the sliding was executed correctly, and the answer landed on a genuine corner of the region with a genuine objective value. The output is a well-formed answer to the wrong question, and the drawing offers no signal at all.

What to do instead. Write c = ( 2 , 3 ) explicitly. State the rule in words before sliding: minimising, so travel against c . If any doubt remains about a particular direction d , compute c T d and read the sign, for d pointing down-left, say ( − 1 , − 1 ) , the product is − 5 < 0 , confirming the objective falls that way.

A complete answer does each of these:

  • contours parallel
  • identifies increase direction
  • decides by sign
  • separates contour from constraint

Transfer · Evaluation · Explanation

A linear program in forty variables is being minimised. At the current point, an algorithm considers moving along an edge direction d and computes the single number c T d = − 4 .

Say what this number tells the algorithm, what it would mean if it were + 4 , and what it would mean if it were 0 . Then explain what this quantity corresponds to in the two-variable picture.

Write your answer, then compare it with the worked solution.

2 hints available, least help first.

Hint 1: Retrieval cue

What does c T d measure when you move along d ?

Hint 2: Strategy cue

Remember the problem is a minimisation when deciding whether a negative rate is good news.

Compare with the worked solution

Comparing does not record a result. Judging your own written answer cannot show that you can do this without help.

c T d = − 4 . Moving along d changes the objective at a rate of − 4 per unit step: each unit of movement lowers the objective by 4 . Since this is a minimisation, the direction improves the objective, and the algorithm should move along it, as far as feasibility permits.

If it were + 4 . The objective would rise along d at the same rate, so for a minimisation the direction is not worth taking. The algorithm would look at a different edge.

If it were 0 . The objective would not change along d at all. Moving that way reaches different points of exactly equal value. If the algorithm is at an optimal point, such a direction is the signature of multiple optima; the point reached is another optimal solution.

What it corresponds to in the picture. Exactly the sliding of the contour. In two variables, c T d is the rate at which the contour value changes as you walk along d : negative means walking downhill across the contours, positive means uphill, and zero means walking along a contour without crossing any.

Why this is the point of the unit. In forty variables there is no picture. What survives is that single number, and the whole geometric account has been compressed into its sign. A learner who acquired 'push the contour away from the origin' has nothing to carry here; a learner who acquired 'the sign of c T d decides' has the same competence working unchanged. This quantity is the reduced cost, and the sign convention that makes the optimality test intelligible is precisely this one.

A complete answer does each of these:

  • contours parallel
  • identifies increase direction
  • decides by sign
  • separates contour from constraint
Practice data

Your practice record is stored in this browser only. Clearing it removes every answer and every scheduled review, and cannot be undone.

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.