OT-Module2 (1)
OT-Module2 (1)
INTRODUCTION
In 1947, George Dantzig and his associates, while working with the US Air Force during World War II,
developed this technique, primarily for solving military logistics problems. They observed that a large
number of military programming/planning problems could be formulated as maximizing/minimizing a
linear form of profit/cost function whose variable were restricted to values satisfying a system of linear
constraints. In chapter 1, We have already discussed the concept of optimization and explained the basic
feasible solution of linear programming problem.
In this chapter, we study linear programming problems (LPP), their mathematical formulation, objective
function concept and graphical method. We use graphical method mainly for solving problems involving
two variables. Linear programming can be applied to a variety of problems such as production,
transportation, advertising and problems in public and private organizations, e.g., business, industry,
hospitals, libraries as also in education. In order to solve linear programming problems, we need to convert
them into a canonical or standard form.
Objectives. The objective of these contents is to provide some important concepts/results to the reader
like:
Linear programming problems, it’s applications and limitations.
Mathematical formulation of linear programming problem.
Graphical Method
Canonical and Standard form of an LPP
1
i. Objective function should be well defined
ii. Objective function can be expressed as a linear function of the decision variables.
iii. There should be finite number of constraints and can be expressed as linear equalities or
inequalities in terms of variables.
iv. Decision variables should be non- negative.
Advantages and Limitations of an LPP
Linear programming methods are used in many fields including business and industry by almost all their
departments such as production, marketing, finance etc. it’s some advantages are
Helps in attaining the optimum use of resources i.e. maximize profit and minimize costs
Improve the quality of decisions
There are many more advantages. In spite of having many advantages and wide areas of applications,
there are some limitations as well. Following are certain limitations of linear programming:
We can apply linear programming method only if relationships are linear.
While solving LPP, it is possible that we will get non-integral values even for those decision
variables which have only integral values.
Constraints in the linear programming methods are written assuming all parameters are known and
should be constant. However, in real problems, sometimes these are neither known nor constant.
LP deals with the problems having single objective, whereas in real-life, there are many situations
where we have to achieve multi-objectives.
2
FORMULATION OF LPP
In our daily life, there are many real-life situations where LP problems may arise and for using LPP
methods/techniques to find a solution of such situations, it becomes necessary to present the given word
problem into mathematical form correctly. The steps of mathematical formulation of LPP are summarized
as follows:
i) Identify the decision variable of the given problem.
ii) Formulate the objective function, which is to be maximized or minimized, as a linear function of
the decision variables.
iii) Formulate the constraints and express them as linear inequalities or equalities in terms of decision
variables.
iv) Introduce non-negative restrictions as negative values of the decision variables do not have any
valid physical interpretation.
The steps of mathematical formulation of LPP are explained with the help of an example.
Total hours of machine shop required for both types of product = 2x+3y
Total hours of assembly shop required for both types of product =4x+2y
Hence, the constraints as per the limited available resources are:
3
2x+3y ≤ 16 and 4x+2y ≤ 22
Since the number of units produced for both P and Q cannot be negative, the non-negative restrictions are:
x ≥ 0, y ≥ 0
Thus, the mathematical formulation of the given problem is:
Maximize Z = 3x + 4y
Subject to the constraints
2x + 3y ≤ 16
4x + 2y ≤ 22
And non-negative restrictions
x ≥ 0, y ≥ 0
2. Exercise. A company produces two types of items P and Q that require gold and silver.
Each unit pf type P requires 4g silver and 1g gold while that od type Q requires 1g silver
and 3g gold. The company produces 8g silver and 9g gold. If each unit of type P brings
a profit of rupees 44 and that of type Q rupees 55, determine the number of units of each
type that the company should produce to maximize the profit.
Answer. Let Z be the profit function. The mathematical formulation of the given problem is
Max. Z = 44x + 55y
Subject to the constraints:
4x + y ≤ 8,
x + 3y ≤ 9, x ≥ 0, y ≥ 0.
GRAPHICAL METHOD
The graphical method is used to solve simple linear programming problems having two decision variables.
For solving LPPs involving more than two decision variables, we use another method called simplex
method. We discuss it in chapter 3.
The steps of graphical method for solving an LPP are as follows:
1. Plot the graph corresponding to the given constraints.
2. Determine the region for each given constraint.
3. Determine the feasible region.
4. Determine corner/extreme points.
5. Examine corner/extreme points.
1
4
1. A company produces two types of items P and Q that require gold and silver. Each
unit pf type P requires 4g silver and 1g gold while that od type Q requires 1g silver
and 3g gold. The company produces 8g silver and 9g gold. If each unit of type P
brings a profit of rupees 44 and that of type Q rupees 55, determine the number of
units pf each type that the company should produce to maximize the profit. What is
the maximum profit?
Solution. Let x be the number of units of type P to be produced and y be the number of units of type Q to
be produced. It is given that:
Let Z be the profit function. The mathematical formulation of the given problem is
4x + y ≤ 8,
x + 3y ≤ 9, x
≥ 0, y ≥ 0.
4x + y = 8, x + 3y = 9 , x = 0 , y = 0 .
Since these equations are of straight lines, only two points are sufficient to plot the graphs ( see fig.2.5).
For the line 4x + y = 8, we take the following two points:
X 0 2
Y 8 0
X 0 9
Y 3 0
5
Fig.2.5
Note that x = 0 is the y axis and y = 0 is the x axis.
For plotting the graph of the inequality 4x + y ≤ 8 we put (0, 0) In it. We get 0 ≤ 8, which is true. Therefore,
starting from the line 4x + y ≤ 8, we shall shade towards origin. Similarly, for the graph x + 3y ≤ 9, we
shall shade towards origin. For the graph x ≥ 0. we shall shade towards right side of x = 0 and for the
graph y ≥ 0, the region above y = 0 will be shaded.
Thus, the regions for the inequalities are shown in fig.2.6.
Fig.2.6.
You can see from the figure 2.6 that the coordinates of A, B, and D are (0, 0), (2, 0) and (0,3) respectively.
The coordinates of the point C are obtained by solving the equations 4x + y = 8 and x + 3y = 9 as it is the
point of intersection of the two lines represented by them. the solution of equations 4x + y = 8 and x + 3y
= 9 is given as
6
x = 15 and y = 28
11 11
We now obtain the values of Z = 44x + 55y at each of the vertices of ABCD as follows:
At A (0,0) , Z = 44(0) + 55(0) = 0
At B(2,0) , Z = 44(2) + 55(0) = 88
At C(15 , 28 ) , Z = 44( 15) + 55(28) = 60 + 140 = 200
11 11 11 11
Practice Problems:
7
CANONICAL AND STANDARD FORM OF AN LPP
After formulating a linear programming problem, our next step is to solve it. You have learnt that linear
programming problems can be represented as problems of maximization or minimisation with constraints
such as ≤ , =, ≥ . In order to develop a standard procedure for solving LPPs, we need to convert them into
well - known form. We now discuss the General LPP along with these two forms. The canonical form is
especially used in the duality theory and the standard form is used to develop the general procedure for
solving any linear programming problem. In order to understand these forms, you also need to learn about
slack and surplus variable.
Slack and Surplus Variables
In general, if any linear programming problem, we have a constraint of the type
𝑎11𝑥1 + 𝑎12𝑥2 + ... + 𝑎1𝑛𝑥𝑛 ≤ 𝑏1 where 𝑏1≥ 0
Then this inequality can be converted into an equation by adding one non – negative variable 𝑠1 to the left-
hand side. This new variable is called a slack variable and the constraints are transformed into the
following equation:
𝑎11𝑥1 + 𝑎12𝑥2 + ... + 𝑎1𝑛𝑥𝑛 + 𝑠1 = 𝑏1 where 𝑠1≥ 0, 𝑏1≥ 0
Thus, a non – negative variable subtracted from the left – hand side of less than or equal to (≤) type of a
constraint that converts it into an equation is called a slack variable. The values of this variable can be
interpreted as the amount of unused resource.
Canonical Form
The characteristics of the canonical form are:
(a). Objective function should be of maximization form. If it is given in minimization form, it should be
converted into maximization form.
(b). All the constraints should be of “≤ ” type, except for non- negative restrictions. Inequality of “ ≥ ”
type, if any, should be changed to an inequality of the “ ≤ ” type.
(c). All variables should be non-negative. If a given variable is unrestricted in sign (i.e., positive, negative
or zero), it can be written as a difference of two non-negative variables. Suppose x is unrestricted in sign,
then x can be written as x= 𝑥′- 𝑥′′ where 𝑥′ ≥ 0, 𝑥′′ ≥ 0.
Standard Form:
The characteristics of the Standard Form are:
1) The objective function should be in the maximization form as we explained in canonical form.
8
2) The right-side element of each constraint should be non- negative. If it is negative, we multiply the
inequality by -1.
3) All constraints should be expressed in the form of equations, except for the non- negative restrictions
by augmenting slack or surplus variables.
INTRODUCTION
In previous content, we have studied the graphical method of solving linear programming problems and
learnt how to express a linear programming problem in canonical and standard forms. As we know that
the graphical method can be used only to solve the problems involving two decision variables and most of
the real-life problems when mathematically formulated have more than two variables. For more than two
decision variables, methods based on the concept of slack or surplus variables are used.
In this context, first we shall discus`s the Simplex method for solving the linear programming problems
involving more than two decision variables. After learning the procedure of simplex method, we discuss
artificial variable techniques (Big-M Method and Two-Phase Method) for solving LPP and in last we shall
discuss the concept of degeneracy in linear programming.
Objectives. The objective of these contents is to provide some important concepts/methods to the reader like:
Simplex Method.
Artificial Variable Techniques.
Big-M and Two-Phase Method for Solving LPP Involving Artificial Variable(s).
Degeneracy.
SIMPLEX METHOD
Simplex method was developed by G B Dantzig in 1947. The method is an iterative or step by step
procedure by which one can obtained a new basic feasible solution from a given initial basic feasible
solution. In this method, the value of the objective function improves with each solution and the
optimum solution is achieved in a finite number of steps.
Suppose we have to optimize (Maximize or minimize) Z, a linear function of n basic variables
𝑋1, 𝑋2, … , 𝑋𝑛. The LPP is written as:
Maximize Z = 𝐶1𝑋1 + 𝐶2𝑋2 + ⋯ + 𝐶𝑛𝑋𝑛 … (1)
subject to the constraints:
𝑎11𝑥1 + 𝑎12𝑥 2 + ⋯ + 𝑎1𝑛𝑥𝑛 ≤ 𝑏1
𝑎21𝑥1 + 𝑎22𝑥2 + ⋯ + 𝑎2𝑛𝑥𝑛 ≤ 𝑏2
∙ ∙ ∙ ∙ (2)
9
∙ ∙ ∙ ∙
𝑎𝑚1𝑥1 + 𝑎𝑚2𝑥2 + ⋯ + 𝑎𝑚𝑛𝑥𝑛 ≤ 𝑏𝑚
and 𝑥𝑗 ≥ 0 for all j= 1,2, …, n … (3)
where the constants 𝐶1, 𝐶2, … , 𝐶𝑛 are the cost coefficients of decision variables. Let (𝑎𝑖𝑗) be m×n real
matrix and {𝑏1, 𝑏2 , … , 𝑏𝑚} be a set of constants.
The linear function Z gives in equation (1) is called the objective function. The set of inequalities gives in
equation (2) is called constraints of LPP and the inequalities gives in equation (3) are known as non-
negative restrictions of LPP (which means that all 𝑥𝑗 values are non –negative)
Let us explain the step by step procedure for solving the LPP by the Simplex method.
Step 1: Convert the LPP into standard form by adding slack variables
We convert the given LPP into standard form by adding slack variables 𝑠1, 𝑠2, … , 𝑠𝑚.Maximize Z = 𝐶1𝑋1 +
𝐶2𝑋2 + ⋯ + 𝐶𝑛𝑋𝑛 + 0𝑠1 + 0𝑠2 + ⋯ + 0𝑠𝑚 … (4) subject to the given constraints:
𝑎11𝑥1 + 𝑎12𝑥2 + ⋯ + 𝑎1𝑛𝑥𝑛 + 𝑠1 = 𝑏1
𝑎21𝑥1 + 𝑎22𝑥2 + ⋯ + 𝑎2𝑛𝑥𝑛 + 𝑠2 = 𝑏2
∙ ∙ ∙ ∙ … (5)
∙ ∙ ∙ ∙
𝑎𝑚1𝑥1 + 𝑎𝑚2𝑥 2 + ⋯ + 𝑎𝑚𝑛𝑥𝑛 + 𝑠𝑚 = 𝑏𝑚
and 𝑥𝑗 ≥ 0 𝑎𝑛𝑑 𝑠𝑖 ≥ 0 for all i =1, 2,…, m and j= 1,2, …, n … (6)
𝑪𝒋 → 𝑪𝟏 𝑪𝟐 . . 𝑪𝒓 0 0…
Basic Profit/unit Quantity 𝑋1 𝑋2 . . 𝑋𝑟 𝑆1 𝑆2.. Replacement
variables (𝑪𝑩) Ratios
𝑆1 0 𝑏1 𝑎11 𝑎12 . . 𝑎1𝑟 1 0..
𝑆2 0 𝑏2 𝑎21 𝑎22 . . 𝑎2𝑟 0 1..
. . . . . . . .
. . . . . . . .
. . . . . . . .
10
Step 3: Test for optimality
Calculate the values of 𝑐𝑗 − 𝑧𝑗 , the nature of the solution could be any one of the following:
11
Exercise Problems:
1. Solve the following LPP by Simplex Method
Maximize Z=3𝑥1 + 2𝑥2
subject to the constraints:
𝑥1 + 𝑥2 ≤ 4
𝑥1 − 𝑥2 ≤ 2
𝑥1 ≥ 0, 𝑥2 ≥ 0
Solution: Step 1: First we convert the given LPP into standard form by adding slack variables 𝑠1 and 𝑠2.
Maximize Z = 3𝑥1 + 2𝑥2 + 0𝑠1 + 0𝑠2
subject to the constraints:
𝑥1 + 𝑥2 + 𝑠1 = 4
𝑥1 − 𝑥2 + 𝑠2 = 2
𝑥1, 𝑥2, 𝑠1, 𝑠2 ≥ 0
Step 2: We now construct the initial simplex table (Table 2: Initial Simplex Table)
𝑐𝑗 → 3 2 0 0
𝑧𝑗 →
Z= 𝑐𝑗 − 𝑧𝑗 →
Note: Columns corresponding to the basic variables in initial simplex tables in the simplex method form
an identity matrix. For example, in Table 2, the basic variables are 𝑠1 and 𝑠2 and their coefficients in the
constraints form identity matrix.
The value of Z in column of Table2 is obtained from the equation
Z=∑ 𝑐𝑗 𝑏𝑗, j=1, 2
The values of 𝑧𝑗′𝑠 are obtained from the equation
𝑧𝑗 = ∑𝑖=1
𝑚 𝑐 𝑎 , where m is the number of rows. In this example m=2
𝑖 𝑖𝑗
12
𝑐𝑗 → 3 2 0 0
𝑧𝑗 → 0 0 0 0
Z=0 𝑐𝑗 − 𝑧𝑗 → 3 2 0 0
The outgoing variable is the variable for which RR minimum. In Table 4, RR in the second row is
minimum. It corresponds to 𝑠2 and hence 𝑠2 is the outgoing variable.
The element which lies at the intersection of the column of incoming variable (𝑥1) and the row of the
outgoing variable (𝑠2) is called the key element. Here it is 1 and is enclosed by the rectangle as shown in
Table4. Incoming variable Key element
𝑐𝑗 → 3 2 0 0
13
(outgoing 0 2 -1 0 1 2/1=2
1
Variable)𝑠2
𝑧𝑗 → 0 0 0 0
Z=0 𝑐𝑗 − 𝑧𝑗 → 3 2 0 0
The objective function Z=0 at 𝑥1 = 0 𝑎𝑛𝑑 𝑥2 = 0 (since 𝑥1 𝑎𝑛𝑑 𝑥2 do not appear in the column of basic
variables, these are non-basic variables. The values of non-basic variables are taken as zero). This is the
initial solution, which we shall improve.
Step 6: Now, we form the next simplex table to find the adjacent vertex, i.e., the improved solution. The
steps for forming this table are explained below:
a) The initial simplex table (Table 4) has revealed that 𝑥1 is an incoming variable which will enter in place
of 𝑠2, the outgoing variable. The cost coefficient of 𝑠2will also be replaced by the cost coefficient of 𝑥1
in “Profit / Unit” column. In this case its value is 3. Therefore, now the simplex table takes the form of
Table 5. Other entries of the table will be filled up as explained in point (b).
b) Since 𝑥1 has entered as a basic variable, the coefficients of 𝑥1 along with 𝑠1 should form an identity
matrix; i.e., the column corresponding to 𝑥1 should be (01). Thus, we have to make the key element
unity and the other element zero. Note that it is already unity in this case (Table 4). Had it been any
number other than unity, we would have divided the row containing leading element by the leading
element itself, excluding the elements of the column “Profit / Unit”. So, the table takes the form
Table 5: Simplex Table
𝑐𝑗 → 3 2 0 0
c) Now, we have to make the other element in the column of key element (𝑥1 ) zero. In this case,
itsvalue is 1 (𝑎11 = 1). For this, we multiply the row of the key element (excluding profit / unit) by
negative of the element 𝑎11 (in this case) and add it to the first row.
This row operation is shown below:
First row of Table 7→ 4 1 1 1 0
Second row of Table 7→ -2 -1 1 0 -1
(on multiplying by -1)
Sum of the rows 2 0 2 1 -1
Thus, the sum of the rows is the new first row (excluding profit/ unit), which replaces the first row of
Table5. We get Table 6 as follows:
14
Table 6: Simplex Table
𝑐𝑗 → 3 2 0 0
Note: Now the matrix for the basic variables 𝑠1 and 𝑥1 in the Table 6 is the identity matrix.
Next, we calculate 𝑧𝑗 and 𝑐𝑗 − 𝑧𝑗. The resulting simplex table is given below:
Table 7: Simplex Table
𝑐𝑗 → 3 2 0 0
Basic Profit/unit (𝐶𝐵) Quantity 𝑥1 𝑥2 𝑠1 𝑠2 RR
variabl
es
← 𝑠1 0 2 0 22 1 -1 2/2=1←
𝑥1 3 2 1 -1 0 1 -
𝑐𝑗 − 𝑧𝑗 0 5 0 -3
→ ↑
Here Z=6 at 𝑥1 = 2 (see the value in the Quantity column) and 𝑥2=0 (𝑥2 being non-basic variable).
In Table 7, the incoming variable is 𝑥2 corresponding to the most positive value of 𝑐𝑗 − 𝑧𝑗 = 5. The key
element is 2. We find the RR by dividing the elements in the Quantity column by the corresponding
elements in the column of the incoming variable 𝑥2 and ignore the negative or zero values. So, in this case,
there will be only one RR and that will be considered as minimum RR. This implies that 𝑠1 is the outgoing
variable. If none of the elements in the column of incoming variable is positive, then the given LPP has
an unbounded solution and we will stop there.
Step 7: Repeat the procedure
1. For the next simplex table, 𝑥2 will enter in place of 𝑠1 as a basic variable and accordingly we shall
write the cost coefficient of 𝑥2 in the LPP as the value for the column of profit / unit, i.e.,2. The
element 2 enclosed in a rectangle in Table 7 is the key element. So, we shall divide the row
containing the key element by the key element itself, i.e., by 2, excluding the values in the column
15
of profit / unit. Thus, we get Table 8:
Table 8: Simplex Table
𝑐𝑗 → 3 2 0 0
Basic Profit/unit Quantity 𝑥1 𝑥2 𝑠1 𝑠2
variables (𝐶𝐵)
𝑥2 2 1 0 1 1/2 -1/2
𝑥1 3 2 1 -1 0 1
Now the coefficients of 𝑥2 𝑎𝑛𝑑 𝑥1 have to form an identity matrix, i.e., the column corresponding to 𝑥2
should be (10) . We have already made the key element unity. Now, to make the second element , (i.e., -
1) in its column as zero, we just add the first row corresponding to 𝑥2, to the second row of Table 8
excluding the values in the column of profit / unit as follows:
First row of Table 10→ 1 0 1 1/2 − 1/2
Second row of Table 10→2 1 -1 0 1
(on multiplying by 1)
Sum of the rows 3 1 0 1/2 1/2
We write the sum as above as the second row, excluded profit / unit as shown in Table 9. Then we obtain
Z, 𝑧𝑗, 𝑎𝑛𝑑 𝑐𝑗 − 𝑧𝑗 as explained in Step 1(iii) and (iv) and also in Step 2(c) . The complete resulting simplex
table is given below:
Table 9: Simplex Table
𝑐𝑗 → 3 2 0 0
Basic Profit / Quantity 𝑥1 𝑥2 𝑠1 𝑠2 RR
variables Unit
𝑥2 2 1 0 1 1/2 -1/2
𝑥1 3 3 1 0 1/2 1/2
Z=2× 𝑧𝑗 → 2× 0 + 2× 1 + 2× 1/2 + 2× (−1/2) +
1+3× 3×1= 3×0=2 3 × 1/2 = 3 × 1/2 = 1/2
3 = 11 3 5/2
𝑐𝑗 − 𝑧𝑗 → 0 0 -5/2 -1/2
↑
Now, in Table 9 none of the net-evaluation, i.e., the values of 𝑐𝑗 − 𝑧𝑗 are positive. Therefore, the optimum
solution is attained for 𝑥1 = 3 𝑎𝑛𝑑 𝑥2 = 1, the values of 𝑥1 𝑎𝑛𝑑 𝑥2 in the Quantity column of Table 11.
At this stage, it is necessary to check whether any of the non-basic variables (other than those appearing
in the first column, i.e., the column with caption “Basic Variables”, i.e., 𝑥1 𝑎𝑛𝑑 𝑥2 in Table 9) has value
0 in the net-evaluation row. If “yes”, then the LPP has multiple optimum solutions. If “not”, then we stop
here concluding that the unique solution. In this example, it is given by
Max. Z= 11 at 𝑥1 = 3 𝑎𝑛𝑑 𝑥2 = 1 (see the values in the Quantity column)
16
Note: It should be noted that in the initial simplex table (Table 2), 𝑐𝑗 − 𝑧𝑗 is same as 𝑐𝑗. Also 𝑐𝑗 − 𝑧𝑗
corresponding to the column of unit matrix are always zero. So, there is no need to calculate them.
We discuss the case of multiple optimum solutions in the next example.
2. Solve Max. Z= 6x+3y
Subject to the
constraints:
2x + 5y ≤ 120
2x + y ≤ 40
x ≥ 0, 𝑦 ≥ 0
Solution: Rewriting the given LPP in the standard form, we have
Max. Z = 6x +3y +0𝑠1 + 0𝑠2
subject to the constraints:
2x + 5y+ 𝑠1 = 120
2x + y + 𝑠2 = 40
x, 𝑦, 𝑠1, 𝑠2 ≥ 0
We form the initial simplex table (Table1) as explained in Example 1:
Table 1: Initial Simplex Table
𝑐𝑗 → 6 3 0 0
Basic Profit / Quantity x y 𝑠1 𝑠2 RR
variables Unit
𝑠1 0 120 2 5 1 0 120/2=60
← 𝑠2 0 40 22 1 0 1 40/2=20
Z=0 𝑧𝑗 → 0 0 0 0
𝑐𝑗 − 𝑧𝑗 → 6 3 0 0
↑
Note from Table 1 that 𝑐𝑗 − 𝑧𝑗=6 is maximum for x and RR is minimum for 𝑠2. Therefore, x is the
incoming variable and 𝑠2 is the outgoing variable. Then in the second simplex table, x will enter in place
of 𝑠2 as a basic variable. Profit / unit will be written accordingly. The key element is 2 and enclosed by
the rectangle in Table 1. To make the key element unity, we divide the second row in Table 1 by 2
excluding the values of the column of profit / unit. So, we get Table 2 as follows:
Table 2: Simplex Table
𝑐𝑗 → 6 3 0 0
17
Basic Profit / Quantity x y 𝑠1 𝑠2
variables Unit
𝑠1 0 120 2 5 1 0
X 6 20 1 1/2 0 1/2
Now, we have to make the other element in column of x zero so that the coefficients of
𝑠1 and x form the identity matrix. So, we multiply the second row of Table 2 (excluding the elements in
the column of profit /unit) by the negative of the element (𝑎𝑖𝑗) in the row of 𝑠1 and column of x in Table
1, i.e., by -2 and then add it to the first row of the Table 2 as follows
First row of Table 2→ 120 2 5 1 0
Second row of Table 2→ -40 -2 -1 0 -1
(on multiplying by -2)
Sum of the rows 80 0 4 1 -1
We also calculate Z, 𝑧𝑗, 𝑎𝑛𝑑 𝑐𝑗 − 𝑧𝑗. So, the resulting completed simplex table is as follows:
Table 3: Simplex Table
𝑐𝑗 → 6 3 0 0
Basic Profit / Quantity x y 𝑠1 𝑠2 RR
variables Unit
𝑠1 0 80 0 4 1 -1
X 6 20 1 1/2 0 1/2
Z=120 𝑧𝑗 → 6 3 0 3
𝑐𝑗 − 𝑧𝑗 → 0 0 0 -3
As none of the net-evaluations is positive, the optimum solution is attained. The optimum solution is
Max. Z = 120 when x = 20 (see the value in the Quantity column),
Y = 0 (since y is non-basic variable)
But we also note that the non-basic variable y has zero value in its net-evaluation row in Table 3.
Therefore, the given LPP has multiple optimal solutions. To find another optimal solution, let us find
another vertex at which Max. Z = 120.
So, another simplex table has to be formed. Here, instead of selecting the column corresponding to the
most positive element in the net-evaluation row, we select the column of non-basic variable which has
zero in the net-evaluation row, i.e., the column of y shown in Table 4.
Table 4: Simplex Table
𝑐𝑗 → 6 3 0 0
18
Basic Profit / Quantity x y 𝑠1 𝑠2 RR
variables Unit
← 𝑠1 0 80 0 4 1 -1 80/4=20←
X 6 20 1 1/2 0 1/2 20/(1/2)=40
Z=120 𝑧𝑗 → 6 3 0 3
𝑐𝑗 − 𝑧𝑗 → 0 0 0 -3
↑
Note that in Table 4, the key element is 4 and the minimum RR corresponds to 𝑠1. So, 𝑠1 is the outgoing
variable and y is the incoming variable. We form the next simplex table (Table 5) following the steps
explained for forming Table 3. The resulting simplex table (Table 5) is given as follows:
Table 5: Simplex Table
𝑐𝑗 → 6 3 0 0
Basic Profit / Quantity x y 𝑠1 𝑠2 RR
variables Unit
Y 3 20 0 1 1/4 -1/4
X 6 10 1 0 -1/8 5/8
Z=120 𝑧𝑗 → 6 3 0 3
𝑐𝑗 − 𝑧𝑗 → 0 0 0 -3
You should verify all entries of Table 5 before studying further. Note that for forming Table 5, we have
first divided the first row by the value of key element to make the key element unity.
Then we obtain the second row of Table 5 as follows:
Second row of Table 4→ 20 1 1/2 0 1/2
First row of Table 5→ -10 0 -1 /2 -1/8 1/8
(on multiplying by -1/2)
Sum of the rows 10 1 0 -1/8 5/8
From the above simplex table (Table 5), we find that Max. Z = 120 at (10,20) also (see the value of x =
10, y = 20 in the Quantity column).
19
PRACTICE PROBLEMS:
1. Solve the following LPPs by the Simplex method:
Maximize Z = 2𝑥1 + 4𝑥2
subject to the constraints:
𝑥1 + 2𝑥2 ≤ 5
𝑥1 + 𝑥2 ≤ 4
𝑥1 ≥ 0, 𝑥2 ≥ 0
Answer. Max. Z = 10 at the two vertices (0,5⁄2 ) and (3, 1).Max. Z = 10at many other points also
which are given as (3 – 3t, 1+3𝑡⁄2 ), 0 ≤ 𝑡 ≤ 1.
2. Maximize Z = 100𝑥1 + 60𝑥2 + 40𝑥3
Subject to the constraints:
𝑥1 + 𝑥2 + 𝑥3 ≤ 100
10𝑥1 + 4𝑥2 + 5𝑥3 ≤ 500
𝑥1 + 𝑥2 + 3𝑥3 ≤ 150, 𝑥1 , 𝑥2 , 𝑥3 ≥ 0
Answer. Z=22000/3 at 𝑥1 = 100/3, 𝑥2 = 200/3,𝑥3 = 0
BIG-M METHOD
Big-M Method is used for removing artificial variable(s) from the basis. It is also known as Penalty method
or Charne’s Method. In this method, the objective function coefficients impose a huge and hence
unacceptable penalty. In case of maximization, the objective function is modified by adding –MA1, where
M is arbitrary large and A1 is an artificial variable. If there are two artificial variables A1and A2, then -
MA1-MA2 is added to the objective function. Similar treatment is done for more artificial variables.
20
The logic behind taking the coefficient as –M is that we should never get the net-evaluation positive in
the column of the artificial variable, i.e., the artificial variable should not enter again as a basic variable.
M is very big and hence adding –MA1 is the penalty to the objective function. Hence this method is called
penalty method. Though –M is big penalty, it does not affect the objective function. This is because the
value of artificial variable should come out to be zero so that –MA1 becomes zero. If the artificial variable
remains as a basic variable till the final simplex table, then its value in the quantity column should be zero
for the solution of LPP to exist. Otherwise, if in the final simplex table, an artificial variable appears as a
basic variable and is non zero, the LPP does not possess any feasible solution.
1. Solve LPP
Maximize Z = 𝑥1 + 2𝑥2
Subject to the constraints:
𝑥1 − 𝑥2 ≥ 3
2𝑥1 + 𝑥2≤ 10
𝑥1 ≥ 0, 𝑥2 ≥ 0
Solution: First we convert the given LPP in the standard form as follows:
Max Z = 𝑥1+ 2𝑥2 + 0𝑠1+ 0𝑠2
Subject to the constraints
𝑥1 − 𝑥2 − 𝑠1=3
2𝑥1 + 𝑥2 + 𝑠2=10
𝑥1 ≥ 0, 𝑥2 ≥ 0, 𝑠1 ≥ 0, 𝑠2 ≥ 0
Now, let us try to form simplex table as follows:
Table 1: Simplex Table
cj→ 1 2 0 0
Basic Profit/ Qty 𝑥1 𝑥2 𝑠1 𝑠2
variable unit
1 -1 -1 0
2 1 0 1
We cannot form the initial simplex table with the variables x1, x2, s1, s2 as there is only one variable s2
that has a column of unit matrix. Therefore, one more variable, i.e., artificial variable A 1(say) needs to
be introduced in the first constraints to get another column of unit matrix. Its coefficient in the objective
function will be taken as –M.
Thus, the objective function is
Max. Z = 𝑥1+ 2𝑥2 + 0𝑠1+ 0𝑠2 − 𝑀𝐴1
Subject to the constraints
21
𝑥1 − 𝑥2 − 𝑠1 + 𝐴1=3
2𝑥1 + 𝑥2 + 𝑠2=10
𝑥1 ≥ 0, 𝑥2 ≥ 0,𝑠1 ≥ 0, 𝑠2 ≥ 0
The initial simplex table, therefore, is as follows (Table 2: Initial Simplex table)
cj 1 2 0 0 -M
Basic Profit/ Qty 𝑥1 𝑥2 𝑠1 𝑠2 𝐴1 RR
variable unit
←A1 -M 3 1 -1 -1 0 1 3/1=3←
𝑠2 0 10 2 1 0 1 0 10/2=5
Z= -3M zj → -M M M 0 -M
cj-zj → 1+M 2-M -M 0 0
↑
Here, since M is big, 1+M is most positive and x1 is the incoming variable. The least replacement ratio is
(3/1) which corresponds to A1 and hence it is the outgoing variable. Thus, the resulting simplex table is
as follows:
Table 3: Simplex Table
cj→ 1 2 0 0 -M
Basic Profit/unit Qty 𝑥1 𝑥2 𝑠1 𝑠2 A1 RR
variable
𝑥1 1 3 1 -1 -1 0 ×
← 0 4 0 2 1 × 4/3←
𝑠2 3
Z=3 zj→ 1 -1 -1 0 ×
cj- 0 3 1 0
zj→
We obtain the second row (excluding profit/unit) in table 3 as follows:
First row of the second simplex table (table3) → -6 -2 2 2 0 ×
(After multiplying by -2)
Second row of first simplex table (table2) →10 2 1 0 1 ×
Once the artificial variable is removed from the basic variable, there is no need to do any computational
work for it.
Thus,we get the resulting simplex table.
22
Table 4: Simplex Table
cj→ 1 2 0 0 -M
Z=21/3 zj→ 1 2 1 1 ×
=7 cj-zj→ 0 0 -1 -1 ×
3.3.1. Exercises.
1. Minimize Z = 4𝑥1 + 2𝑥2
Subject to the constraints
3𝑥1 + 𝑥2 ≥ 27
𝑥1 + 𝑥2 ≥ 21
𝑥1 + 2𝑥2 ≥ 30
𝑥1, 𝑥2≥ 0
Answer. Max. Z’ = ─48, i.e. Max. ─Z = ─48i.e. Min. Z = 48 when 𝑥1 = 3, 𝑥2 = 18
2. Maximize Z = 𝑥1 + 2𝑥2
Subject to the constraints:
𝑥1 + 𝑥2≤ 4
𝑥1 + 𝑥2≥ 6
𝑥1, 𝑥2≥ 0
Answer. No feasible solution.
23
3. Maximize Z = 10𝑥1 + 2𝑥2
Subject to the constraints:
-𝑥1 + 𝑥2≤ 2
𝑥1 + 𝑥2≥ 4
𝑥1, 𝑥2≥ 0
Answer. Unbounded solution.
TWO-PHASE METHOD
The two-phase method provides an alternate procedure for removing artificial variables from the basis
by which one can not only get initial basic feasible solution but also eliminate redundant equation
existing among the constraints. It also terminates the iteration if a feasible solution of the problem is
absent, for this the method is divided into two phases of iterations.
In the first phase, the process of eliminating artificial variable is performed so that we get a basic
feasible solution of the LPP and the second phase is used to get the optimal solution. Since the process
of finding the solution of an LPP is completed in two phases, this is called the two-phase method.
Remark: The basic feasible solution (if it exists) obtained at the end of phase I is used to start phase II.
Rules for applying two-phase method are as follows:
1. Assign a cost ‘-1’ to each artificial variable and a cost ‘0’ to all other variables (in place of their
original cost) in the objective function.
2. Solve the auxiliary problem by simplex method until either of the following three properties arise:
i. Max. Z* < 0 and at least one artificial vector appears in the optimum basis at a positive level.
In this case not proceed to Phase II.
ii. Max. Z* = 0 and at least one artificial vector appears in the optimum basis at zero level. In
this case proceed to phase II.
iii. Max. Z* = 0 and no artificial vector appears in the optimum basis. In this case also proceed
to phase II.
The method is well explained by the following examples.
1. Use two-phase simplex method to solve the problem: Min. Z = 𝑥1 −
2𝑥2 − 3𝑥3
Subject to the constraints:
−2𝑥1 + 𝑥2 + 3𝑥3 = 2
2𝑥1 + 3𝑥2 + 4𝑥3 = 1
𝑥1, 𝑥2, 𝑥 3 ≥ 0
Solution. Max. Z = −𝑥1 + 2𝑥2 + 3𝑥3
Subject to the constraints:
24
−2𝑥1 + 𝑥2 + 3𝑥3 + 𝑎1 = 2
2𝑥1 + 3𝑥2 + 4𝑥3 + 𝑎2 = 1
𝑥1, 𝑥2, 𝑥 3, 𝑎1, 𝑎2 ≥ 0
Phase I: Auxiliary linear programming problem is
Max. Z* = 0𝑥1 + 0𝑥2 + 0𝑥3 − 1𝑎1 − 1𝑎2
Subject to the constraints:
−2𝑥1 + 𝑥2 + 3𝑥3 + 𝑎1 = 2
2𝑥1 + 3𝑥2 + 4𝑥3 + 𝑎2 = 1
𝑥1, 𝑥2, 𝑥 3, 𝑎1, 𝑎2 ≥ 0
𝐶𝐽 0 0 0 -1 -1
Basic 𝐶𝐵 𝑋𝐵 𝑥1 𝑥2 𝑥3 𝐴1 𝐴2 Minimum
variable Ratio
𝑎1 -1 2 -2 1 3 1 0 2⁄3
← 𝑎2 -1 1 2 3 4 0 1 1⁄4 ←
Z* = -3 0 -4 -7 ↑ 0 0 ← ∆𝑗
Since all ∆𝑗 ≥ 0 an optimum basic feasible solution to the auxiliary Linear Programming Problem has
been attained. But at the same time Max. Z* is negative.
Here, there is no need to enter phase-II.
Note: Here in place of 𝑐𝑗 − 𝑧𝑗, we take−(𝑐𝑗 − 𝑧𝑗) as ∆𝑗 so corresponding changes imposed.
2. Solve the problem:
Min. Z= 15 𝑥 − 3𝑥
4 1 2
25
3𝑥1 − 𝑥2 − 𝑥3 − 𝑠1 + 𝑎1 = 3
𝑥 1 − 𝑥 2 + 𝑥 3 − 𝑠2 + 𝑎 2 = 2
And 𝑥1, 𝑥2, 𝑥3, 𝑎1,𝑎2, 𝑠1, 𝑠2 ≥ 0
Phase: I
Max. Z*= 0𝑥1 + 0𝑥2+ 0𝑥3 +0𝑠1 + 0𝑠2 − 1𝑎1 − 1𝑎2
Subject to the constraints:
3𝑥1 − 𝑥2 − 𝑥3 − 𝑠1 + 𝑎1 = 3
𝑥 1 − 𝑥 2 + 𝑥 3 − 𝑠2 + 𝑎 2 = 2
And 𝑥1, 𝑥2, 𝑥3, 𝑎1,𝑎2, 𝑠1, 𝑠2 ≥ 0
𝑆1 , 𝑆2 → Surplus
𝑎1,𝑎2 → Artificial variables.
Basic 𝐶𝐵 𝑋𝐵 𝑥1 𝑥2 𝑥3 𝑠1 𝑠2 𝐴1 𝐴2 Minimu
variable m
Ratio
← a1 -1 3 3 -1 -1 -1 0 1 0 1←
a2 -1 2 1 -1 1 0 -1 0 1 2
Z*=-5 -4 ↑ 2 0 1 1 0 0 ← ∆𝑗
Since all ∆𝑗 ≥ 0 and no artificial variable appears in the basis, an optimum solution to the auxiliary
problems has been attained.
Phase II:
In this phase, we consider
Max. Z’=−15 𝑥 + 3𝑥 +0𝑥 + 0𝑠 + 0𝑠
2 1 2 3 1 2
26
Now, apply simplex method in the usual manner:
𝐶𝑗 → −15⁄2 3 0 0 0
Basic 𝐶𝐵 𝑋𝐵 𝑥1 𝑥2 𝑥3 𝑠1 𝑠2 Minimum
variable Ratio
𝑥1 −15⁄2 5⁄4 1 −1⁄2 0 −1⁄4 −1⁄4
𝑥3 0 3⁄4 0 −1⁄2 1 1⁄4 3⁄4
Z’=−75⁄8 0 3⁄4 0 15⁄8 15⁄8 ← ∆j≥ 0
Phase: I
27
𝐶𝑗 → 0 0 -1 -1 0
Basic 𝐶𝐵 𝑋𝐵 𝑥1 𝑥2 𝐴1 𝐴2 𝑠3 Minimu
m
variable
Ratio
𝑎1 -1 3 3 2 1 0 0 3⁄2
← 𝑎2 -1 4 1 4 0 1 0 1←
𝑠3 0 5 1 1 0 0 1 5
Z = -7 -4 -6 ↑ 0 0 0 ← ∆j
→ 𝑥1 0 2⁄5 1 0 2⁄5 -5 0
𝑥2 0 9⁄10 0 1 −1⁄10 3⁄2 0
𝑠3 0 27⁄10 0 0 −3⁄10 7⁄2 1
Z=0 0 0 1 1 0 ← ∆j
≥0
Since all ∆𝑗≥ 0 and no artificial variable appears in the basis, an optimum solution to the auxiliary problem
has been attained.
Phase: II
In this phase, we consider
Max. Z = 5𝑥1 + 8𝑥2 + 0𝑠3
𝐶𝑗 → 5 8 0
Basic 𝐶𝐵 𝑋𝐵 𝑥1 𝑥2 𝑠3 Minimum
variable Ratio
𝑥1 5 2⁄5 1 0 0
𝑥2 8 9⁄10 0 1 0
𝑠3 0 27⁄10 0 0 1
0 0 0 ← ∆j≥ 0
28
i. Exercise:
1. Solve the problem:
Max. Z = 2𝑥1 + 3𝑥2 + 5𝑥3
Subject to the constraints
3𝑥1 + 10𝑥2 + 5𝑥3 ≤ 15
𝑥1 + 2𝑥2 + 𝑥3 ≥ 4
33𝑥1 − 10𝑥2 + 9𝑥3 ≤ 33
Answer. There do not exist any feasible solution, because artificial variable is not removed.
2. Max. Z = 5𝑥1 − 2𝑥2 + 3𝑥3
Subject to the constraints
2𝑥1 + 2𝑥2 − 𝑥3 ≥ 2
3𝑥1 − 4𝑥2 ≤ 3
𝑥2 + 3𝑥3 ≤ 5 And 𝑥1, 𝑥2, 𝑥3 ≥ 0
Answer. 𝑥1 = 23⁄3 , 𝑥2 = 5, 𝑥3 = 0, 𝑀𝑎𝑥. 𝑍 = 85⁄3.
3. Solve the problem:
Min. Z = 𝑥1 + 𝑥2
Subject to the constraints
2𝑥1 + 𝑥2 ≥ 4
𝑥1 + 7𝑥2 ≥ 7
And 𝑥1, 𝑥2 ≥ 0
Answer. 𝑥1 = 21⁄18 , 𝑥2 = 10⁄18 , 𝑀𝑎𝑥. 𝑍 = 31⁄13
4. Solve the problem:
Max. Z = 2𝑥1 + 𝑥2 + 1⁄4 𝑥3
Subject to the constraints
4𝑥1 + 6𝑥2 + 3𝑥3 ≤ 8
3𝑥1 − 6𝑥2 − 4𝑥3 ≤ 1
2𝑥1 + 3𝑥2 − 5𝑥3 ≥ 4
And 𝑥1, 𝑥2, 𝑥3 ≥ 0
Answer. 𝑥1 = 9⁄7 , 𝑥2 = 10⁄21 , 𝑥3 = 0, 𝑀𝑎𝑥. 𝑍 = 64⁄21
29
5. Solve the problem:
Max. Z = 2𝑥1 + 𝑥2
Subject to the constraints
5𝑥1 + 10𝑥2 − 3𝑥3 = 8
𝑥1 + 𝑥2 + 𝑥4 = 1
And 𝑥1, 𝑥2, 𝑥3, 𝑥4 ≥ 0
Answer. 𝑥1 = 0, 𝑥2 = 4⁄5 , 𝑥3 = 0, 𝑥4 = 1⁄5 , 𝑀𝑎𝑥. 𝑍 = 4⁄5
DEGENERACY
The process of obtaining a degenerate basic feasible solution in an LPP is called degeneracy. Degeneracy
is revealed when a basic feasible solution contains a smaller number of non-zero variables than the number
of independent constraints when at the initial stage while forming the initial simplex table if the values of
some basic variables are zero and if at any iteration there is a tie in the minimum replacement ratios (RR)
i.e. RR is not unique. In case of tie, if we select any of the rows arbitrarily, it may be possible that the
subsequent iterations may not produce improvements in the value of objective function. This concept is
known as cycling. In this case, we have to go back and choose another row.
However, one can avoid the situation of cycling which arises due to degeneracy in LPP by adopting the
following procedure:
Determine the non-negative ratios of the first column of the unit matrix (and not the quantity column) to
the entries of the entering variable. Then choose the minimum of the values occurring at the places of tie.
If we find tie again, then we compute the ratios of the second column of the unit matrix to the entry of the
entering variable. We continue the process till the ratios do not break the tie.
EXAMPLE. Maximize Z = 3𝑥1 +9𝑥1
Subject to the constraints:
𝑥1 + 𝑥2 ≤ 8
𝑥1+ 2𝑥2 ≤ 4
𝑥1, 𝑥2 ≥ 0
Solution. The standard form of the LPP is
Maximize Z = 3𝑥1 +9𝑥2+0𝑠1 +0𝑠2
Subject to the constraints:
𝑥1 + 4𝑥2 + 𝑠1 = 8
𝑥1 + 2𝑥2 + 𝑠2 = 4
𝑥1, 𝑥2, 𝑠1, 𝑠2 ≥ 0
30
The initial simplex table for the given LPP is as follows:
Table 1: Initial Simplex Table
cj→ 3 9 0 0
Basic Qty 𝑥1 𝑥2 𝑠1 𝑠2 R.R.
variable
𝑠1 0 8 1 4 1 0 8/4=2
𝑠2 0 4 1 2 0 1 4/2=2
Z=0 zj→ 0 0 0 0
cj – zj → 3 9 0 0
↑
Clearly, from Table 1, there is tie in the minimum replacement ratio as it is 2 in each of the two rows.
Now, to avoid cycling, we should not select any row arbitrarily. We will proceed as follows:
We divide the non-negative ratios of the first column of identify matrix, i.e.
4
(1) by the entries of the entering variable, i.e. ( ).
0 2
1⁄4 4
So, we have replacement ratios as ( ), i.e. ( ). So here we have found the minimum RR to be 0 and
0⁄2 2
the tie has been broken. Therefore, we select the second row. Thus, the completed initial simplex table is
as follows:
Table 2: Complete Initial Simplex Table
cj→ 3 9 0 0
Basic Profit/unit Qty 𝑥1 𝑥2 𝑠1 𝑠2 R.R.
Variables
0 8 1 4 1 0 2, ¼
𝑠1
← 0 4 1 0 1 2, 0←
𝑠2 2
Z=0 zj→ 0 0 0 0
cj - zj → 3 9 0 0
↑
Now we apply simply our simplex method procedure to obtain the optimum value of the objective
function. It will be Max. Z =18 at x1 = 0, x2 = 2.
31
32