Applied

The lines the optimum lies under

Change the resources a linear program is given and its best value changes too, tracing a graph. Every solution of the dual is a straight line lying above that graph, and the graph is exactly the lowest of those lines — a bent roof of finitely many planks. Require the answer to be in whole numbers and the roof stays where it was while the graph falls away beneath it in steps, and the space between is the part of the problem no price can see.

Worth reading first: When one of the two numbers is missing · What a constraint is worth.

What a constraint is worth changed one right-hand side of a linear program and watched the optimum respond, and found it piecewise linear, with each piece’s slope equal to a dual variable. When one of the two numbers is missing mapped out what happens at the edges of that — where one side of the theorem stops having an optimum at all. Put together, they suggest looking at the optimum as a function of the whole right-hand side, and asking what the dual is in relation to that function.

The answer is a single picture. Every solution of the dual is a straight line lying above the optimum, and the optimum is the lowest of those lines. The dual is not a second program that happens to reach the same number; it is the collection of planks that the optimum rests against, one of which touches it at every point.

The optimum as the lowest of 3 lines, one per dual vertex. The optimal value of a linear program plotted against one right-hand side, drawn over a family of straight lines, one for each vertex of the dual feasible region. The optimum follows the lowest line throughout.
Fig. 1 The optimum of max3x1+4x2\max\, 3x_1 + 4x_2 subject to 3x1+2x2b13x_1 + 2x_2 \le b_1 and x1+4x210x_1 + 4x_2 \le 10, as b1b_1 runs from 0 to 40 (orange), and one line b1y1+10y2b_1y_1 + 10y_2 for each of the three vertices of the dual region (grey, dashed). At every b1b_1 the optimum is exactly the lowest line; each of the three takes its turn at the bottom, and the corners of the optimum are where the lowest line changes.

One line per dual solution

The argument is weak duality read with the right-hand side left free. The program is to maximise cxc^\top x subject to AxbAx \le b and x0x \ge 0; write v(b)v(b) for its optimum at resources bb. A dual solution is any y0y \ge 0 with AycA^\top y \ge c, and that condition does not mention bb at all. So a single dual solution works for every right-hand side at once, and for every bb weak duality gives

v(b)    by.v(b) \;\le\; b^\top y.

As a function of bb, the right side is linear. So each dual solution is a plank — a straight line in the figure, a plane when both right-hand sides vary — lying on or above the optimum everywhere. Strong duality then says that at every bb some plank touches: the lowest value of byb^\top y over dual solutions equals v(b)v(b). And since a linear function is lowest at a vertex, only the finitely many vertices of the dual region are needed:

v(b)  =  miny a dual vertex  by.v(b) \;=\; \min_{y \text{ a dual vertex}} \; b^\top y.

The figure checks that identity at eighty-one values of b1b_1, exactly. The dual region here has three vertices, so there are three lines; the orange curve runs along the lowest of them, and its two corners, at b1=5b_1 = 5 and b1=30b_1 = 30, are where the lowest line changes. On the first stretch the lowest line is y=(2,0)y = (2, 0), which says that the second constraint is worth nothing there; on the last it is y=(0,3)y = (0, 3), which says the first constraint has stopped mattering; in between both have prices, 45\tfrac45 and 35\tfrac35.

The formula has two consequences that were visible in the earlier sweep and are explained here. The optimum is concave, because the lowest of a family of lines always bends downwards — and concavity has a direct meaning: a mixture of two resource bundles is worth at least the same mixture of their values, since mixing the two optimal plans is a feasible plan for the mixed bundle. And the slopes are the prices, because along each piece the optimum is one of the lines, and a line’s slope in b1b_1 is its y1y_1.

The wedges on which a basis survives

With both right-hand sides free, the planks are planes over the (b1,b2)(b_1, b_2) square and the optimum is a roof made of the lowest of them. Colour each point of the square by which plane is lowest there.

The right-hand sides divided into 3 wedges by the dual's vertices. A square of right-hand-side values for a two-constraint linear program, divided into wedges radiating from the origin, each coloured by the dual vertex that attains the optimum there.
Fig. 2 Every right-hand side (b1,b2)(b_1, b_2) from 0 to 30, coloured by which vertex of the dual region gives the lowest plane there: three wedges, each fanning out from the origin. On each wedge the optimum is one linear function of bb and the same two constraints bind; crossing a boundary is a change of basis.

