Skip to content
Feb 27

Duality in Linear Programming

MT
Mindli Team

AI-Generated Content

Duality in Linear Programming

Linear programming provides powerful tools for optimization, but its true depth is unlocked through duality. This concept creates a paired relationship between two LP problems, offering not just an alternative solution path but profound insights into the original problem's structure, sensitivity, and economic meaning. Understanding duality transforms your approach from mere calculation to strategic analysis, providing guaranteed bounds on optimal values and revealing the value of constrained resources.

The Primal-Dual Pair

Every linear program, called the primal problem, has a corresponding dual problem. The two are intimately linked, and their forms are derived systematically. Consider a primal problem in standard maximization form:

Here, is an -dimensional vector of decision variables, is the vector of objective coefficients, is an matrix of constraint coefficients, and is the vector of right-hand side resources.

Its dual problem is a minimization problem constructed with the same data but rearranged:

The dual variable vector has components, each associated with one primal constraint. The derivation rules are symmetrical: a maximization primal with "" constraints leads to a minimization dual with "" constraints and non-negative variables. For other primal forms (minimization, equality constraints, unrestricted variables), the dual construction follows a precise set of conversion rules, ensuring the pair is always well-defined.

Weak and Strong Duality Theorems

The relationship between the primal and dual solutions is governed by two fundamental theorems. The Weak Duality Theorem states that for any feasible primal solution and any feasible dual solution , the primal objective value is always less than or equal to the dual objective value: . This provides a powerful bounding mechanism: if you find a feasible primal solution, you immediately have a lower bound on the maximum possible profit; if you find a feasible dual solution, you have an upper bound. Consequently, if you discover a pair of feasible solutions where the objective values are equal, then both must be optimal.

Weak duality is proven directly. Starting from the primal constraints and dual constraints , we can pre-multiply and post-multiply to chain the inequalities: The non-negativity of the variables is crucial for maintaining the inequality directions.

The Strong Duality Theorem is the cornerstone result. It states that if either the primal or the dual problem has a finite optimal solution, then so does the other, and their optimal objective values are equal: . This means the bounds provided by weak duality are tight at optimality. The proof typically relies on the fact that an optimal simplex tableau for the primal directly provides an optimal solution for the dual, often found in the objective row coefficients corresponding to the slack variables.

Complementary Slackness Conditions

The Complementary Slackness Conditions provide a critical link between optimal primal and dual solutions. They state that for optimal solutions and , the product of each primal slack variable and its corresponding dual variable is zero. Mathematically, this means:

  1. For each primal constraint : .
  2. For each dual constraint : .

In essence, if a primal constraint is not binding (has slack), then its corresponding dual variable must be zero. Conversely, if a dual variable is positive, then its corresponding primal constraint must be tight (binding). Similarly, if a primal variable is positive, its corresponding dual constraint must be tight, and if a dual constraint has slack, its corresponding primal variable must be zero. These conditions are necessary and sufficient for optimality when both solutions are feasible. They are immensely useful for verifying optimality, constructing optimal solutions, and understanding which constraints are economically "active."

Economic Interpretation of Dual Variables

The dual variables , often called shadow prices, have a powerful economic interpretation. At optimality, represents the instantaneous rate of change in the optimal primal objective value with respect to a small increase in the right-hand side resource . In a profit-maximization model, if , it means an additional unit of resource would increase total profit by approximately 3 units, assuming the current optimal basis remains unchanged.

This interpretation transforms the dual from an abstract mathematical construct into a vital managerial tool. The dual solution tells you which resources are bottlenecks (positive shadow price) and which are not fully utilized (zero shadow price). It also provides the marginal value of resources, informing decisions like whether to purchase additional raw materials or lease more machine time. The dual objective can be interpreted as the total imputed cost or accounting value of all resources consumed.

Applications: Sensitivity Analysis and Game Theory

Duality theory directly enables sensitivity analysis, which examines how changes in the problem parameters (, , ) affect the optimal solution. Using the optimal dual solution, you can immediately determine the range over which a right-hand side can change before the current basis becomes suboptimal—this is the range for which the current shadow price remains valid. Similarly, duality provides insights into how changes in objective coefficients affect optimality through reduced costs, which are essentially the slack in the dual constraints.

In game theory, duality provides a deep connection. A two-person zero-sum matrix game can be formulated as a pair of dual linear programs. The minimax strategy for one player is found by solving a primal LP, while the maximin strategy for the opponent is found by solving its dual. The strong duality theorem guarantees that the value of the game computed by both players is identical, confirming the fundamental minimax theorem of game theory. This elegant link shows that solving a game is equivalent to finding optimal primal and dual solutions.

Common Pitfalls

  1. Misinterpreting Dual Variable Signs: A common error is misapplying the sign conventions for dual variables. Remember, the sign of a dual variable is determined by the direction of its associated primal constraint. For a standard maximization primal with "" constraints, dual variables are non-negative (). If you have an equality constraint in the primal, the corresponding dual variable becomes unrestricted in sign. Flipping this relationship will lead to an incorrect dual formulation and nonsensical economic interpretations.
  1. Applying Complementary Slackness Incorrectly: The conditions state that the product is zero, not that each factor must be zero. It is a disjunction: either the slack is zero OR the dual variable is zero (or both). A mistake is to assume both must be zero simultaneously. For example, a non-binding primal constraint () forces its dual variable to , but a binding constraint () allows its dual variable to be either positive or zero.
  1. Over-Extending Shadow Price Interpretation: Shadow prices are local, marginal values. They are valid only for small changes within the range where the current optimal basis remains optimal. A pitfall is assuming that if acquiring a unit of a resource increases profit by , then acquiring 100 units will increase profit by . For large changes, the basis will likely change, and the shadow price is no longer constant. You must perform range sensitivity analysis to understand the limits of this linear approximation.

Summary

  • Every linear programming problem has a corresponding dual problem, and their optimal objective values are equal (Strong Duality), with feasible solutions providing bounds (Weak Duality).
  • Complementary Slackness Conditions are necessary and sufficient for optimality, linking positive variables to binding constraints and vice versa.
  • Dual variables are interpreted as shadow prices, quantifying the marginal value of a unit increase in the corresponding primal resource constraint.
  • Duality is the foundation for sensitivity analysis, allowing you to determine how changes in costs or resources affect the solution without re-solving the problem.
  • The theory finds a profound application in game theory, where the solutions to a pair of dual LPs give the optimal strategies and value of a two-person zero-sum game.

Write better notes with AI

Mindli helps you capture, organize, and master any subject with AI-powered summaries and flashcards.