0% found this document useful (0 votes)
7 views

Lecture3

This document covers Linear Programming (LP) techniques, focusing on the Graphical Method and the Simplex Method for solving LP problems. It explains how to identify feasible regions, optimal solutions, and the use of slack and surplus variables in the Simplex Method. Additionally, it provides guidelines for solving LP problems graphically and through the Simplex algorithm, detailing steps for standardizing problems and testing for optimality.

Uploaded by

fakespam690
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)
7 views

Lecture3

This document covers Linear Programming (LP) techniques, focusing on the Graphical Method and the Simplex Method for solving LP problems. It explains how to identify feasible regions, optimal solutions, and the use of slack and surplus variables in the Simplex Method. Additionally, it provides guidelines for solving LP problems graphically and through the Simplex algorithm, detailing steps for standardizing problems and testing for optimality.

Uploaded by

fakespam690
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/ 16

LECTURE 3 - LINEAR PROGRAMMING (GRAPHICAL METHOD AND SIMPLEX METHOD)

Simple Linear Programming problems (LPP’s) involving only two variables can easily be solved
by a graphical method. The geometrical interpretation of LPP’s with two variables is quite
important and provides a great deal of insight into the structure of problems with more variables.
In particular, the concepts and terminology of linear programming can be explained using this
graphical approach. These are summarized at the end of the section.

3.1 Graphical Method

3.1.1 Maximize subject to the following constraints:

The feasible region (i.e. the set of points in the plane satisfying the constraints and the
non-negativity restrictions) is the un-shaded region below:

Any point in the feasible region is known as a feasible solution.


The feasible region is bounded by:
(i) the two co-ordinate axes (the non-negativity restrictions ensure that all feasible
solutions must lie in the first quadrant)
(ii) the line (the first constraint ensures that the
feasible region is to the lower left of that line)
(iii) the line

Now for each value of z, the line is a straight line. Allowing z to vary generates a
set of parallel straight lines (z increases when these lines are shifted to the upper right as
indicated by the broken lines)
It is now immediately obvious that the optimal solution to the problem is given by the upper right
corner of the feasible region. This is the point where the two lines
and intersect. This point has the coordinates
.The associated value of z is 12.37.

AHA – Lecture 3 1
3.1.2 The same problem as 3.1.1 but with the objective function changed to
gives the following:

The lines are now parallel to the edge of the feasible region. This means
that there is no longer a unique solution, but that the entire line-segment from A to B
gives optimal solutions. Note however as in 3.1.1 at least one corner of the feasible
region is optimal.

The above two examples illustrated normal (well-behaved) LPP’s. The next two will
illustrate the two possible exceptional cases:

3.1.3 Maximize subject to the following constraints:

AHA – Lecture 3 2
In this case the feasible region is unbounded i.e. there are many feasible solutions. This is
indicated by the un-shaded area.

3.1.4 Maximize subject to the following constraints:

There is no point satisfying the constraints and therefore we say the problem is infeasible (This is
indicated by the fact that the shaded areas do not overlap on the graph).

AHA – Lecture 3 3
NOTE: Unbounded and infeasible solutions are in practice usually due to incorrect formulation of
the problem.

From these few examples we can make the following generalizations:


(i) The feasible region (if there is one) is always a convex set (i.e. for any two points in the
feasible region, the entire line segment joining these points lies in the feasible region)
(ii) Whenever the optimal value of z is finite, a corner of the feasible region will give the
optimal solution.
It can be proved that these two observations are true in general.

The above examples also illustrate important facts concerning linear programming problems
which can be summarized as follows:

(i) A linear programming (LP) problem is the problem of maximizing or minimizing a linear
function subject to a finite number of linear constraints.
(ii) The linear function that is to be maximized or minimized in a LP problem is called the
objective function.
(iii) Numbers that satisfy all the constraints of a LP problem constitute a feasible solution of
that problem.
(iv) A feasible solution that maximizes or minimizes the objective function is called an
optimal solution. The corresponding value of the objective function is called the optimal
value of the problem.
(v) Not every LP problem has a unique optimal solution. Some problems have many different
solutions and others have no optimal solution at all.
(vi) Problems which have no feasible solutions are called infeasible.
(vii) Problems that have many feasible solutions are called unbounded.
(viii) A LP problem is said to be in standard form when all the constraints are linear
inequalities and all variables are non-negative.

