This directory contains compressed matlab and fortran programs
for linear programming. There are several examples as well.
Also, there is a compress tar file simplex.tar.Z
You can download this tar file to get all the files in the directory,
i.e. in bina

disp('Example 1 for Phase I,II')
disp('original problem (P) data with objective row z -c' 0
is: ')
A0=[
1
10
1 -2
0
012014
0 0 1 -1 1 1 ]
pause
disp('change to auxiliary problem (A) with artificial vrbles and new objective
row: ')
A1=[
1
00
00
11
0
012011

% This m file uses the Primal Dual Affine Scaling Algorithm to solve
%
% linear programming problems.
% Author: Henry Wolkowicz
%
% Modified by: Steven Furino 20051212
% Assumptions
% The user has already created the matrices A, b and c and has provided
%

s
ws
9
p
hI)Xp
p
p
h)@
p p
hj)Xp
s
y'vSvdq'hut
3q
k r y x vg
7)q'Ihpw)2
u r u e v eg k k r y r r q eg x r v e q q q eg y y q v r q ug t e y d v t r q
Bh)426pUhhE4Ihhwp'4sswsvpSpwSh'tsU)%SuB)"
s
6
$ h
x cfw_ cfw_
hf2h%
x y x x
[email protected]

CO350 Linear Programming
Chapter 9: The Revised
Simplex Method
11th July 2005
Chapter 9: Revised Simplex Method
1
Example of infeasibility
Solve the LP using revised two-phase method with smallestsubscript rules.
max (z =) 2x1
(P )
s.t.
x2
3x1 + 10x2 + 7

CO350 Linear Programming
Chapter 9: The Revised
Simplex Method
8th July 2005
Chapter 9: Revised Simplex Method
1
Example of unboundedness
Solve the LP using revised simplex method with smallestsubscript rules.
max 3x1 2x2
x1
s.t.
(P )
3 x3
x2
x3 1
7x1

CO350 Linear Programming
Chapter 9: The Revised
Simplex Method
29th June 2005
Chapter 9: Revised Simplex Method
1
Motivation
The most computationally intensive part of the simplex
method is pivoting;
i.e., the construction of the new tableau.
Tableau:
z
x

