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

LINEAR PROGRAMMING2

Linear Programming (LP) is a mathematical technique developed for optimizing resource allocation in management science, allowing businesses to choose the best alternatives from a set of feasible options. It involves decision variables, an objective function, and constraints, which can be categorized into system, individual, and non-negativity constraints. LP problems can be solved using graphical methods or the Simplex method, and are applicable in various scenarios such as production planning and resource management.

Uploaded by

legeseefa27
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views

LINEAR PROGRAMMING2

Linear Programming (LP) is a mathematical technique developed for optimizing resource allocation in management science, allowing businesses to choose the best alternatives from a set of feasible options. It involves decision variables, an objective function, and constraints, which can be categorized into system, individual, and non-negativity constraints. LP problems can be solved using graphical methods or the Simplex method, and are applicable in various scenarios such as production planning and resource management.

Uploaded by

legeseefa27
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 146

1

 Linear programming- developed by Kantorovich in 1939


and extended by G. Dantzig in 1947 .
 The original name, "programming in a linear structure,"
which was later shortened to "linear programming.”
─ Programming- “planning or optimization”
─ LP- Planning with linear models.

2
 LP is a mathematical technique for choosing the
best alternative from the a set of feasible
alternatives.
It is the most commonly applied form of constrained
optimization, which is harder than unconstrained
optimization

3
 Linear Programming (LP) is a field of management science
that finds most efficient way of using limited resources to
achieve the objectives of a business.

Optimization
A model, which is 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, is linear programming

4
 Decision variables –represent unknown quantities to be solved
for.
Goal- to find values of the variable that provide a best value of the objective function

 Objective function- the criterion by which all decisions are evaluated or

mathematical expression that combines the variables to express


your goal.
•Represent profit, efficiency, yield, cost etc
•Requirement: maximize or Minimize objective function

 Parameters
•fixed values that specify the impact that one unit of each decision variable
will have on the objective and on any constraint
5
 Constraints- a mathematical expression that combine the variables to
express limits on the possible solutions . It includes 5 elements such as :-

 A right hand side (RHS) quantity that specifies the limit for that
constraint. It must be a constant, not a variable.
 An algebraic sign that indicates whether the limit is an upper bound that
cannot be exceeded, a lower bound that is the lowest acceptable amount,
or an equality that must be met exactly.
 The decision variables to which the constraint applies.
 The impact that one unit of each decision variable will have on the
right-hand side quantity of the constraint.

6
 Constraints can be arranged into three groups:
 System constraints – involve more than one decision
variable,
 Individual constraints – involve only one variable, and
 Non-negativity constraints – specify that no variable will
be allowed to take on a negative value.

 Variable bound- Right hand side (RHS) or quantity,

budget

7
 Linearity – each decision variable has a linear impact on the objective function
and in each constraint in which it appears. There is no squared, cubed, square
root, products etc in the model
 Divisibility/continuity – non integer values are acceptable to the potential values
of decision variables if they are continuous but not for discrete variables
 Certainty : Various parameters namely the objective function coefficients, the
coefficients of inequality/equality constraints and the constraints (resource)
values are known and constant. Hence, linear programming is deterministic in
nature.
 Additively :- The value of the objective function and the total amount of each
resource used (or supplied), must be equal to the sum of the respective individual
contributions (profit or cost) by decision variables.
 Proportionality: there has to be proportional contribution
of the decision variables exists in the objective function
and the constraint inequalities
 Finite choices – A linear programming model also
assumes that a limited number of choices are available to
the decision maker
 Non-negativity – all the decision variables will never
assume negative values and hence we consider the first
quadrant un the x-y coordinate
 Helps in attaining the optimum use of scarce
resources
 Improve quality of decisions
 Highlighting of bottlenecks in the production
process.
 Helps in re-evaluation of a basic plan for changing
conditions.
11
• Decision variables
X1 , X2 , X3 , … , Xn
e.g. the quantities of different products
Index n = the number of product types

• Constraints
– a less than or equal to constraint : f(X1 , X2 , X3 , … ,
Xn) < b
– a greater than or equal to constraint : f(X1 , X2 , X3 , … ,
Xn) > b
– an equal to constraint : f(X1 , X2 , X3 , … ,
Xn) = b

• Objective

MAX(or MIN) Z : f(X1 , X2 , X3, …, Xn) 12
MAX(MIN) : f(X1 , X2 , X3 , … , Xn)

Subject to:
f(X1 , X2 , X3 , … , Xn) < b1

f(X1 , X2 , X3 , … , Xn) > bk

f(X1 , X2 , X3 , … , Xn) = bm

note : n variables, m constraints

13
There are three basic steps in formulation of LPM
Step 1 : define the decision variables
how many x1, x2, x3……xn to produce
Step 2 : define the objective function
maximize profit or minimize a cost
Step 3 : define the constraints
resources available to produce something
Step 4 : Determine appropriate values for parameters and determine
whether an upper limit, lower limit or equality is called for.
14
 An electronic firm is undecided at the most profitable mix for its
products. The products manufactured are transistors, resistors and
carbon tubes with a profit of (per 100 units) $ 10, $6 and $4
respectively. To produce a shipment of transistors containing 100
units requires 1 hour of engineering, 10 hours of direct labor and 2
hours of administrative service. To produce 100 units of resistors
requires 1 hour, 4 hours and 2 hours of engineering, direct labor and
administrative time respectively. For 100 unit of carbon tubes it
needs 1 hour, 6 hours and 5 hours of engineering, direct labor and
administrative time respectively. There are 100 hours of engineering
time, 600 hours of direct labor and 300 hours of administrative time
available. Formulate the corresponding LPP.

