0% found this document useful (0 votes)
10 views29 pages

BBA BS 340 Unit3&4

This document introduces linear programming, focusing on its standard form, which includes maximizing or minimizing an objective function subject to constraints expressed as equations. It discusses the conversion of general linear programs to standard form, including handling inequality constraints with slack and surplus variables, and outlines the Simplex Method for finding optimal solutions. The document also provides examples and explains the process of identifying basic feasible solutions and pivoting in the Simplex tableau.

Uploaded by

M'simuko Simon
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views29 pages

BBA BS 340 Unit3&4

This document introduces linear programming, focusing on its standard form, which includes maximizing or minimizing an objective function subject to constraints expressed as equations. It discusses the conversion of general linear programs to standard form, including handling inequality constraints with slack and surplus variables, and outlines the Simplex Method for finding optimal solutions. The document also provides examples and explains the process of identifying basic feasible solutions and pivoting in the Simplex tableau.

Uploaded by

M'simuko Simon
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 29

UNIT 3

INTRODUCTION TO LINEAR PROGRAMMING


Reading

Hillier and Lieberman Chapter 18

Wayne L. Winston Chapter 9

Handy A. Taha Chapter 8

Hillier and Lieberman Chapter 2

Handy A. Taha Chapter 3

Wayne L. Winston Chapter 4

1. LINEAR PROGRAMMIMG IN STANDARD FORM

The standard form of a linear programming problem within constraints and n


variables can be represented as follows:

Maximize (Minimize):

Subject to:

The main features of the standard form are:

1. The objective function is of the maximization or minimization type.

2. All constraints are expressed as equations.

3. All variables are restricted to be nonnegative.

15
4. The right-hand side constraint of each constant in nonnegative.

In matrix-vector notation, the standard linear programming problem can be


expressed in a compact form as:

Maximize (Minimize) :

Subject to :

Where A is an (m n) matrix, is an column n vector, b is an


column vector, and C is an row vector.

In other words,

In practice, A is called the coefficient matrix, is the decision vector, b is the


requirement vector, and C is the profit (cost) vector of the linear program.

The standard form and its associated general notations are illustrated by the
following example:

Maximize:

Subject to:

16
In this problem,

Reduction of a General Linear Program to a Standard Form

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.

Hence the first step in solving a linear program is to convert it to a pattern in


standard form.

Handling Inequality Constraints

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.

To illustrate the use of slack variables, consider the equation

This can be converted to an equation by introducing a slack variable, say as


follows:

17
Note that is also nonnegative, and represents unused resources.

To illustrate the use of surplus variables consider the inequality:

By introducing a surplus variable, say the above inequality could be


expressed as an equation as follows:

Where is nonnegative and represents extra 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.

Handling Variables Unrestricted in Sign

In some situations, it may become necessary to introduce a variable that can assume both
positive and negative values.

Suppose is unrestricted then, we replace by wherever it appears in the


equation.

The Simplex Method

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.

Maximize the linear function

subject to the constraints

(1)

Where are nonnegative.

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

Maximize the objective function subject to the constraints

(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

The variables and are called Structural Variables.

19
Now we can restate the problem in terms of equations:

Maximize

Such that

and

where are nonnegative.

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

2. At B, But from equation (5), 2(3) + 2 + =8. Thus

3. At C, But from Equation (5), 2(3) + 2 + =8. Thus


From equation (6), 2(3) + 3(2) + =12. Thus

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:

Since are nonnegative, we have

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

Entering variable (most negative indicators)

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).

In our present BFS, are non basic variables . Suppose we


look for another BFS that gives a larger value of Z and such that one of is basic.
The equation corresponding to the Z-row is given by

(9)

If becomes basic and therefore remains non basic, then

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).

In fact, since and the coefficients of in equation (9) are


negative, then Z is maximum when That is, in (8), having all having
all nonnegative indicators means we have an optimum solution.

In terms of our original problem, if

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 102=5
variable
2 2 1 0 1 0 0 102=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
01=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

Since all indicators are nonnegative, Z is maximum when and


The maximum value is Z=20. Note that this value is the same as that
value of value of Z corresponding to tableau II. In degenerate problems it is possible to
arrive at the same value of Z at various stages of the simplex process.

Degeneracy, Unbounded Solutions, Multiple Optimum Solutions

In a degenerate, some problems may develop in the simplex procedure. It is possible to


obtain a sequence of tableaus that correspond to BFS’s which give the same Z value.
Moreover, we may eventually return to the first tableau in the sequence. In Figure 1.2 we
arrive at BFS1, proceed to BFS2, then BFS3 and finally return to BFS1. This is called
cycling. When cycling occurs, it is possible that we may never obtain the optimum value
of Z. This phenomenon rarely is encountered in practical linear programming problems.
However, there are techniques for resolving such difficulties.

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

Degenerate Optimal Solutions

Maximize
Subject to

28
UNIT 4

Artificial variables

To initiate the simplex method, a basic feasible solution is required. For a


standard linear programming problem, we begin with the BFS in which all
structural variables are zero. However, for a maximization problem that is not of
standard form, such a BFS may not exist. In this section you will see how the
simplex method is used in such situations.

Let us consider the following problem:

29
Maximize
Subject to

and Since constraint (2) cannot be written as


where b is nonnegative, this problem cannot be put into standard form. Note that
(0, 0) is into a feasible point. To solve this problem, we begin by writing
constraints (1) and (2) as equations. Constraint (1) becomes

Where is a slack variable and for constraint (2), will equal 1 if


we subtract a nonnegative slack variable from . That is, by subtracting
we are making up for the “surplus” on the left side of (2) so that we have
equality. Thus

Where We can now restate the problem:

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

The optimal solution is:

1.1 Minimization

So far we have used the simplex method to maximize objective functions. In


general, to minimize a function it suffices to maximize the negative of the
function.

Example 1

Minimization

Use the simplex method to minimize

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

The optimal solution is:

Where, basic variables are and non basic variables are

SUMMARY OF THE SIMPLEX ALGORITHM FOR A MAX PROBLEM

Step 1: Convert the LP to Standard Form

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.

This means that we can find the optimal solution to by solving :

Maximize

Subject to

or

Maximize

Subject to

Basic Variable RHS


0 1 1 1 0 4

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

3 3 3 0 12 Since all the values in


2 -3 0 0 0
5 0 3 0 12 row are nonnegative we have
an optimal solution

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.

Basic Variable RHS


0 1 1 1 0 4

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

1. Use the simplex algorithm to solve the following LP:

(a) Maximize

39
Subject to

(b) Minimize

Subject to

(c) Alternative solution

Maximize

Subject to

If an LP has more than one optimal solution, we say that it has


multiple or alternative optimal solutions.

(d) Unbounded maximize

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.

(e) Degenerate maximize

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.

(f) The Big M method

Minimize

Subject to

(g) Infeasible LP

Minimize

Subject to

A linear programming problem may be unsolved mathematically due to


the contradictory nature of constraints. Such an instance is referred to
as non-feasible solution. A solution is also non-feasible if an artificial
variable appears in the basis of the solution purported to be optimal.

41
In summary, if any artificial variable is positive in the optimal Big M
tableau, the original LP has no feasible solution.

Variables that are unrestricted in sign.

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:

Case 1. This case occurs if a bfs has . In this case,


Thus, .

2. This case occurs if . Since


, we obtain .

3. In this case, .

Learning Objectives

After working through this Unit, you should be able to:

 convert an LP to standard form,


 use Simplex Algorithm to solve LP with more than two variables,

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

You might also like