The solution set is given by the unshaded area

3.2 HINTS ON SOLVING LP PROBLEMS USING THE GRAPHICAL METHOD

(i) Always choose the variables of the objective function first (i.e. first find what must be
maximized or minimized and then assign variables to these). All the constraints must
then be written in terms of these variables.
(ii) Like constraints must be grouped (i.e. money with money, masses with masses, etc) to
assign the variables.
(iii) The gradient of the objective function is used to draw the search line. The search line is
the line used to find the maximum or minimum of the objective function when it is written
in standard form, i.e, y is the subject of the formula. Note that for grade 11 the maximum
or minimum is found by a numerical search along the boundary of the feasible region.
(iv) The minimum or maximum always occur at a vertex of the feasible region or on a
boundary line if there is no unique solution to the problem. So when you want to
maximize you are looking for a vertex as far as possible from the origin. If you want to
minimize you are looking for a vertex as close as possible to the origin.
(v) The search line must not go through the feasible region but must still touch it (this will
happen at one of the vertices).

Example

AHA – Lecture 3 4
The N. Dustrious Company produces two products: I and II. The raw material requirements,
space needed for storage, production rates, and selling prices for these products are given in
Table 1.

The total amount of raw material available per day for both products is 15751b. The total storage
space for all products is 1500 ft2, and a maximum of 7 hours per day can be used for production.

All products manufactured are shipped out of the storage area at the end of the day. Therefore,
the two products must share the total raw material, storage space, and production time. The
company wants to determine how many units of each product to produce per day to
maximize its total income.

3.3 Simplex Method

AHA – Lecture 3 5
3.3.1 Slacks and Surplus Variables

Slack Variable
 The smaller-than-equal-to constraint has a slack variable.
 The slack variable is either positive or zero.
 If the slack variable is zero, the resource from that constraint is fully utilized and that
constraint is called a binding constraint and passes through the optimal point.
2x1 + x2 ≤ 15
2x1 + x2 + s1 = 15
Surplus Variable
 The larger-than-or-equal-to constraint has a surplus variable.
 The surplus variable is either positive or zero.
2x1 + x2 ≥ 15
2x1 + x2 − s2 = 15
 If the surplus variable is zero, the utilization of that resource just meets the minimum
requirement and the line of that constraint passes through the optimal point.
 Every equality constraint has neither slack nor surplus.

3.3.2 Simplex Method


 The simplex method is an iterative algorithm for efficiently solving LP problems.
 In the simplex method, the search usually starts at the origin and moves to that adjacent
corner that increases (for maximization) or decreases (for minimization) the value of the
objective function the most.
 The search moves to an even better corner adjacent to the new one.
 The process continues until no further improvement is possible. In each iteration, the
objective function improves.

The Simplex Procedure


Step 1: Standardize the problem.
Step 2: Generate an Initial Solution.
Step 3: Test for Optimality. If the solution is optimal,
go to Step 6. Otherwise, go to Step 4.
Step 4: Identify the Incoming and Outgoing Variables.
Step 5: Generate an Improved Solution. Go to Step 3.
Step 6: Check for other Optimal Solutions.

AHA – Lecture 3 6
3.3.3 Simplex Process
Step1. Standardize the problem
 Only corner points of feasible solution space are to be checked.
 Because these corner points are defined by the intersection of equations, convert the
inequalities (constraints) in the problem statement into equations in order to find the
coordinates of the point.
For less-than-or-equal-to constraints ( ≤)
 Add a slack variable (S)
2x1 + x2 ≤ 40
2x1 + x2 + s1 = 40
 At the origin (x1  0, x2  0), s1 becomes 40 (OK).

For greater-than-or-equal-to constraints ( ≥)


 Use both a surplus variable (s) and an artificial variable (a) to form an equation.
x1 + x2 ≥ 300
x1 + x2 – s2 = 300
 At the origin (x1  0, x2  0), s2 = -300, which is not allowable. Therefore, an artificial variable
a is introduced into the equation. Therefore,
x1 + x2 – s2 + a2 = 300 where a2  0
 The objective of the artificial variable is to simply form an initial solution.
 Because the artificial variable has no meaning so its value must be zero in the final solution.

