Solutions Methods in Optimization: Linear Programming

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 73

SOLUTIONS METHODS IN

OPTIMIZATION
LINEAR PROGRAMMING

Copyright c@KPIS Corporation UG All rights reserved.

K.P.I. Kimuli linear programming Page 1 of 186


Page 2 of 186 Kimuli linear programming
Contents

1 LP problem 5
1.1 History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.2 Uses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.3 Methodology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.4 General linear programming problem . . . . . . . . . . . . . . . . . . . . . . . . 6
1.5 LP Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.5.1 Applications of Linear programming . . . . . . . . . . . . . . . . . . . . 7
1.5.2 Statement of a General form of the LP problem . . . . . . . . . . . . . . 7
1.5.3 A typical Example of an LP problem . . . . . . . . . . . . . . . . . . . . 8
1.5.4 Changing the sense of optimization . . . . . . . . . . . . . . . . . . . . . 8
1.5.5 Changing the sense of an inequality . . . . . . . . . . . . . . . . . . . . . 8
1.5.6 Changing an inequality into equality . . . . . . . . . . . . . . . . . . . . 9
1.5.7 Standard and Canonical forms of Linear Programming problems . . . . . 9
1.5.8 Examples of Linear Programming Problems in words . . . . . . . . . . . 10

2 Geometrical/Graphical solution of a linear programming problems: 13


2.1 Feasible Region . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.2 Graphical Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

3 Simplex Method 35
3.1 Mathematical Background to the simplex method . . . . . . . . . . . . . . . . . 35
3.1.1 Theorems about the Convex sets . . . . . . . . . . . . . . . . . . . . . . 37
3.2 Solution to a LP Problem( Simplex Method) . . . . . . . . . . . . . . . . . . . . 41
3.2.1 Basis presentation of an LP . . . . . . . . . . . . . . . . . . . . . . . . . 41
3.2.2 Vector to enter the Basis . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
3.3 Standard Maximization Problem . . . . . . . . . . . . . . . . . . . . . . . . . . 44
3.3.1 Simplex Method for Standard Maximization Problem . . . . . . . . . . . 44
3.3.2 Basic Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
3.4 Simplex Method for Minimization Problem . . . . . . . . . . . . . . . . . . . . . 45
3.5 Sample of a simplex tableau . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
3.5.1 A typical example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
3.5.2 Vector to leave the Basis . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
3.5.3 Steps for solving an LPP . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
3.6 LP problem before the primal simplex tableau . . . . . . . . . . . . . . . . . . . 51
3.7 Summary of the Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
3.8 Degeneracy and Cycling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
3.9 Worked Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55

4 The Big - M Method 73


4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
4.2 The method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73

3
CONTENTS

5 The Dual simplex method 93


5.1 Dual Simplex method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
5.2 Primal Vs Dual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
5.3 Dual methodology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94

6 Duality of LP problems 109


6.1 Canonical form of duality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
6.2 Standard form of duality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109

7 The Primal - dual simplex method 135


7.1 Why Primal-Dual? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
7.2 The Mathematics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
7.3 Pivoting strategy under the primal- dual simplex method . . . . . . . . . . . . . 135
7.4 How to improve the solutions then . . . . . . . . . . . . . . . . . . . . . . . . . 137
7.5 Advantages of the Primal-dual algorithm . . . . . . . . . . . . . . . . . . . . . . 147
7.6 Disadvantages of the Primal-dual algorithm . . . . . . . . . . . . . . . . . . . . 147

8 Sensitivity Analysis 149


8.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
8.2 Exploratory Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
8.3 Tableau Sensitivity Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
8.4 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161

9 Sample Questions 163


9.1 Worked Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
9.2 Past Papers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
9.3 Exam 2007/2008 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
9.4 Review . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
9.4.1 The Simplex Algorithm for a Maximization Problem, Round 2 . . . . . . 184
9.4.2 Solving a Minimization Problem . . . . . . . . . . . . . . . . . . . . . . . 185
9.4.3 Big M Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
9.4.4 Primal - dual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
9.4.5 To Follow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
9.5 Acknowledgment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
9.6 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186

Page 4 of 186 linear programming


Chapter 1

LP problem

1.1 History
Linear programming was a mathematical model developed during the second world war to plan
expenditures and returns such that it reduces costs to the army and increases losses to the
enemy. It was kept secret until 1947. Postwar, many industries found its use in their daily
planning.
The founders of the subject are George B. Dantzig, who published the simplex method
in 1947, John von Neumann, who developed the theory of the duality in the same year, and
Leonid Kantorovich, a Russian mathematician who used similar techniques in economics before
Dantzig and won the Nobel prize in 1975 in economics. A breakthrough came after 1947 when
Fiacco and McCormick introduced the Interior Point Method in 1984.
Dantzig’s original example of finding the best assignment of 70 people to 70 jobs still explains
its success. The computing power required to scan all the permutations to select the best
assignment is vast and impossible. He observed that it takes only a moment to find the optimum
solution using the simplex method, which is effectively noticing that a solution exists in the
corners of the polygon described by the equations formed from the given constraints.

1.2 Uses
Linear programming is an important field of optimization for several reasons. Many practical
problems in operations research can be expressed as linear programming problems. Certain
special cases of linear programming, such as network flow problems and multi commodity flow
problems are considered important enough to have generated much research on specialized al-
gorithms for their solution. A number of algorithms for other types of optimization problems
work by solving LP problems as sub-problems. Historically, ideas from linear programming
have inspired many of the central concepts of optimization theory, such as duality, decompo-
sition, and the importance of convexity and its generalizations. Likewise, linear programming
is heavily used in microeconomics and business management, either to maximize the income
or minimize the costs of a production scheme. Some examples are food blending, inventory
management, portfolio and finance management, resource allocation for human and machine
resources, planning advertisement campaign etc.

1.3 Methodology
A linear programming problem consists of a collection of linear inequalities on a number of real
variables and a given linear functional (on these real variables) which is to be maximized or

5
1.4. GENERAL LINEAR PROGRAMMING PROBLEM

minimized. Further details are given in the linear programming article.


In geometric terms we are considering a closed convex polytope, P, defined by intersecting a
number of half-spaces in n-dimensional Euclidean space; each half-space is the area which lies
on one side of a hyperplane. If the objective is to maximize a linear functional L(x), consider
the hyperplanes H(c) defined by L(x) = c; as c increases, these form a parallel family. If the
problem is well-posed, we want to find the largest value of c such that H(c) intersects P (if there
is no such largest value of c, this isn’t a reasonable question for optimization as it stands). In
this case we can show that the optimum value of c is attained on the boundary of P. Methods
for finding this optimum point on P work in several ways: some attempt to improve a possible
point by moving through the interior of P (so-called interior point methods); others start and
remain on the boundary searching for an optimum.
The simplex algorithm follows this latter methodology. The idea is to move along the facets
of P in search of the optimum, from point to point. Note that, unless the optimum occurs on
an edge or face that is parallel to H, the optimum will be unique and occur at a vertex of the
polytope. If an optimum is found on an edge or face that is parallel to H, the optimum is not
unique and can be obtained at any point on the edge or face. Since the simplex algorithm is
concerned only with finding a single optimal point (even if other equally-optimal points exist),
it is possible to look solely at moves skirting the edge of a simplex, ignoring the interior. The
algorithm specifies how this is to be done.
We start at some vertex of the polytope, and at every iteration we choose an adjacent vertex
such that the value of the objective function does not decrease. If no such vertex exists, we
have found a solution to the problem. But usually, such an adjacent vertex is non unique, and
a pivot rule must be specified to determine which vertex to pick. Various pivot rules exist.
In 1972, Klee and Minty gave an example of a linear programming problem in which the
polytope P is a distortion of an n-dimensional cube. They showed that the simplex method as
formulated by Dantzig visits all 2n vertices before arriving at the optimal vertex. This shows
that the worst-case complexity of the algorithm is exponential time. Similar examples have
been found for other pivot rules. It is an open question if there is a pivot rule with polynomial
time worst-case complexity.
Nevertheless, the simplex method is remarkably efficient in practice. Attempts to explain
this employ the notion of average complexity or (recently) smoothed complexity.
Other algorithms for solving linear programming problems are described in the linear pro-
gramming article.

1.4 General linear programming problem


Linear programming is a branch of operations Research (OR). Other branches of operations
research include Networks, non linear programming, Dynamic programming, Integer program-
ming, Game theory, Queuing theory, etc. with some assisting fields as graph theory and simu-
lation.
Operations Research (OR) methods assist in decision making, mathematical models are set up
and an attempt is made to provide a quantitative reason for a decision. The model has three
components to it that’s the decision variables, restrictions and the objective function. The idea
is to solve the model with the aim of finding the best alternative(s) among the possible ones.

Definition 1.4.1 An optimization problem is one requiring the determination of the optimal
(maximum or minimum) value of a given function, called the objective function, subject to a
set of stated restrictions, or constraints placed on the variables concerned.
A Mathematical optimization problem is one in which some function is either
maximized or minimized relative to a given set of alternatives. The function to be either

Page 6 of 186 linear programming


1.5. LP DESCRIPTION

minimized or maximized is called the objective f unction and the set of restrictions is called
the feasible ( or constraint) region.
In this course the feasible region will always be taken as a subset of Rn while the objective
function as a real valued function from Rn to R.
Definition 1.4.2 Linear programming is a method of solving an optimization problem when
the objective function is a linear function and the constraints are linear equations or linear
inequalities.
A linear programming problem is an optimization problem over Rn wherein the objective
function is linear.

1.5 LP Description
A linear programming problem is one in which we are to find the maximum or minimum
value of a linear expression
ax + by + cz + ...
(called the objective function), subject to a number of linear constraints of the form Ax +
By + Cz + .. ≥ N
or
Ax + By + Cz + .. ≥ N. The largest or smallest value of the objective function is called the
optimal value, and a collection of values of x, y, z, ... that gives the optimal value constitutes
an optimal solution. The variables x, y, z, ... are called the decision variables.
Definition 1.5.1
A function is said to be linear if it’s of the form,
f (x) = cx = c1 x1 + c2 x2 + . . . + cn xn . for some ci ∈ R, i = 1, 2, . . . , n, x = x1 , x2 , . . . , xn .
The feasible region is the set of solutions to a finite number of linear inequalities/ constraints
and/or equality constraints.

1.5.1 Applications of Linear programming


Linear programming is an extremely powerful tool for addressing a wide range of applied
optimization problems namely;
Resource allocation in Economics.
Management.
Transportation, Assignment and Production scheduling problems.
Game theory.
Etc.

1.5.2 Statement of a General form of the LP problem


The LP problem takes the following general form,
min/max z = c1 x1 + c2 x2 + . . . + cn xn
s.t the constraints(restrictions)
ai1 x1 + ai2 x2 + . . . + ain xn {<, =, >} bi
and x1 , x2 , . . . , xn ≥ 0 ∀ i = 1, 2, . . . , m.

linear programming Page 7 of 186


1.5. LP DESCRIPTION

The general linear programming problem can also be re - written in the matrix form as,

min/max z = cx
s.t Ax {<, =, >} b
and x ≥ 0

Where A = (aij ) is an m×n matrix x = (x1 , x2 , . . . , xn )t , c = (c1 , c2 , . . . , cn ), b = (b1 , b2 , . . . , bm )t .

1.5.3 A typical Example of an LP problem

min w = x1 − x2 + 7x3
s.t − 2x1 + 3x2 − x3 ≥ 7
+x2 + x3 ≥ 1
x1 + 3x3 ≥ 3
x1 , x2 , x3 ≥ 0

or in Matrix form; 
x1
minw = (1, −1, 7)  x2  subject to
   x3   
−2 3 −1 x1 7
 0 1 1   x2  ≥  1  . ∀ x1 , x2 , x3 ≥ 0
1 0 3 x3  3  
−2 3 −1 7
Where A =  0 1 1  , b =  1  , c = (1, −1, 7).
1 0 3 3

1.5.4 Changing the sense of optimization


n
P
A maximization problem over the objective function z = cj xj is equivalent to a minimization
j=1
problem with the same constraints but it’s objective function is
Pn
z= −cj xj . The equivalence in this case imply that the solutions to the two problems are
j=1
the same in magnitude.

1.5.5 Changing the sense of an inequality


n
P
The inequalities aij xj ≤ bi , i = 1, 2, . . . , n can be re - written in the form;
j=1

n
X
−aij xj ≥ −bi .
j=1

That’s the sense of inequalities is changed by multiplying through by −1.

Page 8 of 186 linear programming


1.5. LP DESCRIPTION

1.5.6 Changing an inequality into equality


The set of inequalities given by,
n
X
aij xj ≤ bi
j=1

can be written as a set of equalities as


n
X
aij xj + si = bi
j=1

where si ≥ 0 and
n
X
aij xj ≥ bi
j=1

will be written as,


n
X
aij xj − ti = bi
j=1

where ti ≥ 0
Here si &ti are referred to as slack and surplus variables respectively.

1.5.7 Standard and Canonical forms of Linear Programming prob-


lems
Since a linear program is a problem of either maximization or minimization of a linear function
subject to a finite number of linear inequalities. Every linear programming problem can be
written or presented in two canonical forms namely;
(i) Maximization canonical form that is of the form

Maximise z = cx
s.t Ax ≤ b
and x ≥ 0

(ii) Minimization canonical form that is of the form

Minimise w = cx
s.t Ax ≥ b
and x ≥ 0

Example 1.5.1

min w = 2x1 − 11x2 − 20x3


s.t − 2x1 + 3x2 − x3 ≥ 7
2x1 + x2 − 20x3 ≥ 6
x1 + 2x2 + 3x3 ≥ 3
x1 , x2 , x3 ≥ 0

linear programming Page 9 of 186


1.5. LP DESCRIPTION