The regions are wedges from the origin, and that is forced. Doubling every resource doubles every plank’s value, so it cannot change which plank is lowest; the whole picture is unchanged by scaling, and the boundaries must be rays. Economically it says that the pattern of an optimal plan — which constraints are tight, which products are made — depends on the proportions of the resources and not on their scale. Double the supply of everything and the same things are made, twice over.

The one-variable sweep in the first figure is a horizontal line across this square, at b2=10b_2 = 10, and its two corners are where that line crosses the two boundary rays. Every corner in any one-variable sweep is a crossing of this kind. And the prices of a price for every person and task, which were found for one particular assignment problem, are the planks for that problem: each is valid across a whole wedge of possible supplies, and changes only when the proportions cross a boundary.

Diminishing returns, from the shape alone

The roof’s concavity has a reading that economists state as a law and that here is a theorem. Fix every resource but one and add that one a unit at a time. The optimum rises, but by less and less: the slope of each piece is a price, the pieces bend downward, and so each extra unit of the resource is worth no more than the one before. In the first figure the first resource is worth 22 a unit up to b1=5b_1 = 5, then 45\tfrac45 a unit up to 3030, then nothing at all.

Nothing about the particular program forced that; the lowest of any family of lines bends the same way. It is a line under every point turned upside down — a concave function is exactly one lying below a line at every point, touching it there — and the planks are those lines, supplied by the dual. Diminishing returns in a linear model are not an assumption about the world; they are the shape of a minimum of linear functions. A model in which a resource becomes more valuable as it becomes more plentiful cannot be a linear program, and the whole-number staircase, which does have stretches where a unit is worth more than the unit before, is the first place that kind of increasing return appears.

At a corner, a fan of prices

On a wedge the price of each resource is one number. On the boundary between two wedges it is not.

A corner of the optimum, and the fan of dual solutions that touch it. The optimal value of a linear program near a corner in its graph, with several straight lines passing through the corner and lying on or above the graph everywhere. Each line comes from a different optimal solution of the dual.
Fig. 3 Near the corner at b1=5b_1 = 5, where the dual vertices (4/5,3/5)(4/5, 3/5) and (2,0)(2, 0) give equal lines, five supporting lines through the corner. Each is the line of a point on the segment between the two vertices; every one of them is a dual optimum at b1=5b_1 = 5, and their slopes fill the interval from 4/54/5 to 22, between the slopes on either side of the corner.

At b1=5b_1 = 5 two dual vertices tie, and so does every point on the segment between them: all of them are dual solutions, all give the same value at the corner, and all their lines lie on or above the optimum everywhere else. The dual optimum is no longer a point but a segment, and the lines through the corner form a fan.

What that means for the price is concrete. Adding a unit of the first resource at b1=5b_1 = 5 raises the optimum at the rate of the right-hand piece, 45\tfrac45. Removing a unit lowers it at the rate of the left-hand piece, 22. The resource is worth more to lose than to gain, and any number in between is a defensible price — which is why a supplier and a buyer negotiating at a corner have a range to argue over rather than a single answer. The segment of dual solutions is what analysts call the subdifferential of the optimum, and its appearance at a corner is exactly what the degenerate vertices of what a constraint is worth predicted: a corner of the roof is a degenerate vertex of the program.

The same fan is the definition of a supporting line in the function seen from its tangents, where a convex function is recovered from all its tangent lines. Here the optimum is concave rather than convex, the tangents lie above rather than below, and the dual is the Legendre-style description of the optimum by its planks. At a smooth point there is one plank; at a corner there is a fan.

Whole numbers, and a gap no line can see

Now insist that the variables be whole numbers. The feasible region is the same polygon, but only its lattice points are allowed.

A linear optimum of 78/5, and a best whole-number point of 14. The feasible polygon of a two-variable linear program with every whole-number point inside it marked, the fractional optimal corner, the best whole-number point, and the objective's level lines through each.
Fig. 4 3x1+2x2123x_1 + 2x_2 \le 12 and x1+4x210x_1 + 4x_2 \le 10: the linear optimum of 3x1+4x23x_1 + 4x_2 is 78/578/5 at the corner (14/5,9/5)(14/5, 9/5), and the best of the twelve whole-number points is 1414, at (2,2)(2, 2). The dashed lines are the objective’s level lines through both. Every dual solution bounds the fractional corner too, so the best dual bound is 78/578/5 and the gap of 8/58/5 is invisible to it.

