Linear Programming. Larry Blume Cornell University, IHS Vienna and SFI. Summer 2016

Similar documents
Chapter 1. Preliminaries

CO 250 Final Exam Guide

Convex Optimization & Lagrange Duality

Extreme Abridgment of Boyd and Vandenberghe s Convex Optimization

3. Linear Programming and Polyhedral Combinatorics

3. Linear Programming and Polyhedral Combinatorics

Optimality Conditions for Constrained Optimization

Summer School: Semidefinite Optimization

CHAPTER 2: CONVEX SETS AND CONCAVE FUNCTIONS. W. Erwin Diewert January 31, 2008.

MAT-INF4110/MAT-INF9110 Mathematical optimization

Spring 2017 CO 250 Course Notes TABLE OF CONTENTS. richardwu.ca. CO 250 Course Notes. Introduction to Optimization

1 Review Session. 1.1 Lecture 2

Appendix PRELIMINARIES 1. THEOREMS OF ALTERNATIVES FOR SYSTEMS OF LINEAR CONSTRAINTS

AN INTRODUCTION TO CONVEXITY

EE364a Review Session 5

LP Duality: outline. Duality theory for Linear Programming. alternatives. optimization I Idea: polyhedra

Midterm Review. Yinyu Ye Department of Management Science and Engineering Stanford University Stanford, CA 94305, U.S.A.

Lectures 6, 7 and part of 8

The dual simplex method with bounds

Optimality Conditions for Nonsmooth Convex Optimization

OPTIMISATION /09 EXAM PREPARATION GUIDELINES

Lagrange duality. The Lagrangian. We consider an optimization program of the form

OPTIMISATION 2007/8 EXAM PREPARATION GUIDELINES

Week 3 Linear programming duality

Division of the Humanities and Social Sciences. Supergradients. KC Border Fall 2001 v ::15.45

Discrete Optimization

Optimization. A first course on mathematics for economists

1 Overview. 2 Extreme Points. AM 221: Advanced Optimization Spring 2016

Jørgen Tind, Department of Statistics and Operations Research, University of Copenhagen, Universitetsparken 5, 2100 Copenhagen O, Denmark.

Linear Programming. Chapter Introduction

Convex Optimization and Modeling

Linear and non-linear programming

Lecture 1: Entropy, convexity, and matrix scaling CSE 599S: Entropy optimality, Winter 2016 Instructor: James R. Lee Last updated: January 24, 2016

Convex Sets with Applications to Economics

Lecture 5. Theorems of Alternatives and Self-Dual Embedding

Input: System of inequalities or equalities over the reals R. Output: Value for variables that minimizes cost function

5. Duality. Lagrangian

Convex Functions and Optimization

Chapter 1: Linear Programming

Lecture 3: Lagrangian duality and algorithms for the Lagrangian dual problem

Chap6 Duality Theory and Sensitivity Analysis

Optimization for Communications and Networks. Poompat Saengudomlert. Session 4 Duality and Lagrange Multipliers

Subgradients. subgradients. strong and weak subgradient calculus. optimality conditions via subgradients. directional derivatives

Linear and Combinatorial Optimization

Karush-Kuhn-Tucker Conditions. Lecturer: Ryan Tibshirani Convex Optimization /36-725

BBM402-Lecture 20: LP Duality

Lagrangian Methods for Constrained Optimization

I.3. LMI DUALITY. Didier HENRION EECI Graduate School on Control Supélec - Spring 2010

Linear Programming Inverse Projection Theory Chapter 3

CS261: A Second Course in Algorithms Lecture #9: Linear Programming Duality (Part 2)

Thursday, May 24, Linear Programming

EE/AA 578, Univ of Washington, Fall Duality

LECTURE 25: REVIEW/EPILOGUE LECTURE OUTLINE

Primal/Dual Decomposition Methods

UNDERGROUND LECTURE NOTES 1: Optimality Conditions for Constrained Optimization Problems

Duality. for The New Palgrave Dictionary of Economics, 2nd ed. Lawrence E. Blume

Duality in Linear Programming

