You are on page 1of 9

Batch Planning and Resources Allocation

Application 2
AN LP PROBLEM AND ITS DUAL: GEOMETRIC APPROACH, SIGNIFICANCES OF DUAL VARIABLES

Example 2. Some theoretical properties of LP models: Duality, geometry of LP, extreme points and a nave approach
in solving an LP problem.
Consider a linear programming model P and its dual D:
P: maximize x1 x2
subject to x1 2 x2 6
x1 x2 3
x1 , x2 0

D: minimize 61 3 2
subject to 1 2 1
21 2 1
1 , 2 0

P : max c T x

D : min T b

Ax b, x 0

AT c , 0

i.e.

Concentrate now on P. Has P a solution ?

The feasible set defined by the constraints of P can be represented as in Fig.1.
x1 = 0
D

x1x2=3

x2

C
A

x2 = 0
x1+2x2=6

x1
F

_________________________________________________________________________________________________________________________
Con. V.E.Oltean. BPRA: Application 2: An LP problem and its dual: significances of dual variables as shadow prices
2/9

Remarks. Recall some basic definitions.

A convex set S R n is characterized by x, y S , x (1 ) y S , (0, 1) .
S CONVEX
y
x
=1
=0

S NOT CONVEX y
x
=1
=0

A function f : S R is convex if x, y S , f ( x) (1 ) f ( y) f (x (1 ) y) , [0, 1] , i.e. the set above its

graph is convex.
Very important! 1) If S is convex and f is convex any local extreme of f is also global on S.
2) The feasible set of a LP is convex.
3) A linear function is both convex and concave (objective function in LP !!!)

Extreme points of the feasible set. The optimum of P is between the extreme points of the feasible set, i.e. at a
corner of the feasible set. More formally: Given S convex, x S is an extreme point if whenever x y (1 ) z ,
for y, z S and (0, 1) , then x y z , i.e. x is not in the interior of any line segment.
The optimum is searched between the extreme points of the feasible set
Algorithm for solving LP (nave!)
Input: The feasible set and the objective function f
Output: The optimal extreme point x * (so that f ( x*)
min

x extreme point

f ( x) )

1. Find all the vertices of the feasible set.

2. Pick the best one.
Remark. This is not a good approach, as shown in the optimization course, basically because of the
computational complexity. Details, later! Remind the simplex algorithm.
_________________________________________________________________________________________________________________________
Con. V.E.Oltean. BPRA: Application 2: An LP problem and its dual: significances of dual variables as shadow prices
3/9

The nave approach for solving P is, however, instructive! Rewrite P and D with slack variables, i.e.
in P: Ax b Ax z b , z 0 , and in D: AT c AT v c , v 0 , hence
D: minimize 61 3 2
subject to 1 2 v1 1
21 2 v2 1
1 , 2 0 , v1 , v2 0

P: maximize x1 x2
subject to x1 2 x2 z1 6
x1 x2 z 2 3
x1 , x2 0 , z1 , z 2 0

1 = 0

x1 = 0
D

z2=0

x2
Ax b
A

C
E

B
x1

v2=0

x2 = 0
z1=0

A
F

AT c

2 = 0

D E

1
v1=0

_________________________________________________________________________________________________________________________
Con. V.E.Oltean. BPRA: Application 2: An LP problem and its dual: significances of dual variables as shadow prices
4/9

x1

x2

z1

z2

P: C
D
E
F

0 3

0 3 12

0 3

v1

v2

0 2

0 23 13

0 12

0 1 3

0
D: C
D 1 2
E
0
F
2

Only C is feasible for both P and D C is the optimum

In conclusion:
P: maximize x1 x2
subject to x1 2 x 2 6
x1 x 2 3
x1 , x2 0
x2
i.e.
P : max c T x
Ax b, x 0

Geometric representation:
x1 = 0
3

cTx* = 5
c

x1x2 = 3
C (4,1)

Solution: x* [4 1]T , f ( x*) 5 .

x2 = 0
x1+2x2 = 6

x1
3

_________________________________________________________________________________________________________________________
Con. V.E.Oltean. BPRA: Application 2: An LP problem and its dual: significances of dual variables as shadow prices
5/9