15
• Let X1- 100 units of transistors
• X2- 100 units of resistors
• X3- 100 units of carbon tubes
Z= 10X1+6X2+4X3
each product will requires
X1+X2+X3
10X1+4X2+6X3
2X1+2X2+5X3
But the total time available for engineering, direct labor
and administrative services is 100, 600 and 300 hours
respectively.

16

17
• DeReal international, produces wooden doors and chairs. Each
doors sells for $27, uses $10 of raw materials and takes $14 of
labor& overhead costs. Each chairs sells for $21, uses $9 of raw
materials, and takes $10 of overhead costs. Each doors needs 2
hours finishing and 1 hour carpentry; each chairs needs 1 hour
finishing and 1 hour carpentry. Raw materials are unlimited, but
only 100 hours of finishing and 80 hours of carpentry are
available each week. Demand for chairs is unlimited; but at
most 40 doors can be sold each week. How many of each should
be made each week to maximize profits.

18
 Decision variables completely describe the
decisions to be made (in this case, by DeReal).
DeReal must decide how many doors and chairs
should be manufactured each week. With this in
mind, we define:
 x1= the number of doors produced per week,
 x2= the number of chairs produced per week,

19
• Objective function: maximizing the total weekly
profit (z).
Here, profit equals to (weekly revenues) – (raw
material purchase cost) – (other variable costs).
 Weekly profit from doors: 27-(10+14)= 3
 Weekly profit from chairs: 21-(9+10)= 2
Hence DeReal’s objective function is:
Max z = 3x1+ 2x2

20
• Constraints: Here there are three constraints:

• Finishing time per week


• Carpentry time per week
• Weekly demand for doors

non-negative values: (DeReal can not


manufacture negative number of doors or chairs!)

21
• The complete Linear Programming (LP) problem

Max z = 3x1+ 2x2 (The Objective function)


st: 2x1+ x2 ≤100 (Finishing constraint)
x1+ x2 ≤80 (Carpentry constraint)
x1 ≤40 (Constraint on demand for doors)
x1, x2 >0 (Sign restrictions)

22
 A farmer is preparing to plant a crop in the spring and needs to
fertilize a field. There are two brands of fertilizer to choose from,
Super-gro and Crop-quick. Each brand yields a specific amount
of nitrogen and phosphate per bag, as follows:
Chemical contribution
Brand Nitrogen (lb/bag) Phosphate (lb/bag)
super-gro 2 4
Crop-quick 4 3

The field requires at least 16 pounds of nitrogen and 24 pounds


of phosphate farmer's . Super-gro costs $6 per bag, and Crop-
quick costs $3. The farmer wants to know how many bags of
each brand to purchase in order to minimize the total cost of
fertilizing. 23
• Decision Variables

x1 = bags of Super-gro

x2 = bags of Crop-quick

The Objective Function

minimize Z = $6x1 + 3x2

where

$6x1 = cost of bags of Super-gro

$3x2 = cost of bags of Crop-quick 24


25
 A Farmer is mixing two types of food, Brand X and
Brand Y, for his cattle. If each serving is required to have
60 grams of protein and 30 grams of fat, where Brand X
has 15 grams of protein and 10 grams of fat and costs 80
cents per unit, and Brand Y contains 20 grams of protein
and 5 grams of fat and costs 50 cents per unit. Formulate
LPM
26
 A Farmer is mixing two types of food, Brand X and
Brand Y, for his cattle. If each serving is required to
have 60 grams of protein and 30 grams of fat, where
Brand X has 15 grams of protein and 10 grams of fat
and costs 80 cents per unit, and Brand Y contains 20
grams of protein and 5 grams of fat and costs 50 cents
per unit. Formulate LPM

27

28
LP Solutions

29
 The linear programming problems can be
solved to determine optimum strategy by
two methods- Graphical and Simplex
method.

30
• Graphical method is suitable when there are
only two decision variables.
• Models with three decision variables can be
graphed in three dimensions, but the process is
quite cumbersome, and
• Models of four or more decision variables
cannot be graphed at all.

31
Step I.

Formulate the LP Problem as explained in the previous class.

Step II.
Convert the inequalities in to equalities to obtain graphical form of the
constraints.

(Draw the line of each constraint, first putting x 1=0 to find the value of x2

and then putting x2=0 to find the value of x1. Then draw the line for the

values of x1 and x2 which represents the particular constraint. Once the


lines are drawn for all the constraints, identify the feasible polygon (area)
by shading the area below the line for the constraint < and shading above
the line for the constraint > type).
32
Step III.
Identify the extreme points of the feasible polygon and name
the Corners.

Step IV.
Evaluate the objective function Z or C for all points of
feasible region.

Step V.
In case of maximizing objective function Z, the corner point
of feasible region giving the maximum value of Z becomes
the value of decision variables. Similarly in minimizing case,
the point of minimum value of C gives the answer.
33

Maximization Problem ==>Maximize Z with
inequalities of constraints in < form.
Example:
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 and $250 from 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.
 How many sets of each model will be produced each
day so that the total profit will be as large as
possible?

34
Resources used per unit
Constraints Model A Model B Maximum Available hrs.
(X1) (X2)

Labor hr. 2 1 40

Machine hr. 1 3 45

Marketing hr. 1 0 12

Profit $300 $250

Solution
1. Formulation of mathematical modeling of LPP St:
Max Z=300X1 +250X2
2X1 +X2<
X1 +3X2< 45 LPP Model 40
X1 < 12
X1, X2 > 0

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

X 1, X 2 =0
X2
X1=0
40 X1=12

15
B

Feasible C (12, 11)


Region X2=0
X1
D
A 12 20 45

36
Maximization Problem…
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)
6. Identify the optimal point
7. Interpret the result

Corners Coordinates MaxZ=300 X1 +250X2


A (0, 0) $0
B (0, 15) $3750

C (12, 11) $6350


D (12, 0) $3600

