I’ve always found duality theory in optimisation rather difficult and unintuitive, and I harbour a vague suspicion that many textbooks exagerate its importance. I have never had much use for it in practice, but reading Sperling & Dosher (1986), I came across Koopman’s optimal search ideas and here the dual problem turns out to be very simple and extremely elegant.
During WWII, Bernard Koopman’s was to help protect US convoys against German U-boots. As far as I understood the original problem was to put defensive ships in the locations where they would be most likely to catch submarines. This led him to a general formulation of search problems under constrained resources: we are looking for a certain target, we have a limited budget, and the question is how best to allocate our limited resources over possible locations. For example we could be on a witch hunt, but have only a few trained inquisitors at our disposal. Or, more prosaically, maybe we are looking for keys and the limited resource is time.
Mathematically, Koopman’s setup is as follows: a target can be in one of locations. If we spend an amount of time
looking for the target in location
, the probability of finding it grows with
, according to:
This assumes of course that the target actually is in location , otherwise the probability is 0.
Suppose we have some prior distribution over target locations, and a total amount of time we can spend,
. We can choose to spend time
at location 1,
at location 2, etc. Koopman’s search procedure finds the optimal time allocation on the condition that there are no switching costs (you don’t spend any time going from one location to the next).
Given a certain time allocation , the probability of finding the target is:
The objective is then to minimise , under the constraint that
, the budget constraint. Another constraint is naturally that all the
are 0 or more. Using Boyd & Vanderberghe’s notation, the problem is:
We can take that problem and express it as a Lagrangian:
I’m forgetting the inequality constraint for now.
Solving the optimisation problem is equivalent to finding a stationary point for : as per usual we work out the derivatives.
This means the first-order stationarity condition is:
We still have the requirement that to deal with: we reintroduce it here by setting negative
‘s in the unconstrained solution to 0 (see below on why it’s legal to do that here). Our solution will satisfy:
The shape of the “dual problem” should begin to appear. The equation above states: given a certain value of , the optimal allocation first sets a lower bound – we ignore all sites with probability less than
of containing the target. On the rest of the sites we spend
time.
This implies that one way of looking at the problem is to find the minimum value of such that the time constraint is solved. The dual problem is then:
where denotes the positive part function.
The dual problem is a trivial one-dimensional minimisation! To find the solution we could use any number of simple search procedures. For example you could first test what happens when: if for this value we need too much search time in total, we can test
, otherwise, we could test
, and so on. Using this bisection trick we could converge very quickly to a solution.
We have reduced a -dimensional problem with easy constraints into a one-dimensional problem with a more complicated constraint. As far as I know all primal-dual transformations feature that kind of trade-off (no free lunch). In the case of Koopman’s problem the dual is particularly nice because writing an algorithm that finds an optimal allocation is trivially easy.
[1. A very rough note on why it’s OK to ignore the constraint in the Lagrangian, then reintroduce it later. A way to look at it is that the Lagrangian as formulated here provides the solution ignoring the constraint, so we can reintroduce the constraint by projecting on the positive quadrant. Since the stationarity conditions are separable, we can project coordinate-wise, and that’s the same as setting all negative values to 0.
A more careful argument is to add the inequality conditions to the Lagrangian, and the conclusion follows from the KKT conditions (using complementary slackness)
2. The whole thing transposes almost unchanged to the continuous case.]
References
Koopman, B. O. (1979). Search and its optimization. The American Mathematical Monthly, 86(7):527+.
Boyd, S. and Vandenberghe, L. (2004). Convex Optimization. Cambridge University Press.
Sperling, G. and Dosher, B. A. (1986). Strategy and optimization in human information processing. In Boff, K., Kaufman, L., and Thomas, J., editors, Handbook of perception and human performance: Vol. 1. Sensory processes and perception. Wiley, New York.