Example 1.5.2

max w = 4x1 − 2x2 − 5x3


s.t 2x1 + x2 − x3 ≤ 7
2x1 + x2 − 2x3 ≤ 13
x1 + 3x3 ≤ 3
x1 , x2 , x3 ≥ 0

Exercise 1.1 Write the following minimization linear programming problems in canonical
minimization form and hence convert them to canonical maximization linear programming
problems;
(i)

min w = x1 − 12x2 − 2x3


subject to − 2x1 + 3x2 − x3 ≤ 7
2x1 + x2 − 20x3 ≥ −30
x1 + 3x3 ≤ 3
x1 , x2 , x3 ≥ 0

(ii)

min w = x1 + 17x2 + x3
subject to − x1 + 2x2 − 6x3 ≤ −10
−x2 − 2x3 ≥ −6
2x1 + 11x3 ≤ 19
x1 , x2 , x3 ≥ 0

Definition 1.5.2
A linear programming problem is said to be in standard form if all the restrictions are only
equalities.

1.5.8 Examples of Linear Programming Problems in words


1. A nutritionist is planning a menu consisting of two foods A and B, Each gram of A
contains 2 units of fats, 2 units of carbohydrates and 4 units of proteins, Each gram of
B contains 3 units of fats, 3 units of carbohydrates and 2 units of proteins. He wants
the meal to provide atleast 18 units of fats, 12 units of carbohydrates and 24 units of
proteins. If each gram of A costs 200/ = and that of B costs 250/ =, formulate a linear
programming problem to be used to find how many grams of each type of food should be
used so as to minimize the cost for the meal yet satisfy the requirements of the nutritionist.
2. A manufacturer has three machines A, B and C with which he produces two different
products x and y, The different machining times required per product are as follows:

Product Machine times (hrs)


ABC
x 320
y 255

Page 10 of 186 linear programming


1.5. LP DESCRIPTION

The estimated profits per product are 7, 500 U GX and 13, 500 U GX for x and y respec-
tively. the amounts of time each machine is available for making the products during any
given week are restricted as follows:
Machine A is available for atmost 21 hours,
Machine B is available for atmost 40 hours,
Machine C is available for atmost 30 hours,
The Manufacturer’s objective is to make as much profit as he can, Formulate the problem
as a linear programming problem that can be used to find this profits.

3. A pharmaceutical firm produces two products H and M . Each unit of product H requires
3 hours of operation I and 4 hours of operation II, while each unit of product M requires
4 hours of operation I and 5 hours of operation II. Time available for operation I and
II are 20 hours and 26 hours respectively. Product H sells at a profit of 1, 000 U GX per
unit, while M sells at a profit of 2, 000 U GX. Determine the quantities of H and M to
be produced, so that the profit earned is maximum.

linear programming Page 11 of 186


1.5. LP DESCRIPTION

Page 12 of 186 linear programming


Chapter 2

Geometrical/Graphical solution of a
linear programming problems:

Given any two dimensional linear programming problem, we can find the optimal solution to
the problem by the use of the following procedure.

- Plot the constraints set / equalities in the LP problem.

- Shade out the unwanted region to identify the feasible region.

- Plot the objective function on the graph starting with a value of z(w) = 0 and shift the
objective function in order to identify a point that either maximizes or minimizes the LP
objective.

In other words To sketch the region represented by a linear inequality in two variables:
A. Sketch the straight line obtained by replacing the inequality with an equality.
B. Choose a test point not on the line ((0,0) is a good choice if the line does not pass through
the origin, and if the line does pass through the origin a point on one of the axes would be a
good choice).
C. If the test point satisfies the inequality, then the set of solutions is the entire region on the
same side of the line as the test point. Otherwise it is the region on the other side of the line. In
either case, shade out the side that does not contain the solutions, leaving the solution region
showing

2.1 Feasible Region


The feasible region determined by a collection of linear inequalities is the collection of points
that satisfy all of the inequalities.
To sketch the feasible region determined by a collection of linear inequalities in two variables:
Sketch the regions represented by each inequality on the same graph, remembering to shade the
parts of the plane that you do not want. What is unshaded when you are done is the feasible
region.

2.2 Graphical Method


The graphical method for solving linear programming problems in two unknowns is as follows.

13
2.2. GRAPHICAL METHOD

(Step A.) Graph the feasible region (Sketch the constraints and shade the wanted region).

(Step B.) Compute the coordinates of the corner points of the feasible region.

(Step C.) Substitute the coordinates of the corner points into the objective function to see which
gives the optimal value.

(Step D.) If the feasible region is not bounded, this method can be misleading: optimal solutions
always exist when the feasible region is bounded, but may or may not exist when the
feasible region is unbounded. The textbook shows a straightforward way for determining
whether optimal solutions exist in the case of unbounded feasible regions.

Example 2.2.1 Graphically solve the LP below,

max Z = 4x + 5y
subject to 2x + 5y ≤ 25
6x + 5y ≤ 45
x, y ≥ 0

The corner points are thus (0, 0), (0, 5), (15/2, 0) and (5, 3). Check these values.

Figure 2.1: Shaded region: Feasible solutions

Objective function
Corner points z = 4x + 5y
(0, 0) 4(0) + 5(0) = 0
(0, 5) 4(0) + 5(5) = 25
( 15
2
, 0) 4( 15
2
) + 5(0) = 30
(5, 3) 4(3) + 5(3) = 35

Look for the maximum (since objective is to maximize) value for z in this list is 35 at (5, 3).

Example 2.2.2 Maximize p = x + 5y subject to the constraints in the previous example.

Objective function
Corner points z = x + 5y
(0, 0) (0) + 5(0) = 0
(0, 5) (0) + 5(5) = 25
( 15
2
, 0) ( 15
2
) + 5(0) = 15
2
(5, 3) (3) + 5(3) = 20

The maximum value for p is 25 at (0, 5).

Page 14 of 186 linear programming


2.2. GRAPHICAL METHOD

Example 2.2.3 Graphically solve the LP below,

max K = x1 + 2x2
subject to − 2x1 + x2 ≤ 2
x1 − 2x2 ≤ 4
x1 + x2 ≤ 5
x1 , x2 ≥ 0

linear programming Page 15 of 186


2.2. GRAPHICAL METHOD

Figure 2.2: Feasible solution

The optimal solution to the linear programming problem is (1, 4) since it’s one that yields
the maximum shift in the objective function and the optimal value is therefore K = K = 9

Example 2.2.4

max p = 143x + 60y


subject to x + y ≤ 100
120x + 210y ≤ 15000
110x + 30y ≤ 4000
x, y ≥ 0

The corner points are thus (0, 0), (0, 500


7
), ( 400
11
, 0) and (20, 60). Check these values.

Objective function
Corner points z = 143x + 60y
(0, 0) 143(0) + 60(0) = 0
(0, 500
7
) 143(0) + 60( 500
7
) = 4286
400 400
( 11 , 0) 143( 11 ) + 60(0) = 5200
(20, 60) 143(20) + 60(60) = 6460

the maximum value of p is 6460 at (20, 60)

Class 2.2.1 A firm manufactures two categories of Timber, Mahogany and other types. Ma-
hogany timber costs 4, 500/ = to make and each of the others cost 6, 000/ = to make. The
weekly production budget is 540, 000/ =. A Mahogany timber takes 2 man hours to make and
each of the others take 4 man hours. There are 160 man hours available in a week. Given
that each of Mahogany timber give a profit of 20, 000/ = and other timber give a profit of
25, 000/ =.

Page 16 of 186 linear programming


2.2. GRAPHICAL METHOD

(i) Construct a linear programming problem.

(ii) Find the number of Mahogany and other timber that can be produced in order to maxi-
mize production in a week (Hint: Take x to be the number of Mahogany timber produced
and y to be the number of other timber produced and Use graphical method to solve the
problem ).

max π = 20, 000x + 25, 000y


subject to 4500x + 6000y ≤ 540, 000
2x + 4y ≤ 160
x, y ≥ 0

linear programming Page 17 of 186


2.2. GRAPHICAL METHOD

Using graphical method find the optimal solution to the following linear programming prob-
lems.

Exercise 2.1

max z = 2x + 3y
subject to 3x + y ≤ 2
4x + 2y ≤ 44
4x − y ≤ 14
x, y ≥ 0

Exercise 2.2

minimise w = x + y
subject to − x + y ≤ 3
2x + y ≤ 18
y ≥ 6
x, y ≥ 0

Exercise 2.3

maximise z = x1 + x2
subject to 2x1 + 3x2 ≤ 6
x1 + 4x2 ≤ 4
x1 , x2 ≥ 0

Exercise 2.4 maximise z = 60x + 30y

2x + 3y ≥ 120, 2x + y ≥ 80

Example 2.2.5 A company makes two products (X and Y ) using two machines (A and B).
Each unit of X that is produced requires 50 minutes processing time on machine A and 30
minutes processing time on machine B. Each unit of Y that is produced requires 24 minutes
processing time on machine A and 33 minutes processing time on machine B.
At the start of the current week there are 30 units of X and 90 units of Y in stock. Available
processing time on machine A is forecast to be 40 hours and on machine B is forecast to be 35
hours.
The demand for X in the current week is forecast to be 75 units and for Y is forecast to be
95 units. Company policy is to maximize the combined sum of the units of X and the units of
Y in stock at the end of the week.

Page 18 of 186 linear programming


2.2. GRAPHICAL METHOD

(i) Formulate the problem of deciding how much of each product to make in the current week
as a linear program.

(ii) Solve this linear program graphically.

Solution: : Let

x be the number of units of X produced in the current week

y be the number of units of Y produced in the current week

then the constraints are:

50x + 24y ≤ 40(60) machine A time


30x + 33y ≤ 35(60) machine B time
x ≥ 75 − 30

i.e. x ≥ 45 so production of X ≥ demand (75) - initial stock (30), which ensures we meet
demand
y ≥ 95 − 90 i.e. y ≥ 5 so production of Y ≥ demand (95) - initial stock (90), which ensures we
meet demand The objective is: maximize (x + 30 − 75) + (y + 90 − 95) = (x + y − 50) i.e. to
maximize the number of units left in stock at the end of the week
It is plain from the diagram below that the maximum occurs at the intersection of x = 45
and 50x + 24y = 2400

Example 2.2.6 A company is involved in the production of two items (X and Y ). The
resources need to produce X and Y are twofold, namely machine time for automatic processing
and craftsman time for hand finishing. The table below gives the number of minutes required
for each item:

Machine time Craftsman time


Item X 13 20
Y 19 29

linear programming Page 19 of 186


2.2. GRAPHICAL METHOD

The company has 40 hours of machine time available in the next working week but only 35
hours of craftsman time. Machine time is costed at 10 per hour worked and craftsman time
is costed at 2 per hour worked. Both machine and craftsman idle times incur no costs. The
revenue received for each item produced (all production is sold) is 20 for X and 30 for Y . The
company has a specific contract to produce 10 items of X per week for a particular customer.
(i) Formulate the problem of deciding how much to produce per week as a linear program.
(ii) Solve this linear program graphically.
Solution: : Let
x be the number of items of X
y be the number of items of Y
then the LP is:
maximize
20x + 30y − 10 (machine time worked) −2 (craftsman time worked)
subject to:

13x + 19y ≤ 40(60) machine time


20x + 29y ≤ 35(60) craftsman time
x ≥ 10 contract
x, y ≥ 0

so that the objective function becomes


maximize
20x + 30y − 10(13x+19y)
60
− 2(20x+29y)
60
i.e. maximize
17.1667x + 25.8667y
subject to:

13x + 19y ≤ 2400


20x + 29y ≤ 2100
x ≥ 10
x, y ≥ 0

It is plain from the diagram below that the maximum occurs at the intersection of x = 10 and
20x + 29y ≤ 2100
Solving simultaneously, rather than by reading values off the graph, we have that x = 10
and y = 65.52 with the value of the objective function being 1866.5
Example 2.2.7
A company manufactures two products (A and B) and the profit per unit sold is 3 and 5
respectively. Each product has to be assembled on a particular machine, each unit of product
A taking 12 minutes of assembly time and each unit of product B 25 minutes of assembly time.
The company estimates that the machine used for assembly has an effective working week of
only 30 hours (due to maintenance/breakdown).
Technological constraints mean that for every five units of product A produced at least two
units of product B must be produced.

Page 20 of 186 linear programming


2.2. GRAPHICAL METHOD

(i) Formulate the problem of how much of each product to produce as a linear program.

(ii) Solve this linear program graphically.

(iii) The company has been offered the chance to hire an extra machine, thereby doubling the
effective assembly time available. What is the maximum amount you would be prepared
to pay (per week) for the hire of this machine and why?
Solution: : Let
xA = number of units of A produced

xB = number of units of B produced


then the constraints are:

12xA + 25xB ≤ 30(60) (assembly time)


xA
xB ≥ 2( )
5
i.e. xB − 0.4xA ≥ 0
i.e. 5xB ≥ 2xA (technological)
where xA , xB ≥ 0

and the objective is


maximize 3xA + 5xB
It is plain from the diagram below that the maximum occurs at the intersection of 12xA +
25xB = 1800 and xB − 0.4xA = 0
Solving simultaneously, rather than by reading values off the graph, we have that:

xA = (1800/22) = 81.8
xB = 0.4xA = 32.7

with the value of the objective function being 408.9


Doubling the assembly time available means that the assembly time constraint (currently
12xA +25xB ≤ 1800) becomes 12xA +25xB ≤ 2(1800) This new constraint will be parallel to the

linear programming Page 21 of 186


2.2. GRAPHICAL METHOD