Interpretation:
12 units of product A and 11 units of product B should be produced so that the total profit
will be $6350.

37
Exercise:
 A manufacturer of light weight mountain tents makes two types of tents,
REGULAR tent and SUPER tent. Each REGULAR tent requires 1 labor-
hour from the cutting department and 3labor-hours from the assembly
department. Each SUPER tent requires 2 labor-hours from the cutting
department and 4 labor-hours from the assembly department .The maximum
labor hours available per week in the cutting department and the assembly
department are 32 and 84 respectively. Moreover, the distributor, because of
demand, will not take more than 12 SUPER tents per week. The
manufacturer sales each REGULAR tents for $160 and costs$110 per tent to
make. Where as SUPER tent ales for $210 per tent and costs $130 per tent
to make.
38
Required:
 Formulate the mathematical model of the problem.
 Using the graphic method, determine how many of each
tent the company should manufacture each week so as
to maximize its profit?
 What is this maximum profit assuming that all the tents
manufactured in each week are sold in that week?
39
B. Minimization Problem
Minimize C= 50x1 + 20x­2
Subject to
2x1 – x2> 0
x1 + 4x2 > 80

0.9x1 + 0.8x2 >40


x1 ,x2 > 0

40
• The first step is skipped as LP problem is already formulated. We
will follow other steps simultaneously. In constraint (i) 2x 1 –x2 >
0 there is no constant value, hence it must pass through the
origin. First convert it into equality.

2x1 –x2 = 0 . Now give x1 any arbitrary value.

When x1 =0, x2=0

x1 =1, x2=2

x1 =2, x2=4 and so on.


41
• We draw the line with these coordinates and get line I drawn in the graph
passing through origin.
• Now, convert constraint (ii) in equality
x1 + 4x2 = 80
When x1 =0, x2=20
X2 =0, x1=80
• We draw the line II (80, 20) as shown in graph.
• Now, convert constraint (iii) in equality
0.9x1 + 0.8x2 =40
• When x1 =0, x2=50
X2 =0, x1=44.4
• We draw line III (44.4, 50) as shown in graph.

42
43
 For feasible area we need to examine all the three constraints
equations (Note, all are > type)
 In equation (i) if we move vertically upward, meaning x1=o and

x2 increasing, the equation becomes negative or less than, which


is not permitted. Hence feasible area should be on RHS.
 In equation (ii), the feasible area should be above the line
because it is greater than the sum of x1 and x2.
 Similarly in equation (iii) it is on the RHS therefore feasible area
(region) is indicated by three rows or shading and extends up to
infinity.
44
Now we have to find out different values of Z at different corner points, B,C,E by
finding out their coordinates (x1, x2) then putting them in objective function Z.
The point which gives the minimum value is the answer.

At corner B x1=16,x2=32 therefore Z= 1440

At corner C x1=34.4,x2=11.4 therefore Z= 1948

At corner E x1=80,x2=0 therefore Z= 4000

From the above we can see that minimum value of Z is at point B where x 1=16

and x2 =32 and hence it is the answer.

45
 A Farmer is mixing two types of food, Brand X and Brand Y,
for his cattle. If each serving is required to have 60 grams of
protein and 30 grams of fat, where Brand X has 15 grams of
protein and 10 grams of fat and costs 80 cents per unit, and
Brand Y contains 20 grams of protein and 5 grams of fat and
costs 50 cents per unit.
 Find the solution using graphical method.

46
47
Answer:
X1 = 2.4
X2 = 1.2
Minimum cost = 2.52

48
 A company owns two flour mills viz. A and B, which have different production
capacities for high, medium and low quality flour. The company has entered a
contract to supply flour to a firm every month with at least 8, 12 and 24
quintals of high, medium and low quality respectively. It costs the company
Rs.2000 and Rs.1500 per day to run mill A and B respectively. On a day, Mill A
produces 6, 2 and 4 quintals of high, medium and low quality flour, Mill B
produces 2, 4 and 12 quintals of high, medium and low quality flour
respectively. How many days per month should each mill be operated in order
to meet the contract order most economically?
 Min C = 5125 The minimum value is at the extreme point B, which is the
value of the M (objective function). The optimum values variables are X1 = 0.5
and X2 = 2.75. 49
Simplex
Algorithm
50
 Geometric (graphical method) of solving LPP is useful only for
problems involving two DVs and relatively few problem
constraints.
 What happen when we need more DVs and more problem
constraints?
 We use an algebraic method called the simplex method, which
was developed by George B Dantzig in 1947.

51
• The simplex Algorithm is an iterative procedure for
finding the optimal solution that comes from the corner
points of the feasible region.
• Simplex algorithm considers only those feasible
solutions which are provided by the corner points and
that too not all of them. It is very efficient algorithm.
• The technique also has the merit to indicate whether a
given solution is optimal or not.
• formulated by G. Dantzig in 1947.

52
• Standard Form: linear relationships of objective function and
constraints, making RHS of constraints as equal produces standard
form, whereas the inequality situation is called canonical form
• Slack/surplus and Artificial Variables: these are generally designated
as S1, S2 . . . . etc. and A1, A2 etc. respectively
• Slack variables indicate unused capacity of a constraint added in ‘≤’
constraints
• Slack variables represent the unused resources between the left-hand
side and right-hand side of each inequality.
• Surplus variables indicate excess usage of resources which is deducted
from the right hand side value of a ≥ a constraint
53
• Artificial variables are imaginary
variables added in ‘=‘ & ≥ constraints to
have the standard form
• Simplex Table: A table used for
calculations during various iterations of
the simplex procedure, is called Simplex
table

54
 Basic variables are selected arbitrarily with the restriction
that there be as many basic variables as there are equations.
The remaining variables are non-basic variables.

