You are on page 1of 88

Linear programming

Introduction to Linear Programming


 In June 1947, US Air Force wanted to investigate the
feasibility of applying mathematical techniques to military
budgeting and planning.

 George Dantzig had proposed that interrelations between


activities of a large organization can be viewed as a LP
model and that the optimal program (solution) can be
obtained by minimizing a (single) linear objective function.

 At the end of summer in 1947, Dantzig and associates


developed an initial mathematical model of the general
linear programming problem, and a general method of
solution called the SIMPLEX method.
What is LP?

The Linear Programming (LP)


problems are optimization problems
in which the objective function and
the constraints are all linear.
What will LP do?

The most common type of application


involves the general problem of
allocating limited resources among
competing activities in a best
possible way.
Why talk about LP?

 LP is simpler than NLP, hence, good for a foundation.

 Linearity has some unique features for optimization.

 A lot of problems are or can be converted to a LP


formulation.
 Some NLP algorithms are based upon LP simplex
method.
Linear Programming model
 A Linear Programming model seeks to maximize or
minimize a linear function, subject to a set of linear
constraints.

 The linear model consists of the following components:

- An objective function.
- A set of decision variables.
- A set of constraints.
Brewery Problem
Small brewery produces ale and beer.
• Production limited by scarce resources: corn, hops, barley malt.
• Recipes for ale and beer require different proportions of resources.

Corn Hops Malt Profit


Beverage
(pounds) (ounces) (pounds) ($)
Ale 5 4 35 13
Beer 15 4 20 23
Quantity 480 160 1190

How can brewer maximize profits?


• Devote all resources to beer: 32 barrels of beer  $736.
• Devote all resources to ale: 34 barrels of ale  $442.
• 7½ barrels of ale, 29½ barrels of beer  $776.
• 12 barrels of ale, 28 barrels of beer  $800.
Brewery Problem

Mathematical Model:

max 13 A  23B
s. t. 5 A  15B  480
4 A  4B  160
35 A  20B  1190
A , B  0
Brewery Problem: Graphical Method
Hops Malt
4A + 4B  160 35A + 20B  1190

(0, 32)
(12, 28)
Feasible (26, 14) Corn
Region 5A + 15B  480

Beer

(0, 0) Ale (34, 0)


Brewery Problem: Objective Function

(0, 32)
(12, 28)
13A + 23B = 1600
(26, 14)

Beer 13A + 23B = 800

(0, 0) Ale (34, 0)


13A + 23B = 442
Brewery Problem: Geometry
Brewery problem observation. Regardless of coefficients
of linear objective function, there exists an optimal solution
that is an extreme point.
Extreme points

(0, 32)
(12, 28)
(26, 14)

Beer

(0, 0) Ale (34, 0)


LP standard form
Objective
Maximize: Z  c1 x1  c2 x2  c3 x3  ...  cn xn Function

Subject to:
a11 x1  a12 x2  ...  a1n xn  b1
a21 x1  a22 x2  ...  a2 n xn  b2
Constraint
. . Set
. .
am1 x1  am 2 x2  ...  amn xn  bm
Non-negative x1  0, x2  0,..., xn  0
Right-hand side Non-negative
Constants b1  0, b2  0,..., bm  0 Variables
Constraint
LP standard form: matrix description
Maximize: Z  cx
Subject to: Ax  b
x0 where,
b0 c  [c1 c2 . . . cn ]

a11 a12 . . . a1n  b1   x1 


a a . . . a  b  x 
A   21 22 2n 
b 2 x   2
. .  .  . 
     
am1 am 2 . . . amn  bm   xn 
Converting a LP into standard Form

 If we have a min instead of a max:


Min ( 2x1 – 3x2 + 4x3 ) with subject to…
Negate coefficients and look for max:
Max ( – 2x1 + 3x2 – 4x3 ) with subject to…

 Some Xj does not have non-negative constraints:


Define two new variables Xj = Xj ’ – Xj ”
with Xj ’, Xj ” ≥ 0
Replace Xj with (Xj ’ – Xj ”) wherever it appears.
Slack and surplus variables
x1 + 3x2 + 5x3 ≤ 10
Introduce a slack variable x4:
x1 + 3x2 + 5x3 + x4 = 10
(x4 ≥ 0)

x1 + 3x2 + 5x3 ≥ 10
Introduce a surplus variable x5:
x1 + 3x2 + 5x3 - x5 = 10
(x5 ≥ 0)
Non-standard to standard Form: an
example
The answer
Graphical solution
Graphical solution
Graphical solution
Graphical solution
Graphical solution
Graphical solution

B
The optimal solution
is at B, which is the
solution of C
Feasible
region

x1=2, x2=6,
Z=36000.
Graphical solution
 Feasible solution – A solution
for which all constraints are
satisfied (point 1)
 Infeasible solution – A solution
Point 3 for which at least one constraint
is violated (point 2)
Point 2  Feasible region – The collection
of all feasible solutions (blue
Point 1 region)
 Optimal solution – A feasible
solution that has the most
favorable value of the objective
function (point 3)
Graphical solution discussion

1. How about minimize?

Feasible C
region
Graphical solution discussion
2. Feasible region

Empty feasible region->


no solution
Graphical solution discussion
3. Multiple solution

Every point in line


segment BC is an Feasible C
optimal solution. region
Graphical solution discussion
4.Unbounded region

Feasible region is
unbounded, x2 could
increase indefinitely.
->no optimal solution and
Z is unbounded.

Unbounded ?=? no solution


Simplex-based algorithms
Basic feasible solution
 Each variable is designated as either a basic or a non-
basic variable.
 The number of basic variables equals the number of
functional constraints. Therefore, the number of non-
basic variables equals the total number of variables
minus the number of functional constraints.
 The non-basic variables are set equal to zero.
 The value of the basic variables are obtained as the
simultaneous solution of the system of equations.
 The basic variables satisfy the non-negative constraints.
Basic feasible solution
The following two theorems explain why the concept
of a basic feasible solution is of great importance in
linear programming:

Theorem 1 The feasible region for any linear programming


problem is a convex set. Also, if an LP has an optimal
solution, there must be an extreme point of the feasible
region that is optimal.

Theorem 2 For any LP, there is a unique extreme point


(vertex) of the LP’s feasible region corresponding to each
basic feasible solution.
Convex set

Convex Set Non-convex set


SIMPLEX Method
 A finite number of extreme points implies a finite number of
solutions, hence, search is reduced to a finite set of points.

 However, a finite set can still be too large for practical


purposes.

 SIMPLEX Method provides an efficient systematic search


guaranteed to converge in a finite number of steps.
Basic Steps of Simplex
 Begin the search at an extreme point (i.e., a basic feasible
solution).

 Determine if the movement to an adjacent extreme can improve


the objective function. If not, the current solution is optimal. If,
however, improvement is possible, then proceed to the next step.

 Move to an adjacent extreme point which offers improvement in


the objective function.

 Continue steps 2 and 3 until an optimal solution is reached.

Feasible
region
Simplex algorithm
 Step 1 Convert the LP to standard form
 Step 2 Obtain a bfs from the standard form
 Step 3 Determine whether the current bfs is optimal
 Step 4 If the current bfs is not optimal, determine which
nonbasic variable should become a basic variable and
which basic variable should become a nonbasic variable, to
find a bfs with a better objective function value.
 Step 5 Find a new bfs with a better objective function
value. Go back to Step 3.
Summary
The simplex algorithm starts at some vertex of the
feasible region and performs a sequence of iterations.
In each iteration, it moves along an edge of the feasible
region from a current vertex to a neighboring vertex
whose objective value is improved. The simplex
algorithm terminates when it reaches a local maximum,
which is a vertex from which all neighboring vertices
have a smaller objective value.
Other algorithms for LP
 The simplex algorithm often solves general