LINEAR PROGRAMMING. Relation to the Text (cont.) Relation to Material in Text. Relation to the Text. Relation to the Text (cont.

Introduction to Mathematical Programming IE406. Lecture 10. Dr. Ted Ralphs

Convex Optimization M2

A Review of Linear Programming

Nonlinear Programming 3rd Edition. Theoretical Solutions Manual Chapter 6

An introductory example

II. Analysis of Linear Programming Solutions

Lecture 10: Linear programming duality and sensitivity 0-0

Introduction to linear programming using LEGO.

Ω R n is called the constraint set or feasible set. x 1

CSC373: Algorithm Design, Analysis and Complexity Fall 2017 DENIS PANKRATOV NOVEMBER 1, 2017

Optimality, Duality, Complementarity for Constrained Optimization

Quiz Discussion. IE417: Nonlinear Programming: Lecture 12. Motivation. Why do we care? Jeff Linderoth. 16th March 2006

CSCI 1951-G Optimization Methods in Finance Part 01: Linear Programming

LECTURE 10 LECTURE OUTLINE

Fundamental Theorems of Optimization

Convex Optimization Theory. Chapter 5 Exercises and Solutions: Extended Version

Vector Spaces. Addition : R n R n R n Scalar multiplication : R R n R n.

Lecture: Duality.

1 Seidel s LP algorithm

Shiqian Ma, MAT-258A: Numerical Optimization 1. Chapter 4. Subgradient

Support Vector Machines

Linear and Integer Optimization (V3C1/F4C1)

TMA 4180 Optimeringsteori KARUSH-KUHN-TUCKER THEOREM

Chapter 2 Convex Analysis

Seminars on Mathematics for Economics and Finance Topic 5: Optimization Kuhn-Tucker conditions for problems with inequality constraints 1

Solving Dual Problems

Chapter 2: Linear Programming Basics. (Bertsimas & Tsitsiklis, Chapter 1)

Linear Programming Redux

Lagrangian Duality. Richard Lusby. Department of Management Engineering Technical University of Denmark

3. Vector spaces 3.1 Linear dependence and independence 3.2 Basis and dimension. 5. Extreme points and basic feasible solutions

CONSTRAINT QUALIFICATIONS, LAGRANGIAN DUALITY & SADDLE POINT OPTIMALITY CONDITIONS

Linear Programming in Matrix Form

GENERALIZED CONVEXITY AND OPTIMALITY CONDITIONS IN SCALAR AND VECTOR OPTIMIZATION

HW1 solutions. 1. α Ef(x) β, where Ef(x) is the expected value of f(x), i.e., Ef(x) = n. i=1 p if(a i ). (The function f : R R is given.

3. Duality: What is duality? Why does it matter? Sensitivity through duality.

The general programming problem is the nonlinear programming problem where a given function is maximized subject to a set of inequality constraints.

Convex Optimization Boyd & Vandenberghe. 5. Duality

Duality of LPs and Applications

Mathematical Foundations -1- Constrained Optimization. Constrained Optimization. An intuitive approach 2. First Order Conditions (FOC) 7

A SET OF LECTURE NOTES ON CONVEX OPTIMIZATION WITH SOME APPLICATIONS TO PROBABILITY THEORY INCOMPLETE DRAFT. MAY 06

Note 3: LP Duality. If the primal problem (P) in the canonical form is min Z = n (1) then the dual problem (D) in the canonical form is max W = m (2)

Farkas Lemma, Dual Simplex and Sensitivity Analysis

Transcription:

Linear Programming Larry Blume Cornell University, IHS Vienna and SFI Summer 2016 These notes derive basic results in finite-dimensional linear programming using tools of convex analysis. Most sources prove these results by exploiting properties of the simplex analysis. That works, but it never did anything for me. In this case I get more from a geometric approach than from the algorithmic approach; thus these notes. One virtue of this method is that one can imagine how some of this will carry over to infinite-dimensional spaces, which is important for labor-macro people. See Gretsky, Ostroy and Zame (1992) "The Non-atomic assignment model," Economic Theory 2: 103-127, and their (2002) "Subdifferentiability and the duality gap," Positivity 6: 261-274. 1 Convex Facts Linear programs are the canonical example of convex optimization problems. The intuition derived from finite dimensional linear programs is useful for the study of finite infinite dimensional linear programs, infinite dimensional convex optimization problems, and beyond. Duality theory, which is most easily seen here, is important throughout the analysis of optimization problems. We need just a few key facts from convex analysis to get underway. Copyright Lawrence Blume, All Rights Reserved.

1.1 Convex Sets Definition 1. A subset C of a vector space is convex if it contains the line segment connecting any two of its elements. Most of the special properties of convex sets derive from the separating hyperplane theorem: Theorem 1. If C is a closed and convex subset of R n and x / C, then there is a p = 0 in R n such that p x > sup y C p y. The geometry of this theorem is that between the point and the set lies a hyperplane a line in R 2, a plane in R 3 and so forth. There are many different statements of this theorem, having to do with, for instance, the separation of two convex sets, a distinction between strict and strong separation, and so on. See the references for statements and proofs. The dual description of a closed convex set is an immediate consequence of the separation theorem. A closed half-space is a set containing all vectors lying on one side of a hyperplane; that is, for some vector p and scalar α, H = {x : p x α}. The primal description of a convex set is the list of all vectors it contains. The dual description of a convex set is the list of all closed half spaces containing it. The utility of the dual description derives from the following theorem: Theorem 2. Every closed convex set in R n is the intersection of the half-spaces containing it. Proof. For a closed convex set C and each x / C there is a vector p x = 0 and a scalar α x such that p x x > α and p x y α x for all y C. Define the closed half-space H x = {y : p x y α}. The set C is a subset of H x, and every x not in C is also not in H x. Thus x / C H x = C. Polyhedral convex sets are special convex sets defined by finite numbers of linear inequalities: P = {x : Ax b} defines a (closed) convex polyhedron in R n when A is an m n matrix and b R m. Constraint sets in lp s are examples of closed convex polyhedra. Obviously their 2

dual description requires only a finite number of half-spaces. This special structure can be exploited to provide sharp dual characterizations. An important example is Farkas Lemma. Farkas Lemma. One and only one of the following alternatives is true: 1. The system Ax = b, x 0 has a solution; 2. The system ya 0, y b < 0 has a solution. Results like this are called theorems of the alternative and they are very useful. Farkas Lemma is about systems of linear inequalities, but it is algebraic expression of the following geometric statement: If b is not in the cone generated by the columns of A, then there is a hyperplane that separates the cone from b. Notice that ya 0 if and only if yax 0 for all x 0, which is to say that y c 0 for all elements c of the cone described in the first alternative. Farkas Lemma follows immediately from the separation theorem once we know that the cone Ax 0, x 0 of the first alternative is closed. We prove this in an appendix. 1.2 Concave and Convex Functions Concave and convex functions can be defined in terms of convex sets. Definition 2. The subgraph of a real-valued function on a vector space V is the set sub f = {(x, y) V R : f (x) y}. The supergraph of a real-valued function on a vector space V is the set sup f = {(x, y) V R : f (x) y}. These sets are often referred to as the hypergraph and epigraph, respectively. These sets define concave and convex functions. Compare the following definitions to other more usual definitions. Definition 3. A real-valued function on a vector space V is concave if sub f is convex, and convex if super f is convex. 3

It is often useful to think of concave and convex functions as taking values in the extended real numbers. In this case, for concave f, dom f = {x : f (x) > }; and for convex g, dom g = {x : g(x) < + }. 2 Introduction The general linear program is a constrained optimization problem where objectives and constraints are all described by linear functions: v P (b) = max c x s. t. Ax b x 0 (1) where c, x R n, and the matrix A is m n. Problem 1 is called the primal problem, and the way it is described in (1) is the canonical form. If we wanted the constraint equation a x b, the matrix A would have the row a, and the vector b would contain corresponding term b. Having both constraints a x b and a x b effectively imposes the equality constraint a x = b. More clever, maximizing c x c y subject to Ax Ay b with x, y 0 is a rewrite of the problem max c z s.t. Az b with no positivity constraints on z. Really cleverly, the canonical form can handle absolute values of variables in both the objective function and in the constraints; exercise left to the reader. So the canonical form (and the standard form to follow) are quite expressive. Finally, note that without loss of generality we can assume that in any standard-form problem, n m and that A has full row rank. To see this, start with a k l matrix A. Rewriting in the canonical form gives a matrix of size 2k l. Rewriting this in standard form using slack variables gives a matrix of size 2k 2k + l.. 2k of the columns correspond to slack variables, and so the submatrix with those columns is the 2k 2k identity matrix. We have thus rewritten the constraint set using a matrix with full row rank. It may be unnatural, but it works. The assumption of full row rank for standard-form problems will be maintained throughout. 4

The standard form of a linear program is v P (b ) = max c x s. t. A x = b x 0 (2) which uses only equality and non-negativity constraints. We have already seen that a given standard-form problem, say, (2), can be rewritten in canonical form. A given problem, say, (1) in canonical form, is rewritten in standard form by using slack variables, here variables z: v P (b) = max c x s. t. Ax + Iz = b x 0 z 0 (3) where I is m m and z R m. The matrix [A I] is called the augmented matrix for the canonical-form problem (1). We use the following terminology: The objective function for (1) is f (x) = c x. The constraint set is C = {x R n : Ax b and x 0} for programs in canonical form, and C = {x R n : Ax = b and x 0} for programs in standard form. This set is a convex polyhedron. A solution for (1) is any x R n. A feasible solution is a element of C. An optimal solution is a feasible solution at which the supremum of the objective function on C is attained. A linear program need have no feasible solutions, and a program with feasible solutions need have no optimal solutions. 5

3 The Geometry of Linear Programming The canonical-form constraint set C is a polyhedral convex set. In figure 1, the four corners are vertices of C. This constraint set is bounded, so any linear program with constraint set C will have a solution. In this section we refer to programs in the standard form (2). Thus 5 4 y 3x 0 3 1 1 1 1 2 1 0 [ ] x y x, y 0 0 6 0 1 3 2 1 x 1 C x y 6 x 2y 0 Figure 1: The set C. C = {x : Ax = b, x 0}. The set of x satisfying the constraints Ax = b is the intersection of a number of hyperplanes. Thes lower dimensional planes are called affine spaces; they are translates away from the origin of vector subspaces. Thus a standard-form constraint set is the intersection of an affine space with the non-negative orthant. Vertices will necessarily be at the orthant boundaries. Definition 4. x is a vertex of the polyhedron C iff there is no y = 0 such that x + y and x y are both in C. The vertex theorem describes the relation between the geometry of C and solutions to (2). Theorem 3 (Vertex Theorem). For a linear program in standard form with feasible solutions, 1. A vertex exists. 2. If v P (b) < and x C, then there is a vertex x such that c x c x. 6

Other ways of writing a given linear program do not always have vertices. For instance, the program where C = {(x 1, x 2 ) : 0 x 1 1} has no vertex. Problem 1. What are the canonical and standard forms of this program? vertices Do they have Proof of Theorem 3. The proof of 1) constructs a vertex. Choose x C. If x is a vertex, we are done. If x is not a vertex, then for some y = 0, both of x ± y C. Thus Ay = 0, and if x j = 0 then y j = 0. Let λ 0 solve sup{λ : x ± λy C}. Since x is not a vertex, λ = 0, and since C is closed, x ± λ y C. One of x ± λ y has more 0 s than does x. Suppose without loss of generality it is x + λ y. If x + λ y is a vertex, we are done. If not, repeat the argument. The argument can be iterated at most n times before the origin is reached, and the origin is a vertex of any standard form program for which it is feasible. The proof of 2) has the same idea. If x is a vertex, take x = x. If not, then there is a y = 0 such that x ± y C, and this y has the properties given above. If cy = 0, without loss of generality, take y such that cy > 0. If cy = 0, choose y such that for some j, y j < 0. (Since y = 0, one of y and y must have a negative coefficient.) Consider x + λy with λ > 0. Then c(x + λy) = cx + λcy cx. Case 1: y j 0 for all j. Then x + λy is in C for all λ 0. Since cy > 0, c(x + λy) + as λ +, so v P (b) = +, the problem is unbounded. Case 2: There is a j such that y j < 0. For large enough λ, x + λy 0. Let λ denote the largest λ such that x + λy is feasible. Then x + λ y is in C, has at least one more zero, and c(x + λ y) cx. Now repeat the argument. If the problem is bounded, case 2 happens at most n times before a vertex is reached. Definition 5. A solution to an linear programming problem in standard form is a basic solution if and only if the columns A j of A such that x j > 0 are linearly independent; that is, if the 7