x1  2 x2  s1 32
3 x1  4 x2  s2 84
 This system has two equations, we can select any two of the
four variables as basic variables. The remaining two
variables are then non-basic variables. A solution found by
setting the two non-basic variables equal to 0 and solving for
the two basic variables is a basic solution. If a
basic solution has no negative values, it is a
basic feasible solution.
55
• Max Z = 6X1 + 8X2
– S.t 5X1 + 10X2 ≤ 60
4X1 + 4X2 ≤ 40
X1, X2 >= 0

The Standard form of the LPM:


• Max Z = 6X1 + 8X2 + 0S1 + 0S2
– S.t 5X1 + 10X2 + S1 = 60
4X1 + 4X2 + S2 = 40
X1, X2, S1, S2, ≥ 0
» Since slack does not provide any real contribution to the obj. fun,
each slack variable is assigned a coefficient of zero in the
objective function

56
57
• Cj = the coefficient of the variables in the
objective function in the standard form.
• Cb = the coefficient of basic variables in the
obj. fun.
• X1, X2, ..Xn = decision variables .
• S1, s2, Sn = basic variables (slack).
• a11, a12,… coefficient of DV in the constraint
set.
• 1, 0, 1 are coefficient of basic variables in the
constraints set.
• RHSV = the right hand side value of the
constraints.
58
• Cj - Zj = Index Row: The row containing net profit
or loss resulting from introducing one unit of the
variable in that column in the solution. A positive
number in the index row would indicate an algebraic
reduction or increment in the objective function if
one unit of the variable of that column is introduced
in the basis
• Pivot -Column: The column with the largest positive
number in Cj - Zj row in a maximization problem or
the smallest number in a minimization problem is
called Pivot column. This indicates the variable
entering the solution in the next iteration by replacing
an appropriate variable.

59
• Pivot Row: it is the ratio of quantities
divided by of the Pivot column which
indicates the outgoing variable to be
replaced by the entering variable. This
would be the one with the smallest
positive value of the ratio column
• Pivot Element: The element at the
point of intersection of the key column
and the key row is called the Pivot
element

60
61
 Step 1: Write the problem in
Standard form
 Max Profit = $70T + $50C + 0S1 + 0S2
 Subject to:
 2T + 1C + 1S1 + 0S2 = 100
 4T + 3C + 0S1 + 1S2 = 240
 T, C, S1, S2 ≥ 0

62
63
• The number in the first row represent the coefficients
in the first constraint and the numbers in the second
row is the coefficients in the second constraint
• Initial solution is T = 0 and C= 0 a, So, S1 = 100 and
S2 = 240, max of Z = 0
• The two slack variables are the initial solution mix
where the values are found in the Quantity column
• The Substitution Rates:
– The coefficient of the constraint equations are the
substitution rates
– Using variable T, to produce 1table; 2 units of S1
and 4units of S2 have to be removed from the
solution, has to be consumed
– Using variable C: to produce 1 chair; 1 unit of S1 and
3units of S2 should be consumed or removed from
the solution mix
– The slack variables should make an identify matrix

64
• The Cj – Zj number in each column represents the
net profit that will result from introducing 1 unit
of each DV
• It is computed by subtracting the Zj total for each
column from the Cj value at the very top of that
variable's column
• Obviously with a profit of $0, the initial solution is
not optimal
• By examining the numbers in the Cj – Zj row in
the table, we can see that the total profits can be
increased by $70 for each unit of T and $50 for
each unit of C
• A negative number in Cj – Zj row would tell us
that the profits would decrease if the
corresponding variables were added to the
solution mix
• An optimal solution is reached when there are no
positive numbers in the Cj - Zj row in case of
maximization problem 65
• Determining the entering variable: For a
maximization problem; the entering variable is identified as
the one which has the largest positive value in Cj-Z row.
The column which corresponds to the entering variable in
the simplex tableau is called pivot column.
• In a minimization problem, the entering variable is
identified as the one which has the largest negative Cj-Z row
value in the simplex tableau.
• Determining the leaving variable: the leaving
variable is identified as the one with the smallest non-
negativity ratio for quantity divided by respective positive
pivot columnar entries. The row of the leaving variable is
pivot row
• The number at the intersection of the pivot row and pivot
column is the pivot number pivot number
66
• All the pivot column elements except the
pivot number (has to be 1) should be
changed to Zero by applying row operation

67
2 1 1 0 100
Divide all the pivot row by the pivot number i,e,. By 2
1 0.5 0.5 0 50
Apply row operation to change the pivot column elements to be zero,
keeping that the pivot number to be one
The operation is applicable to all of the row elements
Row operation: -4R1 + R2 = R2
-4 -2 -2 0 -200
4 3 0 1 240
When you sum up the above two rows using the operation the resulting R2
value will be:
0 1 -2 1 40

68
69
• The current solution is 50 tables and zero
chairs generates a profit of $3500
• T is a basic variable and C is a non-basic
variable here
• Slack variable S2 is the unused time in
the carpentry dep’t and is in the basis..
Its value implies there is 40 hours of
unused carpentry time remaining.
• Slack variable S1 is non basic and it
means no unused time in the painting
dep’t

70
• The substitutions:
– In column C, if 1 unit of C is added to the
current solution, 0.5 unit of T and 1 unit of S2
must be given up
– Because these are marginal rate of
substitution, so only 1 more unit of S2 is
needed to produce 1 chair
– In column S1, the substitution rates means
that if 1 hour of slack painting time is added to
produce a chair, 0.5 less of a table will be
produced
• Cj – Zj row is important for two reasons:
– First, it indicates whether the current solution
is optimal – when there are no positive values
in the bottom row, an optimal solution to a
maximization LP has been reached
– Second, we use it to determine which variable
will enter the solution mix 71
72
73
 Therefore, optimal solution is reach now
