Choosing the Right CBSE School A Comprehensive Guide for Parents
Linear Programming Problems : Dr. Purnima Pandit
1. Linear Programming Problems
Dr. Purnima Pandit
Assistant Professor
Department of Applied Mathematics
Faculty of Technology and Engg.
The Maharaja Sayajirao University of Baroda
3. Elements
Variables
Objective function
Constraints
Obtain values of the variables
that optimizes the objective function
( satisfying the constraints )
4. Linear Programming (LP)
LP is a mathematical modeling
technique used to achieve an objective,
subject to restrictions called constraints
6. LP Model Formulation
Decision variables
mathematical symbols representing levels of activity of an
operation
Objective function
a linear relationship reflecting the objective of an operation
most frequent objective of business firms is to maximize profit
most frequent objective of individual operational units (such as
a production or packaging department) is to minimize cost
Constraint
a linear relationship representing a restriction on decision
making
8. LP Model: Example
RESOURCE REQUIREMENTS
Labor Clay Revenue
PRODUCT (hr/unit) (lb/unit) ($/unit)
Bowl 1 4 40
Mug 2 3 50
There are 40 hours of labor and 120 pounds of clay
available each day
Decision variables
x1 = number of bowls to produce
x2 = number of mugs to produce
10. Graphical Solution Method
1. Plot model constraint on a set of coordinates
in a plane
2. Identify the feasible solution space on the
graph where all constraints are satisfied
simultaneously
3. Plot objective function to find the point on
boundary of this space that maximizes (or
minimizes) value of objective function
11. Convex Hull
A set C is convex if
every point on the line
segment connecting x
and y is in C.
The convex hull for a
set of points X is the
minimal convex set
containing X.
12. Graphical Solution: Example
x2
50 –
40 –
4 x1 + 3 x2 120 lb
30 –
20 – Area common to
both constraints
10 –
x1 + 2 x2 40 hr
0– | | | | | |
10 20 30 40 50 60 x1
16. Minimization Problem
CHEMICAL CONTRIBUTION
Brand Nitrogen (lb/bag) Phosphate (lb/bag)
Gro-plus 2 4
Crop-fast 4 3
Minimize Z = $6x1 + $3x2
subject to
2x1 + 4x2 16 lb of nitrogen
4x1 + 3x2 24 lb of phosphate
x 1, x 2 0
17. Graphical Solution
x2
14 –
x1 = 0 bags of Gro-plus
12 – x = 8 bags of Crop-fast
2
10 –
Z = $24
8–A
Z = 6x1 + 3x2
6–
4–
B
2–
C
0– | | | | | | |
2 4 6 8 10 12 14 x1
18. Two type of Constraints
Binding and Nonbinding constraints:
A constraint is binding if the left-hand and right-
hand side of the constraint are equal when the
optimal values of the decision variables are
substituted into the constraint.
A constraint is nonbinding if the left-hand side
and the right-hand side of the constraint are
unequal when the optimal values of the decision
variables are substituted into the constraint. 18
19. Special Cases of Graphical Solution
• Some LPs have an infinite number of solutions
(alternative or multiple optimal solutions).
• Some LPs have no feasible solution (infeasible
LPs).
• Some LPs are unbounded: There are points in
the feasible region with arbitrarily large (in a
maximization problem) z-values.
19
20. Alternative or Multiple Solutions
X2
60
B
D
50
Any point (solution) Feasible Region
falling on line segment
40
AE will yield an optimal
solution with the same E
30
objective value z = 100
z = 120
20
z = 60
10
F
A C
10 20 30 40 50 20
X1
21. No feasible solution
X2
60
No Feasible Region
50
x1 >= 0
40
Some LPs have no
x2 >=0
solution. Consider
30
the following
formulation:
20
10
No feasible region exists
10 20 30 40 50 21
X1
22. Unbounded LP
X2
Feasible Region
6 D
The constraints are
5 B
satisfied by all points z=4
bounded by the x2 axis 4
and on or above AB and 3
CD.
2
There are points in the
feasible region which 1
z=6
will produce arbitrarily
A C
large z-values 1 2 3 4 5 6 X1
(unbounded LP). 22
24. Cannonical form
Standard form is a basic way of describing a LP
problem.
It consists of 3 parts:
A linear function to be maximized
maximize c1x1 + c2x2 + … + cnxn
Problem constraints
subject toa11x1 + a12x2 + … + a1nxn < b1
a21x1 + a22x2 + … + a2nxn < b2
…
am1x1 + am2x2 + … + amnxn < bm
Non-negative variables
x1, x2 ,…, xn > 0
25. Obtain Standard Form
IMPORTANT: Simplex only deals with equalities
General Simplex LP model:
min (or max) z = ci xi
s.t.
Ax=b
x0
In order to get and maintain this form, use
slack, if x b, then x + slack = b
surplus, if x b, then x - surplus = b
artificial variables (sometimes need to be added to
ensure all variables 0 )
26. Different "components" of a LP model
LP model can always be split into a basic
and a non-basic part.
“Transformed” or “reduced” model is
another good way to show this.
This can be represented in mathematical
terms as well as in a LP or simplex
tableau.
27. Simplex
A simplex or n-simplex is
the convex hull of a set of
(n +1) . A simplex is an n-
dimensional analogue of a
triangle.
Example:
a 1-simplex is a line segment
a 2-simplex is a triangle
a 3-simplex is a tetrahedron
a 4-simplex is a pentatope
28. Movement to Adjacent
Extreme Point
Given any basis we move to an adjacent extreme point
(another basic feasible solution) of the solution space by
exchanging one of the columns that is in the basis
for a column that is not in the basis.
Two things to determine:
1) which (nonbasic) column of A should be brought
into the basis so that the solution improves?
2) which column can be removed from the basis
such that the solution stays feasible?
29. Entering and Departing Vector
(Variable) Rules
General rules:
The one non-basic variable to come in is the one
which provides the highest reduction in the objective
function.
The one basic variable to leave is the one which is
expected to go infeasible first.
NOTE: THESE ARE HEURISTICS!!
Variations on these rules exist, but are rare.
30. Example Problem
Maximize Z = 5x1 + 2x2 + x3
subject to
x1 + 3x2 - x3 ≤ 6,
x2 + x3 ≤ 4,
3x1 + x2 ≤ 7,
x1, x2, x3 ≥ 0.
33. Step 2: Explanation
Adjacent Basic Feasible Solution
If we bring a nonbasic variable xs into the basis, our system changes from the
basis, xb, to the following :
x1 + ā1sxs= b1 x = b a for i =1, …, m
i i is
xr + ārsxr= b xs = 1
r
xj = 0 for j=m+1, ..., n and js
xm + āmsxs= b
s
The new value of the objective function becomes:
m
Z c (b a
i 1
i i is ) c s
Thus the change in the value of Z per unit increase in xs is
cs = new value of Z - old m
m
value of Z
= c (b a
i 1
i
m
i is ) c s c b
i 1
i i
This is the Inner Product rule
= c c a
s i is
i 1
34. Simplex: Step 3
Use the inner product rule to find the relative profit coefficients
cB Basis cj Constants
5 2 1 0 0 0
x1 x2 x3 x4 x5 x6
0 x4 1 3 -1 1 0 0 6
0 x5 0 1 1 0 1 0 4
0 x6 3 1 0 0 0 1 7
c row 5 2 1 0 0 0 Z=0
c j c j cB Pj
c1 = 5 - 0(1) - 0(0) - 0(3) = 5 -> largest positive
c2 = ….
c3 = ….
Step 4: Is this an optimal basic feasible solution?
35. Simplex: Step 5
Apply the minimum ratio rule to determine the basic variable to leave the basis.
The new values of the basis variables:
xi = bi a is x s for i = 1, ..., m
bi
max xs min
a is 0 a is
In our example:
cB Basis cj Constants
5 2 1 0 0 0 Row Basic Variable Ratio
x1 x2 x3 x4 x5 x6 1 x4 6
0 x4 1 3 -1 1 0 0 6 2 x5 -
0 x5 0 1 1 0 1 0 4 3 x6 7/3
0 x6 3 1 0 0 0 1 7
c row 5 2 1 0 0 0 Z=0
39. Simplex Variations
Various variations on the simplex method exist:
"regular" simplex
two-phase method: Phase I for feasibility
and Phase II for optimality
Condensed / reduced / revised method: only
use the non-basic columns to work with
(revised) dual simplex, etc.
40. Limitations of Simplex
1. Inability to deal with multiple objectives
2. Inability to handle problems with integer variables
Problem 1 is solved using Multiplex
Problem 2 has resulted in:
Cutting plane algorithms (Gomory, 1958)
Branch and Bound (Land and Doig, 1960)
However,
solution methods to LP problems with integer or
Boolean variables are still far less efficient than those
which include continuous variables only
41. Primal and Dual LP Problems
•Economic theory indicates that scarce (limited) resources
have value. In LP models, limited resources are allocated, so
they should be, valued.
•Whenever we solve an LP problem, we implicitly solve two
problems: the primal resource allocation problem, and the
dual resource valuation problem.
•Here we cover the resource valuation, or as it is commonly
called, the Dual LP.
42. Max c X j j
Primal s.t. a X
j
ij j bi for all i
j
Xj 0 for all j
Min b Y i i
Dual s.t.
i
a Y
i
ji i c j for all j
Yi 0 for all i