submatrix A x of A consisting of the columns A j for which x j > 0 has full column rank. Theorem 4. A solution x is basic if and only if it is a vertex. Proof. First, suppose that x is not a vertex. Then from the arguments of the proof of Theorem 3 we know that for some y = 0, Ay = 0 and if x j = 0, then y j = 0. The second statement implies that Ay is a linear combination of the columns of A x, and the first says that combination is 0, so the columns A j of A x are linearly dependent. Thus x is not a basic solution. Next, suppose that x is not basic. Then the columns A j are linearly dependent, and so there is a y such that if x j = 0 then y j = 0 in other words, y describes a linear combination of the A j such that Ay = 0. For λ such that λ is sufficiently small, x ± λy 0. For all these λ, x ± λy C, and so x is not a vertex. Corresponding to every linearly independent set of column vectors is at most one basic solution, because if x and x are two distinct sets of solutions employing only the columns of x, then A(x x ) = 0, and so the the columns of x are dependent. A maximal linearly independent set contains at most min{m, n} vectors, and so there are at most ( n min{m,n} ) maximal linearly independent sets, so this bounds from above the number of vertices. Together, theorems 3 and 4 say three things. First, the constraint set C for a standard-form program has vertices. Second, vertices correspond to basic solutions of the linear inequalities defining the constraints. Third, if the linear program has a feasible/optimal solution, it has a basic (vertex) feasible/optimal solution. This last fact is important. One might wonder about the relationship of vertices of the standard form to vertices of the canonical form. Theorem 5. The feasible solution x to the canonical problem (1) is a vertex of the canonical form feasible set if and only if there is a z such that (x, z) is vertex of the constraint set for the corresponding standard form problem (3). Proof. Let A denote the matrix for the canonical form constraint set, and [A I] the constraint matrix for the corresponding standard form problem. First, suppose that (x, z) is a vertex 8

