Chapter Two
Chapter Two
Linear programming (LP) model enables users to find optimal solutions to certain problems in which
the solution must satisfy a given set of requirements or constraints. It is a model used for optimum
allocation of scarce or limited resources to competing products or activities under such assumptions
as certainty, linearity, fixed technology, and constant profit per unit.
As a decision making tool, it has demonstrated its value in various fields such as production, finance,
marketing, research and development and personnel management.
Determination of optimal product mix (a combination of products, which gives maximum profit),
transportation schedules, Assignment problem and many more are the techniques managers use to
make optimal decisions.
In this chapter, you will learn about linear programming models where emphasis will be given to such
issues as familiarization of the model, problem recognition and formulation using the model, solving
linear programming problem for feasibility and optimality, and post optimality analysis.
Non-negativity Resource
Constraints constraints
Figure 2.1. The linear programming problem/model
Note
The coefficients of the variables in the Objective Function are called the profit or cost
coefficients. They express the rate at which the value of the Objective Function
increases or decreases by including in the solution one unit of each of the decision
variables.
The coefficients of the constraints’ variables are called the input- output coefficients
that indicate the rate at which the given resources are depleted or utilized.
Example 1
A firm that assembles computers and computer equipment is about to start production two
new microcomputers. Each type of microcomputers will require assembly time, inspection
time and storage space. The amount of each of these resources that can be devoted to the
production of these microcomputers is limited. The manager of the firm would like to
determine the quantity of each microcomputer to produce in order to maximize the profit
generated by sales of these microcomputers.
Additional information
In order to develop a suitable model of the problem, the manager has met with design and
manufacturing personnel. As a result of these meetings the manager has obtained the
following information.
The manager also met with the firm’s marketing manager and learned that demand for the
microcomputers was such that whatever combination of these two types of microcomputers
is produced, all of the outputs can be sold.
Required:
Formulate the LPPM of the problem.
Solution
Step 1: identify the decision variable
the quantity/ amount/ units of each microcomputer (microcomputer type 1 and
microcomputer type 2) to be produced
Storage space per unit 3 cubic feet 3 cubic feet 39 cubic feet
Max Z = 60x1 + 50 x2
Example 2
A firm is engaged in breeding pigs. The pigs are feed on various products grown on the farm.
In view of the need to ensure certain nutrient constituents (call them vitamins, minerals and
proteins) it is necessary to buy two additional products say A and B. One unit of product
A contains 36 units of vitamins, 3 units of minerals and 20 units of proteins. One units of
product B contains 6 units of vitamins, 12 units of minerals and 10 units of proteins. The
minimum requirement of vitamins, minerals and proteins is 108units, 36units and 100 units
respectively. Product A costs birr 20 per unit and product B costs birr 40 per unit
Required
Formulate the LPPM of the problem
Solution
Step 1: identify the decision variables
Product A and B to be purchased to prepare the food for pigs
Let x1 represent product A to be purchased
X2 represent products B to be purchased
NUTRIENT
CONSTITUENTS PRODUCT A PRODUCT B REQUIREMENT
2. Simplex methods
Is used to find solutions for LPP when the decision variables of the problem are not greater
than two.
Procedure
To apply this method, we should follow the following steps.
1. Formulate LPP
5. Determine the values of the objective function at each corner points of feasible region
6. Select the point on the feasible region that optimizes the objective function-optimal
solution (The most favorable values)
Example 1
Consider the microcomputer problem formulated above and solve it using the graphical
approach.
Step one: Graph each constraints:
To draw the graph first change the inequality to equality i.e. replace the < and > sign
into = sign.
Max Z=60x1 + 50x2
Subject to
36x1 + 6x2> 100 36x1 + 6x2= 100
3x1 +12 x2> 22 3x1 +12 x2= 22
20x1+ 10x2 >39 20x1+ 10x2 =39
x1 & x2 > 0 x1 & x2 = 0
Then find the x and y intercepts (in our case x1 and x2 respectively) - points where each
constraint intersects the axis. To do so, set x1 = 0 to find values for x2 and set x2= 0 to find
values for x1.
As indicated in the graph, the corner points of the feasible region (the corner points of the
shaded region) are A, B, C, D and E. The next task is to find the coordinates of these
corner points, some are determined by observation and some are through simultaneous
equation. Then we test each corner points to find the points that results the optimal
solution. These activities are indicated in the following table.
Since the maximum value (because the objective function of the problem is maximization) is 740, the
solution is:
X1= 9, X2= 4 and The Maximum Profit is Birr 740.
When we interpret the result, we state the company should produce 9 units of microcomputer type
one and 4 units of microcomputer type two to get a maximum profit of Birr 740.
Example 2
Max.Z 50 X 180 X 2
St :
X 12 X 2 32
X 12 X 2 82
X1, X 2 0
Note: Try to solve the problem by yourself, in separate piece of paper before you
check the answer.
Example 3
Consider two models of color TV sets; Model A and B, are produced by a company to
maximize profit. The profit realized is $300 from a TV set of model A, and $250 from that of
set B. The limitations are:
A. availability of only 40hrs of labor each day in the production department
B. a daily availability of only 45 hrs on machine time
C. ability to sale 12 set of model A
Required
How many sets of each model will be produced each day so that the total profit will be as
large as possible?
Labor hr. 2 1 40
Machine hr. 1 3 45
Marketing hr. 1 0 12
Note: Try to solve the problem by yourself, in separate piece of paper before you
check the answer.
Solution
1. Formulation of mathematical modeling of LPP
Max Z=300X1 +250X2
St:
2X1 +X2< 40
X1 +3X2< 45
LPP Model
X1 < 12
X1, X2 >0
2. Convert constraints inequalities into equalities
2X1 +X2 = 40
X1 +3X2= 45
X1 = 12
3. Draw the graph by intercepts
2X1 +X2 = 40 ==> (0, 40) and (20, 0)
X1 +3X2= 45==> (0, 15) and (45, 0)
X1 = 12==> (12, 0)
X1, X2 >0
X1 +X2 = 45
15
4. Identify the feasible area of the solution which satisfies all constrains.
5. Identify the corner points in the feasible region
A (0, 0), B (0, 15), C (12, 11) and D (12, 0)
8. Identify the optimal solution point
___________________________________________________________________
Cutting department 1 2 32
Assembly department 3 4 84
Selling price per tent $160 $210
Cost per tent $110 $130
Profit per tent $50 $80
The distributor will not take more than 12 SUPER tents per week. Thus, the manufacturer
should not produce more than 12 SUPER tents per week.
Decision variable: number of regular and super tent to be produced per week.
Let X1 =The No of REGULAR tents produced per week.
X2 =The No of SUPER tents produced per week.
X1 and X2 are called the decision variables
Max.Z 50 X 180 X 2
St :
X 12 X 2 32 ……….Cutting department constraint
LPP Model
X 14 X 2 82 ……….Assembly department constraint
X 2 12 ……….Demand constraint
X 1 , X 2 0 ……….Non-negativity constraints
Operation research teaching material Compiled by:Ashebir U.
14
Corners Coordinates Max Z=50 X1 +800X2
A (0, 0) $0
B (0, 12) $960
C (8, 12) $1360
D (20, 6) $1480
E (28, 0) $1400
Interpretation
The manufacturer should produce and sale 20 REGULAR tents and 6 SUPERS tents to
get a maximum weekly profit of $1480.
Example 5
Suppose that a machine shop has two different types of machines; machine 1 and machine 2,
which can be used to make a single product .These machine vary in the amount of product
produced per hr., in the amount of labor used and in the cost of operation. Assume that at least
a certain amount of product must be produced and that we would like to utilize at least the
regular labor force. How much should we utilize each machine in order to utilize total costs
and still meets the requirement?
Solution: The key information inputs in the problem are provided as follows
_______________________________________________________________
Resource used
Machine 1 (X1) Machine (X2) Minimum required hours
_________________________________________________________________________
Product produced/hr 20 15 100
Labor/hr 2 3 15______
Operation Cost $25 $30____________________________________
The problem is formulated in the next model
Min.Z 25 X 130 X 2
St :
20 X 115 X 2 100 LPP Model
2 X 13 X 2 15
X1, X 2 0
Constraint equation:
20X1 +15X2=100 ==> (0, 20/3) and (5, 0)
2X1+3X2=15 ==> (0, 5) and (7.5, 0)
X1 X2> 0
X2
X1 =0
A (0, 20/3)
Feasible Region
B (2.5, 3.33)
X2 =0
X1
___________________________________________________________________________________________
5 C (7.5, 0)
Corners Coordinates MinZ=25 X1 + 30X2
A (0, 20/3) 200
B (2.5, 3.33) 162.5
C (7.5, 0) 187.5
The optimal solution mix is represented by X1 =2.5, X2=3.33, and Min Z= 162.5
Example 6
A company owns two flour mills (A and B) which have different production capacities for
HIGH, MEDIUM and LOW grade flour. This company has entered contract supply flour to
a firm every week with 12, 8, and 24 quintals of HIGH, MEDIUM and LOW grade
respectively. It costs the Co. $1000 and $800 per day to run mill A and mill B respectively.
On a day, mill A produces 6, 2, and 4 quintals of HIGH, MEDIUM and LOW grade flour
respectively. Mill B produces 2, 2 and 12 quintals of HIGH, MEDIUM and LOW grade flour
respectively.
Required
How many days per week should each mill be operated in order to meet the contract order
most economically standardize? Solve graphically.
Solution
No of days per week of Minimum flour in
Mil A (X1) Mill B(X2) quintals
HIGH Capacity (in quintal) 6 2 12
MEDIUM Capacity (in quintal) 2 2 8
LOW Capacity (in quintal) 4 12 24
Running cost/day $1000 $800
Slack Variables(S): is /are added to the left-hand side of a < constraint to convert the
constraint into its standard form. The value of the slack variable shows unused or
underutilized resource.
Surplus variables(S): is/are added to the left-hand side of a > constraints to convert the
constraint into its standard form. The value of the surplus variable shows the excess resources
used.
Artificial variables (A): somewhat analogous to slack variables in that they are added to
equality and a > constraints in the same way that slack variables are added to a < constraints.
However artificial variables have no physical interpretation; they merely serve as a device to
enable us to use the simplex process.
Since the above problem constraints have all a < algebraic sign, we use slack variables for
standardizing the problem.
Note
A slack variable is always added for a < constraint to convert the constraint to a standard
form.
Slack variables represent unused resource or idle capacity. Thus, they don’t produce any product and
their contribution to profit is zero.
Slack variables are added to the objective function with zero coefficients.
From the above example n=5 variables (x1, x2, s1, s2, and s3) and m=3 constraints (assembly, inspection
and storage space constraints), excluding non-negativity.
Therefore, n-m=5-3=2 variables (x1 and x2) are set equal to zero in the 1st simplex tableau. These are
non-basic variables. 3 Variables (s1, s2, and s3) are basic variables (in the 1st simplex tableau) because
they have non-zero solution values.
Step 3: Construct the initial simplex tableau(continued)
Initial simplex tableau
Slack variables
variables column
Real or decision
Solution quantity
Profit per unit
columns
Basic or DV
column
column
column
C 60 50 0 0 0
BV X1 X2 S1 S2 S3 Q
S1 0 4 10 1 0 0 100 R1
S2 0 2 1 0 1 0 22 R2 Constraint
equation rows
S3 0 3 3 0 0 1 39 R3
Z 0 0 0 0 0 0
Gross Profit row
C–Z 60 50 0 0 0
Net Profit row
/Indicator row/
Note:
The entering variable is the variable that has the most (the largest) positive value in the
C - Z row (indicator row).
It is the variable that has the highest contribution to profit per unit.
X1 in our case is the entering variable. (Because the maximum number in the c-z row
is 60)
The column associated with the entering variable is called key or pivot column X1
column in our case.
Note
The leaving variable is the variable that has the smallest replacement ratio(minimum ratio).
S2 in our case is the leaving variable. (Because the smallest replacement ratio is 11
The row associated with the entering variable is called key or pivot row S 2 row in our case.
The pivot element is the intersection point between the pivot row and pivot column; No 2 in
the above example
In our case
100 =25
4
22 = 11 is the minimum
2
39 =13
3
It is interesting to note that the three ratios (25, 11, 13) corresponding to the intersections of the
constraints with the x1(look the graphical solution).
Operation research teaching material Compiled by:Ashebir U.
21
Note that the smallest of the ratios represents the extreme point of the feasible solution space; the other
points lie beyond the feasible solution space. Hence by selecting the smallest ratio, the simplex
procedure stays within the feasible solution space. It sometimes happens that some of the substation
rates for the variable we want to bring into solution are zero or negative. We don’t nee to divide the
quantity values by a negative or a zero substitution rates.
Step 6: Calculate the values of pivot row (Row to be replaced) or Perform row operations.
Perform algebraic operations on the PIVOT COLUMN to convert the pivot element into 1 and the
remaining pivot column numbers into 0. Obtain the new row values through the following two
operations:
Pivot row element = Old pivot row element OR 1/ Key element X corresponding
Key element elements of old pivot row
C 60 50 0 0 0
SV X1 X2 S1 S2 S3 Q RR
Note
Divide each element of the pivot row by the pivot element to find new values in the key or pivot row.
Perform row operations to make all other entries for the pivot column equal to zero.
BV C X1 x2 s1 s2 s3 Q
Z 60 30 0 30 0 660
BV C 60 50 0 0 0 Q
X1 X2 S1 S2 S3
S1 0 0 0 1 6 -16/3 24
X1 60 1 0 0 1 -1/3 9
X2 50 0 1 0 -1 2/3 4
Z 60 50 0 10 40/3 740
C-Z 0 0 0 -10 - 40/3
B C 4 3 0 0
X1 X2 S1 S2 Q RR
S1 0 20 10 1 0 230 11.5
S2 0 5 15 0 1 120 24
Z 0 0 0 0 0
C–Z 4 3 0 0
B C 4 3 0 0
X1 X2 S1 S2 Q RR
X1 4 1 ½ 1/20 0 11.5 23
Z 4 2 1/5 0 46
C–Z 0 1 -1/5 0
X1 4 1 0 3/50 - 1/25 9
X2 3 0 1 -1/50 2/25 5
4 3 0.18 0.08
Z
51
C- Z 0 0 - 0.18 -0.08
Note
For the initial basis, use artificial variables for constraints that have > and = sign. For a <
constraint use a slack variable. Hence, surplus variables will not appear in an initial solution.
X1 X2 S1 S3 A2 A3 Q RR
S1 0 0 1 1 0 0 0 4 4/0=und.
A2 -M 1 1 0 0 1 0 9 9
A3 -M 6 2 0 -1 0 1 24 4
Z -7M -3M 0 +M -M -M -33M
C–Z 7M +6 3M+8 0 -M 0 0
Since 7m+ 6 is the largest, x1 will be the entering variable for the next tableau. Since an artificial
value (A3) leaves the solution it will removed from the next table, so A3 column will not exist in the
2nd tableau
2nd tableau
B C 6 8 0 0 -M
X1 X2 S1 S3 A2 Q RR
S1 0 0 1 1 0 0 4 4
A2 -M 0 2/3 0 1/6 1 5 27/2
X1 6 1 1/3 0 -1/6 0 4 12
Z 6 2-3/3M 0 -1-1/6M -M 24-5M
C-Z 0 6+2/3M 0 1+1/6M 0
BV C 6 8 0 0 -M
X1 X2 S1 S3 A2 Q RR
X2 8 0 1 1 0 0 4 und
A2 -M 0 0 -2/3 1/6 1 7/3 14
Final tableau
BV C 6 8 0 0 Q
X1 X2 S1 S3
X2 8 0 1 1 0 4
S3 0 0 0 -4 1 14
X1 6 1 0 -1 0 5
Z 6 8 2 0 62
C–Z 0 0 2 0
Example 2
Max Z=2x1 +x2+3x3
Subject to:
x1+ x2 + 2x3 < 5
2x1+ 3x2 +4x3 = 12
x1, x2 , x3 >0
B C 2 1 3 0 -M Q
RR X1 X2 X3 S1 A1
S
2.5
1 0 1 1 2 1 0 5
3A1 -M 2 3 4 0 1 12
Z -2M -3M -4M 0 -M -12 M
C- Z
2M+2 3M+1 4M+3 0 0
B C 2 1 3 0 -M Q
RR X1 X2 X3 S1 A1
X 310 3 1/2 ½ 1 1 0 5
A14 -M 2 3 4 0 1 12
B C 2 1 3 0 Q
RR
X1 X2 X3 S1
X2 1 0 1 0 -2 2
Undefined
Z 3/2 1 3 5/2 13/2
C-Z 1/2 0 0 -5/2
B C 2 1 3 0 Q
X1 X2 X3 S1
X1 2 1 0 2 3 3
X2 1 0 1 0 -2 2
Z 2 1 4 4 8
C-Z 0 0 -1 -4
Note
TYPE OF CONSTRAINT TO PUT INTO STANDARD FORM
< ----------------------------------------Add a slack variable
= -----------------------------------------Add an artificial variable
> ---------------------- Subtract a surplus variable and add an artificial variable
Example 1
Minimize Z=25x1 +30x2
Subject to:
20x1+15x2 > 100
2x1+ 3x2 > 15
x1 & x2 > 0
X1 X2 S1 S2 A1 A2
A1 M 20 15 -1 0 1 0 100
A2 M 2 3 0 -1 0 1 15
Z 22M 18M -M M M M 115 M
C–Z
25 -22M 30- 18M M M 0 0
B C 25 30 0 0 M Q
X1 X2 S1 S2 A2
X1 25 1 ¾ -1/20 0 0 5
A2 M 0 3/2 1/10 -1 1 5
Z 25 75/4+3/2M -5/4+1/10M M M 125+5 M
C–Z 0 45/4-3/2M 5/4-1/10 M M 0
B C 25 30 0 0 Q
X1 X2 S1 S2
X1 25 1 0 -1/10 1/2 5/2
X2 30 0 1 1/15 -2/3 10/3
Z 25 30 -1/2 -15/2 162.5
C–Z 0 0 1/2 15/2
Example 2
Solve the problem provided below (Minimization with mixed constraint)
Min Z=5x1 +3x2
Subject to:
2x1+4x2 < 12
2x1+ 2x2 = 10
5x1+ 2x2>10
X1 &X2
Solution
Min Z=5x1+3x2 +0s1+0s3 +MA2+MA3
Subject to
2x1+4x2+s1 = 12
2x1+ 2x2+A2 = 10
5x1+ 2x2-S3+ A3=10
X1, X2, S1, S3, A2 and A3 = 0
Min Z=5x1 +3x2, If no production
2x1+4x2+s1 = 12 ==>x1 =x2=0==>s1=0 (Solution Value in the initial simplex tableau)
2x1+2x2 +A1 =10 ==>x1 =x2=0==>A2 =15 (Solution Value in the initial simplex tableau)
5x1+2x2 –s2 +A1=10 ==>x1=2=s3=0==>A3=10(Solution Value in the initial simplex tableau)
x1, x2 , s1, s2 ,A1 ,A2 = 0
Operation research teaching material Compiled by:Ashebir U.
34
Initial feasible solution: 1st tableau
B C 5 3 0 0 M M Q
X1 X2 S1 S2 A1 A2
S1 0 2 4 1 0 0 0 12
A1 M 2 2 0 0 1 0 10
A2 M 5 2 0 -1 0 1 10
Z 7M 4M 0 M M M 20 M
C–Z 5 -7M 3- 4M 0 -M 0 0
B C 5 3 0 0 M Q
X1 X2 S1 S2 A1
0 S1 0 16/5 1 2/5 0 8
M A1 0 6/5 0 2/5 1 6
RR
5 X1 1 2/5 0 -1/5 0 2
Z 5M 6/5M +2 0 2/5M - 1 M 10+6 M
2.5
B C 5 3 0 0 M Q
X1 X2 S1 S2 A1
X2 3 0 1 5/16 1/8 0 2.5
A1 M 0 0 -3/8 1/4 1 3
X1 5 0 0 -1/8 -1/4 0 1
Z 5 3 -3/8M +5/6 M/4-7/8 M 12.5+3 M
C- Z
0 0 3/8M -5/6 M/4+7/8 0
B C 5 3 0 0 Q
X1 X2 S1 S2
X2 3 0 1 1/2 0 1
S2 0 0 0 -3/2 1 12
X1 5 0 0 -1/2 0 4
Z 5 3 -1 0 23
C–Z 0 0 1 0
The values of the optimal solution: X1=4, X 2=1, S1=0, S2=12 and Min Z= $23
Exercises
Find the optimal solution for the LPPs using simplex method
1. Min Z=10x1 +5x2
Subject to:
2x1 + 5x2 > 150
3x1 + x2 > 120
x1, x2 >0
Ans: x1=450/13, x2 =210/13 and Min Z=$540
2. Min Z=4x1 +5x2
Subject to:
X1 + 2x2 > 80
3x1+ x2 > 75
x1, x2 >0
Ans: x1=14, x2 =33 and Min Z=$221
3. Min Z=7x1 +9x2
Subject to:
3x1 + 6x2 > 36
8x1+ 4x2 > 64
x1, x2 >0
Ans: x1=20/3, x2 =8/3 and Min Z=212/3
Operation research teaching material Compiled by:Ashebir U.
36
Note
To get an initial feasible solution
Types of constraint Presence of variables in the initial solution mix
1. < (Slack) Yes
2. > *(Surplus) No
*(Artificial) Yes
3. = (Artificial) Yes
B C Q
X1 X2 S1 S3
Z
C- Z 5 2 5 0
Even if X1 has the same coefficient to S1 on the C-Z row (5) X1 is determined to be the
entering variable. This is because X1 represents a decision variable whereas S1 stands for
a slack/surplus variable.
B C 5 8 0 0 M Q
X1 X2 S1 S2 A2
X1 5 1 1 -2 3 0 200
X2 8 0 1 1 2 0 100
A2 M 0 0 0 -1 1 20
Z 5 8 -2 31-M M 1,800+200M
C–Z 0 0 2 M-31 0
Even though all C - Z values are positive and 0 (i.e. the criterion for an optimal solution in a
minimization case), no feasible solution is possible because an artificial variable (A2) remains in
the solution mix.
III. Unbounded Solutions
No finite solution may exist in problems that are not bounded. This means that a variable can be
infinitely large without violating a constraint.
In the simplex method, the condition of unbounded ness will be discovered prior to reaching the
final tableau. We will note the problem when trying to decide which variable to remove from the
solution mix.
The procedure in the simplex solution approach is to divide each quantity column number by the
corresponding pivot column number to identify the leaving variable. The row with the smallest
positive ratio is replaced. But if the entire ratios turn out to be negative or undefined, and zeros it
indicates that the problem is unbounded.
B C 5 9 0 0 Q
X1 X2 S1 S2
X2 5 -1 1 2 0 30
S2 0 -2 0 -1 1 10
Z -9 9 18 0 270
C-Z 15 0 -18 0
The solution in the above case is not optimal because not all C- Z entries are 0 or negative, as
required in a maximization problem. The next variable to enter the solution should be X1.
To determine the variable that will leave the solution, we examine the ratios of the quantity column
values to their corresponding coefficients in the X1 or pivot column. Since both pivot column values
are negative, an unbounded solution is indicated.
IV. Degeneracy /Tie for leaving basic variable (key row)/
If there is a tie for the smallest ratio of the quantity column values to their corresponding coefficients
in the pivot column, it is a signal that degeneracy exists. Degeneracy can occur right in the first
(initial) tableau. This normally happens when the number of constraints is less than the number of
variables in the objective function.
Example
The following tableau shows the case of degeneracy
B C 5 8 2 0 0 0 Q
X1 X2 X3 S1 S2 S3
RR
X2 8 1/4 1 1 -2 0 0 10
10/1/4=40
S2 0 4 0 1/3 -1 1 0 20
20/4=5 Tie for the smallest
S3 0 2 0 2 2/5 0 1 10 ratio indicates deg.
10/2=5
Z 2 8 8 16 0 0 80
C-Z 3 0 -6 -16 0 0
B C 3 2 0 0 Q
X1 X2 S1 S2
X2 2 3/2 1 1 0 6
S2 0 1 0 1/2 1 3
Z 3 2 2 0 12
C-Z
0 0 -2 0
X1=0, X2=6, S2=3 and Max Z=12 or: X1=3, X2=3/2 and Max Z=12
The C – Z value of the Non-basic variable (X1) is 0.Thus, there is alternative optimal
solution.
Exercises1
1. Solve the following LPP using the simplex algorithm
Min Z=6x1 +8x2
Subject to:
x1+ 2x2 > 80
3x1+ x2 > 75
x1, x2 >0
Required
What are the values of the basic variables at each iteration?
Which are the non-basic variables at each iteration?
Ans: X1=14, X2=33, and Min Z=221
B C Q
X1 X2 X3 S1 S2 S3
5 0 1 1 -2 0 0 5
X3
6 1 -3 0 0 0 1 12
X1
S2 0 0 2 0 1 1 -1 10
Z 6 -13 5 5 0 21 97
C-Z
0 16 0 -5 0 -21
Required
What special condition exists if you improve the profit and move to the next iteration?
Proceed to solve the problem for optimal solution
Ans: Degeneracy; X1=27, X2=5, X3=0, and Max Z=$177
3. Convert the following constraints and objective function into the standard form for use in the
simplex method
Min Z=4x1 +x2
Subject to:
3 x1+ x2 = 3
4x1+ 3x2 > 6
x1+ 2x2 < 3
x1, x2 > 0
Answer:
Min.Z=4x1 +x2 + 0 s1 +0 s2+ M A1+M A3
St:
3x1+ x2 + A1 = 3
4x1+ 3x2 -s1+A2 = 6
x1+ 2x2 + s2 = 3
All Variables > 0
4. Solve the following LPP using simplex method
Max Z=9x1 +7x2
Subject to:
2x1+ x2 < 40
x1+ 3x2 < 30
x1, x2 > 0
Ans: X1=18, X2=4, and MaxZ=$190
Operation research teaching material Compiled by:Ashebir U.
41
5. Solve the following LPP to show that it has alterative optimal solutions.
a. Max Z=6x1 +3x2 Ans: i. X1=4, X2=0, and Max Z=24
Subject to: ii. X1=5/2, X2=3, and Max Z=24
2x1+ x2 < 8
3 x1+ 3x2 < 18
x2 < 3
x1, x2 >0
b. Min Z=2x1 +8x2 Ans: i. X1=32/6, X2=10/6, and Min Z=24
Subject to: ii. X1=12, X2=0, and Min Z=24
5x1+ x2 > 10
2x1+ 2x2 > 14
x1+ 4x2 > 14
x1, x2 >0
6. Solve the following LPP to show that it has unbounded solution.
a. Max Z=-2x1 +3x2 x1, x2 > 0
Subject to: b. Max Z=3x1 +6x2
Subject to:
x1 <5
3x1+ 4x2 > 12
2 x1-3x2 < 6 -2x1+ x2 < 4
x1, x2 > 0
7. Solve the following LPP to show that it has no feasible solution.
a. Max Z=-2x1 +3x2 Ans: X1=2, X2=0, A1=2 and Max Z=4-2M
Subject to:
x1 - x2 > 4
x1+ x2 < 6
x1 <2
x1, x2 > 0
b. Max Z=3x1 +3x2 Ans: X1=0, X2=2, A2=2 and MaxZ=4-4M
Subject to:
2x1+ x2 < 2
3x1 + 4x2 > 12
x1, x2 >0
Operation research teaching material Compiled by:Ashebir U.
42
Exercises 2
1. Max Z=50x1 +120x2
Subject to:
2x1+4x2 < 80
3x1+x2< 60
x 1, x 2 > 0
Required: Determine the range of optimality for the coefficient of the basic variables for the given
problem.
B C 80 60 0 0 Q
X1 X2 S1 S2
S2 0 5/2 0 -1/4 1 20
X2 60 3/2 1 1/2 0 40
Z 90 60 30 0 $2,400
-10 0 -30 0
C–Z
Ans: S1=X1=0, X2= 40, S2=20 , MaxZ= 2,400
Note:
Linear programming models are used to find optimal solutions to constrained optimization
problems. In order for linear programming models to be used, the problems must involve a single
objective, a linear objective function and linear constraints, and have known and constant numerical
values.
We can solve linear programming problems using either graphical solution approach or simplex
approach. The graphical method for solution is used when the problem deals with 2 decision
variables. The inequalities are assumed to be equations (in equalities should be changed to
equations). As the problem deals with 2 variables, it is easy to draw straight lines as the relationship
between the variables and constraints are linear. In cases where the problem deals with at least three
variables, instead of lines we have to draw planes and it will become very difficult to visualize the
feasible area. In contrast to the graphical approach, the simplex approach is not limited to problems
with only two decisions variables. It is a general-purpose method to solve problems with any number
of decision variables.
The simplex procedure involves developing a series of tableaus, each of which describes the solution
at a corner point of the feasible solution space beginning with the origin after standardizing the
problem.
Operation research teaching material Compiled by:Ashebir U.
43
The standard form of LP problem should have the following characteristics:
I. All the constraints should be expressed as equations by slack or surplus and/or artificial
variables
II. The right-hand side of each constraint should be made non-negative; if it is not, this should
be done by multiplying both sides of the resulting constraint by -1.
Example: 2X1+3X2-4X3+X3<-50, we multiply both sides by negative
III. Three types of additional variables, namely
a. Slack Variable(S)
b. Surplus variable (-S), and
c. Artificial variables (A) are added in the given LP problem to convert it into standard
form for two reasons:
i. to convert an inequality to have a standard form of an LP model, and
ii. to get an initial feasible solution represented by the columns of an identity matrix
The summery of the extra variables needed to add in the given LP problem to convert it into standard
form is given below:
Types of Extra variables to be added Coefficient of extra variables Presence of variables in the
constraint in the objective function initial solution mix
Max Z Min Z
< Add only slack variable 0 0 Yes
1. Test of optimality
i. If all C – Z < 0, then the basic feasible solution is optimal (Maximization case)
ii. If all C – Z > 0, then the basic feasible solution is optimal (Minimization case)
2. Variable to enter the basis
i. A variable that has the most positive value in the C – Z row
(Maximization case)
ii. A variable that has the highest negative value in the C - Z row (Minimization case)
3. Variable to leave the basis
The row with the non-negative and minimum replacement ratio
(For both maximization and minimization cases i.e.: RR > 0