because all the elements in the last row
is zero and negative and hence:
 T = 30units
 C= 40 units and
 Max Profit = $4100

 S1 = 0 and S2 = 0

74
• Max Z = 60X1+ 50X2
Subject to
4X1+10X2 ≤ 100
2X1 + X2 ≤ 22
3X1 + 3X2 ≤ 39
X1, X2 >0

75
76
Select the leaving variable as the one that has the
smallest nonnegative ratio of quantity divided by
substitution rate.

77
Interpreting the Second Tableau

At this point, variables s1, x1, and s3 are in solution. Not only are they listed in

the basis, they also have a 0 in row C – Z. The solution at this point is s1 = 56,

x1 = 11, and s3 = 6.

Note, that x2 and s2 are not in solution. Hence, they are each equal to zero.
The profit at this point is $660, which is read in the Quantity column in row
78
79
Interpreting the Third Tableau
In this tableau, all of the values in the bottom row are
either negative or zero, indicating that no additional
potential for improvement exists. Hence, this tableau
contains the optimal simplex solution, which is
s1 = 24
x1 = 9
x2 = 4
80
• Maximize Z = 30x1 + 40x2
Subject to, 60x1 + 120x2 < 12,000
8x1 + 5x2 < 600
3x1 + 4x2 < 500
x1, x2 > 0
Answer
X1= 200/11
X2=1000/11
Profit= 46,000/11

81
Simplex Algorithm-
Minimization problem

82
• Some of the important aspects of minimization problem
1. Artificial variables have no economic significance
• Introduced only to bring in the standard form of simplex
method.
• Need be removed from the solution as soon as they become
non-basic.
2. Since these variables are added for computation purpose only,
• ensure their zero value in the optional solution.
• This can be done by assigning very large penalty (+M) for a
minimization problem, so that these do not enter the
solution.

83
3. If artificial variables cannot be removed from the solution,
then the solution so obtained is said to be Non-Feasible. This
would indicate that the resources of the system are not sufficient
to meet the expected demand.
4. Equality Constraints also can be handled by using artificial
variables to obtain initial solution.

84
 Big M-Method
 In this method, we assign the coefficients of the
artificial variables, as a very large positive
penalty i.e., +M therefore called Big M-
method.

85
• The Big M-method for solving LP problem can be adopted
as follows:
Step 1 : The standard simplex table can be obtained by
subtracting a surplus variable and adding an
artificial variables.
• Slack variables are assigned zero coefficients and
artificial variables assigned +M coefficients in the
objective function.
Step 2: We obtain initial basic feasible solution by assigning
zero value to the decision and slack variables.

86
Step 3: Initial basic feasible solution is obtained in
the form of the simplex table as above and then
values of ∆j = Cj - Zj are calculated.
If ∆j ≥0, then the optimal solution has been
obtained.
If ∆j< 0, then we select the largest negative value of
∆j and this column becomes the key column
indicating the entering variable.

87
Step 4: Determine the key row as in case of
maximization problem i.e., selecting the lowest
positive value of the ratio Q or bi/aij, obtained by
dividing the value of quantity bi by corresponding
element of the key column.

88
 Step 5: Repeat steps 3 and 4 to ensure optimal
solution with no artificial variable in the solution.
If at least one artificial variable is present in the
basis with zero value and coefficient of M in each
Cj - Zj values is negative, the LP problem has no
solution. This basic solution will be treated as
degenerate.
 A tie for the pivot row is broken arbitrarily and
can lead to degeneracy.

89
• If at least one artificial variable is present in
the basis with positive value, and coefficient of
M in each Cj - Zj values is non-negative, then
LP problem has no optimal basic feasible
solution. It is called pseudo-optimum
solution.

90
 Food A contains 20 units of vitamin X and 40 units
of vitamin Y per gram. Food B contains 30 units
each of vitamin X and Y. The daily minimum
human requirements of vitamin X and Y are 900
and 1200units respectively. How many grams of
each type of food should be consumed so as to
minimize the cost, if food A costs 60 cents per
gram and food B costs 80 cents per gram.

91
• LPP formulation is as follows

Min. Z = 60x1+ 80x2 (Total Cost)

Subject to, 20x1 + 30x2 > 900 (Vitamin X


Constraint)

40x1 + 30x2 > 1,200 (Vitamin Y

Constraint) and x1, x2 > 0

92
• Adding slack and artificial variables, we get

Min. Z = 60x1 + 80x2 + 0S1 + 0S2 + MA1 + MA2

Subject to, 20x1 + 30x2 – S1 + A1 = 900

40x1 + 30x2 - S2 + A2 = 1,200

and x1, x2, S1, S2, A1, A2 > 0

93
simplex table I
Zj Cj 60 80 0 0 M M Ratio
BV x1 x2 s1 s2 A1 A2 Q
M A1 20 30 -1 0 1 0 900 45
M A2 40 30 0 -1 0 1 1200 30

Zj 60M 60M -M -M M M 2100M


Cj-Zj 60- 80- M M 0 0
60M 60M

Since ∆j = 60 – 60M is the lowest, x1 becomes


the entering variable, similarly Ratio bi/aij =
30 is lowest positive value, hence it goes out. 94
Zj Cj 60 80 0 0 M Ratio
BV x1 x2 s1 s2 A1 Q Q/aij
M A1 0 15 -1 1/2 1 300 20
6 X1 1 3/4 0 -1/40 0 30 40
0
Zj 60 45+15M -M 3/2+1/2M M 1800+300
M
Cj- 0 35-15M M (3-M)/2 0
Zj
Since ∆j = 35 – 15M is the lowest, x1 becomes
the entering variable, similarly Ratio bi/aij =
20 is lowest positive value, hence it goes out.
95
Simplex table III