for problem (3). Then it is a basic feasible solution, and so there is a square submatrix [A I ] of the matrix [A I] such that [ ] x [A I ] = b, z [A I ] is invertible and (x, z ) is the non-zero part of the (x, z). If y and w are directions such that x ± y is feasible for (1), and (x, z) ± (y, w) is feasible for (3), then y only perturbs x and w only perturbs z, because otherwise one direction would violate a non-negativity constraint. So it suffices to pay attention only the matrices A and I, the vectors to x, z, and their perturbations y and w. Suppose that x is not a vertex for the problem (1). Then there is a y such that A (x ± y ) b and x ± y 0. Let w = Ay. Then [ ] x [A I ± y ] = b, z ± w Since (x, z) is a vertex for (3), one of (x, z ) ± (y, w ) must not be non-negative. We assumed that x ± y are both feasible for (1), and hence non-negative, and so one of (z ± w ) is not non-negative. Without loss of generality, assume that z + w = z Ay 0. Thus for some i, z i (Ay ) i < 0. For this i, (Ay ) i > z i, and so (Ax ) i + (Ay ) i > (Ax ) i + z i = b i, contradicting the feasibility of x + y. This contradiction establishes that x is a vertex for the problem (1). Now suppose that x is a vertex for (1), and define z such that Ax + z = b. We will show that (x, z) is a vertex of (3). Again, suppose not. Suppose there are (y, w) such that (x, z) ± (z, w) are feasible for problem (3). Then z ± w are both non-negative, and so A(x ± y) b. Since x is a vertex, x ± y cannot be feasible for (1), and so x ± y are not both non-negative. Hence contrary to assumption, (x, z) ± (z, w) are not both feasible for (3). 9