For constraints with an equality ( = )


 Add an artificial variable.
3x1 + x2 = 10
 When x1 =0 and x1=0, 0 = 10 which is unacceptable so an artificial variable is added to the
equation. 3x1 + x2 + a3 =10
 Once the constraints have been modified, the problem can be written in a standard form.

Standard Form
 All slack, surplus and artificial variables must be written in the objective function.
 The coefficient of the slack and surplus variables is zero in the objective function because
they do not generate any profit or have any costs.
 To ensure that the artificial variable is kept out of the final solution, a very large penalty (M or
-M) is assigned as a coefficient of the artificial variable in the objective function.
 For a maximization problem, the coefficient of the artificial variable is -M.
 For a minimization problem, the coefficient of the artificial variable is M.

AHA – Lecture 3 7
Example 1:
Normal Form Standard Form

Max Z = 300x1 + 250x2 Max Z = 300x1 + 250x2 + 0s1 + 0s2 + 0s3


St: 2x1 + x2 ≤ 40 St: 2x1 + x2 + s1 = 40
x1 + 3x2 ≤ 45 x1 + 3x2 + s2 = 45
x1 ≤ 12 x1 + s3 = 12
x1, x2 ≥ 0 x1, x2 , s1, s2, s3 ≥ 0

Min Z = 45x1 + 12x2 Min Z = 45x1 + 12x2 + 0s1 + Ma1 + 0s2 + Ma2
St: x1 + x2  300 x1 + x2 - s1 + a1 = 300
3x1  250 3x1 – s2 + a2 = 250
x1, x2 ≥ 0 x1, x2 , s1, a1, s1, a1 ≥ 0

Step2. Generate an initial solution


 Consider the standardized maximization problem.
Max Z = 300x1 + 250x2 + 0s1 + 0s2 + 0s3
St: 2x1 + x2 + s1 = 40
x1 + 3x2 + s2 = 45
x1 + s3 = 12
x1, x2 , s1, s2, s3 ≥ 0
 To obtain the value of Z we solve for x1, x2, s1, s2 and s3 from all equations (constraints).
 With 5 unknown variables and 3 equations, two of five variables are set to zero so that it is
possible to solve the system of linear equations in order to get an initial solution or the
starting point for the simplex algorithm.
 The variables that have nonzero values are called basic variables and the ones that have
values of zero are called non-basic variables.
 From the problem considered, x1 and x2 are set to zero as non-basic variables with s1, s2 and
S3 as basic variables. Therefore, s1 = 40, s2 = 45, s3 = 12, x1 = 0 and x2 = 0 is a simple initial
solution.
 The simplex method is to switch only one of the basic variables for one of the non-basic
variables at a time.
Structure of Tableau

AHA – Lecture 3 8
Basis Column
 Identify the initial solution variable or basic variables.

Unit Profit/Cost Column


 Display coefficients of basic variables in the objective function.

Quantity Column
 Indicate values of basic variables in the solution.
 For the proposed initial solution, this column displays the right hand side quantities of the
constraints.

Columns of Decision, Slack and Surplus Variables


 In the initial tableau, values under each of these columns are coefficients of the
corresponding variable in each constraint.
 Each value under these columns shows the rate of utilization of the corresponding resources.
In other words, it implies how much the value of the relevant basic variable (in the same row)
will decrease if the value of the corresponding non-basic variable increase by 1.

Ratio Column
 This column is used to identify the basic variable that should be removed from the solution (to
become a non-basic variable) without violating any constraint.
 Each value under this column in each row is the ratio of the Quantity to the coefficient of the
variable considered in the same row.
 Cj Row: Show the coefficients of all variables in the objective function.
 Zj Row: Show the amount of profit/cost the objective function will be reduced by when one
unit of the variable, in each column, is brought into the basis.
 Cj-Zj Row: Display the net impact on the value of the objective function of bringing one unit of
each of the column variable into the basis.
 Cj indicates how much will be gained while Zj shows how much will be simultaneously be lost
 If the value of Cj-Zj is positive, the value of the objective function can be increased by
introducing the variable in that column into the solution.
 In the minimization problems, if one or more of the Cj-Zj values is negative, then the solution