linear programs quickly in practice. With
some carefully contrived inputs, the simplex
algorithm can require exponential time.
 The first polynomial-time algorithm for linear
programming was the ellipsoid algorithm,
which runs slowly in practice.
 A second class of polynomial-time algorithms
are known as interior-point methods.
Example
 To explain the steps of the algorithm we consider the following LP
maximize z  3x1  5 x2
s.t. x1  8
2 x2  12
3x1  4 x2  36
x1 , x2  0

 Converting this to standard form, we have


maximize z  3x1  5 x2
s.t. x1  x3  8
2 x2  x4  12
3 x1  4 x2  x5  36
x1 , x2 , x3 , x4 , x5  0
Solve Constraints in Terms of non-basic variables

Looking at the objective function z = 3x1 + 5x2 , we see that:


– x1, and x2 are the non-basic variables
– x3, x4, and x5 are the basic variables

We solve each constraint equation for the basic variable in


terms of the non-basic variables

x3 = 8 - x1
x4 = 12 - 2 x2
x5 = 36 - 3x1 - 4x2
Choose Entering Variable
Next we choose the entering variable x2 by
looking at the objective function
z = 3x1 + 5x2 largest coefficient, choose x
2

We see that we can increase z the most by


increasing x2, so we choose x2 to be the
entering variable
Choose Departing Variable
 Now that we have the entering variable, we want to maximize it in
order to increase the objective function as much as possible, however
we must satisfy all of the constraints.
 We consider the maximum amount we can increase x2 by letting all
other non-basic variables be zero (in this case, x1)
 Since all xi must be non-negative, this places an upper bound on how
much we can increase the entering variable (x2)
x3  8 Here we can increase x2 indefinitely
without making x3 negative
x4  12  2 x2 Here we can make x2 at most 6
x5  36  4 x2 before x4 becomes negative
Here we can make x2 at most 9
 Thus, to satisfy all constraints we before x5 becomes negative

choose the minimum upper bound for x2 of the three constraints.


– Thus, x4 will be the departing variable
The process continues…

maximize z  3x1  5 x2
s.t. x1  x3  8
2 x2  x4  12
3 x1  4 x2  x5  36
x1 , x2 , x3 , x4 , x5  0
Optimal solution

X  (4,6,4,0,0)
* T

z  42
*
Applications of LP
 Many problems can be formulated as maximizing or
minimizing an objective, given limited resources and
competing constraints.

 If we can specify the objective as a linear function of


certain variables, and if we can specify the constraints
on resources as equalities or inequalities on those
variables, then we have a linear-programming
problem.

 Linear programs arise in a variety of practical


applications.
A political problem
Suppose that you are a politician trying to win
an election. Your district has three different
types of areas-urban, suburban, and rural. These
areas have, respectively, 100,000, 200,000, and
50,000 registered voters. To govern effectively,
you would like to win a majority of the votes in
each of the three regions.
policy Urban suburban rural

build roads -2 5 3

gun control 8 2 -5

farm subsidies 0 0 10

gasoline tax 10 0 -2

 Each entry describes the number of thousands of urban,


suburban, or rural voters who could be won over by spending
$1,000 on advertising support of a policy on a particular issue.
Negative entries denote votes that would be lost.
 Your task is to figure out the minimum amount of money that
you need to spend in order to win 50,000 urban votes, 100,000
suburban votes, and 25,000 rural votes.
Solution
We introduce 4 variables:
 x1 is the number of thousands of dollars spent
on advertising on building roads,
 x2 is the number of thousands of dollars spent
on advertising on gun control,
 x3 is the number of thousands of dollars spent
on advertising on farm subsidies, and
 x4 is the number of thousands of dollars spent
on advertising on a gasoline tax.
We format this problem as