Zj Cj 60 80 0 0
BV x1 x2 s1 s2 Q
8 X2 0 1 -1/15 1/30 20
0
6 X1 1 0 1/20 -1/20 15
0
Zj 60 80 -7/3 -1/3 2500
Cj- 0 0 7/3 1/3
Zj

Since ∆j = zero and positive value, hence this


the solution.
96
98
X1 – entering variable and A2 – the leaving variable
and the Pivot element is 8
Row operation: New R2 = 1/8 *Old R2 to make
the pivot element ONE
– New R1 = -3 * New R2 + Old R1 to make the
pivot column elements ZERO except the key
element
 X2 – entering variable and A1 – exiting
variable and key element is 9/2
 Row operation:
 New R1 = 2/9 * Old R1 to make the pivot
element ONE
 New R2 = -1/2 * New R1 + Old R2 to make the
pivot column elements ZERO except the key
element
 Do we reach at optimal? Yes, b/c in case of
minimization, if all the C-Z row are zero
and positive, it indicates optimality is
attained
 Therefore, X1 = 20/3 X2 = 8/3 S1 =
0 S2 = 0
 and Min Z = 212/3
102
103
simplex table I
Zj Cj 4 2 0 0 M M Ratio
BV Q x1 x2 s1 s2 A1 A2
M A1 3 3 1 0 0 1 0 1
M A2 6 4 3 -1 0 0 1 6/4
0 S2 3 1 2 0 1 0 0 3
Zj 9M 7M 4M -M 0 M M
Cj-Zj 4-7M 2-4M M 0 0 0

104
• X1= Q X1 X2 S1 S2 A2
3 3 1 0 0 0
3/3 3/3 1/3 0/3 0/3 0/3
new row= 1 1 1/3 0 0 0
• New row= old row – corresponding coefficient new
tableau
in pivot column X
row value

row A2, Q= 6-(4x1) = 2 S2, Q= 3-(1x1)= 2


X1= 4-(4x1)=0 X1= 1-(1x1)=0

X2= 3-(4x1/3)=5/3 X2= 2-(1x1/3)=5/3

S1= -1-(4x0)= -1 S1= 0-(1x0)=0

S2= 0-(4x0)= 0 S2= 1-(1x0)=1


105
Revised simplex table II

Zj Cj 4 2 0 0 M Ratio
BV Q x1 x2 s1 s2 A2
4 X1 1 1 1/3 0 0 0 3
M A2 2 0 5/3 -1 0 1 6/5
0 S2 2 0 5/3 0 1 0 6/5
Zj 4+2M 4 4/3+5/3 -M 0 M
M
Cj-Zj 0 2-5M/3 M 0 0

Select near to the top

106
• X2= Q X1 X2 S1 S2
2 0 5/3 -1 0

2/5/3 0/5/3 5/3/5/3 -1/5/3


0/5/3
new row= 6/5 0 1 -3/5 0

• New row= old row – corresponding coefficient new


tableau
in pivot column X
row value

row X1, Q= 1-(1/3x6/5) = 9/15 S2, Q= 2-(5/3x6/5)= 0


X1= 1-(1/3x0)= 1 X1= 0-(5/3x0)= 0

X2= 1/3-(1/3x1)= 0 X2= 5/3-(5/3x1)= 0

S1= 0-(1/3x-3/5)= 1/5 S1= 0-(5/3x-3/5)=1 107


Optimal solution simplex table III
Zj Cj 4 2 0 0
BV Q x1 x2 s1 s2
4 X1 9/15 1 0 1/5 0
2 X2 6/5 0 1 -3/5 0
0 S2 0 0 0 1 0
Zj 72/15 4 2 -2/5 0
Cj-Zj 0 0 0 0

This is the optimal solution, with X1= 3/5


X2= 6/5
and
total cost= 72/15

108
• The basic simplex solution of typical maximization and
minimization problems has been shown in this chapter.
However, there are several special types of atypical
linear programming problems.
• For irregular problems the general simplex procedure
does not always apply.
These special types include problems with more than one
optimal solution, infeasible problems, problems with
unbounded solutions, problems with ties for the pivot
column or ties for the pivot row, and problems with
constraints with negative quantity values.
109
40

Profit @ corner B
30

A and C is equal
20

(1200)
B
10

FR
C
10 20 30 40 50
110
111
The three constraints do not overlap to form a feasible
solution area. Because no point satisfies all three constraints
simultaneously, there is no solution to the problem.

X1= 4
8

X2=6 C
6

B
4

4X1+2X2=8
2

A
C
2 4 6 8 10
112
 In some problems the feasible solution area
formed by the model constraints is not closed.
In these cases it is possible for the objective
function to increase indefinitely without ever
reaching a maximum value because it never
reaches the boundary of the feasible solution
area.
 In an unbounded problem the objective function
can increase indefinitely because the solution
space is not closed. 113
But unlimited profits are
not possible in the real
world; unbounded
solution, like an infeasible
solution, atypically reflects
an error in defining the
problem or in formulating
10

the model
Z=
8

4X

The objective function is


6

1+
2X
2 4

shown to increase without


2

FR bound; thus, the solution is


2 4 6 8 10
never reached
114
• Sensitivity analysis
• Duality

• Carried out after the optimal


solution is found
• Is begins with the final simplex
tableau
115
 Examination of the impacts of changes of
parameters on the optimal solution.
 i.e. change of coefficient of the constraints,
change of coefficient of the objective function,
change of quantity of RHS values.
 Starts with the final tableau of the LPP (simplex
tableau)

116
 Shadow prices: ==>How much should a firm
be willing to pay to make additional resources
available?
 Shadow prices signify the change in the
optimal value of the objective function for 1
unit increases in the value of the RHS of the
constraint that represent the availability of
scarce resources.
 The negative of the number of Cj - Zj row in its