The fractional optimum sits at a corner with coordinates 145\tfrac{14}5 and 95\tfrac95, value 785=15.6\tfrac{78}{5} = 15.6. The best whole-number point is (2,2)(2, 2) with value 1414. Any dual solution still gives a valid bound — weak duality never used fractions — but it bounds the fractional corner as well, so the best it can do is 15.615.6. The dual can certify that 14 is within 1.6 of optimal; it cannot certify that 14 is optimal.

Swept across a range of resources, the difference becomes a picture of the whole problem.

The whole-number optimum as a staircase under the linear one. Two optimal values of the same program plotted against a right-hand side: the linear optimum as a concave piecewise-linear curve, and the optimum over whole-number points as a staircase beneath it, with the gap between them shaded.
Fig. 5 The optimum of max3x1+4x2\max\, 3x_1 + 4x_2 with 3x1+2x2b13x_1 + 2x_2 \le b_1 and x1+4x210x_1 + 4x_2 \le 10, once with fractional xx (orange, the lowest dual line) and once with whole-number xx (green steps), for b1b_1 from 0 to 30. The steps meet the orange curve at only 6 of the 121 sampled values and fall up to 3.5 below it.

The whole-number optimum is a staircase: it changes only when enough resource has accumulated to allow one more whole unit of something, and then it jumps. A staircase is not concave, so it cannot be the lowest of any family of lines, and every family of lines lying above it lies above its smallest concave cover. The gap between the staircase and the orange roof is exactly the part of the whole-number problem that linear duality cannot price. Where the steps touch the roof, a dual solution certifies the whole-number answer; everywhere else the certificate is only approximate.

This is the same gap that where the corners stop being whole found in matchings when an odd cycle appears. There the question was whether the polygon’s corners are lattice points; here it is what the dual can see when they are not. Both say the same thing from two sides: when the corners of the feasible region are whole — as they are for assignments and network flows — the staircase coincides with the roof at every whole-number resource level, and duality is exact. When they are not, it is a bound.

The knapsack, where the gap has a shape

The simplest whole-number problem is a knapsack: a handful of items, each with a weight and a value, and a limit on the total weight. Every subset of items is a point, and the whole problem is visible at once.

Every subset of 4 items as a point, and the dual's line above them. A scatter of all subsets of a small set of items by total weight and total value, with the best value for each weight limit drawn as a staircase and the Lagrangian dual bound drawn as the concave curve lying above all the points.
Fig. 6 Four items of weight 3, 4, 5 and 7 and value 5, 6, 8 and 9: each of the sixteen subsets is a dot at (weight, value). The green steps are the best value within each weight limit. The orange curve is the lowest line lying above every dot, read at each limit — at a limit of 10 it gives 16 against a best packing of 14.

The best packing within a limit is the highest dot to the left of it — the green staircase. The dual here relaxes only the weight limit: charge a price λ\lambda per unit of weight, let the packer choose any subset to maximise value minus charge, and add back λ\lambda times the limit. Each price gives a line, and the best price gives the lowest line above all the dots, read at the limit. Those lines together trace the orange curve, which is the upper hull of the sixteen dots.

At a limit of 1010 the hull passes at 1616 while the best packing is 1414. The hull’s value there is a mixture: the packing of items 1 and 3 (weight 8, value 13) and a fraction of item 2 on top, which is exactly what a greedy packer would do if items could be cut — take the best value per unit weight first, and cut the next item to fill the space. The Lagrangian dual of the knapsack is the fractional knapsack, and the gap of 2 is how much it costs that items cannot be cut. Where the dots lie on their own upper hull, the gap closes; where the hull has to bridge between two dots, it opens, and its size is exactly how far the dots fall short of lying on a concave curve.

What replaces the lines

The gap is not a failure of duality in principle, only of linear duality. If the planks are allowed to be something other than straight lines, a dual that closes the gap exists.

The right class turns out to be functions built from linear ones by rounding down. A plank like b1y1+b2y2b_1 y_1 + b_2 y_2 becomes, after rounding, something like 12b1+13(b1+b2)\lfloor \tfrac12 b_1 \rfloor + \lfloor \tfrac13 (b_1 + b_2) \rfloor — a staircase itself, able to follow the staircase optimum down into its steps. The theory, developed by Ralph Gomory, Robert Jeroslow and others in the 1960s and 1970s, says that for whole-number programs with whole-number data a dual made of such rounded functions always meets the optimum exactly: the whole-number optimum is itself one of them, and strong duality is restored.