minimize x1+x2+x3+x4
subject to
-2x1+8x2+0x3+10x4≥50
5x1+2x2+0x3+0x4≥100
3x1-5x2+10x3-2x4≥25
x1, x2, x3, x4≥0
Personnel Scheduling
 UNION AIRWAYS needs to hire additional customer
service agents.
 Each agent works an 8-hour shift 5 days per week, and the
authorized shifts are
 Shift 1: 6:00 A.M. to 2:00 P.M.
 Shift 2: 8:00 A.M. to 4:00 P.M.
 Shift 3: Noon to 8:00 P.M.
 Shift 4: 4:00 P.M. to midnight
 Shift 5: 10:00 P.M. to 6:00 A.M.
 The minimum number of agents that need to be on duty at
different times of the day are shown in the table.
 For each shift, the daily compensation (including benefits)
for each agent is shown in the bottom row.
 Goal: how many agents should be assigned to the
respective shifts each day to minimize the total personnel cost .
Analysis

x1 x2 x3 x4 x5
Material cutting
We have a batch of steel pipes with length 8
meters, and require 100 pieces with length
2.5 meters and 200 pieces with length 1.3
meters cut from the batch. What is the
minimum number of steel pipes that must be
cut?

Analysis: To seek for a material-saving solution, the first is to consider


all the preferable cutting patterns, which include the following four
patterns:

Ⅰ Ⅱ Ⅲ Ⅳ
2.5m 3 2 1 0
1.3m 0 2 4 6
Remnants 0.5 0.4 0.3 0.2
The quantities of raw materials required for patterns Ⅰ, Ⅱ,
Ⅲ, and Ⅳ are set as xj (j = 1, 2, 3, 4), respectively. The LP
model can be built as the following:

min Z  x1  x2  x3  x4
3x1  2 x2  x3  100

2 x2  4 x3  6 x4  200
 x  0 ( j  1, 2, 3,4)
 j
Material cutting in 2-dimension:
An interesting problem

What is the maximum number of discs


with diameter one can be cut from a 10
times 10 square?
100?
105?
106?
Air Traffic Control
 Air plane j (1,2,…,n) arrives at the airport within the
time interval [aj, bj ] in the order of 1,2,…,n. The airport
wants to find the arrival time for each air plane such
that the minimal metering time (inter-arrival time
between two consecutive airplanes) is the greatest.
How to model this problem as a LP?
Analysis: Let tj be the arrival time of the jth plane,
j=1…n.

LP model?
Reformulate the problem as a LP:
max 
s.t. t2  t1    0
t3  t 2    0

tn  tn 1    0
a j  t j  bj j  1, 2,, n
0-1 Integer Linear Programming

We present some examples that illustrate a variety of formulation


techniques with binary variables (i.e., 0-1 variables).
Course Selection Problem
A school requires that the graduates of management major must take 2 math
courses, 3 economics courses, and 2 computer courses at least. The credits,
categories, and prerequisites for these courses are shown in the following
table. What is the minimum number of courses a student must take for
graduation?

Number Course Credit Category Prerequisite


1 Economic Mathematics 5 Mathematics
2 Mathematical Statistics 4 Mathematics
Economic Mathematics、
3 Microeconomics 4 Mathematics、Economics
Mathematical Statistics
4 Data Structure 3 Mathematics、Computer Computer Programming
Economic Mathematics、
5 Econometrics 4 Mathematics、Economics
Mathematical Statistics
6 E-Commerce 3 Computer、Economics Computer Programming
7 Computer Programming 2 Computer
8 Macroeconomics 2 Economics Microeconomics
Economic Model Economic Mathematics、
9 3 Economics、Computer
Building Mathematical Statistics
Solution

 Use xi =1 or 0 to indicate whether a course (by number) is


selected or not, and the objective function is to minimize
the number of selected courses :
Min z=x1+x2+x3+x4+x5+x6+x7+x8+x9
 Constraint 1:
The number of courses required for each category
x1+x2+x3+x4+x5 ≥ 2
x3+x5+x6+x8+x9 ≥ 3
x4+x6+x7+x9 ≥ 2
 Constraint 2 :
The prerequisite requirements.
E.g., if the prerequisite course of Data Structure x4 is
Computer Programming x7, then if x4=1, it implies
that x7=1, which can be formulated as x4 ≤ x7.

2x3-x1-x2 ≤ 0
x4-x7 ≤ 0
2x5-x1-x2 ≤ 0
x6-x7 ≤ 0
x8-x7 ≤ 0
2x9-x1-x2 ≤ 0
Allocating TV spots
A corporation is developing its marketing plans for next year’s new products. For three
of these products, it is considering purchasing a total of five TV spots for commercials
on national television networks. The problem we will focus on is how to allocate the
five spots to these three products, with a maximum of three spots (and a minimum of
zero) for each product.
The following table shows the estimated impact of allocating zero, one, two, or three
spots to each product. This impact is measured in terms of the profit from the additional
sales that would result from the spots, considering also the cost of producing the
commercial and purchasing the spots. The objective is to allocate five spots to the
products so as to maximize the total profit.
Profit
Number of TV
Product
spots
1 2 3
0 0 0 0
1 1 0 -1
2 3 2 2
3 3 3 4
Solution
This small problem can be solved by inspection. However, we will show an
ILP formulation. Such a formulation would become necessary if this small
problem needed to be incorporated into a large IP model involving the
allocation of resources to marketing activities for all the corporation’s new
products.
A natural formulation would be to let x1,x2,x3 be the number of TV spots
allocated to the respective products. The contribution of each xj to the
objective function then would be given by the corresponding column in the
table. However, each of these columns violates proportionality. Therefore,
we cannot write a linear objective function in terms of these integer decision
variables.
Now see what happens when we introduce an auxiliary binary variable yij
for each positive integer value of xi=j (i=1,2,3 ; j=0,1,2,3), where yij has the
following interpretation
1, if xi  j
yij  
0, otherwise
Covering All Flights

An airline needs to assign its crews to cover all its upcoming flights.
We will focus on the problem of assigning three crews based in San
Francisco (SF) to the flights listed in the first column of the next table.
The other 12 column shows the 12 feasible sequences of flights for a
crew. Exactly three of the sequences need to be chosen in such a way
that every flight is covered. (It is permissible to have more than one
crew on a flight, where the extra crews would fly as passengers, but
union contracts require that the extra crews still be paid for their time
as if they were working). The cost of assigning a crew to a particular
sequence of flights is given (in thousands of dollars) in the bottom row
of the table. The objective is to minimize the total cost of the three
crew assignments that cover all the flights.
Feasible Sequence of Flights
Flight 1 2 3 4 5 6 7 8 9 10 11 12
San F. to Los A. 1 1 1 1
San F. to Denver 1 1 1 1
San F. to Seattle 1 1 1 1
Los A. to Chicago 2 2 3 2 3
Los A to San F. 2 3 5 5
Chicago to Denver 3 3 4
Chicago to Seattle 3 3 3 3 4
Denver to San F. 2 4 4 5
Denver to Chicago 2 2 2
Seattle to San F. 2 4 4 5
Seattle to Los A. 2 2 4 4 2
Cost, $1,000 2 3 4 6 7 5 7 8 9 9 8 9
Formulation with binary variables: with 12 feasible sequences of flights, we have 12
yes-or-no decisions:
1, if sequence j is assigned to a crew,
xj  
0, otheriwse
MinZ  2 x1  3 x2  4 x3  6 x4  7 x5  5 x6 
7 x7  8 x8  9 x9  9 x10  8 x11  9 x12


 x1  x4  x7  x10  1
 x2  x5  x8  x11  1

 x3  x6  x9  x12  1
x  x  x  x
12  1
 4 7 9

 x1  x6  x10  x11  1

 x4  x5  x9  1

 x7  x8  x10  x11  x12  1