existing assembly time constraint so that the new optimal solution will lie at the intersection
of 12xA + 25xB = 3600 and xB − 0.4xA = 0
i.e. at xA = ( 3600
22
) = 163.6
xB = 0.4xA = 65.4
with the value of the objective function being 817.8
Hence we have made an additional profit of (817.8−408.9) = 408.9 and this is the maximum
amount we would be prepared to pay for the hire of the machine for doubling the assembly
time.
This is because if we pay more than this amount then we will reduce our maxi-
mum profit below the 408.9 we would have made without the new machine.
Example 2.2.8 minimize 4a + 5b + 6c
subject to
a+b ≥ 11
a−b ≤ 5
c−a−b = 0
7a ≥ 35 − 12b
a, b, c ≥ 0

Solution: : To solve this LP we use the equation c − a − b = 0 to put c = a + b (≥ 0 as a ≥ 0


and b ≥ 0) and so the LP is reduced to
minimize 4a + 5b + 6(a + b) = 10a + 11b
subject to
a+b ≥ 11
a−b ≤ 5
7a + 12b ≥ 35
a, b ≥ 0

From the diagram below the minimum occurs at the intersection of a − b = 5 and a + b = 11
i.e. a = 8 and b = 3 with c(= a + b) = 11 and the value of the objective function
10a + 11b = 80 + 33 = 113.

Page 22 of 186 linear programming


2.2. GRAPHICAL METHOD

Example 2.2.9 Solve the following linear program:


maximize 5x1 + 6x2
subject to

x1 + x2 ≤ 10
x1 − x2 ≥ 3
5x1 + 4x2 ≤ 35
x1 ≥ 0
x2 ≥ 0

Solution: It is plain from the diagram below that the maximum occurs at the intersection of
5x1 + 4x2 = 35 and x1 − x2 = 3
Solving simultaneously, rather than by reading values off the graph, we have that
5(3 + x2 ) + 4x2 = 35
i.e. 15 + 9x2 = 35
i.e. x2 = (20/9) = 2.222 and
x1 = 3 + x2 = (47/9) = 5.222
The maximum value is 5(47/9) + 6(20/9) = (355/9) = 39.444

Example 2.2.10 A carpenter makes tables and chairs. Each table can be sold for a profit
of 30 and each chair for a profit of 10. The carpenter can afford to spend up to 40 hours per
week working and takes six hours to make a table and three hours to make a chair. Customer
demand requires that he makes at least three times as many chairs as tables. Tables take up
four times as much storage space as chairs and there is room for at most four tables each week.
Formulate this problem as a linear programming problem and solve it graphically.
Solution:
Let

xT = number of tables made per week

xC = number of chairs made per week

Constraints total work time 6xT + 3xC ≤ 40


customer demand xC ≥ 3xT

linear programming Page 23 of 186


2.2. GRAPHICAL METHOD

storage space (xC /4) + xT ≤ 4


all variables ≥ 0 Objective maximize 30xT + 10xC
The graphical representation of the problem is given below and from that we have that the
solution lies at the intersection of
(xC /4) + xT = 4 and 6xT + 3xC = 40
Solving these two equations simultaneously we get xC = 10.667, xT = 1.333 and the corre-
sponding profit = 146.667

Example 2.2.11 Solve the problem

min c = 3x1 + 4x2


subject to 3x1 − 4x2 ≤ 12
x1 + 2x2 ≥ 4
x1 ≥ 1, x2 ≥ 0

(x1 , x2 , c) = (1, 1.5, 9)

Page 24 of 186 linear programming


2.2. GRAPHICAL METHOD

Example 2.2.12 Solve using the graphical method, determine the feasible region, corner
points, optimal solution and optimal objective function value. Also graph the objective func-
tion.
max p = 5x1 + 7x2
subject to x1 ≤ 6
2x1 + 3x2 ≤ 19
x1 + x2 ≤ 8
x1 , x2 ≥ 0

(x1 , x2 , p) = (5, 3, 46)

Example 2.2.13 Use both the geometric and primal simple algorithm to solve the problem
max π = 5y1 + 8y2
subject to y1 + 2y2 ≤ 1
y1 + y2 ≤ 2
2y1 + 3y2 ≤ 4
y1 , y2 ≥ 0

(y1 , y2 , π) = (3, −1, 7)

Example 2.2.14 Consider the linear programming model with two variables and 3 constraints:-

max z = 2x1 + 3x2


subject to −x1 + x2 ≤ 5
x1 + 3x2 ≤ 35
x1 ≤ 20
x1 , x2 ≥ 0

Solve graphically.    
x1 20
 x2  =  5 
z 55
Repeat the problem using a primal-simplex.
Exercise 2.5
max z = 2x1 + 3x2
subject to −x1 + x2 ≤ 5
x1 + 3x2 ≤ 35
x1 ≤ 20
x1 + 15x2 ≥ 10
x1 , x2 ≥ 0

linear programming Page 25 of 186


2.2. GRAPHICAL METHOD

Example 2.2.15 Every Saturday, David irons for the family. he irons three different types of
clothing: dresses, shirts and jackets. David knows that each Saturday:

he must iron at least 2 dresses, at least 5 shirts and atleast 2 jackets;


he can only iron at most 28 clothing;
he takes 3 minutes to iron a dress, 2 minutes to iron a shirt and 2 minutes to iron a jacket.
The iron must be used for at least 40 minutes but not more than 60 minutes.

Each Saturday, David irons x dresses, y shirts and z jackets.

(a) Find six inequalities that model David’s situation.

(b) On a particular Saturday, David irons the same number of jackets as dresses. David’s
aim is to iron the maximum number of items of clothing.

(i) Show that the inequalities found in part (a) above simplify to

x ≥ 2, y ≥ 5, 2x + y ≤ 28, 40 ≤ 5x + 2y ≤ 60

(ii) Draw a suitable diagram to enable the problem to be solved graphically, indicating
the feasible region.
(iii) Use your diagram to find how many of each type of clothing David might iron to
achieve his aim.
(x, y) = (4, 20, 28)

Example 2.2.16 State any two limitations of a graphical approach of solving a LP problem.

Class 2.2.2 Without solving, formulate a linear programming problem to determine the pairs
of each type of shoes should the company make to maximize profits π for the shoe company
that requires the following resources.
Jogging shoes Racing shoes Security shoes Resource available
Labor 2 Hrs 3 Hrs 14 Hrs 35
Machine hour 13 Hrs 4 Hrs 7 Hrs 54
Cotton 24 inches 1 inches 6 inches 71
Rubber 5 inches 9 inches 8 inches 35
Profit 10 5 35

max π = 10x1 + 5x2 + 35x3


subject to 2x1 + 3x2 + 14x3 ≤ 35
13x1 + 4x2 + 7x3 ≤ 54
24x1 + x2 + 6x3 ≤ 71
5x1 + 9x2 + 8x3 ≤ 35
x1 , x2 , x3 ≥ 0

Example 2.2.17 A pension fund manager is considering investing in two shares A and B. It
is estimated that

Page 26 of 186 linear programming


2.2. GRAPHICAL METHOD

(a) Share A will earn a dividend of 12% per annum and share B 4% per annum.

(b) Growth in the market value in one year of share A will be 10 praise per Re.1 invested
and in B 40 praise per Re.1 invested.

He wants to invest a minimum total sum which will give dividend income of atleast Rs.600 per
annum and growth in one year of atleast Rs.1000 on the initial investment. You are required
to

(i) State the mathematical formulation of the problem.

(ii) Compute the minimum sum to be invested to meet the manager’s objective by using the
primal simplex method on the dual problem.

min z = x1 + x2
subject to 0.12x1 + 0.04x2 ≥ 600
0.1x1 + 0.4x2 ≤ 1000
x1 , x2 ≥ 0

50, 000 15, 000 65, 000


x1 = Rs. , x2 = Rs. , Zmin =
11 11 11

Example 2.2.18 In order to produce 1000 tones of non-oxidising steel for engine valves,
atleast the following quantities of mangnese (Mn), Chromium (Cr) and Molybdenum (Mb) are
needed:
M n 50kg, Cr 60kg, M b 70kg,
These metals are available in packages A, B and C having different proportions of M n, Cr and
M b and also different in prices as below:

Contents in Kg per packet


Package Mn Cr Mb Prices per package (Rs)

A 10 10 5 45
B 10 15 5 60
C 5 5 25 75
How many packages A, B and C should be purchased to minimize cost? What is the possible
cost?

Example 2.2.19 A company uses small trucks and large trucks to transport its products in
crates. The crates are all of the same size.
On a certain day 10 truck drivers at most are available. Each truck requires one driver only.
Small trucks take 10 minutes each to load and large trucks take 30 minutes each to load. The
total loading time must not be more than 3 hours. Only one truck can be loaded at a time.

(i) if x represents the number of small trucks and y represents the number of large trucks
used, write down two inequalities in x and y. Illustrate these on graph paper.

x + y ≤ 10
10x + 30y ≤ 180

linear programming Page 27 of 186


2.2. GRAPHICAL METHOD

(ii) Each small truck carries 30 crates and each large truck carries 70 crates. How many of
each type of truck should be used to maximize the number of crates to be transported
that day?

Vertex 30x 70y 30x + 70y


(0,0) 0 0 0
(0,6) 0 420 420
(6,4) 180 280 460
(10,0) 300 0 300

The company should have 6 small trucks and 4 large trucks to maximise the number of
crates exported

Example 2.2.20 Two types of machines, type A and type B, can be purchased for a new
factory. Each machine of type A costs $1600. Each machine of type B costs $800. The purchase
of the machines can cost, at most, $27200.
Each machine of type A needs 90m2 of floor space in the factory.
Each machine of type B needs 54m2 of floor space.
The maximum amount of floor space available for the machines is 1620m2 .
(i) If x represents the number of machines of type A and y represents the number of machines
of type B, write down two inequalities in x and y and illustrate these on graph paper.
1600x + 800y ≤ 27, 200
90x + 54y ≤ 1620

(ii) The daily income from the use of each machine of type A is $75. The daily income from
the use of each machine of type B machine is $42. How many of each type of machine
should be purchased so as to maximise daily income?

The income will be $75x + $42y

Vertex 75x 42y 75x + 42y


(0,0) 0 0 0
(0,30) 0 1260 1260
(12,10) 900 420 1320
(17,0) 1275 0 1275

(iii) What is the maximum daily income?


The maximum possible daily income will be $1320.

Example 2.2.21 Houses are to be built on 9 hectares of land.


Two types of houses, bungalows and semi-detached houses, are possible.
Each bungalow occupies one fifth of a hectare.
Each semi-detached house occupies one tenth of a hectare.
The cost of building a bungalow is $80, 000.
The cost of building a semi-detached house is $50, 000.
The total cost of building the houses cannot be greater than $4 million.

Page 28 of 186 linear programming


2.2. GRAPHICAL METHOD

(i) Taking x to represent the number of bungalows and y to represent the number of semide-
tached houses, write down two inequalities in x and y and illustrate these on graph paper.

(ii) The profit on each bungalow is $10, 000. The profit on each semidetached house is $7, 000.
How many of each type of house should be built so as to maximise profit?

The builder should build no bungalows and 80 semi-detached in order to maximise his profits
of $560, 000.

Example 2.2.22 A new ship is being designed. It can have two types of cabin accommoda-
tion for passengers - type A cabins and type B cabins.
Each type A cabin accommodates 6 passengers and each type B cabin accommodates 3 pas-
sengers. The maximum number of passengers that the ship can accommodate is 330.
Each type A cabin occupies 50m2 of floor space. Each type B cabin occupies 10m2 of floor
space. The total amount of floor space occupied by cabins cannot exceed 2300m2 .

(i) Taking x to represent the number of type Acabins and y to represent the number of type
B cabins, write down two inequalities in x and y and illustrate these on graph paper.

6x + 3y ≤ 330
50x + 10y ≤ 2300

(ii) The income on each voyage from renting the cabins to passengers is $600 for each type A
cabin and $180 for each type B cabin. How many of each type of cabin should the ship
have so as to maximize income, assuming that all cabins are rented?
The income will be $600x + $180y

Vertex 600x 180y 600x + 180y


(0,0) 0 0 0
(0,55) 0 9,900 9,00
(40,30) 24,000 5,400 29,400
(46,0) 27,600 0 27,600

They ship should have 40 of type A cabins and 30 of type B cabins.

(iii) What is the maximum possible income on each voyage from renting the cabins?
The maximum possible income will be $29, 400.

Example 2.2.23 A machine tool company conducts a job-training program for machinists.
Trained machinists are used as teachers in the program at a ratio of one for every ten trainees.
The training program lasts for one month. From past experience it has been found that out of
ten trainees hired, only seven complete the program successfully (the unsuccessful trainees are
released).
Trained machinists are also needed for machining and the company’s requirements for the next
three months are as follows:
January 100
February 150
March 200

linear programming Page 29 of 186


2.2. GRAPHICAL METHOD

In addition, the company requires 250 trained machinists by April. There are 130 trained
machinists available at the beginning of the year. Payroll costs per month are:
Each trainee $400
Each trained machinist(machining or teaching) $700
Each trained machinist idle(Union forbids firing them!) $500
Set up the linear programming problem that will produce the minimum cost hiring and training
schedule and meet the company’s requirements.

Each trained machinist can:


(i) work a machine

(ii) teach

(iii) stay idle


The number of trained machinists is fixed; therefore the decision variables are the number
teaching each month and the number idle each month.

Let X1 = number of trained machinists teaching in January


X2 = number of trained machinists idle in January
X3 = number of trained machinists teaching in February
X4 = number of trained machinists idle in February
X5 = number of trained machinists teaching in March
X6 = number of trained machinists idle in March

The cost of machinists operating is constant and therefore not required in the objective function.

Relevant costs are:


(i) cost of training program i.e. cost of trainees + cost of teachers

(ii) ) cost of idle machinists


Objective function (cost minimization):