4 The Fundamental Theorem of Linear Programming The Fundamental Theorem of Linear Programming is an immediate consequence of the Vertex Theorem. Theorem 6 (Fundamental Theorem of Linear Programming). If the linear program (2) has a feasible solution, then it has a basic feasible solution. If it has an optimal solution, then it has a basic optimal solution. This theorem already provides a (really inefficient) algorithm for finding an optimal solution on the assumption that a feasible solution exists. If an optimal solution exists, then a basic optimal solution exists, and there are only a finite number of basic solutions to check. A consequence of theorem 5 and the subsequent definition of a basic solution for the canonical form is that theorem 6 also holds for problems posed in the canonical form. 5 Duality The dual program for problem (1) in canonical form is v D (b) = min y b s. t. ya c y 0 (4) What is the relationship between the primal problem and the dual problem? Write down the Lagrangian for each. For problem (1), letting y denote the multipliers, L(x, y) = cx + yb yax. For problem (4), letting x denote the multipliers, L(y, x) = by xay + xc 10

To find a saddle-point of the Lagrangean L(x,y) (or L(y, x)) is to solve both the primal and the dual problems. This observation demonstrates why there should be a connection between the primal and the dual problems, but in order to get a proof out of it one would need to develop Lagrangean duality, saddle points and so forth. A more direct path exposes the geometry of the problem and leads to geometric insights which can be applied to more general problems. Suppose, more generally than in (4) that we have a primal with some inequality and some equality constraints: v P (c) = max c x s. t. Ax b (5) A x = b x 0 Prove that the dual can be expressed: v D (b, b ) = min y b + z b s. t. ya + za c y 0 (6) That is, it is like the dual for the canonical form with only inequality constraints, but with no sign constraints on the dual variables corresponding to the equality constraints. The first, and easy observation, is the weak duality theorem. Theorem 7 (Weak Duality). For problems (1) and (4), v P (b) v D (c). Proof. Write the problem in the canonical form. For feasible solutions x and y for the primal and dual, respectively, (ya c) x 0, and y (b Ax) 0, so for all feasible primal solutions x and dual solutions y, c x y b. Notice that any feasible y for the dual bounds from above the value of the primal, so if the primal is unbounded, then the feasible set for the dual must be empty,. Similarly, any feasible 11

solution for the primal bounds from below the value of the dual, so if the dual is unbounded then the feasible set for the primal problem must be empty. Theorem 8 (Duality Theorem). For the primal program (1) and the dual program (4), exactly one of the following three alternatives must hold: 1. Both are feasible, both have optimal solutions, and their optimal values coincide. 2. One is unbounded and the other is infeasible. 3. Neither is feasible. Proof. We can prove this theorem by making assertions about the primal and seeing the consequences for the dual, and noting that corresponding statements hold for parallel assertions about the dual. There are three cases to consider: The primal program has feasible solutions and a finite value, the primal program has feasible solutions but an infinite value, and the primal program has no feasible solutions. Suppose first that the primal program has feasible solutions and a finite value. We rewrite the problem in standard form, and we denote its constraint matrix too by A. Then < v P (b) < +, where v P (b) is the least upper bound of the set of feasible values for the primal. First we show that the primal has an optimal solution. Let {x n } denote a sequence of feasible solutions such that c x n v P (b). The fundamental theorem implies that there is a sequence {x n} of basic feasible solutions such that for all n c x n c x n. Thus c x n converges to v P (b). That is, for each n there is a square invertible submatrix A n such that y n = A 1 n b and c x n v P (b) and x n is y n padded out with 0s. There are, however, only a finite number of basic feasible solutions, and so at least one solution x occurs infinitely often in the sequence. Thus c x = v P (b), and x is optimal for the primal. If the value of the primal program is bounded, weak duality bounds the value of the dual, and a parallel argument shows that the dual program has a solution. Next we show that the values of the primal and dual programs coincide. Weak duality says that the value of the dual is at least that of the primal. To prove equality, we show the existence of feasible solutions to the dual program that approximate the value of the primal 12