x  x  x  x  1
 2 4 5 9

 x5  x8  x11  1

 x3  x7  x8  x12  1
 x6  x9  x10  x11  x12  1
 12

 xj  3
 j 1
 x j is binary , for j  1,2...,12.

Duality theory
One of the most important discoveries in the early development
of linear programming was the concept of duality. This discovery
revealed that every linear programming problem has associated with
it another linear programming problem called the dual. The
relationships between the dual problem and the original problem
prove to be extremely useful in a variety of ways.
Example
There is a company which produced two products A and B, and
information is in the following table.
A B Available materials
Material 1 2 3 24
Material 1 3 2 26
profit($/each) 4 3
How does the company arrange its productions to make the total profit
maximum?
max Z  4 x1  3 x 2
2 x1  3 x 2  24 ( material 1)

s.t .3 x1  2 x 2  26 ( material 2)

 x1 , x 2  0
Now, from the other way, if the company would not want to arrange the
production, and would rather sell its materials to get revenue then how to
determine the sale price of materials.

A B Available materials
Material 1 2 3 24
Material 2 3 2 26
profit($/each) 4 3

min W  24 y  26 y
1 2

 2 y  3 y  4 ( product A)
 1 2

s .t . 3 y  2 y  3 ( product B )

1 2

y , y 0
1 2

Principle of no loss: constraints


Principle of competitiveness: objective function
If we look closely to these two LP problems …

max Z  4 x1  3 x 2 min W  24 y  26 y
1 2
2 x1  3 x 2  24 ( material 1)  2 y  3 y  4 ( product A)
  1 2
s.t .3 x1  2 x 2  26 ( material 2) 
 s .t . 3 y  2 y  3 ( product B )
 x1 , x 2  0 
1 2

y , y 0

1 2
Standard form
Given the standard form for the primal problem at
the left, its dual problem has the form shown to the
right.

Primal problem Dual problem


n m
max Z   c j x j min W   bi y i
j 1
i 1
 a x b
n

  ij j m
 a ij y i  c j
i
s.t. j 1
x j  0 s .t . i 1
 y  0
 i
Key observations
1. The primal problem in maximization form, the dual problem is in
minimization.
2.The coefficients in the objective function of the primal problem
are the right-hand sides of the functional constraints in the dual
problem.
3. The right-hand sides of the functional constrains in the primal
problem are the coefficients in the objective function of the dual
problem.
4.The coefficients of a variable in the functional constraints of the
primal problem are the coefficients in a functional constraint of the
dual problem.
The primal-dual table for linear programming also helps to highlight
the correspondence between the two problems in standard form.

primal problem

x1 x2  xn
y1 a11 a12  a1n  b1
Dual
y2 a21 a22  a2 n  b2
problem
    
yn am1 am 2  amn  bm

c1 c2  cn
Relationship between the primal and the Dual
in general form
Primal Problem Dual Problem
(or Dual Problem) (or Primal Problem)
Maximize Minimize
Constraint i Variable y i
< form yi > 0
= form y i unconstrained
> form yi < 0
Variable x j Constraint j
xj > 0 > form
x j unconstrained = form
xj < 0 < form
Example

Primal Dual
min z  2 x1  3 x2  5 x3  x4 max w  5 y1  4 y2  6 y3
s.t. x1  x2  3 x3  x4  5 s.t. y1  2 y2 2
2 x1  2 x3  x4  4 y1  y3  3
x2  x3  x4  6 3 y1  2 y2  y3  5
x1  0, x2  0, x3  0 y1  y2  y3  1
y1  0, y2  0, y3 free
Primal and dual in compact (matrix)
form

P:max Z  CX D:min W  Y T b
AX  b  A T Y  CT
 
 X0  Y0

Primal Dual
Problem Problem
Primal and Dual Relationships
a. Symmetry Property:
– Dual’s dual=primal problem