slack variable columns provide as with
shadow prices. Or: shadow prices are found in
the Zj row of the final simplex tableau in the
slack variable columns.
117

• The LPM of the micro computer problem
above is:

Max Z: 60x1+50x2

Subject to:

Assembly time: 4X1+10x2≤100

Inspection time: 2x1+x2≤22

Storage space: 3x1+3x2≤39

x1, x2≥0 118


Basis Cj 60 50 0 0 0 Quantit
X1 X2 S1 S2 S3 y
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

Cj-Z 0 0 0 10 -40/3

Shadow price
119
• From the above tableau; the shadow prices are $

0 for S1, $10 for S2 and $40/3 for S3.

• for example, an increase of S1 by one unit will

resulted increment of objective value by $10.

• Similarly the opposite is true, i.e. decrease of 1

unit of S1 will be resulted in reduction of

objective value by $0.

• But to what extent this change hold true?

• Because we can’t increase or decrease the

constraint infinitely, there are upper and lower120


 The range of feasibility is the range over which
the RHS value of a constraint can be changed
and still have the same shadow prices.

121
 The range within which resources/constraints
can changed having the proportionate change in
objective value

122
Step 1. compute the ratio (feasibility ratio) quantity
respective slack
value = Q/S
both –ve and +ve ratio are considered
Step 2. identify the smallest +ve ratio and –ve ratio closest to
zero
Step 3. find the upper limit or allowable increase and lower
limit or allowable decrease (range of feasibility)
Closest to zero
Upper limit= the original value - negative ratio
Lower limit= the original value – positive ratio
For both max and min problems
123
Cj 60 50 0 0 0
Zj Bv Q X1 X2 S1 S2 S3
0 S1 24 0 0 1 6 -16/3
60 X1 9 1 0 0 -1 -1/3
50 X2 4 0 1 0 -1 2/3
Zj 740 60 50 0 10 40/3
Cj-Zj 0 0 0 -10 -40/3

124
1. Recall the original value of the resources
Original value constraints S1 S2
S3
100 S1 1 6
-16/3
101 S2 0 -1
-1/3
39 S3 0 -1
2/3
2. ratio = Q/respective slack values
S1= 24/1= 24 S2= 24/6= 4 S3=
24/-16/3= -4.5
9/0= undefined 9/-1= -9 125
Constraints Original value Lower limit Upper limit Range of
feasibility

S1 100 100-24= 76 100+∞ 76-∞

S2 22 22-4= 18 22+4= 26 18-26

S3 39 39-6 = 33 39+4.5=43.5 33-43.5

Therefore:
Constraint one (assembly line): 100-24 up to 100+∞= 76-∞
Constraint two (inspection time): 22-4 up to 22-4= 18-26
Constraint three (storage space): 39-6 up to 39+4.5= 33-43.5
126
First constraint:

Each hour decrease in assembly time will decrease the current profit by Birr 0 (i.e no

effect-indicated by shadow price) as long as the decrease is up to 24 hours. But if the

assembly time decreases by more than 24 hours (or if the total available assembly time is

lower than 76 hours), the current shadow price will no longer be valid. That is, the profit

will be affected. But available assembly time can increase indefinitely (=allowable

increase is ∞ ) without affecting the current profit level.

Second constraint:

Similarly, Each hour increase or decrease in inspection time will increase or decrease the

127
Range of optimality
the range over which the objective function
coefficient of basic variables can change
without changing the optimal values i.e.
without changing basic and non basic
variables but change the optimal function
value.
128
For both max and min
problems

129
Cj 60 50
Zj BV Q X1 X2 S1 S2 S3
0 S1 24 0 0 1 6 -
16/3
60 X1 9 1 0 0 1 -1/3
50 X2 4 0 1 0 -1 2/3
Zj 740 60 50 0 10 40/3
Cj-Zj 0 0 0 -10 -
40/3
 Determine the range of insignificant for S2
and the range of optimality for decision
variables

130
X1 Cj- 0 0 0 - -
Zj 10 40/
X1
X1values
valuesin
inthe
the 1 0 0 1 -1/3
3 X2 Cj- 0 0 0 - -
tableau
tableau Zj 10 40/3
0 1 0 -1 2/3
∞ ∞ ∞ -10 40

• Upper limit= 60+40= 100 ∞ ∞ ∞ 10 -20

• Lower limit= 60-10= 50 • Upper limit= 50+10= 60

• Range of optimality of X1(1st DV)= 50-100 • Lower limit= 50-20= 30

• Range of optimality of X2(2nd DV)=


30-60

131
EXERCISE:
Solve the following LPP using simplex
method. A firm that manufactures both
lawn mowers and snow blowers:
X1 =the number of lawn mowers
X2 =the number of snow
blowers
Max.Z=$30x1+$80x2
Subject to:
2 x1+4x2 < 1000 Labor hours available
6x1 + 2x2 < 1,200 pound of steel
available
x2 < 20 snow blower engine 132
b. What are the shadow prices? When the
optimal solution has been reached, which
resource has the highest marginal value?
Answer:
The shadow price for 1 additional
labor=$0
The shadow price for 1 additional pound
of steel=$5.01
The shadow price for 1 additional snow
blowers engine made available =$70.01
Thus, snow blower engine have the highest

marginal value at the optimal solution.

133
c. Over what range in each of the
RHS values are these shadows
valid?
Answer:
The shadow price for labor hours is
valid from 466.66 hours to an infinite.
The shadow price for pounds of steel is
valid from 40 pounds up to 2800pounds
The shadow price for snow blower
engines ranges from 0 engines up to 180
engines
d. What are the ranges over which
134
• The mirror image of LPP
A given LPP has two forms
1. The Primal: the original LP Model
2. The Dual: alternative
How to convert the primal to its dual and vice
versa?
Maximization objective of the primal=
minimization objective of the Dual. 135
Every LPP has another LPP
associated with it, which is called
its dual.
The first way of starting a linear
problem is called the primal of the
problem.
The second way of starting the
same problem is called the dual.
 The optimal solutions for the
