Search⌘ K
AI Features

The Dual of Linear Programming (LP)

Explore how to formulate and solve the dual problem in linear programming, understand its relationship with the primal problem, and learn when solving the dual offers computational advantages. This lesson helps you grasp key concepts like Lagrangian duality, the role of constraints, and practical solution methods using NumPy and SciPy.

We'll cover the following...

In some cases, the dual problem of an LP problem might be easier to solve than the primal problem. If the primal is a minimization problem, the dual will be a maximization problem, and vice versa. So, depending on the specifics of the problem (simpler constraints or objective function), it might be easier to solve the dual problem than the primal problem.

Calculation of the dual objective

Consider an LP problem whose primal is given as follows:

where cRdc \in \R^d is the cost vector, ARm×dA \in \R^{m \times d} is the constraint matrix, and bRmb \in \R^m is the constraint vector.

The Lagrangian function £(x,λ)\pounds(x, \lambda) is given by the following:

where λRm\lambda \in \R^m is the vector of the nonnegative Lagrange multipliers. Rearranging the terms corresponding to xx yields the following:

The dual of Lagrangian is given as follows:

Because £(x,λ)\pounds(x, \lambda) is a convex function, we can find its minimum (with respect to ...