The program of the lattice-point figure shows how the rounding works. Take the two constraints with weights 15\tfrac15 and 25\tfrac25 and add: x1+2x26.4x_1 + 2x_2 \le 6.4. Every whole-number point satisfies it, and for whole numbers the left side is whole, so the right side can be rounded down: x1+2x26x_1 + 2x_2 \le 6. That new constraint cuts off the fractional corner (145,95)(\tfrac{14}5, \tfrac95), where the left side is 6.46.4, and leaves every lattice point. The new fractional optimum is 1515, at (3,32)(3, \tfrac32). Round once more — a quarter of each of the first and third constraints gives x1+x24.5x_1 + x_2 \le 4.5, rounded to 44 — and the fractional optimum drops to 1414, at (2,2)(2, 2): the whole-number answer, certified. Two roundings closed a gap no straight plank could. These rounded combinations are Chvátal–Gomory cuts, and the theorem behind them, from Václav Chvátal in 1973, is that finitely many rounds always reach the whole-number optimum.

The price is that the dual is no longer a linear program. Its variables are functions rather than numbers, finding the right rounded plank is as hard as the original problem, and the elegance of a finite list of vertices is gone. That is the general shape of the difference between linear and whole-number optimisation: the same theorem holds, and the certificate it promises can be as hard to find as the answer.

What the pictures cannot show

More than two resources. The roof is drawn over one right-hand side and then over two. With many constraints it is a concave surface over a space of many dimensions, made of as many planar pieces as the dual region has vertices — potentially an enormous number — and the wedges become cones with many faces. The picture of the lowest plank survives; nothing here can draw it.

How the gap behaves for large problems. The gaps drawn are small — 1.6, 3.5, 2 — because the problems are tiny. For many whole-number problems the ratio between the fractional and whole-number optima can be bounded, and those bounds are what approximation algorithms rest on; for others it can grow without limit. A two-variable picture cannot show which case a problem is in.

The fractional point’s meaning. The figures mark the fractional optimum (145,95)(\tfrac{14}5, \tfrac95) as a dot on the polygon, and it is a perfectly good point. What it means — fourteen-fifths of a product, a fraction of an item in a knapsack — is exactly the question the whole-number requirement exists to refuse, and a drawing that shows it cheerfully in the same colours as the whole-number points is making it look more legitimate than it is.

Still open: how far below the roof the shortest tour lies

The most studied instance of this gap is the travelling salesman problem. For a salesman visiting cities with ordinary distances, there is a standard linear relaxation — the subtour relaxation, from Dantzig, Fulkerson and Johnson’s work of 1954 — whose optimum is a lower bound on the shortest tour, in the same way the orange roof is an upper bound on the staircase. The ratio between the true shortest tour and that bound is the problem’s integrality gap.

It is known to be at most 32\tfrac32, a bound established in 1980 and only very slightly improved since. It is known to be at least 43\tfrac43, from a family of examples. Whether the true worst case is exactly 43\tfrac43 has been conjectured for decades and is open. A proof would say that the linear planks come within a third of the whole-number answer for every possible arrangement of cities; it would also, very likely, give a better way of finding short tours, since every improvement so far in the bound has come with one.

A roof and a staircase

The optimum of a linear program, as its resources vary, is the lowest of finitely many planks, one for each vertex of the dual. That makes it concave, makes its slopes into prices, divides the resources into wedges on which one plan’s pattern survives, and turns the corners between wedges into fans of equally valid prices.

Require whole numbers and the roof stays up while the optimum falls into a staircase beneath it. Every plank still bounds the staircase, and none can reach into its steps. The dual is exact wherever the region’s corners are whole, and a bound everywhere else — and replacing its straight planks by rounded ones restores the exactness at the cost of everything that made it easy.

What links here

Computed from the collection, not written here: the essays that point at this one.

Shares its objects with

Essays that name at least two of the same things, and that neither author linked.

Named objects

A dashed tag is an object no other essay names yet.

Concave functionConvexityDualityInteger programKnapsackLagrangian relaxationLinear programShadow price