• No results found

The Simplex Algorithm (II)

9.2 Interpretation of the Dual

In many settings, the dual of a linear program may have some intuitive meaning or relationship to the problem being modelled by the primal program. In this section, we briefly discuss a few examples and see how an optimal solution to the dual may be useful for making decisions.

We have already seen one example of this in action. Our initial example of a

linear program (Example 1.1) was a “blending problem” in which a student was trying to select a cheap blend of foods that met basic dietary requirements. In Example 1.2 we considered the same problem from the point of view of a vendor of dietary supplements trying maximise revenue. It should now be easy to see that this is in fact the dual of the program from Example 1.1, and so both problems have the same optimal objective value.

Now that we have developed a more comprehensive theory of linear program-ming, we know right away that, since the diet problem has 4 constraints (one for each of the 4 nutrients we consider) there must be an optimal solution that uses at most 4 foods. This is because we know that if this program is feasible and bounded, there must be an optimal solution that is a basic feasible solution. This solution will have at most m = 4 non-zero variables. In fact, we saw that it used only 3 foods—this is because one of the slack variables must have also been basic.

The associated inequality is not tight (unless we are at a degenerate solution) and so we would thus expect that the dual would have its variable corresponding to this inequality set to zero. Indeed, if we compute an optimal dual solution us-ing complementary slackness, we see that it sets: y1 = 1.43382, y2 = 0.588235, y3 = 0.0367647, and y4 = 0. These correspond to the nutrients Thiamin, Ri-boflavin, Niacin, and Vitamin C, respectively. By complementary slackness, this implies that the constraint for Vitamin C must not be tight (that is, the given diet gives more Vitamin C than is needed).

Suppose that (against her doctor’s advice!) the student decided to consume less than the daily allowance of some nutrient. The dual variables tell us that consuming less Vitamin C won’t make any difference, since this constraint is not even tight. However, consuming less of each of the other nutrients will lower the cost of the diet at the rate given by the dual variables. This makes sense from the point of view of the vitamin company—if the student consumes slightly less Thiamin, their revenue will decrease at a rate equal to the current price of Thiamin pills (which is y1). Surprisingly, this is also true from the student’s point of view.

If she decides to consume slightly less Thiamin, then this will lower the value of the cheapest diet at a rate of 1.43382 (until perhaps some other constraint becomes tight, of course). The dual variables can thus be interpreted as telling our student how much satisfying each nutritional requirement is costing her.

Let’s now see an example of duality in a production problem. Our first pro-duction problem (Example 2.1) involved a foundry making 2 kinds of parts with 4 different processes and constraints on metal, electricity and labour. Additionally, each process could run for at most 28 days. We got the following linear program

for maximising revenue.1

maximise 4000x1+ 1800x2+ 4800x3+ 11400x4 subject to 100x1+ 70x2+ 120x3+ 270x4 ≤ 6000

800x1+ 600x2+ 2000x3 + 4000x4 ≤ 100000 16x1 + 16x2+ 50x3+ 48x4 ≤ 1000

xi ≤ 28, for each i = 1, 2, 3, 4 xi ≥ 0, for each i = 1, 2, 3, 4 The dual of this linear program is the following:

minimise 6000y1+ 100000y2+ 1000y3+ 28y4+ 28y5+ 28y6+ 28y7

subject to 100y1+ 800y2+ 16y3 + y4 ≥ 4000 70y1+ 600y2+ 16y3 + y5 ≥ 1800 120y1+ 2000y2+ 50y3 + y6 ≥ 4800 270y1+ 4000y2+ 48y3 + y7 ≥ 11400

yi ≥ 0, for each i = 1, . . . , 7

We now have 1 constraint for each production process, and one variable repre-senting the cost allocated to each requirement: y1 represents metal, y2 represents electricity, y3 represents labour, and y5, . . . , y7 represents the number of days we have available to run each of the 4 production processes, respectively. These last quantities were not explicitly listed as an input in the problem, but since we in-cluded an extra constraint that no process runs for more than 28 days, they appear in the dual. Note that our statement xi ≤ 28 for i = 1, 2, 3, 4 is actually 4 separate constraints, one for each value of i. That is why we have 4 separate dual variables with coefficient 28 in the objective.

One way of viewing the dual is as follows: we want to know what the total value of our current resources/assets. We have 6000 kg of metal, 100000 kWh of power, 1000 hours of labour, and 28 days of time for each process. Using these resources, we produce parts and obtain revenue. The value (in £) that we assign to one unit of each resource should be chosen in a way that reflects the total revenue that they can be converted into. So, for each process the values we assign to our resources should be at least as much as the revenue this process generates. One

1Here, we consider the first program we derived, which does not involve input and output variables. We would get exactly the same result if we used the more complicated (but also more readable) program with i1, i2, i3 and o1, o2. However, the dual would have some extra variables and would need to be simplified to see clearly what is going on.

way to do this would be to simply assign a very large value to all of our resources, but this will not represent an accurate valuation. Therefore, we instead look for a valuation of all the resources we have for the month that is as small as possible but still accurately accounts for the revenue we can produce. By strong duality, the solution to this dual linear program will then give us a total value that is equal to the most revenue we can make in a month, as we would expect.

The variables of the dual then have an intuitive meaning as prices or values.

Suppose we wanted to make a small change to our budget for next month. Should we increase the amount of metal on hand, or the amount of power or labour?

Alternatively, maybe we should consider building extra production capacity (like a second assembly line) so that we can utilise one of our processes to larger extent.

What change would have the greatest effect on revenue? The answer can be obtained by simply examining the dual variables. At an optimal solution, the dual variables for this particular program end up being all zero except for y3 = 237.5, corresponding to labour, and y4 = 200, corresponding to our utilisation of production line 1. What this means is that currently we can increase our revenue the most by hiring labour, and that we will bring in an extra £237.50 per hour of labour hired. Note that this estimate is only valid for the current value of the linear program. That is, similarly to a derivative, it estimates the instantaneous rate of increase in revenue at the current solution point. If we hired 1000 hours of extra labour it might be that some other constraint would become tight and we would not see a full increase of 1000 · 237.50 in our revenue. Nonetheless, for very small increases, this is a good estimate just like the derivative often gives a good estimate of the behaviour of a function for small changes around a single point.

The variable y4 corresponds to the constraint that we can only run production line 1 for 28 days. There’s not much we can do about this, since we can’t make more days in a month! However, it indicates that if we could improve the speed of production line 1 so that it could produce (for example) 30 days worth of parts in our production period, we would increase our revenue. Alternatively, we might consider building a second copy of this production line.

As the previous examples illustrate, there is often some meaning behind the value of the dual to a linear program. In general, each dual variable represents how much its constraint is affecting the solution. Its value tells us what rate the objective function would change at if we relaxed this constraint slightly. Thus, the dual variables can be extremely useful for making decisions about how to modify our plans.