and:
the feasibility set X { x R 2 : ( x1 2 x 2 6) ( x1 x 2 3)} is a convex polyhedron resulted from the
intersection of two halfplanes (i.e. 2-dimensional halfspaces) restricted to the first quadrant and
the optimum, or the problem value, in this case the maximal value of the function f ( x) c T x x1 x 2 ,
for x X is reached at a vertex of the polyhedron.
Note also that geometrically, increasing the value of the objective function f ( x ) c T x means that the
line c T x d , with d real parameter, evolves in the plane, starting from the origin (where d 0 ), in the
direction of its normal c [1 1]T , till it reaches the vertex C (4,1) , where d f ( x*) 5 .

Greater explanation concerning the search of optimum solutions and the properties of feasible values is given
later ! Recall now, briefly (see the Optimization lectures)) that a basic solution of Ax b is a solution with at
least n m 2 2 zero variables (all solutions are basic) and C is also feasible in both cases, because:
P: x1C 4 0 and x2C 1 0 ,
D: 1C 2 3 0 and 2C 1 3 0
hence it is optimal.
( In fact, it will be detailed later that sufficient optimality comes from:
1) xC x * is feasible for P, C * is feasible for D and
2) they satisfy complementary slackness: xCi vi 0 , Ci zi 0 , i 1,2 . )

_________________________________________________________________________________________________________________________
Con. V.E.Oltean. BPRA: Application 2: An LP problem and its dual: significances of dual variables as shadow prices
6/9

Economic significance of the dual optimal variables C *

Economic problem: Given
P : max f ( x ) c T x

D : min T b

Ax b, x 0

AT c , 0

the vector b (b1 b2 )T signifies the upper bound for the resources (or goods) used to produce the quantities x with
optimal profit contribution (see Example 1).
PROBLEM: How does the optimal value of the objective function f (x*) vary when b varies, i.e. when the available
production resources vary?
Geometrically: The point C will change its coordinates, which now depend on b.
x1 = 0
D

z2=0

x2
Ax b
A

C
E

x2 = 0
z1=0

x1
F

Lets compute the coordinates of C C (b) .

x 4
b 3
In the original problem, b 1 , x* 1C and the optimal program is f ( x*) 4 1 5 .
b2 6
x 2C 1

_________________________________________________________________________________________________________________________
Con. V.E.Oltean. BPRA: Application 2: An LP problem and its dual: significances of dual variables as shadow prices
7/9

Now b b and, as a result, x * (b) x * (b ) What is the variation of f ( x * (b)) , i.e. the sensitivity of the
solution with resources variation ?
The simplest approach is the geometrical one. The coordinates of C, - which is the intersection of the lines z1 0 and
z 2 0 - satisfy the algebraic system:
x1 2 x2 b1

x1 x2 b2

b1 2b2

*
x1C x1
2b b
3
f ( x * (b)) x1* x2* 1 2 .

b b
3
x2C x2* 1 2
3

4
Remark. Recall that to the initial optimal variables x* xC (where C {z1 0} {z2 0} )
1
2 3
correspond, in D, the dual variables * C (in the dual plane, C {v1 0} {v2 0} )!
1 3
Compute :
f ( x * (b)) 2 * f ( x * (b)) 1 *
1 ,
2
b1
3
b2
3
Economic interpretation: The optimal dual variables * give the variation speed of the optimal program f (x*)
with the upper bound b of the constraints. These optimal dual variables are also called
LAGRANGE MULTIPLIERS

A short explanation for the last term (general explanation later, in the chapter dedicated to Lagrangian methods!)
_________________________________________________________________________________________________________________________
Con. V.E.Oltean. BPRA: Application 2: An LP problem and its dual: significances of dual variables as shadow prices
8/9

Joseph-Louis Lagrange (1736-1813)

Conclusion. Economic interpretation for
Economic problem: Given
P : max f ( x ) c T x

D : min T b

Ax b, x 0

AT c , 0

Dual variables: price for violating primal constraints,

i.e. * b f ( x * (b)) , when b b

Primal constraints: resources

_________________________________________________________________________________________________________________________
Con. V.E.Oltean. BPRA: Application 2: An LP problem and its dual: significances of dual variables as shadow prices
9/9