program arbitrarily closely. We use Farkas lemma to prove this. Consider the primal system of inequalities for a standard form lp (2): [ ] [ ] A b x =, c v P (b) + ɛ x 0. This system has a solution for ɛ = 0, but no solution for ɛ > 0. Accordingly, Farkas lemma says that for any ɛ > 0, the following alternative system has a solution (y, α): [ y [ y ] [ b α v P (b) + ɛ ] [ ] A α 0 (7) c ] < 0 (8) If α = 0, then (y, 0) also solves the alternative for ɛ = 0, a contradiction. If α > 0, then y b + α(v P (b) + ɛ) < 0. This will also hold for ɛ = 0, a contradiction. So α < 0. Without loss of generality, take α = 1. Then (7) implies that y is feasible for the dual, and (8) implies that y b < v P (b) + ɛ. This and weak duality imply that v P (b) v D (c) < v P (b) + ɛ for all ɛ > 0, and so v P (b) = v D (c). The weak duality theorem and the comment following its proof dispenses with the second case, that of an unbounded primal (dual) program. Any feasible solution to the dual (primal) program bounds the value of the primal (dual) program from above (below). So if the value of the primal (dual) program is + ( ), then the dual (primal) program can have no feasible solutions. We demonstrate the last alternative of the theorem by example. Consider the program v P (b) = max(1, 1) (x 1, x 2 ) ( ) ( ) ( ) 1 1 x1 0 s. t., 1 1 1 x 2 x 0. 13

The feasible set for the dual program are those (y 1, y 2 ) that satisfy the inequalities ( ) ( ) 1 1 1 (y 1, y 2 ), 1 1 1 y 0. Neither inequality system has a solution. 6 Complementary Slackness We remain in the canonical form. Let A i and A j denote the ith row and jth column of A. Theorem 9 (Complementary Slackness). Suppose that x and y are feasible for the primal and dual problems, respectively. Then they are optimal for their respective problems if and only if for each constraint i in the primal program, y i (b i A i x ) = 0. Similarly for each constriant j of the dual program, (y A j c)x j = 0. In each case, if the constraint is slack then the corresponding dual variable is 0. Complementary slackness hints at the interpretation of dual variables as shadow prices. This hints at the role of dual variables as shadow prices. In this case, when a constraint is not binding, there is no gain (loss) to slackening (tightening) it. Proof. Suppose that x and y are feasible solutions that satisfy the complementary slackness conditions. Then y b = y Ax and y A x = c x, so y b = c x, and optimality follows from the duality theorem. If x and y are optimal, then since Ax b and y is non-negative, y Ax y b. 14

Similarly, cx y Ax. The duality theorem has c x = y b, so both inequalities are tight. 7 Dual Programs and Shadow Prices The role of dual variables in measuring the sensitivity of optimal values to perturbations of the constraints is an important theme in optimization theory. A familiar example is the equality of the Lagrange multiplier for the budget constraint in a utility optimization problem and the marginal utility of income. This fact is typically explained by the envelope theorem and the first-order conditions for utility maximization. Such results, however, are understood most deeply as consequences of convexity assumptions. Consider again the primal program and its dual program P(b) : D(c) : v P (b) = max c x s. t. Ax b x 0 v D (b) = min y b s. t. ya c y 0 (1) (4) where we now emphasize the dependence of the problems on the constraints. The goal of this section is to describe the value functions v P (b) and v D (c). The domains dom v P and dom v D are the sets of vectors b R m and c R m for which the feasible sets are not empty. They are closed convex cones. 1 Theorem 10. v P (b) is concave, and v D (c) is convex. Their (respective) sub- and supergraphs are closed. 1 Recall that by definition, the value v P (b) > if and only if b dom v P, and v D (c) < + if and only if c dom v C. 15

We prove the first claim. The proof of the second is similar. Proof. The value function is clearly increasing and linearly homogeneous. If (b, v ) and (b, v ) are in the subgraph of v P, then b and b are in dom v P, and there are feasible x and x such that v c x and v c x. For any 0 λ 1, λx + (1 λ)x is feasible for λb + (1 λ)b, so the λ-combination of (b, v ) and (b, v ) is also in the subgraph. Closure of the hypograph of v P and the epigraph of v D follows from the maximum theorem. The maximum theorem applied to b in dom v P asserts that v P is continuous in its domain. (Why? Think consumer theory.) Let (b n, v n ) sub v P converge to (b, v) with b dom v P. Then v n v P (b n ) and v P (b n ) converges to v P (b), so v v P (b). Conclude that (b, v) sub v P (b). The same argument applies to v D. The sets dom v P and dom v D are the values b and c, respectively, for which the problems have feasible solutions. Notice that the preceding proofs did not depend in any way on finiteness of the value functions. The next theorem, while a bit off-point, Theorem 11. Either v P (b) < + for all b dom v P or v P (b) = for all b dom v P. Similarly, Either v D (c) > for all c dom v D or v D (c) = for all c dom v D. The proof is in an appendix. One would not expect the value functions of linear programs to be smooth because basic solutions bounce from vertex to vertex as the constraint set changes. (This suggests piecewise linearity.) But since the relevant functions are concave and convex, super- and subdifferentials will be the appropriate notions of derivatives. Just for review, here are the definitions. Definition 6. The superdifferential of a concave function f on R n at x dom f is the set f (x) = {s : f (y) f (x) + s (y x) for all y R n }. The subdifferential of a convex function g on R n at x dom g is the set g(x) = {t : g(y) g(x) + t (y x) for all y R n }. Each s f (x) (t g(x)) is a supergradient (subgradient) of f (g). The inequalities in the definition are called the super- and subgradient inequalities, respectively, for the concave and convex case. The main result is: 16