b. Weak Duality property


– Relationships between feasible solutions for primal and
dual
CX  Y T b

c. Strong Duality property


– Relationships between optimal solutions for primal and
dual
CX 0  Y0T b primal dual
Primal and Dual Relationships

d. Duality theorem
– If one problem has feasible solutions and bounded
objective functions, then so does the other
problem. So both weak and strong duality
properties are applicable
– If one problem has feasible solutions and unbounded
objective functions, the other problem has no
feasible solutions.
– If one problem has no feasible solution, then the other
problem either has no feasible solution, or an
unbounded objective function.
Economic Interpretation

Decision variable yi: marginal contribution


(value) to profit of resource i (shadow price)

P:max Z  CX D:min W  Y T b
AX  b  A T Y  CT
 
 X0  Y0

n m
z*
z   c j x j  bi yi ,  yi * (i  1,2m)
j 1 i 1 bi
Shadow Price
 The shadow price is a kind of marginal price, which is the
change of the optimal value of the objective function
caused by a unit change of the resource.
 The shadow price is the valuation of unit resource under
the conditions of optimal utilization of the resources, and
such a valuation is not the actual market price of the
resource.
 If a certain resource is not completely consumed in
production, the shadow price of the resource is 0; if the
shadow price of the resource is not 0, it indicates that the
resource is completely consumed in production.
Sensitivity Analysis
A furniture factory manufactures 4 types of small furniture.
Because they have different sizes, shapes, and styles, the main
raw materials (timber and glass) and production time for them
are different. The available timber, glass, and labor hours, and
the unit profit and maximum demand of each type in a day are
showed below.
Maximum
Furniture Timber Glass Profit per
Labor-hours demand
type (units) (units) piece (yuan)
(pieces)
1 2 4 6 60 100
2 1 2 2 20 200
3 3 1 1 40 50
4 2 2 2 30 100
Available
400 hours 600 units 1000 units
Amount
Questions
1. How to arrange the daily production of these four types of
furniture to maximize the daily profit?

2. Will the furniture factory be willing to pay 10 yuan to a


worker, for working an hour overtime?

3. If the available labor time reduces to 398 hours, how will the
optimal daily profit change?

4. Which resource should be purchased preferentially?

5. If the unit profit of the first type furniture fell from 60 yuan to
55 yuan, then, how will the optimal production planning and
daily profit change?
Modeling and Analysis

Max Z  60 x1  20 x2  40 x3  30 x4
4 x1  2 x2  x3  2 x4  600
6 x  2 x  x  2 x  1000
 1 2 3 4

2 x1  1x2  3 x3  2 x4  400

 x1  100
s.t. 
 x2  200
 x3  50

 x4  100
x , x , x , x  0
 1 2 3 4
Conclusions on duality

Every linear programming problem has associated with


it a dual linear programming problem. There are a
number of very useful relationships between the
original problems and its dual problem that enhance
our ability to analyze the primal problem. For example,
the economic interpretation of the dual problem gives
shadow prices that measure the marginal value of the
resources in the primal problem.
Homework 1
1. Please give the standard form 2. Please give the dual LP of the
of the following LP following LP
Max Z  2 x1  x2  3x3  x4 Min Z  2 x1  2 x2  4 x3
 x1  x2  x3  x4  7 2 x1  3x2  5 x3  2

s.t.  2 x1  3x2  5 x3  8  3x  x  7 x  3
 x , x  0, x  0, x free 
 1 3 s.t.  1 2 3

 x1  4 x2  6 x3  5
2 4

 x1 , x2 , x3  0

3. Please solve the following LP by graphical method


max Z = 2X1 + X2
X1 + 1.9X2 ≥ 3.8
s.t. X1 - 1.9X2 ≤ 3.8
X1 + 1.9X2 ≤ 10.2
X1 - 1.9X2 ≥ -3.8
X1 , X2 ≥ 0

You might also like