primal and the dual are equivalent,
but they are derived through 136
Primal-Dual Relationship
Primal Dual
Objective is minimization Objective is maximization and vice
versa
> type constraints < type constraints

No of columns No of rows

No of rows No of columns

No of decision variables No of constraints

No of constraints No of decision variables

Coefficient of Object function RHS value

RHS value Coefficient of Object function

Duality Advantage
1. The dual form provides an alternative form
2. The dual reduces the computational difficulties associated with some
formulation
3. The dual provides an important economic interpretation concerning the
value of scars resources used. 137
Example: 1
Write the duals to the following
problems
a. Max.Z=5x1+6x2
Subject to:
2x1+3x2 < 3000 (Labor constraint)
5x1 + 7x2 < 1000 (Machine constraint)
x1 + x2 < 5000 (Market constraint)
Solution
xRepresent
1, x2primal
>0 in the conventional table as follows

Dual variables x1 x2 Constraints


u1 2 3 < 3000
u2 5 7 < 1000
u3 1 1 < 500

MaxZ 5 6
By referring the above table, dual for this can be stated
as:
138
MinZ*=3000 u1 +1000 u2 +500 u3
St:
2u1+5u2 + u3> 5
3u1+7u2 + u3> 6
u1, u2 , u3> 0
Note:
For maximizing, all constraints must be brought to “<” form
For minimizing, all constraints must be brought to “>” form
If they are not, use multiplication factor -1
“=” is an intersection of “>” and “< “

139
b. Max.Z=60x1+50x2
Subject to:
2x1+4x2 < 80
3x1 + 2x2 < 60
x1 < 15
2x2 < 36
x1, x2 > 0
Solution
Primal is represented in the table as follows:
Dual variables x1 x2 Constraints
u1 2 4 < 80
u2 3 2 < 60
u3 1 0 < 15
u4 0 2 < 36
MaxZ 60 50

The dual form is:


MinZ*=80 u1 +60u2 +15u3+36u4
St::
2u1+3u2 + u3 > 60
4u1+2u2 + u4 > 50
u1, u2 , u3, u4 > 0 140
C. Obtain the dual problem of the following primal
LPP
Min.Z=x1+2x2
Subject to:
2x1+4x2 < 160
x1 - x2 = 30
Solution x1 > 10
Rule: x1, x2 > 0
1.For a maximization primal with all < type constraints there exists a
minimization dual problem with all > type constraints and vice versa.
Thus, the inequality sign is reversed in all the constraints except the
non-negativity conditions.
2.Transform the < type constraint to a > type constraint by
multiplying the constraint by -1.
3.Write the = type constraint equivalent to two constraints of the
type > and <.
The standard primal LPP so obtained is:
Min.Z=x1+2x2

Subject to:
-2x1-4x2 > -160
x1 - x2 > 30
-x1 + x2 > -30
x1 > 10
x1, x2 > 0 141
Let u1, u2 , u3, and u4 be the dual variables corresponding
to the four constraints in given order, then the dual of the given
primal problem can be formulated as follows:
MaxZ*=-160 u1+30 u2-30 u3+10 u4

St:
-2u1+ u2- u3+ u4 < 1
-4u1- u2+ u3 <2
u1, u2 , u3, u4 >0
Let u= u2-u3, then the above dual problem reduces to the form:
MaxZ*=-160 u1+30 u2-30 u3+10
St:
-2u1+ u+ u4 < 1
-4u1-u <2
u1, u4 > 0, u unrestricted in sign
Here it may be noted that the second constraint in the primal is
equality. Therefore, the corresponding dual u2 should be
unrestricted in sign.
142
 The doctor advises a patient visited him that the patient is weak in
his health due to shortage of two vitamins, i.e., vitamin X and
vitamin Y. He advises him to take at least 40 units of vitamin X and
50 units of Vitamin Y everyday. He also advises that these vitamins
are available in two tonics A and B. Each unit of tonic A consists of 2
units of vitamin X and 3 units of vitamin Y. Each unit of tonic B
consists of 4 units of vitamin X and 2 units of vitamin Y. Tonic A and
Bare available in the medical shop at a cost of ETB 3 per unit of A
and ETB 2.50 per unit of B. The patient has to fulfill the need of
vitamin by consuming A and B at a minimum cost.

143
• If we solve and get the solution of the primal
problem, we can read the answer of dual
problem from the primal solution.
Primal problem: Dual Problem:
Min C= 3X1+ 2.5X2 Max Z=
40Y1+ 50Y2
st: 2X1+ 4X2 ≥40 St:
2y1+ 3y2 ≤3
3X1+ 2X2 ≥50
144
Solution to primal (minimization)
CJ 3 2.5 0 0 M M
Zj Bv Q X1 X2 S1 S2 A1 A2
2.5 X2 5/2 0 1 -3/8 1/4 3/8 -1/4
3 X1 15 1 0 1/4 -1/2 -1/4 1/2
Zj 51.25 3 2.5 -3/16 -7/8 3/16 7/8
Cj-Zj 0 0 3/16 7/8 M- M-7/8
3/16

Solution to dual (maximization)


CJ 40 50 0 0
Zj Bv Q Y1 Y2 S1 S2
50 Y2 7/8 0 1 1/2 -1/4
40 Y1 3/16 1 0 -1/4 3/8
Zj 51.25 3 2.5 15 5/8
Cj-Zj 0 0 -15 -5/2

Answer: Y1= 3/16 Y2= 7/8 profit= 51.25 145


The END!

146

You might also like