BA 35 Unit III Linear Programming
BA 35 Unit III Linear Programming
Unit III
LINEAR PROGRAMMING
Linear
Minimize cost
programming
A. Linear Programming - Graphical
Method
Lesson
LINEAR PROGRAMMING
seek to achieve the best possible solution under restraining conditions
11/11/2024 7
Lesson
LINEAR PROGRAMMING
LINEAR PROGRAMMING PROGRAM
• Direct • Use of • Set of
proportionality of mathematical instructions
relationships of techniques
the variables • Obtain possible
solution
• Limited resources
11/11/2024 8
Lesson
Characteristics of Linear Programming
Objective
Alternative
Objective Action function and
courses of actions
constraints
• To maximize • Must be • Expressed in • There are
• To minimize constrained linear equations course of
• Decision and liner actions to
variables must inequalities choose from.
not violate the
constraints
11/11/2024 9
Lesson
Ways of Solving LP Problems
Graphical Method
• use graphs in finding the optimal solution.
• used only when there are only two variables involved
Simplex Method
• iterative process of mathematically moving from an extreme point to another point
• introduced by George B. Dantzig of Stanford University in 1947
• highly efficient method of solving more complex linear programming problems (two or
more variables involved.
11/11/2024 10
Lesson
Main Parts of LP Problems
Decision Objective Constraints Parameters
Variables Function
11/11/2024 11
Lesson
Types of Constraints
11/11/2024 12
Lesson
Solutions
Optimal Solution
solution that makes the objective function as large as possible in
the case of maximization and as small as possible in the case of
minimization
Feasible Solution
set of all points in the graph that will satisfy the constraints
11/11/2024 13
Lesson
Method in Finding Optimal Solution
Corner-point Method
11/11/2024 14
LINEAR PROGRAMMING
Graphical Method:
Maximization Problem
11/11/2024 16
Lesson
Problem #1
Decision Variables:
Let x = number of Model E to produce to maximize profit
y = number of Model V to produce to maximize profit
Machine A Machine B Profit
Model E (x) 1x 3x 5x
Model V (y) 2y 2y 6y
Available Time ≤ 8 hrs ≤ 12 hrs
11/11/2024 17
Lesson
Solution: Graph of the Constraints
x + 2y ≤ 8 7
x + 2y = 8 6
X Y
0 4
8 0 5
3x+2y=12
(0,4)
4
3x + 2y ≤ 12 (2,3)
3x + 2y = 12 3
X Y
0 6 2
4 0
x+2y=8
1
(0,0) (4,0)
0
0 1 2 3 4 5 6 7 8 9
11/11/2024 18
Lesson
Solution: Finding the Optimal Solution:
Vertices Objective Function: 5x + 6y
(0,4) 5(0) + 6(4) = 24
(4,0) 5(4) + 6(0) = 20
(2,3) 5(2) + 6(3) = 28
(0,0) 5(0) + 6(0) = 0
11/11/2024 19
Lesson
Problem # 2
JRC Products, Inc. produces two brands of cat food called Kitty-C and Kitty-D.
Contributions from Kitty-C is Php50 per pack while Kitty-D yield a contribution of
Php60 per pack. Both products are blended from two basic ingredients – a
protein source and a carbohydrate source products require the following
ingredients:
Products Protein Carbohydrates
Kitty – C 4kgs 4kgs
Kitty – D 2kgs 1kg
For the week only 700kg of protein source and 500 kgs carbohydrates source are available.
How many bags of each of the two brands should be produced to maximize profit?
11/11/2024 20
Lesson
Solution:
Decision Variables:
11/11/2024 21
Lesson
Solution: Graph of the Constraints
4x + 2y ≤ 700
525
500
4x + 2y = 700 475
X Y 450
425
0 350 400
175 0 375 (0,350)
350
325
300
4x + y ≤500 (0,4)
275 (2,3)
4x + y = 500 250
225
(75,200)
X Y 200
0 500 175
125 0 150
125
100
(0,0)
75 (4,0)
50
25
(0,0) (125,0)
0
0 25 50 75 100 125 150 175 200
11/11/2024 22
Lesson
Solution: Finding the Optimal Solution
Vertices Max Profit: 50x + 60y
(0,0) 50(0) + 60(0) = 0
(0,350) 50(0) + 60(350) = 21,000
(75,200) 50(75) + 60(200) = 15,750
(125,0) 50(125) + 60(0) = 6,250
11/11/2024 23
Lesson
Problem # 3
Kraftcorp manufactures two molded plastic saucer-like toys, E and J.
Each of these products must go through two manufacturing process, A and B.
Each unit of Toy E requires one hour in Process A and 2 hours in Process B.
Each unit of Toy J requires two hours in Process A and one hour in Process B.
The machinery supporting Process A currently has weekly machine-
hour capacity of 100 hours, and the weekly capacity of Process B machinery
is 90 machine hours. Per unit profit on Toy E and J are 100 and 150 pesos,
respectively.
Determine the optimal product mix for Kraftcorp to maximize profit.
11/11/2024 24
Lesson
Solution:
Decision Variables:
11/11/2024 25
Lesson
Solution: Graph of the Constraints
100
x + 2y ≤ 100
90 Use the algebraic method or
x + 2y = 100 the Cramer’s Rule to find the
X Y 80 2x+y=90 exact location of the
0 50 intersection of the lines since
100 0 70
we don’t have an exact scale
60 on the graph
(0,50)
2x + y ≤ 90 50
2x + y = 90 40 (27,37)
X Y
0 90 30
45 0
20 x+2y=100
10
(0,0) (45,0)
0
0 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 100 105
11/11/2024 26
Lesson
Solution: Finding the Optimal Solution
Vertices Max Profit: 100x + 150y
(0,0) 100(0) + 150(4) = 0
(0,50) 100(0) + 150(50) = 7,500
(27,37) 100(27) + 150(37) = 8,250
(45,0) 100(45) + 150(0) = 4,500
11/11/2024 27
Lesson
Problem # 4
A baker wants to bake two kinds of cookies which both needed raisins
and walnuts as ingredients. A dozen of the first kind needs 2 ounces of
walnuts and 3 ounces of raisins while a dozen of the second kind requires 2
ounces of walnuts and 5 ounces of raisins.
Since the baker has not yet replenish his stock of ingredients, he found
out that he has only two pounds of walnuts and 3 pounds and 5 ounces of
raisins left.
If he wants to maximize his profit, how many dozens of each kind
should he bake if his profit for a dozen of the first kind is 48 pesos and for the
second kind is 60 pesos? (Convert pounds to ounces, 1lb=16 ounces)
11/11/2024 28
Lesson
Solution:
Decision Variables:
11/11/2024 29
Lesson
Solution: Graph of the Constraints
25
3x + 5y ≤ 53
3x + 5y = 53 10.6
X Y
0 10.60
17.67 0 (13.5,2.5)
0
0
0 25
0
11/11/2024 3x+5y=53 30
Lesson
Solution: Finding the Optimal Solution
Vertices Max Profit: 48x + 60y
(0,0) 48(0) + 60(4) = 0
(0,10.60) 48(0) + 60(10.6) = 636
(13.5,2.5) 48(13.5) + 60(2.5) = 798
(16,0) 48(16) + 60(0) = 768
Decision:
Product Mix: To maximize profit to Php 798,
x = 13.5 dozens of cookie 1 the baker should produce 13.5
y = 2.5 dozens of cookie 2 dozens of cookie 1 and 2.5 dozens
Maximum Profit: Php 798 of cookie 2.
11/11/2024 31
LINEAR PROGRAMMING
Graphical Method:
Minimization Problem
11/11/2024 33
Lesson
Solution:
Decision Variables:
Let X = number of kilos of Ingredient A to be mixed to minimize cost
Y = number of kilos of Ingredient B to be mixed to minimize cost
Objective Function: Minimize Cost: 190X
+ 235Y
Constraints:
Explicit: Implicit:
X + Y = 50 X + Y > 0 (Mixture)
X 15
X ≤ 30
Y 15
11/11/2024 34
Lesson
55
50
45
40
(15,35)
35
30
25
(30,20)
20
15
10
0
0 5 10 15 20 25 30 35 40 45 50 55
11/11/2024 35
Lesson
Finding the Optimal Solution
Vertices Min Cost: 190x + 235y
(15,35) 190(15) + 235(35) = 11,075
(30,20) 190(30) + 235(20) = 10,400
Mixture: Decision:
x = 30 kgs. of Ingredient A To minimize cost to Php 10,400, Engr.
y = 20 kgs. of Ingredient B Chito should mix 30 kilos of Ingredient A
Minimum Cost: Php 10,400 and 20 kilos of Ingredient B to produce
the food supplement for the chicken.
11/11/2024 36
B. Linear Programming – Simplex Method
Lesson
SIMPLEX METHOD
Highly efficient to
solve more complex
problem
11/11/2024 38
Lesson
SIMPLEX ALGORITHM
Establish an initial
corner-point feasible
solution
Is the
NO current YES STOP – the LP problem
solution is solve
optimal?
11/11/2024 39
Lesson
PARTS OF THE SIMPLEX TABLE Objective Row
• The row where the
Cj 30 70 0 0 coefficients
Objective row of the
Variable Rowin the
variables
Soln Soln • objective
The row where the
functions
X Y S1 S2 Variable row
Var. Val. realplaced
variables,
are
Constant Row slack
0 S1 20 1 2 1 0 • and/or
The rowartificial
where the
variables areofplaced.
coefficients the
0 S2 35 1 5 0 1 Constant rows
Zj row (Shadow prices)
• variables in the
Zj 0 0 0 0 0 The row containing
explicit
Shadow constraints
prices
the
Cj-Zj rowopportunity cost
Cj-Zj 30 70 0 0 are placed.
(NetofProfit/Net
bringing one unit
loss)
Net Profits/Cost
of a row
variable into the
• The containing
Cj ColumnPivotal
OptimalRow Column Pivot Element
(Outgoing row) Pivoting solution.
the net profit or loss
• The
(Contribution
ContributionAtocolumn
profit
torow in• any
that
or
Profit The intersectional
contains
solution
theto a element
• The process ofby going fromone
bringing oneunit
loss)) maximizing
outgoing variablebetween
to be the
(minimizing) optimal column
problem simplex table to
of another.
a variable into the
• TheOutgoing
column which
replaced
containing
Row/ hasbythe
the and
the Optimal
highest
incoming Column
thepositive
pivotal row. solution
profits or cost
Pivotal (lowest
variable
Rowper negative)
unit
contained
for valuein thein the Cj-Zj Pivotal Element
the variablerow.
optimal
in the
Thecolumn.
variable in this column is
11/11/2024 solution. called the incoming variable 40
Lesson
Reasons of Adding SLACK Variables (S) to the Constraints:
SLACK VARIABLE (S)
It represents unused resources.
It contributes nothing to the objective function value.
11/11/2024 41
SIMPLEX METHOD
NOTES TO REMEMBER:
For Simplex Method containing symbol
1) In the objective function, slack variable take on zero (0) coefficient so not to affect the profit
or cost.
2) In the explicit constraints, the slack variables take on +1 coefficient.
3) In the implicit constraints, the slack variables must be greater or greater than or equal to 0.
4) The final solution may contain slack variables since their contribution to profit or cost is
null.
5) In a maximization problem, the optimum solution is obtained when the values in the Cj-Zj
row are zero and negative.
6) In a minimization problem, the optimum solution is obtained when the values in the Cj-Zj
row are zero and positive.
11/11/2024 42
Lesson
Pivotal Row (Outgoing Row)
1) Negative divisors are not included in the evaluation despite of
resulting to positive quotients, e.g. -150 (-10) = 5
2) Negative and zero quotients are excluded in the evaluation,
e.g. 150 (-10) = -15 or 0 15 = 0
3) Zero divisors are excluded in the evaluation, e.g. 150 0 =
undefined)
11/11/2024 43
Simplex Method:
Maximization with ≤ symbols
11/11/2024 44
Lesson
LP Simplex Method: Maximization Problem with ≤ symbol
Problem #1 (Thermos Bottles)
A small scale industry manufacturers two kinds of thermos bottles: standard airpot
and electric airpot. Components of these thermos are processed by two different machines,
A and B. During the scheduling period, the production head found out that there are 20
hours of machine A time available and 35 hours of machine B.
To complete one unit of standard airpot model needs one hour on Machine A and one
hour on machine B, while it takes 2 hours on machine A and 5 hours in Machine B to
complete one unit of the electric model.
The company can sell all the units it can produce per production period at a profit of
30 pesos per standard model and 70 pesos per electric model. If the company’s objective is
to maximize profit, how many units of each model should be produced and sold by the
company?
11/11/2024
45
LP Simplex Method Maximization Problem with Symbol
CJ 30.00 70.00 0.00 0.00
Sol Variable Sol Value X Y S1 S2
30.00 X 10.00 1.00 0.00 1.67 -0.67
70.00 Y 5.00 0.00 1.00 -0.33 0.33
ZJ 650.00 30.00 70.00 26.62 3.38
CJ - ZJ 0.00 0.00 -26.62 -3.38
11/11/2024 46
Lesson
LP Simplex Method: Maximization Problem with Symbol
Problem # 2 (Three Variables)
A firm that makes three products, has three machines available as resources,
construct the following LP problem.
11/11/2024
47
Lesson
LP Simplex Method: Maximization Problem with Symbol
CJ 4.00 4.00 7.00 0.00 0.00 0.00
Soln Var Soln Val A B C S1 S2 S3
4.00 B 6.84 0.00 1.00 0.00 0.15 -0.09 0.00
4.00 C 11.11 0.00 0.00 1.00 0.00 0.15 -0.04
7.00 A 7.69 1.00 0.00 0.00 -0.08 0.03 0.13
ZJ 135.90 4.00 4.00 7.00 0.31 0.79 0.26
CJ - ZJ 0.00 0.00 0.00 -0.31 -0.79 -0.26
11/11/2024 48
Simplex Method:
Maximization with ≥ and = symbols
11/11/2024 49
Lesson
LP Simplex Method: Maximization Problem with “≥” and “=“ Symbol
Converting the “≥” to “=“ sign
1) Convert the “≥” to “≤” by multiply both sides of the inequality by -1.
2) Covert the “≤” to “=“ by adding a slack variable with +1 coefficient.
3) For the “=“, add slack variable.
4) In the objective function, add slack variables with 0 coefficient.
11/11/2024 50
Lesson
LP Maximization Problem: Dealing with ≥ symbol
Problem # 3
A company’s profit is P = 300X + 200Y + 100Z, where X, Y, and Z are three
kinds of product. The profit function is subjected to the following
constraints:
X + Y 200 x0
Z 50 Y0
X + Z 150 Z0
Find the values of X, Y, Z to realize the maximum profit.
11/11/2024
51
Lesson
LP Maximization Problem: Dealing with “=“ sign
Problem # 4
Maximize Profit: 5X + 4Y
Explicit Constraints: 2X + Y = 12
2X + 3Y ≤ 24
2X +9Y ≥ 36
Implicit Constraints: X, Y ≥ 0
11/11/2024
52
Simplex Method:
Minimization Problem
11/11/2024 53
Lesson
Simplex Method: Minimization Problem
Artificial Variable
A variable with no physical sense and nothing more than a
computational tool for generating initial LP solution.
Has a large value used as computational device to prevent an
equality constraint from equating a constant to zero.
11/11/2024 54
Lesson
Simplex Method: Minimization Problem
Artificial Variable
In representing the contribution of the artificial variable to the
objective, use a quantity which is the power of 10, greater than
any of the coefficients found in the objective, explicit
constraints and constants.
Power of ten numerals are 10, 100, 1000 and so on.
11/11/2024 55
Lesson
Simplex Method: Minimization Problem
Converting Inequality Symbols to “=“ sign.
1) Add an artificial variable if the symbol in the constraint is “=“ sign.
2) Add a slack variable if the symbol is “≤”.
3) Subtract a slack variable and add an artificial variable if the symbol is “≥”.
In the objective function, add slack variables with zero coefficient, and artificial variable
with coefficient larger than the largest coefficient of the variables in the explicit
constraints which is divisible by 10, 100, 1000, etc.
11/11/2024 56
Lesson
Simplex Method: Minimization problem
Problem # 5
Objective Function: Minimize 7X + 5Y + 6Z
Explicit Constraints: X + Y + Z = 10
X + 2Y + 3Z ≤ 19
2X + 3Y ≥ 21
Implicit Constraints: X, Y, Z ≥ 0
11/11/2024
57
Lesson
Simplex Method: Minimization Problem
Problem # 6
Objective Function: Minimize to 60X + 50Y
Explicit Constraints: 3X + 5Y ≤ 15
4X + 4Y ≥ 16
Implicit Constraints: X, Y ≥ 0
11/11/2024
58
Special Cases in
Simplex Method
11/11/2024 59
Lesson
Special Cases in Simplex Method: INFEASIBILITY
There is no solution that will satisfy all of the problems constraints and it exists when
the problem is improperly formulated.
It is indicated at the final table wherein the Cj-Zj row entries will be of proper sign to
imply optimality, but an artificial variable will still be present in the solution mix or two
the same real variables enter the solution.
Usually appear in Simplex Minimization Problems.
Final Table
Cj -- -- 5 8 0 0 10 10
Svar Sval X Y S1 S2 A1 A2
5 Y 200 1 0 -2 -3 -1 0
8 X 100 0 1 1 -2 -2 0
10 A2 20 0 0 0 1 -1 -1
-- Zj 2000 5 8 -2 -21 -31 -10
11/11/2024 -- Cj-Zj -- 0 0 2 21 31 20 60
Lesson
Special Cases in Simplex Method: INFEASIBILITY
Problem # 7
Minimize: 5X + 3Y
Explicit Constraints: 4X + 3Y ≤ 8
X≥4
Y≥6
11/11/2024
61
Lesson
Special Cases in Simplex Method: UNBOUNDED SOLUTION
LP that do not have finite solution.
The problem may be discovered prior to reaching the final table.
If the quotients turned out or to be negative or undefined, then the problem has
unbounded solution.
This is present in bound maximization and minimization.
Cj -- -- 6 9 0 0
Svar Sval X Y S1 S2
9 Y 30 -1 1 2 0
0 S2 10 -2 0 -1 1
-- Zj 270 -9 9 2 0
-- Cj-Zj -- 15 0 -2 0
11/11/2024 62
Lesson
Special Cases in Simplex Method: UNBOUNDED SOLUTION
Problem # 8
Maximize: 4X + 2Y
Explicit Constraints: X ≥ 4
Y≤2
11/11/2024
63
Lesson
Special Cases in Simplex Method: DEGENERACY
It arises when ratio calculations are made.
If there is a tie for the smallest ratio, this is a signal that degeneracy exists.
It can lead in cycling, in which the simplex algorithm alternates back and forth between
the same non-optimal solutions.
To deal with this is to select THE TOP MOST ROW
Cj -- -- 5 8 2 0 0 0
Svar Sval X Y Z S1 S2 S3
8 X2 10 0.25 1 1 -2 0 0 40
0 S2 20 4 0 0.33 -1 1 0 5
0 S3 10 2 0 2 0.4 0 1 5
-- Zj 80 2 8 8 16 0 0 Thus, S2 should be selected as
-- Cj-Zj -- 3 0 -6 -16 0 0 the pivotal Row.
11/11/2024 64
Lesson
Special Cases in Simplex Method: DEGENERACY
Problem # 9
Maximize: 4X + 6Y
Explicit Constraints: 6X + 4Y ≤ 24
Y≤3
5X + 10Y ≤ 40
11/11/2024
65
Lesson
Special Cases in Simplex Method: MULTIPLE OPTIMAL SOLUTION
Reference is the Final Table
If the Cj-Zj are equal to zero for the real variables, it could be an indication that there are
more than one optimal solution (if there are still real variables that are not entered in
the solution mix).
Optimal Solution Alternative Solution
Cj -- -- 3 2 0 0 Cj -- -- 3 2 0 0
Svar Sval X Y S1 S2 Svar Sval X Y S1 S2
2 Y 6 1.5 1 1 0 2 Y 1.5 0 1 0.25 -1.5
0 S1 3 1 0 0.5 1 3 X 3 1 0 0.5 1
-- Zj 12 3 2 2 0 -- Zj 12 3 2 2 0
-- Cj-Zj -- 0 0 -2 0 -- Cj-Zj -- 0 0 -2 0
11/11/2024 66
Lesson
Special Cases in Simplex Method: MULTIPLE OPTIMAL
SOLUTION
Problem # 10
Maximize: 40X + 30Y
Explicit Constraints: X + 2Y ≤ 40
4X + 3Y ≤ 12
11/11/2024
67
References
References
Anderson, D. R., Sweeney, D. J., Williams, T. A., Camm, J. D., Cochran, J. J., Fry, M. J., & Ohlmann, J. W.
(2016). An Introduction to Management Science: Quantitative Approaches to Decision Making (14th
ed.). Boston, USA: Cengage Learning. Retrieved August 2017, from
http://dreamsupport.us/justin/Books%20&%20Textbooks/Business/Introduction%20to
%20Management%20Science%2014e%20-%20David%20Anderson.pdf
Hillier, F. S. (2015). Introduction to Operations Research (10th ed.). USA: McGraw Hill Education.
Mishra, P.N. and Jaisankar, S. (2007). Quantitative Analysis for Management. New Delhi: Excel Books
Private Limited: Retrieved from: https://www.pdfdrive.com/quantitative-techniques-for-
management-d33411833.html
Render, Barry, Stair, Ralph M., and Hanna, Michael E. (2011). Quantitative Analysis for Management. 11 th
edition. Prentice Hall. Retrieved at https://www.pdfdrive.com/quantitative-analysis-for-
management-2-downloads-d39562234.html
Taylor, W. (2013). Introduction to Management Science (11th ed.). New Jersey: Pearson Education, Inc.
11/11/2024 69
You Can Reach
Us in
Get
Touch
With Me
E-mail:
evvaldez@mmsu.edu.ph
evvaldez@mmsu.edu.ph
valdezerroljohn@gmail.co
mcbjulian@mmsu.edu.ph
City of Batac, Ilocos Norte,
Philippines
CP No.:
09984297121
09984297121
09667258287
09279431850
Address:
MMSU-CBEA
City of Batac, Ilocos Norte,
Philippines