BBA BS 340 Unit3&4
BBA BS 340 Unit3&4
Maximize (Minimize):
Subject to:
15
4. The right-hand side constraint of each constant in nonnegative.
Maximize (Minimize) :
Subject to :
In other words,
The standard form and its associated general notations are illustrated by the
following example:
Maximize:
Subject to:
16
In this problem,
The simplex method for solving linear programming problems requires the
problem to be expressed in standard form. But not all linear programming
problems come in standard form. Very often the constraints are expressed as
inequalities other than equations. In some problems all the decision variables
may not be nonnegative.
Since the standard form requires all the constraints to be equations, inequality
constraints have to be converted to equations. This can be done by the
introduction of new variables to represent the slack between the left-hand side and
right-hand side of each inequality. The new variables are called slack or surplus
variables.
17
Note that is also nonnegative, and represents unused resources.
It should be emphasized here that slack and surplus variables are as much a part
of the original problem as the variables used in the formulation of the linear
program. These variables can remain positive throughout, and their values in the
optimal solution give useful information about the problem.
In some situations, it may become necessary to introduce a variable that can assume both
positive and negative values.
In the first year we solved linear programming problems by a geometric method. This
method is not practical when the number of variables increases to three and is not
possible beyond that. Now we look at a different technique – the Simplex Method,
whose name is linked in more advanced discussions to a geometric object called a
simplex.
The Simplex Method begins with a feasible solution and tests whether or not it is
optimum. If not optimum, the method proceeds to a better solution. We say “better” in
the sense that the new solution brings you closer to optimization of the objective
function. Should this solution not be optimum, then we repeat the procedure. Eventually
the simplex method leads to an optimum solution, if one exists.
Besides being efficient, there are other advantages to the simplex method. It is
completely mechanical (we use matrices, elementary row operations, and basic
arithmetic). Moreover, no geometry is involved. This allows us to solve linear
programming problems having any number of constraints and variables.
18
In this section we shall consider only so-called standard linear programming problems.
These can be put in the following form.
(1)
Note that one feasible solution to a standard linear programming problem is always
Other types of linear programming
problems will be discussed later.
Example 1
(2)
(3)
This problem is of standard form. We begin expressing constraints (2) and (3) as
equations. In (2), will equal 8 if we add some nonnegative number
where
We call a slack variable since it makes up for the “slack” on the left side of (2) so that
we have equality. Similarly, inequality (3) can be written as an equation by using the
slack variable
19
Now we can restate the problem in terms of equations:
Maximize
Such that
and
We know that the optimum solution occurs at a corner point of the feasible region. At
each of these points at least two of the variables are 0, as the
following listing indicates:
(0, 4)
(3, 2)
A B
(0, 0) (4, 0)
Figure 1.0 optimum solution must occur at corner point of feasible region.
1. At A, we have
20
4. At D, From equation (6), Thus
It can also be shown that any solution to equations (5) and (6) such that at least two of the
four variables are zero, corresponds to a corner point. Any such
solution where at least two of these variables are zero is called a basic feasible solution
(abbreviated B.F.S). This number, 2, is determined by the expression n-m, where is the
number of constraints (excluding the non negativity conditions) and is the number of
variables that occur after these constraints are converted to equations. In our case
and For any particular B.F.S., the two variables held at zero value are called non-
basic variables, whereas the others are called basic variables for that B.F.S. Thus for the
B.F.S corresponding to discussion (3) above are the non basic variables, but for
the B.F.S corresponding to (4) the non basic variables are
We eventually want to find a B.F.S that maximizes.
We shall first find an initial B.F.S and then determine whether the corresponding value of
Z can be increased by a different solution to this standard linear programming problem,
let us initially find the B.F.S. Where the structural variables are non basic.
That is, we choose and find the corresponding values of
This can be done most conveniently by matrix techniques.
If we write equation (4) as , then equations (5), (6) and (4) form the
system
In terms of an augmented coefficient matrix, called the initial simplex tableau, we have
Solution
2 1 1 0 0 8
2 3 0 1 0 12
-3 -1 0 0 1 0
The first two rows correspond to the constraints, and the last row, called the objective
row, correspond to the objective equation - thus the dashed horizontal separating line.
Notice that if then from rows 1, 2 and 3 we can directly read off the
values of That is why we placed the letters
to the left of the rows. Thus our initial basic feasible solution is
at which Let us see if we can find a B.F.S that gives
a larger value of Z.
21
The variables are non basic in the B.F.S above. We shall now look for a
B.F.S in which one of remains non basic. Which one should we choose as the basic
variable? Let us examine the possibilities. From the Z-row of the matrix above,
If is allowed to become basic, then remains at 0 and thus,
for each one-unit increase in increases by three units. On the other hand, if is
allowed to become basic, then remains at 0 and thus, for each one unit increase
in increases by one unit. Hence we get a greater increase in the value of Z if
rather than enters the basic variables category. In this case we call an entering
variable. Thus, in terms of the simplex tableau the entering variable can be found by
looking at the “most negative” of the numbers enclosed by the brace in the Z-row. (By
most negative we mean the negative indicator having the greatest magnitude.) Since that
number is – 3 and appears in the is the entering variable. The numbers
in the brace are called indicators.
Solution
2 1 1 0 0 8
2 3 0 1 0 12
-3 -1 0 0 1 0
indicators
entering
variable
In our new B.F.S, the larger increase in (from , the larger the increase in Z.
Now, by how much can we increase ? Since is still held at 0, from rows 1 and 2 of
the simplex tableau above it follows that:
From the first inequality from the second, Thus must be less than or
equal to the smaller of the quotients 4 and 6, which is 4. Hence can increase at most
by 4. However, in a B.F.S two variables must be 0. We already have Since
must be 0 for Thus we have a new BFS with replacing as a
basic variable.
22
That is, will depart from the category of basic variables in the previous BFS and will
be non basic in the new BFS. We say that is the departing variable for the previous
BFS.
Before proceeding let us update our tableau. To the right of the tableau below, the
quotients are indicated. They are obtained by dividing each entry in the first
two rows of the b-column by the entry in the corresponding row of the centering variable
column. Notice that the departing variable is in the same row as the smaller quotient
Solution Quotients
Departing 2 1 1 0 0 8 (smaller)
variable 2 3 0 1 0 12
-3 -1 0 0 1 0
Since and will be basic variables in our new BFS, it would be convenient to change
our previous tableau by elementary row operations into a form where the values of
can be read off with ease. To do this we want to find a matrix which is
equivalent to the tableau above but which has the form where the question marks. Notice
here that if then equals the number in row 1 of the last column,
equals the number in row 2, and Z is the number in row 3.
Solution
1 ? ? 0 0 ?
0 ? ? 1 0 ?
0 ? ? 0 1 ?
Thus we must transform the tableau into an equivalent matrix that has a 1 where the
circled entry appears and 0’s elsewhere in the The circled entry is called the
pivot entry – it is in the column of the entering variable (called the pivot column) and the
row of the departing variable (called the pivot row). By elementary row operations, we
have
Solution
½ R1 x1 1 0 0 4
2 3 0 1 0 12
-3 -1 0 0 1 0
23
Solution
x1 1 0 0 4
0 2 -1 1 0 4
0 0 1 12
Solution
x1 1 0 0 4
0 2 -1 1 0 4
0 0 1 12
indicators
For then from the first row we have from the second,
These values give us the new BFS. Note that we replaced the located to the left of the
initial tableau in (7) by in our new tableau (8) – thus departed and entered.
From row 3, for we get Z=12 which is a larger value than we had
before (it was zero).
(9)
Here each one – unit increase in decrease Z by ½ unit. Thus any increase in would
make Z smaller than before. On the other hand, if becomes basic and remains non
basic, then from equation 9,
24
Here each one – unit increase in decreases Z by units. Thus any increase in
would make Z smaller than before. We cannot move to a better BFS. In short, no BFS
gives a large value of Z than the BFS. (which gives Z=12).
Such that
is
maximum when and the maximum value of Z is 12.
Example 2
Maximize subject to
Example 3
Maximize subject to
(10)
Although the simplex procedure that has been developed in this section applies only to
linear programming problems of standard form, other forms may be adapted to fit this
form. Suppose that a constraint has the form
25
where Here the inequality symbol is
and the constant on the right side is negative. Thus the constraint is not in standard form.
However, multiplying both sides by -1 gives
This does have the proper form. Thus it may be necessary to rewrite a constraint before
proceeding with the simplex method.
In a simplex tableau, several indicators may “tie” for being most negative. In this case,
choose any one of these indicators to give the column for the entering variable.
Likewise, there may be several quotients that “tie” for being the smallest. You may
choose any one of these quotients to give you the departing variable and pivot entry.
Example 3 will illustrate this. When a tie for the smallest quotient exists, then along
with the non basic variables a BFS will have a basic variable that is 0. In this case
we say that the BFS is degenerate or that the linear programming problem has a
degeneracy.
Solution: Constraint (10) does not fit the standard form. However, multiplying both
sides of inequality (10) by -1 gives
which does have the proper form. Thus our initial simplex tableau
is tableau I.
Solution Quotients
Departing 1 2 0 1 0 0 10 102=5
variable
2 2 1 0 1 0 0 102=5
-3 -4 0 0 1 0
Indicators
entering
variable
The entering variable is Since there is a tie for the smallest quotient, we can choose
either as the departing variable. Let us choose The pivot entry is circled.
Using elementary row operations, we get tableau II.
Solution
1 0 0 0 5 No
Departing
variable Quotients
2 2 1 0 1 0 0 since 0 is
-1 0 2 0 1 20 not positive
01=0
26
Indicators
entering
variable
Tableau II correspond to a BFS where a basic variable, is zero. Thus the BFS is
degenerate. Since there are negative indicators, we continue. The entering variables is
now the departing variable is and the pivot is circled. Using elementary row
operations, we get tableau III.
Solution
1 0 0 0 5
1 0 1 -1 1 0 0
0 0 1 20
Indicators
BFS3 BFS2,
Z=d Z=d
BFS1, Z=d
Figure 1.2
NOTE: An LP is degenerate if it has at least one basic feasible solution in which a basic
variable is equal to zero.
Unbounded Solutions:
If no quotients exist in a simplex tableau, then the linear programming problem has an
unbounded solution.
27
Multiple Optimum Solutions
In a tableau that gives an optimum solution, a zero indicator for a non basic variable
suggests the possibility of multiple solutions.
Example 1
Unbounded Solution
Maximize
Subject to
Example 2
Multiple Solutions
Maximize
Subject to
Example 3
Maximize
Subject to
28
UNIT 4
Artificial variables
29
Maximize
Subject to
Maximize
Subject to
Since (0, 0) is not in the feasible region, we do not have BFS in which
To get the simplex method started, we need an initial BFS. Although none is
obvious, there is an ingenious method to arrive at one artificially. It requires that
we consider a related linear programming problem called the artificial problem.
First, a new equation is formed by adding a nonnegative variable to the left side
of the equation in which the coefficient of the slack variable is The variable
is called an artificial variable. In our cases we replace equation (7) by
Thus equations (6) and (7) become
Where
We define the artificial objective function to be
30
Where the constant is a large positive number. We shall not worry about the
particular value of and shall proceed to maximize by the simplex method.
Since there are constraints (excluding the nonnegativity conditions) and
variables in equations (8) and (9), any BFS must have at least
variables equal to zero. We start with the following BFS:
Artificial Variables
Maximize
Subject to
is a large value.
t
1 1 1 0 0 0 9
1 -1 0 -1 1 0 1
-1 -2 0 0 +M 1 0
1 1 1 0 0 0 9
1 -1 0 -1 1 0 1
-M-1 M-2 0 M 0 1 -M
-1-M -2+M 0 M 0 1 -M
31
0 2 1 1 -1 0 8
1 -1 0 -1 1 0 1
0 -3 0 -1 M+1 1 1
0 2 1 1 0 8
1 -1 0 -1 0 1
0 -3 0 -1 1 1
x2 0 1 0 4
1 0 0 5
Z 0 0 1 13
Optimal solution is:
1 1 1 0 0 0 0 12
1 2 0 1 0 0 0 20
-1 1 0 0 -1 1 0 2
-2 -1 0 0 0 M 1 0
32
M -M 0 0 M -M 0 -2M
-2 -1 0 0 0 M 1 0
-2+M -1-M 0 0 M 0 1 -2M
1 1 1 0 0 0 0 12
1 2 0 1 0 0 0 20
-1 1 0 0 -1 1 0 2
-2+M -1-M 0 0 M 0 1 -2M
2 0 1 0 1 -1 0 10
3 0 0 1 2 -2 0 16
-1 1 0 0 -1 1 0 2
-3 0 0 0 -1 1+M 1 2
2 0 1 0 1 0 10
3 0 0 1 2 0 16
-1 1 0 0 -1 0 2
-3 0 0 0 -1 1 2
1 0 0 0 5
0 0 1 0 1
0 1 0 0 7
33
0 -0 0 1 17
Maximize
Subject to
1 2 2 0 1 0 0 6
1 0 -1 -1 0 1 0 2
-1 -3 2 0 M M 1 0
1 2 2 0 1 0 0 6
1 1 -1 -1 0 1 0 2
-1-M -3-2M 2-2M 0 0 M 1 -6M
1 2 2 0 1 0 0 6
1 1 -1 -1 0 1 0 2
-1-2M -3-3M 2-M M 0 0 1 -8M
-1 0 4 2 1 -2 0 2
1 1 -1 -1 0 1 0 2
2+M 0 -1-4M -3-2M 0 3+3M 1 6-2M
1
4 0 1 0
1 0 0 3
2
34
0 0 1
2 2 1 -1 0 1
1 1 0 0 0 3
0 5 0 M 1 9
1.1 Minimization
Example 1
Minimization
Subject to
Minimization
In standard form,
35
Maximize
Alternatively,
-2 1 -1 0 1 0 0 1
-1 1 0 -1 0 1 0 2
1 2 0 0 M 1 0
-2 1 -1 0 1 0 0 1
-1 1 0 -1 0 1 0 2
2M+1 2-M M 0 0 M 1 -M
-2 1 -1 0 1 0 0 1
-1 1 0 -1 0 1 0 2
1+3M 2-2M M M 0 0 1 -3M
-2 1 -1 0 1 0 0 1
1 0 1 -1 -1 1 0 1
5-M 0 2-M M -2+2M 0 1 -2-M
-1 1 0 -1 0 1 0 2
-1 0 1 -1 -1 1 0 1
3 0 0 2 M -2+M 1 -4
36
-1 1 0 -1 0 2
-1 0 1 -1 0 1
3 0 0 2 1 -4
Step 2: Find a basic feasible solution. This is easy if all the constraints are with
nonnegative right-hand sides. Then the slack variable may be used as the basic
variable for row If no bfs is readily apparent, use the techniques to be discussed later
the Big M Method and the Two-Phase Method.
Step 3: If all non basic variables have nonnegative coefficients in row Z, the current bfs
is optimal. If any variables in row Z have negative coefficients, choose the variable with
the most negative coefficient in row Z to enter the basis. We call this variable the
entering variable.
Step 4: Use elementary row operations (ero’s) to make the entering variable the basic
variable in any row that wins the ratio test (ties may be broken arbitrarily). After the
ero’s have been used to create a new canonical form, return to step 3, using the current
canonical form.
A constraint in an LP is binding if the left – hand side and the right – hand side are equal
when the values of the variables in the optimal solution are substituted into the constraint.
Using the Simplex Algorithm to Solve Minimization Problems
There are two different ways that the simplex algorithm can be used to solve
minimization problems. We illustrate these methods by solving the following LP:
Subject to
37
Method 1
The optimal solution to is the point in the feasible region for that makes
the smallest. Equivalently, we may say that the optimal solution to is
the point in the feasible region that makes the largest.
Maximize
Subject to
or
Maximize
Subject to
0 1 -1 0 1 6
1 2 -3 0 0 0
0 1 1 1 o 4
38
0 2 0 1 1 10
1 5 0 3 0 12
Method 2
A simple modification of the simplex algorithm can be used to solve min problems
directly. Modify step 3 of the simplex as follows: If all non basic variables in row Z
have non positive coefficients, the current bfs is optimal. If any non basic variable in
row Z has a positive coefficient, choose the variable with the “most positive” coefficient
in row Z to enter the basis.
This modification of the simplex algorithm works because increasing a non basic variable
with a positive coefficient in row Z will decrease Z.
0 1 -1 0 1 6
1 -2 3 0 0 0
0 1 1 1 0 4
0 2 0 1 1 10
1 -5 0 -3 0 -12
Since each variable in row Z has a non positive coefficient, this is an optimal tableau.
Thus, the optimal solution to is (as we have already seen)
Examples
(a) Maximize
39
Subject to
(b) Minimize
Subject to
Maximize
Subject to
Subject to
Unbounded LP, there exists points in the feasible region for which Z
assumes arbitrarily large (in max problems) or arbitrarily small (in min
problems) values.
Subject to
40
An LP is degenerate if it has at least one bfs in which a basic variable
is equal to zero. The instance of degeneracy is usually preceded by a tie
for an exiting variable and an arbitrary selection for it. This can be
resolved by a proper selection of pivot element.
Minimize
Subject to
(g) Infeasible LP
Minimize
Subject to
41
In summary, if any artificial variable is positive in the optimal Big M
tableau, the original LP has no feasible solution.
Example 2
Maximize
Subject to
For each urs variable we begin by defining two new variables Then,
substitute for in each constraint and in the objective function. Also all the
sign restrictions The effect of this substitution is to express as the
difference of the two nonnegative variables Since all variables are now
required to be nonnegative, we can proceed with the simplex. No basic feasible solution
can have both this means that for any basic feasible solution, each urs
variable must fall into one of the following three cases:
3. In this case, .
Learning Objectives
42
identify alternative optimal solutions, and unbounded LP,
use the Big M method and the Two-phase Simplex Method, and
Solve LP with unrestricted variables.
43