is not optimal and it can be improved.
 Similarly, in the maximization problems, if one or more of the Zj–Cj values is negative, then
the solution is not optimal and it can be improved.

AHA – Lecture 3 9
The Value of the Objective Function
 Computed by multiplying each unit profit by its corresponding quantity and then totaling the
results. Z = 0(40)+0(45)+0(12) = 0

Step3: Test for Optimality


 Examine the Cj-Zj row (for minimization) and Zj–Cj (for maximization) in the tableau.
 The solution is optimal if all values in the Cj-Zj or Zj–Cj row are nonnegative (zero or positive).

Step4: Identify the Incoming and Outgoing Variables


Incoming Variable
 An incoming variable is currently a non-basic variable (the current value is zero) and will be
changed to a basic variable (introduced into the solution).
 The incoming variable is the variable with the largest negative value in the Cj-Zj or Zj–Cj row.

Outgoing Variable
 An outgoing variable is currently a basic variable that is first reduced to zero when increasing
the value of the incoming variable and will be changed to a non-basic variable (removed from
the solution).
 To determine the outgoing variable, compute the ratio of the Quantity to the coefficient of the
incoming variable for each basis row.
 For both the maximization and minimization problems, the outgoing variable is the basic
variable with the smallest ratio.
 The coefficient of the incoming variable in the outgoing row is called the pivot element.

Step5: Generate an Improved Solution


 The solution is improved by introducing the incoming variable into the basis and removing the
outgoing variable.
 Transform the row of the outgoing variable, then the other basis rows and finally transform
the Zj and Cj-Zj (or Zj–Cj) rows.
 The Cj row does not change.

Transforming of the outgoing row


 Divide the elements (coefficients) and the Quantity of the outgoing row by the pivot element.
 Replace the unit profit/cost (coefficient in the objective function) of the outgoing variable with
the one of the incoming variable and also replace the outgoing variable with the incoming
variable.

AHA – Lecture 3 10
Transforming of other rows
 Use an elementary row operation (ZERO) to make other elements in the column of the
incoming variable becomes zero.
Transforming of the Zj row
 For the new Zj of each column, multiply the Unit Profits / Costs in each row by the column
coefficients and sum the results.
Transforming of the Cj-Zj (or Zj–Cj) row
 Subtract Zj from Cj (or Cj from Zj).

Step3: Test for Optimality (repeat)


Step4: Identify the Incoming and Outgoing Variables (repeat)
Step5: Generate an Improved Solution (repeat)
Step6: Check for Other Optimal Solutions
 If the coefficient of one of the non-basic variable in the final Cj-Zj (or Zj–Cj) row is zero, then
multiple optimal solutions exist.
 The non-basic variable with the zero value of Cj-Zj (or Zj–Cj) can enter the basis without
changing the value of the objective function (creating another feasible solution).

More Examples

AHA – Lecture 3 11
3.3.4 Types of Simplex Method

1. The Double Phase Method (with Big M); also known as the regular method.
2. The Dual Simplex Method

The (regular) simplex method moves the initial feasible but non-optimal solution to an optimal
solution while maintaining feasibility through an iterative procedure. On the other hand, the dual
simplex method moves the initial optimal but feasible solution while maintaining optimality through
an iterative procedure.