Theorem 12. If either v P (b) or v D (c) is finite, then 1. v P (b) = v D (c), 2. programs P(b) and D(c) have optimal solutions x and y, respectively, and 3. v P (b) is the set of optimal solutions to the dual program, and v D (c) is the set of partial solutions to the primal program. The only new part is the statement about sub- and superdifferentials. Theorem 11 implies that if v P (b) is finite for any b in dom v P, then it will be for all b dom v p, and similarly for v D on its domain, and so the super- and subdifferentials exist everywhere in the respective domains. Proof of Theorem 12. We will prove the characterization of solutions to the dual program as supergradients of the primal value function. The other proof proceeds in a parallel manner. One direction is simple. If y solves the dual program to P(b), then y A c and y b = v P (b). Furthermore, y is feasible for any other dual program with objective b, so y b v P (b ). Thus y b v P (b ) 0 = y b v P (b), which implies the supergradient inequality. Next we take up the other direction, proving that any supergradient of the primal value function at b solves the program dual to P(b). In doing so we first assert that v P (b) < + for all b R m. It is off dom v P, and theorem 11 and the hypothesis of the theorem imply that v P is finite everywhere on its domain. The value functions for primal and dual are linear homogeneous as well as concave/ convex. In this case, the super- and subgradient inequalities take on a special form. Lemma 13. (i) if y v P (b) then y b v P (b ) for all b R n, with equality at b = b. (ii) if y v D (c) then y b v D (b ) for all b R n, with equality at b = b. Proof. As usual, we only prove (i). And to prove (i) we need only worry about b dom v P since the value of v P is otherwise. Homogeneity of v P implies that y is a supergradient 17

of v P at b if and only if it is a supergradient of v P at αb. (Apply the supergradient inequality to (1/α)b.) Thus for all α > 0, the supergradient inequality says v P (b ) v P (αb) + y (b αb) = y b + α(v P (b) y b), and so v P (b ) y b for all b dom v P. The supergradient inequality also has that 0 = v P (0) v P (b) + y (0 b), so in addition, y b v P (b). Lemma 13 breaks the subgradient inequality into two pieces. The next lemma shows that a vector y is feasible for the dual if and only if it satisfies the first piece. The following lemma shows that y is optimal if and only if, in addition, it satisfies the second piece. Lemma 14. For any y R m, if y b v P (b ) for all b R m, then y R m is feasible for the dual. Proof. Suppose that y b v P (b ) for all b R m. For any b 0, y b v P (b ) v P (0) = 0, so y 0. 2 For any x 0, y Ax v P (Ax) c x. (The last step follows because x 0 is feasible for the problem with constraint Ax b with b = Ax.) Thus y A c. If y is a supergradient of v P (b), then y is feasible for the dual program and y b = v P (b) = v D (c), this last from the duality theorem, and so y is optimal for the dual program. 2 Recall that v P (b) is nondecreasing in b. 18

Appendix: Farkas Lemma The missing piece of the proof of Farkas lemma is to show that C = {x : Ax = b, x 0} is closed. Let c k be a sequence in C converging to c. Then for each k there is a basic feasible solution x k such that x k = c k. That is, there is a square invertible submatrix A k of A such that x k = A 1 k c k and x k is x k with 0s added for the missing components. There are, however, only a finite number of such submatrices and so one of them, say B must repeat infinitely often in the sequence. The subsequence x l = B 1 c l consisting of those elements such that A k = B, converges to a non-negative x, and the corresponding Ax = lim l Ax l = b. Appendix: Saddle Point Theory for Constrained Optimization You should have learned about saddle points of Lagrangians and convex optimization last term. Here is a quick review. Let H : X Y R, not necessarily concave. Definition 7. A point (x, y ) X Y is a saddle point of H iff for all x X and y Y, H(x, y ) H(x, y ) H(x, y). In words, x maximizes H over X and y minimizes H over Y. Saddle points are important for convex optimization and in game theory. saddle points of H: The set of saddle point pairs is a product set. Here is one important feature of the set of Theorem 15. If (x1, y 1 ) and (x 2, y 2 ) are saddle points, then (x 1, y 2 ) and (x 2, y 1 ) are saddle points, and H(x 1, y 1 ) = H(x 1, y 2 ) = (x 2, y 1 ) = H(x 2, y 2 ). Proof. For i, j = 1, 2, H(x i, y i ) H(x i, y j ) H(x j, y j ) so all saddle points take on the same value. 19