CO350 Linear Programming
Chapter 8: Degeneracy and
Finite Termination
27th June 2005
Chapter 8: Finite Termination
1
Recap
The perturbation method
max cT x
(P )
s.t.
Ax = b
x0
Assumption: B is a feasible basis with AB = I .
(P ): perturb b to b = b + [, 2

CO350 Linear Programming
Chapter 8: Degeneracy and
Finite Termination
24th June 2005
Chapter 8: Finite Termination
1
Recap
The perturbation method
max cT x
(P )
s.t.
Ax = b
x0
Assumption: B is a feasible basis with AB = I .
Perturb the right hand side to

CO350 Linear Programming
Chapter 8: Degeneracy and
Finite Termination
22th June 2005
Chapter 8: Finite Termination
1
Recap
On Monday, we established
In the absence of degeneracy, the simplex method will
terminate after a nite number of iterations.
The f

Review of Part III:
Solving LP problems
We learned how to solve LP problems using
the simplex method and
the two-phase method.
We also studied
basic feasible solutions and
extreme points.
By now, you should be able to
give the denitions of basis, bas

CO350 Linear Programming
Chapter 7: The Two-Phase
Method
17th June 2005
Chapter 7: The Two-Phase Method
1
Recap
max (z =) x1
(P )
s.t.
3 x 1 + 5 x2 + 2 x 3 x 4 = 7
2 x 1 + 5 x2 + 3 x 3 + x 4 = 3
x1 ,
x2 ,
x3 , x4 0
So far this week, we learned
to constru

CO350 Linear Programming
Chapter 7: The Two-Phase
Method
16th June 2005
Chapter 7: The Two-Phase Method
1
Recap
To construct auxiliary problem (A) for
max cT x
(P )
s.t.
Ax = b
x0
we
make sure that b 0,
introduce one articial variable ui for each constr

CO350 Linear Programming Chapter 7: The Two-Phase Method
13th June 2005
Chapter 7: The Two-Phase Method
1
Recap
In the past week and a half, we learned the simplex method and its relation with duality. By now, you should know how to solve an LP problem gi

CO350 Linear Programming
Chapter 6: The Simplex Method
10th June 2005
Chapter 6: The Simplex Method
1
Recap
On Wednesday, we learned four common choice rules for
entering variables:
Largest coecient rule (Dantzigs rule);
Smallest subscript rule;
Larges

CO350 Linear Programming
Chapter 6: The Simplex Method
8th June 2005
Chapter 6: The Simplex Method
1
Minimization Problem (6.5)
We can solve minimization problems by transforming it
into a maximization problem.
Another way is to change the selection rule

CO350 Linear Programming
Chapter 6: The Simplex Method
3rd June 2005
Chapter 6: The Simplex Method
1
Recap
Suppose A is an m-by-n matrix with rank m.
max. cT x
(P )
s.t.
Ax = b
x0
On Wednesday, we learned
if (P ) has an optimal solution, then it has an o

CO350 Linear Programming
Chapter 5: Basic Solutions
1st June 2005
Chapter 5: Basic Solutions
1
Recap
On Monday, we learned
Theorem 5.3
Consider an LP in SEF with rank(A) = # rows. Then
x is bfs x is extreme point of the feasible region.
Denition of basi

CO350 Linear Programming
Chapter 5: Basic Solutions
30th May 2005
Chapter 5: Basic Solutions
1
Recap
Last week, we learn
Denition of a basis B of matrix A.
Denition of basic solution x of Ax = b determined by
basis B .
x is a basic solution if and only

CO350 Linear Programming
Chapter 5: Basic Solutions
27th May 2005
Chapter 5: Basic Solutions
1
Notation
maximize
(P )
cT x
subject to
Ax = b
x0
Many times, we will assume that A has rank = # rows.
This is w.l.o.g.:
Apply Gaussian Elimination to [A|b] and

CO350 Linear Programming
Chapter 4: Introduction to
Duality
25th May 2005
Chapter 4: Introduction to Duality
1
Economic Interpretation of
Duality (Section 4.6, Pg 51)
General Production Problem
A factory makes n products from m resources. Each unit
of pro

CO350 Linear Programming
Chapter 4: Introduction to
Duality
20th May 2005
Chapter 4: Introduction to Duality
1
Recap
maximize
LP in SEF:
(P )
Dual LP:
(D )
cT x
subject to
Ax = b
minimize
x0
bT y
subject to AT y c
Complementary Slackness (CS) Condition
x

Chapter 3: Standard Forms
1
Introduction
LP problems takes many form three types of constraints
and two types of objectives.
Instead of developing theories and methods for all kinds of
LP, we focus on TWO simple forms of LP problems
Standard Inequality F

Chapter 1: An Introduction
1
Recap
Terminology
Objective function
Objective value
Constraints
Optimal solution
Feasible solution
Optimal value
Feasible region
Geometry of LP (Orange Factory Problem)
x2
dT
(1,5)
d
b
d
2x1 + 3x2 = 17
b
d
(0,4)
d

Chapter 1: An Introduction
1
Recap
Denition of LP problem: (Pg 9)
minimizing or maximizing a linear function subject to nite
number of linear equalities and/or linear inequalities.
Examples
maximize
2x1 + 3x2
subject to
2 x1 +
x2 10
x1 +
x2
6
x1 +
x2
4

Chapter 1: An Introduction
1
Beginning With an Example
The Orange Factory Problem
Factory produces two products:
Frozen concentrate and Orange juice.
Each unit of
and produces
2 units electricity
$2 prot
1 unit orange
Frozen concentrate
requires
1 unit wa

function [dx,dy,ds]=intpteff(A,b,c,x,y,s)
% Finds a affine scaling search direction for LP in SEF
% Input:
%
A,b,c
data for LP problem max c'x s.t. Ax=b, x>=0
%
x,y,s
current (int) feasible primal-dual pair, x>0, s>0
%
[m,n]=size(A);
%M=[
%
zeros(n)
A'
-e

function [dx,dy,ds]=intpt(A,b,c,x,y,s)
% Finds a affine scaling search direction for LP in SEF
% Input:
%
A,b,c
data for LP problem max c'x s.t. Ax=b, x>=0
%
x,y,s
current (int) feasible primal-dual pair, x>0, s>0
%
[m,n]=size(A);
M=[
zeros(n)
A'
-eye(n)