In other words, the double phase may contain an M value in the objective (and an additional Cj-Zj
(or Zj–Cj) row but the dual simplex does not. The algorithm for both is identical; however, the
Dual Simplex Method has the following iterative procedure:

 Step 1: Rewrite the LP problem by expressing all the constraints in ≤ form and transforming
them into equations through slack variables.
 Step 2: Exhibit the above problem in the form of simplex tableau. If the optimality condition is
satisfied and one or more basic variables have negative values, the dual simplex method is
applicable.
 Step 3: Optimality Condition – The basic variable with the most negative value becomes the
departing variable (D.V). Call the row in which this value appears the work row. If more than
one candidate for D.V. exists, choose one.
 Step 4: Optimality Condition – Form ratios by dividing all but the last element of the last row
of Cj-Zj (or Zj–Cj) values by the corresponding negative coefficient of the work row. The non-
basic variable with the smallest absolute ratio becomes the entering variable (E.V). Designate
this element in the work row as the pivot element and the corresponding column the work
column. If more than one candidate for E.V exists, choose one. If no element in the work row
is negative, the problem has no feasible solution.
 Step 5: Use elementary row operation to convert the pivot element to 1 and then to reduce all
the other elements in the work column to zero.
 Step 6: Repeat steps 3 through 5 until there are no negative values for the basic variables.

Example – The Double Phase

AHA – Lecture 3 12
Example – The Dual Simplex

Use the dual simplex method to solve the following problem.

Minimize: z = 2x1 + x2 + 3x3


Subject to: x1 - 2x2 + x3 ≥ 4
2x1 + x2 + x3 ≤ 8
x1 - x3 ≥ 0
x1 ,x2 ,x3 ≥ 0

Solution
Expressing all constraints in the ≤ form and adding the slack variables, the problem becomes:

Minimize: z = 2x1 + x2 + 3x3 + 0x4 + 0x5 + 0x6


Subject to: - x1 - 2x2 - x3 + s4 = -4
2x1 + x2 + x3 + s5 = 8
-x1 + x3 + s6 = 0
x1 ,x2 ,x3 ≥ 0

AHA – Lecture 3 13
Since all the (Cj-Zj) values are non-negative, the above solution is optimal. However, it is
infeasible because it has a non-positive value for the basic variable s1. Since s1 is the only
positive variable, it becomes the departing variable

Since x1 has the smallest absolute ratio, it becomes the entering variable. Thus the element -1,
becomes the pivot element. Using elementary row operations, we obtain Tableau 2.

3.4 Special Cases

3.4.1 Two Incoming Variables


If there are two or more incoming variables, then either may be arbitrarily chosen which will not
affect the final solution.

3.4.2 Two Outgoing Variables


 If two ratios tie for smallest, the choice for outgoing basic variable may be made arbitrarily.
 If the number of positive variables in the optimal solution is less than the number of
constraints, this situation is called “degeneracy”.
 In the graphical method, degeneracy occurs when three or more constraints intersect in the
solution with two variables.
 In the Simplex procedure, degeneracy occurs when two ratios tie for smallest.

AHA – Lecture 3 14
x1
x1

Feasible area
Optimal
Degenerate
Solution

x2 x2

3.4.3 Unbounded Solution


 In graphical method, the feasible solution space extends infinitely.
 The result in the simplex is that there is no outgoing variable. The ratios are either ∞ or -ve.
 This frequently means that an error was made.
 The result in the simplex is that there is no outgoing variable. The ratios are either ∞ or -ve.
 This frequently means that an error was made.

3.4.4 Unconstrained Variables


 One or more of the decision variables may be allowed to be negative.
 For example, Temperature F can be positive, negative or zero.
 To deal with this situation, two of new positive variables are introduced.
Given F = x2
Maximize z = 40x1 − 3x2
Subject to: x 1 + x2 ≥ 100
2x1 + 3x2 ≥ 70
x1 ≥ 0
Assign x2 = W − U , therefore the problem becomes
Maximize z = 40x1 − 3W + 3U
Subject to: x1 + W − U ≥ 100
2x1 + 3W − 3U ≥ 70
x1 , W, U ≥ 0

3.4.5 Negative Right-Hand Quantity


 If one of the right hand quantities bi is negative, then by multiplying the entire constrain by −1,
the constraint will be in the proper form.
x1 + x2 ≥ −100
multiply this constraint by −1 then it becomes
−x1 − x2 ≤ 100

AHA – Lecture 3 15
3.4.6 No feasible solution
 Graphically, there is no solution space that simultaneously satisfies all constraints.
X1

X2

 In the Simplex Method, there is no feasible solution if the optimal solution still contains an
artificial variable.

3.4.7 Multiple Optimal Solution


 Graphically, this happens when the isoprofit or isocost line is parallel to a binding constraint.
 In the Simplex procedure, it happens when one of the non-basic variables in Cj−Zj row has a
value of zero.

3.4.8 Redundant Constraint


 A redundant constraint is the constraint that does not intersect the feasible area of solutions.
 It can be removed from the problem without affecting the result.
 Constraint 2 is a redundant constraint.

X1

2
3

X2

AHA – Lecture 3 16

You might also like