Linear programming
• Programming means planning.
• Model contains linear mathematical functions.
• Applies to wide variety of situations.
• Often for allocating limited resources among competing activities
in the best possible way is the
Symbols in LP Problem
Data needed for an LP model
General form of an LP
Any situation whose mathematical formulation fits this model is a
linear programming (LP) problem.
Assumptions of an LP Problem
1. Proportionality
• The contribution of each decision variable to the objective function or
to each constraint is proportional to the value of that variable. The
contributions from decision variables are independent from one
another .
• If assumption does not hold, one must use nonlinear
programming
Assumptions of an LP Problem
2. Additivity
Every function in a linear programming model is the sum
of the individual contributions of the activities.
3. Divisibility
• Each decision variable is allowed to take fractional
values.
• Including non-integer values.
Assumptions of an LP Problem
4. Certainty
• Value assigned to each parameter of a linear programming
model is assumed to be a known constant.
• Seldom satisfied precisely in real applications.
• Sensitivity analysis used.
Sigma and Matrix Form of LP
• Compact form using sigma notation
• Matrix form
Standard and Canonical Forms of an LP
How to convert an LP to standard form?
1. Slack variables
2. Surplus variables
3. Deal with bounded variables
4. Unrestricted variables
-How to convert to max?
How to convert an LP to standard form?
Convert to standard form
Geometric (Graphical ) Solution
• This method is only suitable for small problems with two
variables
• But provides a great deal of insight into the linear
programming problem.
Geometric (Graphical ) Solution
Consider the following problem:
• Since z=cx is to be minimized, then the hyperplane (line in a
two-dimensional space) of the isocost (isoprofit for maximization)
must be moved parallel to itself in the direction that minimizes the
objective the most. This direction is -c, and hence the plane is
moved in the direction of -c as much as possible, while maintaining
contact with the feasible region.
•
For the Maximization problem, the improving direction is c itself
Geometric Solution
Example
• Draw the feasible region
• Specify the gradient of the objective
• Move in the improving direction until you leave
the feasible region
Geometric Solution
• Unique Optimal Solution
Example
Geometric Solution
• Alternative Optimal Solutions
• Unbounded Optimal Objective Value
Geometric Solution
Empty Feasible Region
Geometric Solution-Summary
We can graphically solve an LP with two decision variables as
follows:
Step 1: Graph the feasible region.
Step 2: Draw an isoprofit line (for max problem) or an isocost
line (for min problem).
Step 3: Move parallel to the isoprofit/isocost line in the
improving direction (-c for min and c for max). The last point
in the feasible region that contacts an isoprofit/isocost line is
an optimal solution to the LP.
Questions
• If I give you a feasible region, can you give me an objective
that the problem can be infeasible?
• How about an objective that a specific corner point
becomes optimal?
• Can an interior point be optimal?
• What to do if a constraints in LP is strict inequality?
Geometric Solution
• Have you noticed anything about the optimal points?
They are all extreme points or corner points of the
feasible region for LP.
So, Lets define the extreme points algebraically.
Convex sets
Convex combination:
Convex set:
Convex sets
• The feasible region of LP is a convex set.
Proof?
Extreme Points
Extreme point: A point x in a convex set X is called an
extreme point of X if x cannot be represented as a
strict convex combination of two distinct points in X.
Fundamental Theorem of Linear Programming (LP):
• Not every optimal solution has to be at an extreme point.
Simplex Method
•So far, we have studied how to solve two-variable LP problems
graphically.
•However, most real-life problems have more than two variables!
•Therefore, we need to have another method to solve LPs with
more than two variables.
•Simplex Algorithm is quite useful in solving very large LP
problems.
•Today, The Simplex Algorithm is used to solve LP problems in
many industrial applications that involve thousands of variables
and constraints.
Simplex method
• Goerge Dantzig published the "simplex method" in 1949, a
significant development in the field of LP.
• The simplex method of linear programming enjoys wide
acceptance because of (1) its ability to model important and
complex management decision problems, and (2) its capability
for producing solutions in a reasonable amount of time.
Simplex method
The essence of the Simplex method:
•Start with an extreme point
• Move to a neighboring extreme point in the improving
direction
• Stop if all neighbors are no better
How to find a feasible extreme point?
How to go to a neighbor?
Simplex method
• To use the Simplex Method, LP problems should be converted to Standard
Form LP
• We know from 2-variables that extreme points are potential optimal
solutions.
• This will be true in higher dimensions as well.
• We need an ALGEBRAIC way of characterizing extreme points. We can’t
draw the feasible region in higher dimensions.
• Standard form LPs will provide an easy way to do this characterization.
All constraints are equalities, with constant nonnegative right-hand sides
(RHS) and all variables are nonnegative.
•Any LP can be brought into standard form!
Simplex method
• Consider the LP in standard form. So, I need to solve the
system of equations Ax=b, and then find the best solution.
• Will I still have solutions?
To start, simplex method needs for LP to be feasible. How do I
know that the system of equalities has solution(s)?
• Is there a way to write b as linear combination of columns
of A?
Simplex method
Example
-The third constraints is redundant.
Simplex method
• Basic Solution: A solution to Ax=b is called a basic solution if it is obtained
by setting n-m variables equal to 0 and solving for the remaining m variables
whose corresponding columns in A are linearly independent.
• Basic Feasible Solution (BFS) is a BS which is also non-negative.
• BFS points are in correspondence with corner feasible solutions.
Simplex method
- In the 2 variable case you could see all the corner points.
- But if more variables, we cannot graph it but we can
consider the equivalent definition of corner points as BFS.
Simplex method
Fundamental Theorem of LP (Revisited)
The collection of basic feasible solutions and the collection of
extreme points are equivalent. In other words, a point is a basic
feasible solution if and only if it is an extreme point.
For an LP in standard form:
•If feasible set of an LP is non-empty, then there is at least one BFS.
•If an LP has an optimal solution, then there is a BFS which is
optimal.
Simplex method
Example:
Simplex method
Simplex method
Simplex method
Upper bound for # of BFS
Simplex method
Adjacent BFS solutions(neighboring extreme points ):
•For any LP with m constraints, two BFS are said to be
adjacent if their set of basic variables have m−1 basic
variables in common.
• Intuitively, two extreme points are adjacent if they both lie
on the same edge of the boundary of the feasible region
(n-1 active hyperplanes in common)
•Simplex algorithm goes from a BFS point to an adjacent BFS
point with a better objective value.
Simplex method
General description of the Simplex method:
1. Convert the LP problem into a standard form LP.
2. Obtain a BFS to the LP. This BFS is called the initial BFS.
In general, the most recent BFS is called the current BFS. Therefore,
at the beginning the initial BFS is the current BFS.
3. Determine if the current BFS is an optimal solution or not.
4. If the current BFS is not optimal, then find an adjacent BFS with a
better objective function value (one non-basic variable becomes basic
and one basic variable becomes non-basic).
5. Go to Step 3.
Simplex method
Example
Simplex method
Algorithmic approach of Simplex:
Initialization: Start with a BFS
Main iteration:
• Update the whole system based on the current basis matrix.
• Apply the optimality test
a. Stop if optimal.
b. Continue with updating the basis if not:
• Determine which variable enters the basis (This determines
which direction to move in for improvement)
• Determine which variable exits the basis (This determines
how much to move in the improving direction)
Simplex method-Tableau format
• Now solve the same example in a Tableau format
Simplex method
Solve the following example in Tableau format.
Simplex method
• How to identify optimality from the Tableau format?
• How to recognize unboundedness?
• How to identify alternative optimal solutions case?
• How to use the Tableau format for the maximization problem