TOC
Introduction
In optimization, duality refers to a pair of closely related problems, known as the primal problem and the dual problem. The primal problem is the original optimization problem that one wants to solve, while the dual problem is a different optimization problem that is derived from the primal problem.
The concept of duality is important in convex optimization because it provides useful insights into the structure of optimization problems and allows for the development of efficient algorithms for solving them. Specifically, the duality theorem states that under certain conditions, the optimal value of the primal problem is equal to the optimal value of the dual problem. This provides a way to check the optimality of a solution obtained from one problem by verifying its optimality in the other problem. Duality also allows for the development of optimization algorithms that solve the dual problem rather than the primal problem. This can be advantageous in certain situations, such as when the dual problem is easier to solve or has a simpler structure.
The Lagrangian
Let’s start the with the standard form of the optimization problem:
minimize , subject to . The domain D is intersection of all domains, not empty and the optimal value is . The main idea of Lagrangian duality is to augment the constraints into the object functions weightedly. As follows:
.
The domain . are called the Lagrange multipliers. The problem becomes the Lagrangian dual function: so that we find the minimum value of the Lagrangian over x: for :
.
The dual function will give us the lower bounds of the optimal value of the problem. For any and . We can prove it as follows. Suppose x is a feasible point: . So . Therefore the Lagrangian . This makes . Since for all feasible x, it is followed that .
To find the best lower bound, we consider the problem: maximize subject to . This is called the Lagrange dual problem. The optimal value of the Larange dual problem, , is the best lower bound on , this equality is called weak duality. The difference is referred to as the optimal duality gap. If equality happens, the gap is zero, we call it the strong duality.
Strong duality does not hold in general, but if the primal problem is convex: minimize subject to with convex, we usually have strong duality. There are many results establishing conditions on the problem, beyong convexity, to make the strong duality holds. Those conditions are called constraint qualifications. One simple constraint qualification is Slater’s condition: there exist an such that . Such a point can be called strictly feasible, since the inequality constraints hold with strict inequalities. Slater’s theorem states that strong duality holds if Slater’s condition holds and the problem is convex.
Mixed strategies in matrix games
Consider a game of two players. Player 1 makes a move and player 2 makes a move . Player 1 then make payment to player 2 where is the payoff matrix for the game. The goal of player 1 is to make the payment as small as possible, while the goal of player 2 is to maximize it. The players use mixed strategies, with the following probability distribution over the choices: . The expected payoff from player 1 to player 2 is then . Player 1 would choose u to minimize while player 2 wishes to maximize it.
If player 2 knows player 1’s strategy in advance, she would try to maximize the expected payoff . Player 1 choose to minimize this payoff: subject to . The smallest expected payoff is denoted .
If player 1 knows player 2’s strategy in advance, she would try to minimize . Player 2 then maximize this with her v: subject to . The optimal value of this scenario is .
It seems that knowing opponent’s strategy is advantegous, , but with mixed strategies, using duality, we can prove that .
Let’s start by formulating the problem as Linear Programming: minimize t subject to . Adding the multiplier for for and $ \nu \textbf{1}^T u = 1 $$, the Lagrangian is:
.
The dual function is
The dual problem is then: maximize subject to . This is equivalent to: maximize subject to . Those two problems become equal, LPs are feasible, we have strong duality, the optimal values of the two problems are equal.
More examples
Find the minimum and maximum of the function such that ! The Lagragian is . Set the derivatives to be zero:
This is equivalent to
Hence,
And we have two roots . The max and the min .
Another examples on two probability distributions and their cross entropy. As we know, the cross entropy function is to measure the similarity of two probability distributions. If the value is small the two distributions are close. Let’s take a probability distribution . For another probability distribution is the cross entropy function between p and q. We find q to minimize the cross entropy. With the constraint , the Lagrangian is: . To find optimum, we set the derivatives to zero:
This is equivalent to:
So, , hence, . The cross entropy function achieve minimum when the two probability distributions are the same.
Optimality conditions
Complementary slackness
Suppose we have strong duality, let be a primal optimal and be a dual optimal point. This means:
The first line states that the optimal duality gap is zero. The second line is the definition of the dual function. The third line follows since the infimum of the Lagrangian over x is less than or equal to its value at . The last inequality follows from . The two inequalities in this chain hold with equality.
An important conclusion from this: , so . This condition is called the complementary slackness. The complementary slackness condition is expressed as: or equivalently .
KKT optimality condition
Assume that the functions are differentiable. For non convex problem, assume strong duality, be the primal and dual optimal points. Since minimizes over x, the gradient vanishes at :
Thus,
which are called the Karush-Kuhn-Tucker (KKT) conditions. To summarize, any optimization problem with differentiable objective and constraint functions for which strong duality obtains, any pair of primal and dual optimal points must satisfy the KKT conditions.