From this equality and the saddle point properties of H(x i, y i ) it follows that H(x, y 2 ) H(x 2, y 2 ) = H(x 1, y 2 ) = H(x 1, y 1 ) H(x 1, y), proving that (x 1, y 2 ) is a saddle point. A similar argument shows the same for (x 2, y 1 ). Now lets suppose that f and g 1,..., g m are each functions from a convex set C R n to R. Denote by g : X R m the function whose ith coordinate function is g i. Consider the constrained optimization problem P : max x f (x) s.t. g 1 (x) 0. g m (x) 0. The Lagrangian for this problem is the function on C R m + L(x, λ) = f (x) + m i=1 λ i g i (x). The x C are the primal variables and the λ R m + Lagrange multipliers. are the dual variables, also called The main theorem is true for any functions, concave or not. Theorem 16. Let X be a a subset of R n, let f and g 1,..., g m be functions from X to R. If (x, λ ) is a saddle point of the Lagrangian L(x, λ) then x solves P. Furthermore, for all i, λ i g i(x ) = 0 (the complementary slackness property. Proof. The saddle point property is that for all x X and λ R m +, L(x, λ ) L(x, λ ) L(x, λ). The second inequality implies that all λ g ( x ) λ g(x ) for all λ 0, so g(x ) 0. (Why?) This shows that x is feasible. Since 0 λ g(x ) 0 g(x ) = 0, so λ g(x ) = 0 20

Since each term in the sum is non-negative, all must be 0. This proves the complementary slackness property. The first inequality implies that for all x C, f (x) + λ g(x) f (x ) + λ g(x ) = f (x ). Thus for any feasible x, that is, g(x) 0, f (x) f (x ). Convince yourself that the same Lagrangian gives the corresponding conclusions for minimization problems with g(x) 0. Now consider the linear program of equation (1). Take g(x) = b Ax, so the mth constraint is g m (x) = b a m x 0. The Larangean for this (primal) problem is L p (x, y) = c x + y b y Ax. The Lagrangian for the dual problem is L d (y, x) = y b + c x y Ax. The point is to notice that the Lagrangians are the same; that the problem of finding optimal dual variable for the primal is the dual problem, and the problem of finding optimal dual 2 variables for the dual is the primal problem. Appendix: Proof of Theorem 11 An easy piece of this highlights the importance of b = 0: v P (0) is either 0 or =, and if the latter, then v P (b) = + for all b in the domain. Lemma 17. If v P (0) = 0, then v P (0) = +. Proof. Since 0 is feasible for P(0), v P (0) 0. If there is an x 0 such that Ax 0 and c x = α > 0, then for any t > 0, tx 0, Atx 0 and c tx = tα, so v P (0) = +. 21

Lemma 18. If v P (0) = +, then for all b dom v P, v P (b) = +. Proof. If v P (0) = +, then for any α > 0 there is an x feasible for P(0) such that c x > α. If x is feasible for P(b), then so is x + x and so v P (b) > c (x + x) = c x + α. The remaining step is to show that if for any b dom v P, if v P (b) = + then v P (0) = +. The second step proceeds by showing that the constraint set {x : Ax b} consists of a translation of the set Q = {x : Ax 0, x 0}. Lemma 19. If the set {x : Ax b, x 0} is non-empty, then it equals the set sum P + Q, where P is a bounded convex set. Proof. For convenience, we suppose that one of the inequalities represented by A and b is x 0, so we do not have to carry the nonnegativity inequality separately. With this convention, our constraint set is C(b) = {x : Ax b} R n. We map this set to the cone K(b) = {(y, t) R n R : Ay tb 0, t 0}. Clearly this is a polyhedral cone in the half-space {(y, t) : t 0}. This set-to-cone correspondence is clearly one-to-one, since C(b) = {x : (x, t) K, t = 1}. Since K(b) is polyhedral, it is generated by a finite number of vectors (y 1, t 1 ),..., (y r, t r ). We can rescale the vectors so that if t i > 0, then t i = 1. Then without loss of generality we can suppose that the first p vectors are of the form (w i, 1) and the remaining q vectors are of the form (z, 0). If p = 0, then C(b) is empty, so p 1. By taking (y r, t r ) = (0, 0) if necessary, we can without loss of generality assume that q 1. C(b) = {x : (x, 1) K(b)}. The set of all vectors in K(b) with last coefficient 1 is the set of all vectors (y, t) = p i=1 α i(w i, 1) + q j=1 β j(z j, 0), where the α i and β j are all non-negative, and p i=1 α i = 1. Thus take P to be the set of convex combinations of the w i, and take Q to be the set of non-negative affine combinations of the z j ; P is clearly bounded, and Q is clearly a cone. Finally, if (z, 0) K(b), then by definition Az = Az 0b 0, proving the characterization of Q. Now to prove the theorem. According to lemma 18, it suffices to show that if for some b, v P (b) = +, then v P (0) = +. Suppose that for some b, v P (b) = +. For all n there 22

exists an x n 0 such that Ax n b and c x n n. Each x n = y n + z n, where y n P and z n Q from lemma 19. Since P is bounded, there is a γ < + such that c y γ for all y P. Therefore c z n +, so v P (0) = +. Lemma 17 states an obvious geometric fact, which is surprisingly hard to prove that every convex polyhedron is the sum of a convex polytope and a convex cone. 23