Minimise Z = 400(10X1 + 10X3 + 10X5 ) (trainees)


+ 700(X1 + X3 + X5 ) (teachers)
+ 500(X2 + X4 + X6 ) (idle machinists)

Complete problem:

Minimise Z = 4700X1 + 500X2 + 4700X3 + 500X4 + 4700X5 + 500X6


Subject to X1 + X2 = 30 January
7X1 X3 X4 = 20 February
7X1 + 7X3 X5 X6 = 70 March
7X1 + 7X3 + 7X5 = 120 April
X1 , X2 , X3 , X4 , X5 , X6 ≥ 0

250 trained machinists will be required in April

Page 30 of 186 linear programming


2.2. GRAPHICAL METHOD

Example 2.2.24 A company involved in the assembly and distribution of printers in con-
cerned with two types laser and inkjet. Assembly of each laser printer takes two hours, while
each inkjet printer takes one hour to assemble, and the staff can provide a total of 40 person-
hours of assembly time per day. In addition, warehouse space must be available for the assembly
and distribution of the printers, 1 square meter for each laser printer and 3 square meters for
each inkjet printer; the company has a total of 45 square meters of storage space available for
assembled printers each day. Laser printers can be sold for a profit of $30 per unit and inkjet
printers earn a profit of $25 each, but the market in which the company is operating can absorb
a maximum of 12 laser printers per day. (There is no such limitation on the market for inkjet
printers). Formulate this as a linear programming problem and determine, using the simplex
method, the number of each type of printer the company should assemble and distribute in
order to maximise daily profit.
Solution X1? = 12(# of laser printers), X2? = 11(# of inkjet printers).
Total daily profit = $635
Example 2.2.25 The Pasta Basta company wants to evaluate an ecological production versus
a traditional one. One of their products, the Pasta Basta lasagne, has to contain certain
preservatives, R and Q, in order to ensure durability. Artificially produced counterparts R0 and
Q0 are usually used in the production - these are bought from a chemical company PresChem,
but are undesirable from the ecological point of view. R and Q can alternatively be extracted
from fresh fruit, and there are four types of fruit each with their particular content (number of
units) of R and Q in one ton of the fruit. These contents and the cost of buying the fruit are
specified in Table below. Pasta Basta has a market corresponding to daily needs of 7 units of
R and 2 units of
Fruit type F1 F2 F3 F4

Preservative R 2 3 0 5

Preservative Q 3 0 2 4

Cost pr. ton 13 6 4 12


If the complete production is based on ecologically produced preservatives, which types of fruit
and which amounts should be bought in order to supply the necessary preservatives in the
cheapest way ?
Minimise w = 13x1 + 6x2 + 4x3 + 12x4
s.t 2x1 + 3x2 + 5x4 = 7
3x1 + 2x3 + 4x4 = 2
x1 ; x2 ; x3 ; x4 ≥ 0

Example 2.2.26 A company, which owns three farms at the edge of a desert, is planning
agricultural production for the coming year. The agricultural output of each farm is limited by
both the amount of available irrigable land and the quantity of water available. The data are
given below.
Farm Usable Land (Acres) Water Available (Acre Feet)
1 400 600
2 600 800
3 300 375

linear programming Page 31 of 186


2.2. GRAPHICAL METHOD

The crops being considered on these farms include sugar beets, cotton, and corn. These crops
differ primarily in their expected net return per acre and their consumption of water. In
addition, the company has set a maximum quota for the total acreage that can be devoted to
each of these crops. The data is shown below.

Crop Max Quota Water Consumption Net Return


(Acres) (Acre Feet/Acre) ($/Acre)
Sugar beets 600 3 1,000
Cotton 500 2 750
Corn 325 1 250

Because of the limited water available for irrigation, the company will not be able to use all
its irrigable land for planting crops. To ensure equity between three farms, it has been agreed
that each farm will plant the same proportion of its available irrigable land. For example, if
farm 1 plants 200 of its 400 acres, then farm 2 must plant 300 of its 600 acres, while farm 3
plants 150 of its 300 acres. However, any combination of the crops may be grown at any of the
farms. The job facing the company is to plan how many acres to devote to each crop on these
farms while satisfying the given restrictions. The objective is to maximise the total net return
of the company.

Assignment 2.2.1 The Thompson company manufactures two industrial products: a stan-
dard product ($45 profit per item) and an economy product ($30 profit per item). These two
products are built using machine time and manual labor. The standard product requires 3
hours machine time and 2 hours manual labor. The economy model requires 3 hours machine
time and no manual labor. If the week’s supply of manual labor is limited to 800 hours and
machine time to 1500 hours. Without solving, formulate an LP problem model to find how
much of each type of product should be produced each week in order to maximize the profit?

Assignment 2.2.2

Maximize x+y
subject to 2x + y ≤ 14
−x + 2y ≤ 8
2x − y ≤ 10
x ≥ 0, y ≥ 0

(x, y) = (4, 6)

Assignment 2.2.3

Maximize 5x + 4y
subject to x+y ≤2
−2x − 2y ≤ −9
x ≥ 0, y ≥ 0

infeasible

Page 32 of 186 linear programming


2.2. GRAPHICAL METHOD

Assignment 2.2.4
Maximise P = x + 4y
subject to −x + 2y ≤ 6
5x + 4y ≤ 40
x, y ≥ 0

(x, y; P ) = (4, 5; 24)


Assignment 2.2.5
Minimise P = −4x + 6y
subject to −x + 6y ≥ 24
2x − y ≤ 7
x + 8y ≤ 80
x, y ≥ 0

(x, y; P ) = (6, 5; 6)
Assignment 2.2.6 A firm manufactures two types of couplings, A and B, each of which
requires processing time on lathes, grinders and polishers. The machine times needed for each
type of coupling are given in the table.
Coupling Time required (hours)
type Lathe Grinder Polisher
A 2 8 5

B 5 5 2
The total machine time available is 250 hours on lathes, 310 hours on grinders and 160 hours
on polishers. The net profit per coupling of type A is $9 and of type B $10. Determine
(a) the number of each type to be produced to maximize profit. (x, y) = (10, 46)
(b) the maximum profit. Pmax = 550
Assignment 2.2.7 A firm produces three types of pumps, A, B, C, each of which requires
the four processes of turning, drilling, assembling and testing
Pump Process time (hours) per pump profit per
type Turning Drilling Assembling Testing pump

A 2 1 3 4 84

B 1 1 4 3 72

C 2 1 2 2 52

Total time available 98 60 145 160


From the information given in the table, determine
(a) the weekly output of each type of pump to maximize profit. (x, y, z) = (23, 8, 22)
(b) the maximum profit. Pmax = 3652

linear programming Page 33 of 186


2.2. GRAPHICAL METHOD

Page 34 of 186 linear programming


Chapter 3

Simplex Method

In mathematical optimization theory, the simplex algorithm, created by the North American
mathematician George Dantzig in 1947, is a popular technique for numerical solution of the
linear programming problem. An unrelated, but similarly named method is the Nelder-Mead
method or downhill simplex method due to Nelder and Mead (1965) and is a numerical method
for optimizing many-dimensional unconstrained problems, belonging to the more general class
of search algorithms.
In both cases, the method uses the concept of a simplex, which is a polytope of N + 1 vertices in
N dimensions: a line segment on a line, a triangle on a plane, a tetrahedron in three-dimensional
space and so forth.
The simplex method has been the standard technique for solving a linear program since the
1940’s. In brief, the simplex method passes from vertex to vertex on the boundary of the
feasible polyhedron, repeatedly increasing the objective function until either an optimal solution
is found, or it is established that no solution exists. In principle, the time required might be
an exponential function of the number of variables, and this can happen in some contrived
cases. In practice, however, the method is highly efficient, typically requiring a number of steps
which is just a small multiple of the number of variables. Linear programs in thousands or
even millions of variables are routinely solved using the simplex method on modern computers.
Efficient, highly sophisticated implementations are available in the form of computer software
packages.

3.1 Mathematical Background to the simplex method


Definition 3.1.1
The set H = {x ∈ Rn : cx = k} where c is a non zero vector in Rn and k ∈ R is a constant
is called The hyper plane in Rn .
Example 3.1.1
In R2 − A hyper plane represents a line in two dimensions. In R3 − A hyper plane represents
a plane in three dimensions.
Definition 3.1.2 If H? = {x ∈ Rn : cx ≤ k or cx ≥ k} then H? is called a closed half
space(s) of the hyperplane.
If H1 = {x ∈ Rn : cx < k or cx > k} then H1 is called a open half space(s) of the hyperplane.

Definition 3.1.3 r
Let x1 , x2 , . . . , xr be points in Rn and µ1 , µ2 , . . . , µr a set of scalars, then
P
µj xj is called
j=1

35
3.1. MATHEMATICAL BACKGROUND TO THE SIMPLEX METHOD

a convex linear combination or a convex combination of x1 , x2 , . . . , xr when µj ≥ 0 ∀ j and


Pr
µj = 1.
j=1
In particular, The straight line with both ends at finite distances is called a line segment. Thus
the segment from a and b is denoted by = {x : λa + (1 − λ)b, 0 ≤ λ ≤ 1} where a and b are
points in R2 or (Rn ) in general.

Definition 3.1.4 point x is a boundary point of a set S of vectors if for every number  >
0(however small), at least one point within the distance  of x is in S, and at least one point
within the distance  of x is outside S.

Definition 3.1.5
A subset S of Rn is called a convex set if for any two distinct points x1 , x2 ∈ S, then the
line segment joining x1 and x2 lies in S, that is S is a convex linear combination of x1 and x2
if whenever x1 &x2 ∈ S then x = µx1 + (1 − µ)x2 ∈ S for 0 ≤ µ ≤ 1.

Example 3.1.2

Page 36 of 186 linear programming


3.1. MATHEMATICAL BACKGROUND TO THE SIMPLEX METHOD

Generally a set C is said to be convex if and only if given points x1 , x2 , . . . , xn ∈ C then


n
P
the point, x = λ1 x1 + λ2 x2 + . . . + λn xn such that 0 ≤ λi ≤ 1 and λi = 1 is a point in C.
i=1

3.1.1 Theorems about the Convex sets


Theorem 3.1.1
Every Hyperplane H is a convex set.
Proof
Let x1 , x2 ∈ H then it is required to show that x = µx1 + (1 − µ)x2 ∈ H with 0 ≤ µ ≤ 1.
By definition,
x1 ∈ H ⇒ cx1 = k
x2 ∈ H ⇒ cx2 = k
Thus, x ∈ H ⇒ {x ∈ Rn such that cx = k}
cx = c(µx1 + (1 − µ)x2 ) = µcx1 + cx2 + µcx2 .
= µk + k − µk = k Hence x ∈ H.
Theorem 3.1.2
Let A be an m × n matrix and b be a vector in Rn , then the set of solutions to the linear system
of equations Ax = b is a convex set.
Proof
Let’s denote the set of all solutions to the linear system of equations as S. we show that if
x1 , x2 ∈ S then x = µx1 + (1 − µ)x2 ∈ S with 0 ≤ µ ≤ 1,
By definition,
x1 ∈ S → Ax1 = b
x2 ∈ S → Ax2 = b
Thus, x ∈ S → {x ∈ Rn such that Ax = b}
Ax = b(µx1 + (1 − µ)x2 ) = µAx1 + Ax2 + µAx2 .
= µb + b − µb = b Hence x ∈ S. and therefore the set of solutions to the linear system of
equations Ax = b is a convex set.
Theorem 3.1.3 The solutions to the constraints of the LP problem form a convex set. (Proof
is an exercise).
Theorem 3.1.4 The intersection of a finite collection of convex sets is convex. (Proof is an
exercise).
Definition 3.1.6
A point U in a convex set S is called an extreme point of S if it’s not an interior point of
any line segment in S, that is U is an extreme point of a set S if there are no distinct points
x1 , x2 ∈ S such that U = µx1 + (1 − µ)x2 for 0 ≤ µ ≤ 1.
In mathematics, an extreme point of a convex set S in a real vector space is a point in S which
does not lie in any open line segment joining two points of S. Intuitively, an extreme point is a
”corner” of S (a point which cannot be expressed as a convex combination of other points in
the polyhedron).
Example 3.1.3
The dotted points are extreme points in the following diagram

linear programming Page 37 of 186


3.1. MATHEMATICAL BACKGROUND TO THE SIMPLEX METHOD

Figure 3.1: Extreme Points

Example 3.1.4
Map of the contiguous 48 states (excluding Alaska and Hawaii) dots show where the extreme
points/towns are

Page 38 of 186 linear programming


3.1. MATHEMATICAL BACKGROUND TO THE SIMPLEX METHOD

Note 3.1.1 Extreme points of a convex set C are always boundary points but not vice versa.

Figure 3.2: A convex set in light blue, and its extreme points in red

Definition 3.1.7 The convex hull of a set P , denoted by P 0 , is the intersection of all convex
sets Ci which contain P that’s P 0 = ∩i Ci such that Ci is convex and P ⊂ Ci .
The convex hull of a finite set of points is called the convex polytope spanned by these points.

Example 3.1.5 (in class) Note that a convex polytope is spanned by it’s extreme points i.e

any point in the polytope can be written as a linear combination of the extreme points.

Definition 3.1.8 A rectangle in Rn is a set R = {x ∈ Rn such that ai ≤ xi ≤ bi } where ai , bi


are real numbers and ai < bi .

Definition 3.1.9 A bounded convex set is one which can be enclosed in a rectangle in Rn

Theorem 3.1.5 A convex polytope is bounded.

Theorem 3.1.6 A closed bounded convex set in Rn is the convex hull of it’s extreme points.

Theorem 3.1.7 A closed and bounded convex set is a convex polytope iff it has finitely many
extreme points.

Definition 3.1.10 A polyhedron is algebraically defined as the set of solutions to the con-
straint set of the linear programming problem or simply for a system of linear inequalities.

Theorem 3.1.8 A convex polyhedron is the intersection of finitely many closed half spaces.

Theorem 3.1.9 A bounded convex polyhedron is a convex polytope.

Theorem 3.1.10 In a convex polytope, every point is a convex combination of extreme points.

Theorem 3.1.11 Suppose that the set(s) of all feasible solutions to a linear programming
problem is bounded, then one of the extreme points is an optimal solution.

Note 3.1.2

(i) An unbounded solution set may give an unbounded optimal value (i.e optimal value may
not exist) or a finite optimal value may exist depending on the objective function of the
LP problem.

(ii) Some LP’s may have more than one finite optimal values.

linear programming Page 39 of 186


3.1. MATHEMATICAL BACKGROUND TO THE SIMPLEX METHOD

Example 3.1.6 (Demonstration)

maximise z = 2x1 + 3x2


subject to x1 + 3x2 ≤ 9
2x1 + 3x2 ≤ 12
x1 , x2 ≥ 0

Solution

Both (6, 0) and (3, 2) are optimal solutions then a line segment

(x1 , x2 ) = µ(6, 0) + (1 − µ)(3, 2)

= (3 + 3µ, 2 − 2µ)
for 0 ≤ µ ≤ 1. and on this line segment z = 2x1 + 3x2 = 12. that’s any point on the line
segment is an optimal value.

Consider the LP

max z = cx
subject to Ax = b
and x ≥ 0

Where A = (aij ) is an m × n matrix x = (x1 , x2 , . . . , xn )t ∈ Rn , c = (c1 , c2 , . . . , cn ) ∈ Rn ,


b = (b1 , b2 , . . . , bm )t ∈ Rm .
Assumptions

1. m ≤ n

2. m columns of A are linearly independent. We let the first m columns of A be the ones
which are linearly independent.

Note 3.1.3 The assumptions are reasonable in the above LP ( in canonical form). Let the
columns of A be denoted by aj j = 1, 2, 3, . . . , n

Theorem 3.1.12 Let S be the set of all feasible solutions to the standard LP above, then the
point X = (x1 , x2 , . . . , xm , 0, 0, . . . , 0) is an extreme point of S where xj for j = 1, 2, . . . , m

Theorem 3.1.13 If X = x1 , x2 , . . . , xn is an extreme point of S, then the columns of A which


correspond to positive xj form a linearly independent set of vectors in Rm .

Corollary 3.1.1 If x is an extreme point and x1 , x2 , . . . , xr are the r positive components


of x, then r ≤ m and the set of columns, a1 , a2 , . . . , ar can be extended to a set of linearly
independent vectors in Rm by adjoining a suitably chosen set of m − r columns of A.

Theorem 3.1.14 Atmost m components of extreme points of S can be positive and the rest
must be zero.

Page 40 of 186 linear programming


3.2. SOLUTION TO A LP PROBLEM( SIMPLEX METHOD)

3.2 Solution to a LP Problem( Simplex Method)


Definition 3.2.1 Every non - singular m × m sub matrix B of A is called a basis for the
standard LP problem

Note 3.2.1

(i) Every m × m sub matrix B of A with |A| =


6 0 is a basis for the standard LP problem.

(ii) Every m linearly independent columns of A is a basis for the standard LP problem.
n

(iii) There are atmost m bases for the standard LP problem.

(iv) The assumption of rank m for the matrix A implies there is atleast one basis for the
standard LP problem.

Definition 3.2.2 B is a feasible basis for the standard LP problem if B is a basis and B −1 b ≥
0.

Example 3.2.1

maximise z = 120x1 + 100x2


subject to 2x1 + 2x2 ≤ 8
5x1 + 3x2 ≤ 15
x1 , x2 ≥ 0

In standard form

maximise z = 120x1 + 100x2


subject to 2x1 + 2x2 + x3 ≤ 8
5x1 + 3x2 + x4 ≤ 15
x1 , x2 ≥ 0

( In this case the interest here is to identify and create basic variables and the optimal value
be obtained) for example we can make x1 and x2 basic variables and have, x1 − 43 x3 + 12 x4 = 32
and x2 + 45 x3 − 21 x4 = 52

3.2.1 Basis presentation of an LP


Here we split the  set of 
variables into basic and non basicto obtain,
xB xB
z = cx = (cB , cR ) and Ax = b ⇒ (B : R) and therefore
xR xR
 
−1 xB
(I : B R) = B −1 b or IxB = B −1 b − B −1 RxR (3.1)
xR

is the basis presentation of the problem. An assumption here is that the first m columns of A
make up the basis.
Let bi be the components of B −1 b i = 1, 2, . . . , m
let aj be components of B −1 R j = m + 1, m + 2, . . . , n

linear programming Page 41 of 186


3.2. SOLUTION TO A LP PROBLEM( SIMPLEX METHOD)

So (i) is equivalent to

x1 + a1,m+1 xm+1 + . . . + a1,n xn = b1


x2 + a2,m+1 xm+1 + . . . + a2,n xn = b2
.
.
.
xm + am,m+1 xm+1 + . . . + am,n xn = bm

Equation (?)
Definition 3.2.3 The vector (xB (0), 0) ∈ Rn is a basic solution of the standard LP problem
relative to B.
Definition 3.2.4 The m components of xB (0) are called Basic variables ( or variables in the
solution), the n − m components of xR are called non basic variables ( or variables not in the
solution).
Definition 3.2.5 (xB (0)0) is called a basic feasible solution of the standard LP problem if
(xB (0)0) ≥ 0.
Note 3.2.2 A feasible basis leads(always) to a basic feasible solution since
(xB (0) = B −1 b ≥ 0.
Theorem 3.2.1 For the standard LP problem, every basic feasible solution is an extreme
point and conversely every extreme point is a basic feasible solution.
METHOD

(1) Get a basis B that’s a basic feasible solution.

Note 3.2.3 If (1) is not possible then the problem has no solution ( solution space is
empty).

(2) Get another basis B1 such that cB xB (0) < cB1 xB1 (0) and if (2) is not possible then B
gives the required solution.
Consider the general LP problem as in equation ?, Assuming A is an m × k matrix that
is m equalities in k variables, split the matrix A into a square matrix (B) and another matrix
that does not necessarily need be square (R) as in the case below,
A = [B : R], and also decompose X into XB and XR where XB = X1 , X2 , . . . , Xm and
XR = Xm+1 , . . . , Xn thus

Ax = [B : R][XB : XR ] = BXB + RXR = b


Here we have a choice of assigning values to n − m of the variables and then solve the remaining
ones for example setting XR = 0, we get BXB = b ⇒ xB = B −1 b.
Definition 3.2.6 From AX = BXB + RXR = b, if we let XR = 0 then XB = B −1 b is called
the basic solution associated with B to the linear programming problem.

Page 42 of 186 linear programming


3.2. SOLUTION TO A LP PROBLEM( SIMPLEX METHOD)

3.2.2 Vector to enter the Basis


Apply the decompositions to the LP problem thus
the objective function will be z = cx = cB xB + cB xR . then this objective function becomes
z = cB xB = cB B −1 b when we set xR = 0.
Suppose xR 6= 0, then,
max z = cB xB + cR xR
subject to,

BxB + RxR = b (3.2)

Multiplying through equation (1) by B −1 we get

xB + B −1 RxR = B −1 b (3.3)

which implies that xB = B −1 b − B −1 )RxR . using this result in the objective function we get,

z = cB [B −1 b − B −1 RxR ] + cR xR .
= cB B −1 b − cB B −1 RxR + cR xR .
= cB B −1 b + [cR − cB B −1 R]xR
= z + [cR − cB B −1 R]xR

where z = cB B −1 b. and similarly xB = x − B −1 RxR where x = B −1 b (basic solution) From


xB = B −1 b − B −1 RxR Let Y = B −1 R which is an m × (n − m) matrix.
 
y11 . . . y1n−m
 . . . 
 
Y = .
 . . 

 . . . 
ym1 . . . ymn−m

Then the ith constraint is given by,


n−m
X
xi + yij xj = xi .
j=1

and z can also be re - written as ,

z = z + [cR − cB B −1 R]xR
n−m
X
z = z+ [cj − cBi yj ]xj
j=1

Let I = the set of indices for the basic variables


J = the set of indices for the non basic (secondary) variables (secondary)
Thus the objective function and the set of constraints can be written respectively as,
X
z = z− [zj − cj ]xj (3.4)
j∈J

X
xi = xi + yij xj (3.5)
j∈J

linear programming Page 43 of 186


3.3. STANDARD MAXIMIZATION PROBLEM

Suppose k ∈ J that is xk is a non - basic variable(secondary) variable, and we let it take on a


positive value θ(θ > 0) but the rest of the secondary variable remain at a value zero that is
z = z − (zk − ck )θ (3.6)
The value of θ makes z smaller or larger depending on the sign and magnitude of (zk − ck )θ.
From equation (5)
z = z − (zk − ck )θ ≥ z if (zk − ck ) < 0 (3.7)
z = z − (zk − ck )θ ≤ z if (zk − ck ) ≥ 0 (3.8)
Sometimes the above condition on how z can be made larger is referred to as the criterion for
improvement of the solution or a criterion for identifying a variable that gives a better solution
that is in order to improve the value of the objective function we choose a non basic variable
((xk ) say) for which zk − ck < 0 and give it a positive value of θ. therefore min{zk − ck } < 0 is
the entry criterion for the simplex tableaux.

3.3 Standard Maximization Problem


A standard maximization problem in n unknowns is a linear programming problem in which
we are required to maximize (not minimize) the objective function, subject to constraints of
the form
x ≥ 0, y ≥ 0, z ≥ 0, . . ., and further constraints of the form Ax + By + Cz + ... ≤ N , where
A, B, C, ... and N are numbers with N nonnegative. Note that the inequality here must be a
”≤” and not ”=” or ”≥”

3.3.1 Simplex Method for Standard Maximization Problem


To solve a standard maximization problem using the simplex method, we take the following
steps:
Step 1. Convert to a system of equations by introducing slack variables to turn the constraints
into equations, and rewriting the objective function in standard form.
Step 2. Write down the initial tableau.
Step 3. Select the pivot column: Choose the negative number with the largest magnitude in
the bottom row (excluding the rightmost entry). Its column is the pivot column. (If there are
two candidates, choose either one.) If all the numbers in the bottom row are zero or positive
(excluding the rightmost entry), then you are done: the basic solution maximizes the objective
function (see below for the basic solution).
Step 4. Select the pivot in the pivot column: The pivot must always be a positive number. For
each positive entry b in the pivot column, compute the ratio a/b, where a is the number in the
Answer column in that row. Of these test ratios, choose the smallest one. The corresponding
number b is the pivot.
Step 5. Use the pivot to clear the column in the normal manner (taking care to follow the exact
prescription for formulating the row operations described in Chapter 2) and then relabel the
pivot row with the label from the pivot column. The variable originally labeling the pivot row
is the departing or exiting variable and the variable labeling the column is the entering
variable.
Step 6. Go to Step 3.

Page 44 of 186 linear programming


3.4. SIMPLEX METHOD FOR MINIMIZATION PROBLEM

3.3.2 Basic Solution


To get the basic solution corresponding to any tableau in the simplex method, set to zero all
variables that do not appear as row labels (these are the inactive variables).
The value of a variable that does appear as a row label (an active variable) is the number in
the rightmost column in that row divided by the number in that row in the column labeled by
the same variable.

3.4 Simplex Method for Minimization Problem


To solve a minimization problem using the simplex method, convert it into a maximization
problem. If you need to minimize c, instead maximize p = -c. In otherwords to and from a
minimization to maximization and from is to multiply through by a negative.
Example 3.4.1 The minimization LP problem:
Minimize C = 3x + 4y − 8z subject to the constraints

3x − 4y ≤ 12
x + 2y + z ≥ 4
4x − 2y + 5z ≤ 20
x, y, z ≥ 0

can be replaced by the following maximization problem:


Maximize P = −3x − 4y + 8z subject to the constraints

3x − 4y ≤ 12
x + 2y + z ≥ 4
4x − 2y + 5z ≤ 20
x, y, z ≥ 0

Note 3.4.1 The constraints are not changed, when Max to Min: to multiply by a negative in
the objective.
Note 3.4.2 With the nature of our entry and exit criterion, we can only solve a max problem.

3.5 Sample of a simplex tableau


c1 c2 . . . cn
cBj xB x1 x2 . . . xn x
cB1 xB1 xB1
cB2 xB2 xB2
. .
. B −1 R I .
cBm xBm xBm
zj − cj z1 − c1 z2 − c2 − − − zn − cn z

linear programming Page 45 of 186


3.5. SAMPLE OF A SIMPLEX TABLEAU

Clearly from xB + B −1 RxR = xB (B −1 b) we then see that initially B = I(m × m) is an identity


matrix and
P note also that the last row of the tableau correspond to
z = z − (zj − cj )xj .
j∈J

Page 46 of 186 linear programming


3.5. SAMPLE OF A SIMPLEX TABLEAU

Definition 3.5.1 A variable is said to be basic if it appears in only one of the constraint
equality and has a coefficient equal to 1.

(i) coefficient = 1.

(ii) appears only once in all constraints.

(iii) number of basic variables = number of constraints.

(iv) if non-basic=0, basic = +ve.

Definition 3.5.2 A solution to the linear system of equations is said to be feasible if all of
it’s components are non - negative.

3.5.1 A typical example


For the LP problem,

max Z = 2x + y
subject to x + 2y ≤ 5
3x − y ≤ 1
x, y ≥ 0

Translate it into a tableau.

Solution

(i) Transform the Lp into standard form by introducing slack variables x1 and x2 into the
constraint set to get,

max Z = 2x + y + 0.x1 + 0.x2


subject to x + 2y + x1 = 5
3x − y + x2 = 1
x, y, x1 , x2 ≥ 0
 
x
 y 
(ii) Write the problem in matrix form that is; minw = (2, 1, 0, 0) 
 x1  subject to

x2
 
  x  
1 2 1 0   y  = 5 . ∀ x1 , x2 , x3 ≥ 0

3 −1 0 1  x1  1
 x 2
  
1 2 1 0 5
Where A = ,b = , c = (2, 1, 0, 0).
3 −1 0 1 1  
1 2
From where we can decompose A and x into B, R, xB & xR with R = and
  3 −1
1 0
B=
0 1

linear programming Page 47 of 186


3.5. SAMPLE OF A SIMPLEX TABLEAU

2 1 0 0 0
cBj x y x1 x2 xB
0 x1 1 2 1 0 5
0 x2 3 -1 0 1 1
zj − cj −2 −1 0 0 0

3.5.2 Vector to leave the Basis

From Equation(4) that’s

X
xi = xi + yij xj (3.9)
j∈J

Suppose we have chosen xk (k ∈ J) to become a basic variable, isolate the xk term from
equation(8)
X
xi = x i + yij xj + yik xk (3.10)
j∈J−{k}

Let xl be the basic variable to be exchanged with xk . Consider the lth constraint
X
xl = xl + ylk xk + ylk xk (3.11)
j∈J−{k}

Dividing equation (10) through by ylk we get,

xl X  ylj  xl
+ xj + xk = .
ylk ylk ylk
j∈J−{k}

Note 3.5.1 The new value of x with the condition of non negativity implies that yxlkl ≥ 0 iff
ylk > 0. Push yxlkl into the summation and for simplicity take J 0 = {J − {k} + {l}}. in order to
get one equation.
Eliminate xk from the two constraint equations (9) & (10) by multiplying equation (9) by ylk
and (10) by yik and subtract the two equations.
X
xi ylk = xi ylk + ylk yij xj + ylk yik xk
j∈J−{k}

X
xl yik = xl yik + yik ylk xk + yik ylk xk
j∈J−{k}

After subtraction and dividing through by ylk we get,

yik xl X  yij ylk − ylj yik  


xi ylk − xl yik

xi − + xj =
ylk ylk ylk
j∈J−{k}

Page 48 of 186 linear programming


3.5. SAMPLE OF A SIMPLEX TABLEAU

 
xi ylk −xl yik
For feasibility the new solution x0 = ylk
should be non negative that is,
 
xi ylk − xl yik
≥0
ylk
Which implies that,
xi xl

yik ylk
and therefore the criterion for entry of a variable in the basis set of the tableau is given by,
 
xl xi
= min ∀ ylk ≥ 0
ylk i∈ I yik

Theorem 3.5.1 For a maximization problem a necessary and sufficient condition for the
solution to be optimal is that zj − cj ≥ 0 for all j = n − m, . . . , n.
we note that zj − cj = 0 for the basis vectors.

3.5.3 Steps for solving an LPP


Step(a): Canonical form: Max ≤, Min ≥: Note that if = is fine.
Step(b): Standard form the problem: to have equality =. [Slack and Surplus variables]
Step(c): RHS = +ve.
Step(d): Basic variables: Definition 3.5.1
Step(e): Enter Tableau.
Class 3.5.1
max z = 2x1 − 3x2 + x3
subject to x1 − 2x2 + 4x3 ≤ 5
2x1 + 2x2 + 4x3 ≤ 5
3x1 + x2 − x3 ≤ 7
x1 , x2 , x3 ≥ 0

We change into a standard form via the canonical form


max z = 2x1 − 3x2 + x3
subject to x1 − 2x2 + 4x3 + x4 = 5
2x1 + 2x2 + 4x3 + x5 = 5
3x1 + x2 − x3 + x6 = 7
x1 , x2 , x3 , x4 , x5 , x6 ≥ 0

cj 2 -3 1 0 0 0 0
cBj xB x1 x2 x3 x4 x5 x6 x̄B
0 x4 1 -2 4 1 0 0 5
0 x5 2 2 4 0 1 0 5
0 x6 3? 1 -1 0 0 1 7
zj − cj -2 3 -1 0 0 0 0

linear programming Page 49 of 186


3.5. SAMPLE OF A SIMPLEX TABLEAU

The minimum in zj − cj is −2: Then among the ratios

7 5 5
, ,
3 2 1
The minimum is the first, thus 3 is our pivot.
Since not all entries of zj − cj are positives, we repeat the tableau.

cj 2 -3 1 0 0 0 0
cBj xB x1 x2 x3 x4 x5 x6 x̄B
0 x4 0 - 73 13
3
1 0 - 31 8
3
4 14 ?
0 x5 0 3 3
0 1 - 23 1
3
1
2 x1 1 3
- 13 0 0 1
3
7
3
11
zj − cj 0 3
- 53 0 0 2
3
14
3

The minimum in zj − cj is - 53 : Then among the ratios

1/3 8/3
,
14/3 13/3
14
The minimum is the first, thus 3
is our pivot.

cj 2 -3 1 0 0 0 0
cBj xB x1 x2 x3 x4 x5 x6 x̄B
33
0 x4 14
4 3 3
1 x3 0 14
1 0 14
- 14 - 17
33
2 x1 14
29 5 3 67
zj − cj 0 7
0 0 14 7 14

Optimal solution is
33 ? 1 33 67
x?1 = , x2 = 0, x?3 = , x?4 = , x?5 = 0, x?6 = 0, z ? =
14 14 14 14
Example 3.5.1 For the following LP problem,

max z = −7x1 + 9x2 + 3x3


subject to 5x1 − 4x2 − x3 ≤ 10
x1 − x2 ≤ 4
−3x1 + 4x2 + x3 ≤ 1
x1 , x2 , x3 ≥ 0

Find an optimal solution to the LP using the primal simplex method(the simplex method)

(Step: b) Write the LP problem in standard form as,

max z = −7x1 + 9x2 + 3x3


subject to 5x1 − 4x2 − x3 + x4 = 10
x1 − x2 + x 5 = 4
−3x1 + 4x2 + x3 + x6 = 1
x1 , x2 , x3 ≥ 0

Page 50 of 186 linear programming


3.6. LP PROBLEM BEFORE THE PRIMAL SIMPLEX TABLEAU

(Step: d) Write the LP problem in matrix form where identify B, & R and finally put the infor-
mation in the tableau as follows;
−7 9 3 0 0 0 0
cBj x1 x2 x3 x4 x5 x6 xB
0 x4 5 -4 -1 1 0 0 10
0 x5 1 -1 0 0 1 0 4
0 x6 -3 4? 1 0 0 1 1
zj − cj 7 −9 −3 0 0 0 0
The second tableau
−7 9 3 0 0 0 0
cBj x1 x2 x3 x4 x5 x6 xB
0 x4 2 0 0 1 0 1 11
1 1 1 17
0 x5 4
0 4
0 1 4 4
−3 1? 1 1
9 x2 4
1 4
0 0 4 4
1
zj − cj 4
0 − 34 0 0 9
4
9
4

The third tableau


−7 9 3 0 0 0 0
cBj x1 x2 x3 x4 x5 x6 xB
0 x4 2 0 0 1 0 1 11
0 x5 1? -1 0 0 1 0 4
3 x3 -3 4 1 0 0 1 1
zj − cj -2 3 0 0 0 3 3
The fourth tableau
−7 9 3 0 0 0 0
cBj x1 x2 x3 x4 x5 x6 xB
0 x4 0 3
-7 x1 1 -1 0 0 1 0 4
3 x3 0 13
zj − cj 0 1 0 0 2 3 11
Thus the optimal solution is
x?1 = 4, x?2 = 0, x?3 = 13, x?4 = 3, x?5 = 0, x?6 = 0 and z = 11

3.6 LP problem before the primal simplex tableau


Make sure that
• The LP is in a canonical form
• Then that the LP is in a standard form
• The basic variables
Have optimal values(have positive values when non basic= 0).
Coefficient of Basic variables is +1.
The number of basic variables equals the number of constraints.

linear programming Page 51 of 186


3.7. SUMMARY OF THE PROCEDURE

3.7 Summary of the Procedure


1. Check for optimality, that’s check if zj − cj ≥ 0 ∀ j and if all positive then optimal, if for
some j zj − cj < 0 then not optimal.

2. Vector into the basis max |(zj − cj )| or min(zj − cj ) or the most minimum.
n o
3. Vector out of the basis mini∈ I yxiki ∀ ylk ≥ 0

4. Update the tableau (using the pivoting strategy) and go back to 1.

Page 52 of 186 linear programming


3.7. SUMMARY OF THE PROCEDURE

Exercise 3.1 For the following LP problems, find their corresponding optimal solutions using
the primal simplex method(the simplex method),
Exercise 3.2
max z = 2x1 − 3x2 + x3
subject to x1 − 2x2 + 4x3 ≤ 5
2x1 + 2x2 + 4x3 ≤ 5
3x1 + x2 − x3 ≤ 7
x1 , x2 , x3 ≥ 0

Exercise 3.3
max z = 3x1 + x2 + x3
subject to x1 − x2 + 2x3 ≤ 3
2x1 + 3x2 − x3 ≤ 2
−3x1 + x2 − 2x3 ≤ 1
x1 , x2 , x3 ≥ 0

Exercise 3.4
max z = x1 − 2x2 + x3
subject to x1 + 2x2 + x3 ≤ 5
2x1 − x2 + x3 ≤ 3
x1 + x2 − 2x3 ≤ 2
x1 , x2 , x3 ≥ 0

Exercise 3.5
max z = 3x1 + 4x2 + x3 + 5x4
subject to x1 + 4x2 + 5x3 + 2x4 ≤ 8
2x1 + 6x2 + x3 + x4 ≤ 3
8x1 + 3x2 + 4x3 + x4 ≤ 7
x1 , x2 , x3 , x4 ≥ 0

Example 3.7.1 Maximize


x1 + x2 + x3
subject to the constraints
−x1 + x2 ≤ 5
x1 + 4x2 ≤ 45
2x1 + x2 ≤ 27
3x1 − 4x2 ≤ 24
x3 ≤ 4
x1 , x2 , x3 ≥ 0

linear programming Page 53 of 186


3.8. DEGENERACY AND CYCLING

We express this in standard form by introducing slack variables x4 , x5 , x6 , x7 , x8 thus Maximize

M = x1 + x2 + x3

subject to the constraints

−x1 + x2 + x4 = 5
x1 + 4x2 + x5 = 45
2x1 + x2 + x6 = 27
3x1 − 4x2 + x7 = 24
x3 + x8 = 4
x1 , x2 , x3 , x4 , x5 , x6 , x7 , x8 ≥ 0

Example 3.7.2 Minimize


W = 2x1 + 3x2
subject to

x1 + x2 ≤ 10
x1 + 2x2 ≥ 12
2x1 + x2 ≥ 7
x1 , x2 ≥ 0

Since so far we have seen the Primal simplex, which works on ’maximize’, lets first convert it
to maximize
M ax Z = −2x1 − 3x2
subject to

x1 + x2 ≤ 10
−x1 − 2x2 ≤ −12
−2x1 − x2 ≤ −7
x1 , x2 ≥ 0

Still we cant proceed, because the Basic variables will not have a feasible solution x3 = 10, x4 =
−12, x5 = −7 which is degeneracy. Although we had the Basic variables with coefficients
as 1 and appearing once in the constraints, and their number being equal to the number of
constraints.
Degenerate could also have been caused by one of the Basic values equal to zero eg x5 = 0, this
could have been caused by the RHS = 0, e.g instead of −7.
With such, the Primal simplex fails and we go for another bigger method.

3.8 Degeneracy and Cycling


Definition 3.8.1 For a problem with m constraints (excluding the non- negativity restric-
tions) we say that a basic feasible solution is degenerate if less than m of the basic variables

Page 54 of 186 linear programming


3.9. WORKED EXAMPLES

are positive. or we say that a solution to a linear programming problem is degenerate if atleast
one of the basic variables takes on a value zero.
The likely occurences of a degenerate solution is due to the occurences of a tie in calculating

x0
 
xl xi
θ= = min = l
ylk yik yik yl 0 k

then only one of xl and xl0 can leave the basis, leaving the other variable in the basis with value
zero. since xB ≥ 0, the variable with value zero is the one which leaves the basis.
If xl is the one left in the basis with value xl = 0,(when xl0 leaves the basis), then the next
simplex iteration is,  
xl xi
= 0 = min provided ylk > 0.
ylk yik yik
if this is the case then the new value of z after xl has left the basis is,
 
0 xl
Z = z + (ck − zk ) =z
ylk

thus when there is a degenerate solution there may be no change in the value of z,
If degeneracy persists for several successive iterations, there is a possibility of cycling that is a
set of variables may be introduced in such a sequence that the original solution re - occurs in
a later iteration with no change in z.

Definition 3.8.2 Simply Cycling occurs when previously dropped solutions (variables) by the
simplex algorithm are again picked.

Definition 3.8.3 A dictionary is degenerate if one or more ”rhs”-value vanishes.

Definition 3.8.4 A cycle is a sequence of pivots that returns to the dictionary from which
the cycle began.

Note 3.8.1 Every pivot in a cycle must be degenerate. Why?

Theorem 3.8.1 Cycling Theorem: If the simplex method fails to terminate, then it must
cycle.

Theorem 3.8.2 Fundamental Theorem of Linear Programming:


For an arbitrary linear program in standard form, the following statements are true:

(1) If there is no optimal solution, then the problem is either infeasible or un- bounded.

(2) If a feasible solution exists, then a basic feasible solution exists.

(3) If an optimal solution exists, then a basic optimal solution exists.

3.9 Worked Examples


Use the Primal-Simplex method to solve the following LP problems:

Example 3.9.1
M ax z = 6x1 + 5x2

linear programming Page 55 of 186


3.9. WORKED EXAMPLES

subject to
2x1 + 4x2 ≤ 20
3x1 + 2x2 ≤ 18
x1 , x2 ≥ 0

x1 = 4, x2 = 3, z = 39
Class 3.9.1
max z = 4x1 + 5x2
subject to
2x1 + 5x2 ≤ 25
6x1 + 5x2 ≤ 45
x1 , x2 ≥ 0

x1 = 5, x2 = 3, z = 35
Example 3.9.2
max z = 3x1 + 9x2 + 12x3 − 5x4
subject to
x1 + x2 ≤ 40
x3 + x4 ≤ 45
x1 + x3 ≤ 30
x2 + x4 ≤ 35
x1 , x2 , x3 , x4 ≥ 0

x1 = 0, x2 = 35, x3 = 30, x4 = 0, y1 = 5, y2 = 15, y3 = 0, y4 = 0, z = 675

Exercise 3.6 Does Degeneracy cause cycling??


Class 3.9.2
Min Z = −10x1 − 12x2 − 12x3
subject to x1 + 2x2 + 2x3 ≤ 20
2x1 + x2 + 2x3 ≤ 20
2x1 + 2x2 + x3 ≤ 20
x1 , x2 , x3 ≥ 0

Cant solve unless it is a Max problem.


Max π = 10x1 + 12x2 + 12x3
subject to x1 + 2x2 + 2x3 ≤ 20
2x1 + x2 + 2x3 ≤ 20
2x1 + 2x2 + x3 ≤ 20
x1 , x2 , x3 ≥ 0

Page 56 of 186 linear programming


3.9. WORKED EXAMPLES

Step(a): Canonical form the problem: (already in a Canonical form)

Max π = 10x1 + 12x2 + 12x3


subject to x1 + 2x2 + 2x3 ≤ 20
2x1 + x2 + 2x3 ≤ 20
2x1 + 2x2 + x3 ≤ 20
x1 , x2 , x3 ≥ 0

Step(b): Standard form:

Max π = 10x1 + 12x2 + 12x3


subject to x1 + 2x2 + 2x3 + s1 = 20
2x1 + x2 + 2x3 + s2 = 20
2x1 + 2x2 + x3 + s3 = 20
x1 , x2 , x3 ≥ 0

Step(c): RHS = +ve:(already positive)

Max π = 10x1 + 12x2 + 12x3


subject to x1 + 2x2 + 2x3 + s1 = 20
2x1 + x2 + 2x3 + s2 = 20
2x1 + 2x2 + x3 + s3 = 20
x1 , x2 , x3 ≥ 0

Step(d): Basic variables are s1 , s2 , s3

Max π = 10x1 + 12x2 + 12x3


subject to x1 + 2x2 + 2x3 +s1 = 20
2x1 + x2 + 2x3 +s2 = 20
2x1 + 2x2 + x3 +s3 = 20
x1 , x2 , x3 ≥ 0

Step(e): Tableaus will be

linear programming Page 57 of 186


3.9. WORKED EXAMPLES

cj 10 12 12 0 0 0 0
cBj xB x1 x2 x3 s1 s2 s3 x̄B
0 s1 1 2 2 1 0 0 20
0 s2 2 1 2 0 1 0 20
0 s3 2 (2) 1 0 0 1 20
zj − cj -10 -12 -12 0 0 0 0
0 s1 -1 0 (1) 1 0 -1 0
3 −1
0 s2 1 0 2
0 1 2
10
1 1
12 x2 1 1 2
0 0 2
10
zj − cj 2 0 -6 0 0 6 120
12 x3 -1 0 1 1 0 -1 0
5 −3
0 s2 2
0 0 2
1 1 10
3 −1
12 x2 2
1 0 2
0 1 10
zj − cj -4 0 0 6 0 0 120
12 x3 0 4
−3 2 2
12 x1 1 0 0 5 5 5
4
12 x2 0 4
18 8 8
zj − cj 0 0 0 5 5 5
136
   
Which gives x1 x2 x3 s1 s2 s3 π = 4 4 4 0 0 0 136 :
minz = −136
Note 3.9.1
(i) The first constraint should be the one entered, and the basic variable in that constraint,
put outside.
(ii) Always the variable in the exit, form an Identity matrix in the tableaus.
Assignment 3.9.1 With a relevant LP problem below
max C = x1 + 7x2
subject to − x1 + x2 ≤ 25
5x1 − 3x2 ≥ −45
x1 , x2 ≥ 0

Differentiate between
(i) slack and basic variables.
(ii) feasible and optimal solutions of an LP problem.
(iii) standard and canonical form of an LP problem.
Class 3.9.3
max z = 6x1 + 5x2
subject to 2x1 + 4x2 ≤ 20
−3x1 − 2x2 ≥ −18
x1 , x2 ≥ 0

Page 58 of 186 linear programming


3.9. WORKED EXAMPLES

Class 3.9.4 Given the initial simplex tableau


cj 6 5 0 0 0
cBj xB x1 x2 x3 x4 x̄B
0 x3 2 4 1 0 20
0 x4 3 2 0 1 18
zj − cj -6 -5 0 0 0

(i) Formulate its corresponding LP problem (write its objective function and the correspond-
ing constraints).
max z = 6x1 + 5x2
subject to 2x1 + 4x2 ≤ 20
3x1 + 2x2 ≤ 18
x1 , x2 ≥ 0

(ii) State the Basic variables. x3 , x4


(iii) Carry out the pivoting process on the given initial simplex tableau above until the final
tableau.
cj 6 5 0 0 0
cBj xB x1 x2 x3 x4 x̄B
0 x3 2 4 1 0 20
0 x4 3? 2 0 1 18
zj − cj -6 -5 0 0 0

cj 6 5 0 0 0
cBj xB x1 x2 x3 x4 x̄B
8?
0 x3 0 3
1 - 23 8
2 1
6 x1 1 3
0 3
6
zj − cj 0 -1 0 2 36

cj 6 5 0 0 0
cBj xB x1 x2 x3 x4 x̄B
3
5 x2 0 1 8
- 14 3
6 x1 1 0 - 14 1
2
4
3 7
zj − cj 0 0 8 4
39

(iv) Hence state the optimal feasible solutions.


x?1 = 4, x?2 = 3, x?3 = 0, x?4 = 0, z ? = 39

Example 3.9.3
(a) (i) State the dual problem to the linear programming problem
Min Z = c0 X
subject to AX ≥ b
X ≥ 0

linear programming Page 59 of 186


3.9. WORKED EXAMPLES

(ii) What is the dual problem to the following linear programming problem
Min Z = x1 + 4x2 − x4
subject to − x1 + 2x2 − x3 + x4 ≤ 2
2x1 + x2 + 2x3 − 2x4 = 4
x1 − 3x2 + x4 ≥ 5
x1 , x2 and x4 ≥ 0
x3 unrestricted ?

(iii) State the relationship between feasible solutions of the dual linear programming
problems and prove it.
Example 3.9.4 For the following LP problems
(a) What is the elimination criterion in the primal simplex method, and what would be the
effect of violating it?
(b) Using the 2-phase method, solve the problem in [1(a)ii] with the modification that also
x3 ≥ 0 (i.e xi ≥ 0, i=1,2,3,& 4)
Example 3.9.5 Use the primal-simplex algorithm to
max z = 5x1 + 2x2
subject to −x1 + x2 ≥ −2
2x1 + x2 ≤ 7
x1 , x2 ≥ 0

Step(a): canonical form the problem:


max z = 5x1 + 2x2
subject to x1 − x2 ≤ 2
2x1 + x2 ≤ 7
x1 , x2 ≥ 0

Step(b): standard form:


max z = 5x1 + 2x2
subject to x1 − x2 + x3 = 2
2x1 + x2 + x4 = 7
x1 , x2 ≥ 0

Step(c): RHS = +ve:


Already RHS is positive
max z = 5x1 + 2x2
subject to x1 − x2 + x3 = 2
2x1 + x2 + x4 = 7
x1 , x2 ≥ 0

Page 60 of 186 linear programming


3.9. WORKED EXAMPLES

Step(d): Basic variables.


max z = 5x1 + 2x2
subject to x1 − x2 +x3 = 2
2x1 + x2 +x4 = 7
x1 , x2 ≥ 0

Step(e): Enter Tableau.


The initial tableau is
cj 5 2 0 0 0
cBj xB x1 x2 x3 x4 x̄B
0 x3 1 -1 1 0 2
0 x4 2 1 0 1 7
zj − cj -5 -2 0 0 0

After pivoting, the Final tableau is

cj 5 2 0 0 0
cBj xB x1 x2 x3 x4 x̄B
1 1
5 x1 1 0 3 3
3
−2 1
2 x2 0 1 3 3
1
1 7
zj − cj 0 0 3 3
17
   
x1 3
 x2  =  1 
z 17
Example 3.9.6 Use the primal-simplex algorithm to
max z = −3x1 + 4x2
subject to 2x1 − x2 ≥ −5
x1 + 3x2 ≤ 22
x1 , x2 ≥ 0

Step(a): canonical form the problem:


max z = −3x1 + 4x2
subject to −2x1 + x2 ≤ 5
x1 + 3x2 ≤ 22
x1 , x2 ≥ 0

Step(b): standard form:


max z = −3x1 + 4x2
subject to −2x1 + x2 + x3 = 5
x1 + 3x2 + x4 = 22
x1 , x2 , x3 , x4 ≥ 0

linear programming Page 61 of 186


3.9. WORKED EXAMPLES

Step(c): RHS = +ve:


Already RHS is positive
max z = −3x1 + 4x2
subject to −2x1 + x2 + x3 = 5
x1 + 3x2 + x4 = 22
x1 , x2 , x3 , x4 ≥ 0

Step(d): Basic variables.


max z = −3x1 + 4x2
subject to −2x1 + x2 +x3 = 5
x1 + 3x2 +x4 = 22
x1 , x2 , x3 , x4 ≥ 0

Step(e): Enter Tableau.


cj -3 4 0 0 0
cBj xB x1 x2 x3 x4 x̄B
0 x3 -2 1 1 0 5
0 x4 1 3 0 1 22
zj − cj 3 -4 0 0 5
4 x2 -2 1 1 0 5
0 x4 7 0 -3 1 7
zj − cj -5 0 4 0 20
1 2
4 x2 0 1 7 7
7
−3 1
0 x4 1 0 7 7
1
13 5
zj − cj 0 0 7 7
25
   
x1 1
 x2 = 7 
z 25
Example 3.9.7
max π = 22x1 + 30x2 + 25x3
subject to 2x1 + 2x2 ≤ 100
2x1 + x2 + x3 ≤ 100
x1 + 2x2 + 2x3 ≤ 100
x1 , x2 , x3 ≥ 0

max π = 22x1 + 30x2 + 25x3


subject to 2x1 + 2x2 + s1 = 100
2x1 + x2 + x3 + s2 = 100
x1 + 2x2 + 2x3 + s3 = 100
x1 , x2 , x3 ≥ 0

Page 62 of 186 linear programming


3.9. WORKED EXAMPLES

Use the simplex tableau to show that


   
x1 33.33
 x2   16.67 
 x3  =  16.67
   

π 1650.0

Tableau #1

x1 x2 x3 s 1 s2 s3 x̄B
2 2 0 1 0 0 100
2 1 1 0 1 0 100
1 2 2 0 0 1 100
-22 -30 -25 0 0 0 0

Tableau #2

x1 x 2 x3 s1 s2 s3 x̄B
1 0 -2 1 0 -1 0
1.5 0 0 0 1 -0.5 50
0.5 1 1 0 0 0.5 50
-7 0 5 0 0 15 1500

Tableau #3

x1 x2 x3 s1 s2 s3 x̄B
1 0 -2 1 0 -1 0
0 0 3 -1.5 1 1 50
0 1 2 -0.5 0 1 50
0 0 -9 7 0 8 1500

Tableau #4

x1 x2 x3 s1 s2 s3 x̄B
1 0 0 0 0.666667 -0.333333 33.3333
0 0 1 -0.5 0.333333 0.333333 16.6667
0 1 0 0.5 -0.666667 0.333333 16.6667
0 0 0 2.5 3 11 1650

Example 3.9.8

max Z = 2x1 − 4x2


subject to 6x1 − x2 ≤ 2
−3x1 + 4x2 ≤ 8
x1 , x2 ≥ 0

   
x1 0

 x2  
  0 


 x3 =
  2 

 x4   8 
Z 0

linear programming Page 63 of 186


3.9. WORKED EXAMPLES

Example 3.9.9 Use the primal-simplex algorithm to


minimize −x1 − 3x2 + x3
subject to 3x1 − 2x2 + 3x3 ≤ 3
2x1 − x2 − 6x3 ≥ −5
x1 , x2 , x3 ≥ 0

Exercise 3.7
max p = 2x − 3y + 4z
subject to 4x − 3y + z ≤ 3
x + y + z ≤ 10
2x + y − z ≤ 10
x, y, z ≥ 0

Exercise 3.8
min z = x1 + 5x2 − 2x3
subject to x1 + x2 + x3 ≤ 4
x1 ≤ 2
x3 ≤ 3
3x2 + x3 ≤ 6
x1 , x2 , x3 ≥ 0

   
x1 2
 x2   1 
 x3  =  4
   

z 1

Example 3.9.10 Use the primal-simplex algorithm to


max z = 3x1 − x2
subject to −x1 + 2x2 ≥ −5
2x1 + x2 ≤ 15
x1 , x2 ≥ 0

Example 3.9.11 Use the primal-simplex algorithm to


3 1
min − x4 + 20x5 − x6 + 6x7
4 2
1
subject to x1 + x4 − 8x5 − x6 + 9x7 = 0
4
1 1
x2 + x4 − 12x5 − x6 + 3x7 = 0
2 2
x 3 + x6 = 1
x1 , x2 , x3 , x4 , x5 , x6 , x7 ≥ 0

Page 64 of 186 linear programming


3.9. WORKED EXAMPLES

We can not solve a min problem, we change it to max problem

3 1
max x4 − 20x5 + x6 − 6x7
4 2
1
subject to x1 + x4 − 8x5 − x6 + 9x7 = 0
4
1 1
x2 + x4 − 12x5 − x6 + 3x7 = 0
2 2
x 3 + x6 = 1
x1 , x2 , x3 , x4 , x5 , x6 , x7 ≥ 0

Step(a): canonical form the problem: Already its ≤

3 1
max x4 − 20x5 + x6 − 6x7
4 2
1
subject to x1 + x4 − 8x5 − x6 + 9x7 = 0
4
1 1
x2 + x4 − 12x5 − x6 + 3x7 = 0
2 2
x 3 + x6 = 1
x1 , x2 , x3 , x4 , x5 , x6 , x7 ≥ 0

Step(b): standard form:

3 1
max x4 − 20x5 + x6 − 6x7
4 2
1
subject to x1 + x4 − 8x5 − x6 + 9x7 = 0
4
1 1
x2 + x4 − 12x5 − x6 + 3x7 = 0
2 2
x 3 + x6 = 1
x1 , x2 , x3 , x4 , x5 , x6 , x7 ≥ 0

Step(c): RHS = +ve:


Already RHS is positive

3 1
max x4 − 20x5 + x6 − 6x7
4 2
1
subject to x1 + x4 − 8x5 − x6 + 9x7 = 0
4
1 1
x2 + x4 − 12x5 − x6 + 3x7 = 0
2 2
x 3 + x6 = 1
x1 , x2 , x3 , x4 , x5 , x6 , x7 ≥ 0

linear programming Page 65 of 186


3.9. WORKED EXAMPLES

Step(d): Basic variables: The basic variables are already x1 , x2 and x3


3 1
max x4 − 20x5 + x6 − 6x7
4 2
1
subject to x1 + x4 − 8x5 − x6 + 9x7 = 0
4
1 1
x2 + x4 − 12x5 − x6 + 3x7 = 0
2 2
x 3 + x6 = 1
x1 , x2 , x3 , x4 , x5 , x6 , x7 ≥ 0

Step(e): Enter Tableau.

3 1
cj 0 0 0 4
-20 2
-6 0
cBj xB x1 x2 x3 x4 x5 x6 x7 x̄B
1?
0 x1 1 0 0 4
-8 -1 -9 0
1 −1
0 x2 0 1 0 2
-12 2
3 0
0 x3 0 0 1 0 0 1 0 1
−3 −1
zj − cj 0 0 0 4
20 2
6 0
x4 4 0 0 1 -32 -4 36 0
3
x2 -2 1 0 0 4? 2
-15 0
x3 0 0 1 0 0 1 0 1
−7
zj − cj 3 0 0 0 -4 2
33 0
?
x4 -12 8 0 1 0 8 -84 0
−1 1 3 −15
x5 2 4
0 0 1 8 4
0
x3 0 0 1 0 0 1 0 1
zj − cj 1 1 0 0 0 -2 18 0
−1 1 −21
x6 2
1 0 8
0 1 2
0
1 −1 3 3 ?
x5 6 8
0 64
1 0 16
0
3 −1 21
x3 2
-1 1 8
0 0 2
1
1
zj − cj -2 3 0 4
0 0 -3 0
−5
x6 2? -6 0 2
56 1 0 0
1 −2 −1 16
x7 3 3
0 4 3
0 1 0
5
x3 -2 6 1 2
-56 0 0 1
−1
zj − cj -1 1 0 2
16 0 0 0
5 1
x1 1 -3 0 4
20 2
0 0
1? 1 −1
x7 0 3
0 6
-4 6
1 0
x3 0 0 1 0 0 1 0 1
−7 1
zj − cj 0 -2 0 4
44 2
0 0
−1
0 x1 1 0 0 4
-8 -1 9 0
1 −1
0 x2 0 1 0 2
-12 2
3 0
0 x3 0 0 1 0 0 1 0 1
−3 −1
zj − cj 0 0 0 4
20 2
6 0

The problem is Degenerate (RHS = 0) and Cyclic, since the basis vectors in the initial
and final tableaus are the same, yet problem not yet solved

Page 66 of 186 linear programming


3.9. WORKED EXAMPLES

Example 3.9.12 Use the primal-simplex algorithm to

max w = x1 + x2 (profits in $ million)


subject to x1 + 3x2 + x3 = 9 ( M1 processing)
2x1 + x2 + x4 = 8 (M2 processing)
x1 , · · · , x4 ≥ 0


Step(a): canonical form the problem:

Step(b): standard form:

Step(c): RHS = +ve:

Step(d): Basic variables.

max z = x1 + x2 (profits in $ million)


subject to x1 + 3x2 +x3 = 9 ( M1 processing)
2x1 + x2 +x4 = 8 (M2 processing)
x1 , · · · , x4 ≥ 0

Step(e): Enter Tableau.

cj 1 1 0 0 0
cBj xB x1 x2 x3 x4 x̄B
0 x3 1 3 1 0 9
0 x4 2? 1 0 1 8
zj − cj -1 -1 0 0 0
5? −1
0 x3 0 2
1 2
5
1 1
1 x1 1 2
0 2
4
−1 1
zj − cj 0 2
0 2
4
2 −1
1 x2 0 1 5 5
2
−1 3
1 x1 1 0 5 5
3
1 2
zj − cj 0 0 5 5
5
   
x1 3
 x2  =  2 
w 5

Example 3.9.13 Solve

max z = 2x1 + 4x2 + 3x3


subject to 3x1 + 4x2 + 2x3 ≤ 60
2x1 + x2 + 2x3 ≤ 40
x1 + 3x2 + 2x3 ≤ 80
xi ≥ 0 ∀i

We can have the tableau as

linear programming Page 67 of 186


3.9. WORKED EXAMPLES

cj 2 4 3 0 0 0 0
cBj xB x1 x2 x3 x4 x5 x6 x̄B
0 x4 3 4? 2 1 0 0 60
0 x5 2 1 2 0 1 0 40
0 x6 1 3 2 0 0 1 80
zj − cj -2 -4 -3 0 0 0 0
3 1 1
x2 4
1 2 4
0 0 15
5 3? −1
x5 4
0 2 4
1 0 25
−5 1 −3
x6 4
0 2 4
0 1 35
zj − cj 1 0 -1 1 0 0 60
1 1 −1
x2 3
1 0 3 3
0 6 23
5 −1 2
x3 6
0 1 6 3
0 16 32
−5 −2 1
x6 3
0 0 3 3
1 26 32
11 5 2
zj − cj 6
0 0 6 3
0 76 32

Exercise 3.9 Solve

max z = 5x1 + 4x2 + 3x3


subject to 2x1 + 3x2 + x3 ≤ 5
4x1 + x2 + 2x3 ≤ 11
3x1 + 4x2 + 2x3 ≤ 8
xi ≥ 0 ∀i

Exercise 3.10

max z = 4x1 + x2 + 5x3 + 3x4


subject to x1 − x2 − x3 + x 4 ≤ 1
5x1 + x2 + 3x3 + 8x4 ≤ 55
−x1 + 2x2 + 3x3 − 5x4 ≤ 3
xi ≥ 0 ∀i

Example 3.9.14 Solve the LPP

Maximize p = x + 2y − z
subject to 2x + y + z <= 14
2x + y + 3z <= 28
2x + 5y + 5z <= 30

Tableau #1
x y z s1 s2 s3
2 1 1 1 0 0 14
2 1 3 0 1 0 28
2 5 5 0 0 1 30
-1 -2 1 0 0 0 0

Page 68 of 186 linear programming


3.9. WORKED EXAMPLES

Tableau #2
x y z s1 s2 s3
1.6 0 0 1 0 -0.2 8
1.6 0 2 0 1 -0.2 22
0.4 1 1 0 0 0.2 6
-0.2 0 3 0 0 0.4 12
Tableau #3
x y z s1 s2 s3
1 0 0 0.625 0 -0.125 5
0 0 2 -1 1 0 14
0 1 1 -0.25 0 0.25 4
0 0 3 0.125 0 0.375 13
Optimal Solution : p = 13; x = 5, y = 4, z = 0

Example 3.9.15 A company manufactures small and large garden benches in two depart-
ments: the machining department and the polishing department. Small bench requires 2 hours
in the machining department and 3 hours in the polishing department. It takes 4 hours to
machine large bench and 3 hours to polish.
The available time for processing the two models is 100 hours a week in the machining
department and 90 hours a week in the polishing department. The contribution margin expected
is $5 for the small bench and $7 for large bench. Find the optimal mix of products a company
should produce to maximize total contribution margin.
   
x 10
 y  =  20 
π 190

Example 3.9.16 Solve ClassWork :2.2.2 using the primal simplex method.
   196 
x1 81
 x2   0 
 x3  =  349 
   
162
16135
π 162

Note 3.9.2 The problem Example : 3.9.16 is not realistic, cant produce fractional items.

Example 3.9.17

Maximize p = 20x + 12y + 18z


subject to 3x + y + 2z ≤ 9
2x + 3y + z ≤ 8
x + 2y + 3z ≤ 7
x ≥ 0; y ≥ 0; z ≥ 0

x = 2; y = 1; z = 1; P = 70

linear programming Page 69 of 186


3.9. WORKED EXAMPLES

Example 3.9.18 Application problems: To Make Souvenirs A, B and C


A B C available minutes
Profits 6 5 4
Machine 1 2 1 1 180
Machine 2 1 3 2 300
Machine 3 2 1 2 240
let x = # of type A souvenirs
let y = # of type B souvenirs
let z = # of type C souvenirs
Find the number of each type of souvenirs to maximize profits P .
2x + 1y + 1z ≤ 180
1x + 3y + 2z ≤ 300
2x + y + 2z ≤ 240
P = 6x + 5y + 4z
x = 48, y = 84, z = 0, u = 0, v = 0, w = 60, P = 708
Optimum Solution is then to make 48 souvenirs type A, 84 souvenirs type B, 0 souvenirs of
type C; and machine 1 will have 0 min unused, machine 2 will have 0 min unused, and machine
3 will have 60 min unused.
Example 3.9.19
Maximize P = 4x + 6y
subject to: 2x + y ≤ 10
2x + 3y ≤ 18
x ≥ 0y ≥ 0

Use the graphical approach to show that the Corner points are found:
A = (0; 0); B = (0; 6); C = (3; 4) and D = (5; 0)
and P is evaluated at each point:
PA = 0; PB = 36; PC = 36; PD = 20

Because adjacent points have an identical value, there are an infinite number of solutions along
the line segment BC.
Solve again using the simplex method.
Assignment 3.9.2
max z = 5x1 + 4x2 + 3x3
subject to 2x1 + 3x2 + x3 ≤ 5
4x1 + x2 + 2x3 ≤ 11
3x1 + 4x2 + 2x3 ≤ 8
xi ≥ 0 ∀i

(x1 , x2 , x3 , z) = (2, 0, 1, 13)


Assignment 3.9.3 Repeat Assignment 2.2.4 using the simplex algorithm. Comment on
both answers.

Page 70 of 186 linear programming


3.9. WORKED EXAMPLES

Assignment 3.9.4

Maximise P = 4x + 3y
subject to −x + y ≤ 4
x + 2y ≤ 14
2x + y ≤ 16
x, y ≥ 0

(x, y; P ) = (6, 4; 36)

Assignment 3.9.5

Maximise P = 2x + 6y + 4z
subject to 2x + 5y + 2z ≤ 38
4x + 2y + 3z ≤ 57
x + 3y + 5z ≤ 57
x, y, z ≥ 0

(x, y, z; P ) = (0, 4, 9; 60)

Assignment 3.9.6

Maximise W = 3x + 4y + 5z
subject to 2x + 4y + 3z ≤ 80
4x + 2y + z ≤ 48
x + y + 2z ≤ 40
x, y, z ≥ 0

(x, y, z; W ) = (5, 7, 14; 113)

Assignment 3.9.7

Minimize D = −4x − 5y
subject to 2x + 5y ≤ 25
6x + 5y ≤ 45
x, y ≥ 0

(x, y, ; D) = (5, 3; 35)

linear programming Page 71 of 186


3.9. WORKED EXAMPLES

Page 72 of 186 linear programming


Chapter 4

The Big - M Method

4.1 Introduction
So far during the finding of an optimal solution to a maximization problem using the primal
simplex method the assumption that there exists m basis vectors has been used. suppose we
have less than m vectors then we introduce another variable to make them m.
Definition 4.1.1 A technique for solving linear programming problems in which artificial
variables are assigned cost coefficients which are a very large number M , say, M = 1035 .

4.2 The method


In the maximization process is already in its standard form
Max z = cx (4.1)

subject to Ax = b
and x ≥ 0
With
(i) Basic variables not feasible (RHS=-ve), which results into
(ii) less than m basic variables in an m constraint problem (since with a negative in a standard
form, not feasible, multiply by a negative-when already have the equal sign- makes what
had been a basic variable no longer, since coefficient 1 will now be −1).
Let the problem be transformed to,
Max z = cx − M S (4.2)

subject to Ax + S ≤ b
and x, S ≥ 0
We add artificial variables si to have more Basic variables, and subtract them from the objective
but all with coefficient −M on each. e.g
Max z = cx − M s1 − M s2 − M s3

Solve equation (13) and if at the end

73

You might also like