MANSCIE Midterm Notes
MANSCIE Midterm Notes
Lesson #8: DECISION THEORY. Have you ever regret a decision you made because it has caused more
inconvenience than benefit? Managers have that as well. However, with these quantitative
techniques, you will be able to see how much you can gain or lose if you implement a specific
decision. You had a taste of this in your Operations Management classes, but we take it up a notch
here in this Management Science class.
Lesson #9: WAITING LINE MODELS. We all are customers, and we all had our fair share of painstakingly
waiting for our turn to be served. Sometimes, the waiting time is no longer bearable, that we decide
to leave. On the manager's point of view, that means reduced revenue, and eventually reduced
profits. If only there was a way to keep all the customers that come into our business, and serve
them all...and take their money...
Lesson #10: TIME SERIES ANALYSIS AND FORECASTING. Have you even been told not to count your eggs
before they hatch? Could be true, but not if you're equipped with this quantitative technique that
shall enable us to see the future, and how much potential revenue or profit we can get. Like Lesson
#8, this one is already discussed in your Operations Management classes. In this course, we go
deeper.
Lesson #11: SIMULATION. This is a powerful tool used by managers. How powerful? You will soon
know. Do you want to experience its power? Soon.
Note: Course content is subject to change, depending on pace and necessity.
Lesson 1: Introduction to Management Science (Part 1)
I hope you still remember what your high school teacher told you about Science.
Probably all of them said that Science is a body of knowledge. They must have also
said that this body of knowledge keeps expanding. How does knowledge expand?
That is because we constantly add to this already vast body of knowledge. What do
we know about COVID-19? Maybe a lot. Do we know about these things in the year
2016? No. How come, "COVID-19 is caused by the SARS-CoV-2" is now generally
accepted knowledge? Simply because we added that information to the body of
knowledge about Science. Will we know more about COVID-19 in the future? We
have to! Or else, we might not be able to come up with a vaccine to immunize us
from this disease.
This scientific method is foundation of management science. You might have picked
up the idea in the course description that a manager will have to make a lot of
decisions for the organization he is tasked to manage. This course will be full of
simulations what will greatly enhance your decision making skills. Anyway, to define
1.Problem (or research question) identification is one of the first steps in the
scientific method.
In the version depicted above, it is the second step. In our study of problem solving
in the context of management, identification of the problem is the first one. The rest
of the steps in problem solving are as follows:
The similarity between the problem-solving process in management science and that
of the scientific method is a manifestation that some aspects of management can be
scientific.
Results gathered from the problem-solving process contributes to the management
“body of knowledge”, which contain actions proven to have solved a certain
management problem.
Let us relate this to your actual accounting problem solving. Imagine you are taking
a departmental quiz. What is the first thing you do? You read the problem, you look
at some details, you look at the requirements of the problem. What that actually
does is providing a structure of the problem so that in evaluating the alternatives,
you will know what answer you're looking for. As soon as you come to the part
where you evaluate alternatives, that is the part where you turn on your calculator
and start solving. This illustration will help you understand the decision making
process and its two major steps:
In the "evaluate the alternatives" step, this is where quantitative techniques come
in. Like I said previously, in this step is where you usually turn on your calculator
and start solving. Before going deeper to quantitative analysis, let us compare it with
qualitative analysis:
Qualitative Analysis
is based primarily on the manager’s judgment and experience
used if the manager has experience dealing with the problem
it includes the manager’s intuitive “feel” for the problem
more an art than a science.
Quantitative Analysis
is based on mathematical relationships established by using quantitative facts and
data
used if the manager has little or no experience dealing with the problem, or if the
problem is complex
the manager’s intuition is not taken into consideration
more a science than an art
Why will a quantitative approach be used in the decision-making process? The
following are some reasons:
1. The problem is complex, and the manager cannot develop a good solution without
the aid of quantitative analysis.
2. The problem is especially important (e.g., a great deal of money is involved), and the
manager desires a thorough analysis before attempting to make a decision.
3. The problem might be new, and the manager has no previous experience from which
to draw.
4. The problem is repetitive, and the manager saves time and effort by relying on
quantitative procedures to make routine decision recommendations.
Quantitative analysis begins once the problem has been structured, but before
quantitative analysis can be done, the situation must first be converted into a
representation. These representations of real objects or situations are called models.
These models can be presented in various forms.
The first form of models used in quantitative analysis is called the
iconic model. The iconic model is a physical replica of the real object. This is used to
have a feel of how something would look like, and in some models, how it would
function.
Example of an iconic model:
The second form is called the analog model. Analog models are also physical, like
iconic models, but do not have the same physical appearance as the object being
modeled. Here is an example of an analog model:
The speedometer, although physical, is not a replica of another physical thing, but
rather, it represents the speed of a car.
The last form is called the mathematical model. Mathematical models
are representations of a problem by a system of symbols and mathematical
relationships or expressions. The mathematical model must be so accurate that it
captures a certain situation.
To help you better understand how mathematical models work, let us take a simple
situation. Assume that you are a seller of washable, non-surgical masks. You want to
know how much profit you are going to create when you sell different quantities of
your product. How is profit computed? We all know that profit is revenue minus all
the costs. Assume that you made 100 masks today, and it cost you Php 1,000 pesos
to make all the masks. You want to sell each mask for Php 30 each.
How are we going to represent the above situation mathematically? Let us start with
the revenue. The function R(x) = 30x captures the revenue situation very well. This
mathematical function just means that you are going to generate Php 30 for every
mask you sell. What if we sell:
1 mask? Then R(1) = (30)(1) = 30
2 masks? Then R(2) = (30)(2) = 60
5 masks? Then R(5) = (30)(5) = 150
Now we have a revenue model that works for any number of masks you would want
to sell. If you want to sell 750 masks, then just substitute x with 750. R(750) = (30)
(750) = Php 22,500.
We now proceed with costs. The function C(x) = 10x captures the cost situation very
well. For your current production of 100 masks, you incurred a total of Php 1,000.
Let us assume that all costs are variable for easier understanding. That would mean
you spend Php 10 per mask produced. Now, what if we sell:
You might already start noticing a pattern here. Let us go back to our initial profit
model: P(x) = R(x) - C(x). Let us incorporate the revenue and cost models into the
profit model by substituting R(x) and C(x) with 30x and 10x, respectively. We obtain
P(x) = 30x - 10x. We have like terms here (both terms, 30x and 10x, have the
variable x) meaning it is safe to perform subtraction. We then arrive at the function
P(x) = 20x. This is a simpler model. Let us test this function with the values of x we
previously used:
1 mask: P(1) = 20(1) = 20
2 masks: P(2) = 20(2) = 40
5 masks: P(5) = 20(5) = 100
750 masks: P(750) = 20(750) = 15,000
Quantitative Analysis is done by:
1. Model development
2. Data preparation
3. Model solution
4. Report generation
Equations in which the unknown only occurs to the first power are called linear equations
Lesson 2: A Review of Linear Equations and Inequalities (Part
1)
For sure, a number of you were valedictorians in junior high school. Much more are
ranked lower but still in the honor roll. For many, that all went down the drain when
you started the BS Accountancy program. Don’t fret, because this is all
normal. 😊 Now, we are going to refresh ourselves with a junior high school classic –
Elementary Algebra. Today’s lesson is about Linear Equations and Inequalities.
Equations are two expressions connected by the equality symbol. I am using the
term expressions because it is not only limited to numbers. Expressions can also be
mathematical variables like x and y, or u and i. Or it could be anything. A few
examples include:
1+1=2
u + i = 69
Management Science = fun
Inequalities, on the other hand, are like equations, except that they use inequality
symbols. Here are all the inequality symbols:
≠ “not equal to”
> “greater than”
< “less than”
≤ “greater than or equal to”
≥ “less than or equal to”
The first inequality symbol is a vague one. It just refers to any other value not equal
to the expression. For example, in x ≠ 17, possible values of x are every other
number that is not 17. That’s a lot of possible values. For our succeeding lessons,
we are not going to use this inequality symbol, although it is possible to plot such an
inequality in the Cartesian plane.
Yes, speaking of the Cartesian plane, it will be heavily used in this lesson, and some
other lessons going forward. That is why we are having this refresher lesson to
properly refresh us for the next lessons.
Equations and Inequalities are quite vast. We have Quadratic equations and
inequalities, Radical, Exponential, Logarithmic, and others. However, inasmuch as it
would be fun to go back to those lessons that gave us our high grades and those
Metrobank-MTAP-DepEd medals, we are not going to do that simply because we
don’t need that in our future lessons. We are only going to refresh ourselves with
Linear Equations and Inequalities.
Linear Equations and Inequalities are those composed with terms whose variables
have exponents of 1 or below. For us to remember the parts of a linear equation, let
us have the following example:
Property Example
Reflexive x=x
Symmetric If x = y then y = x.
Transitive If x = y and y = z then x = z
Addition If x = y then x +z = y + z
Subtraction If x = y then x - z = y - z
Multiplication If x = y then xz = yz
Division If x = y then x/z = y/z
If x = y then y can replace x in any
Substitution
expression.
These properties are the bases of some techniques we use in solving systems of
linear equations.
Next subtopic are the forms of linear equations. The equation of a line can be
written in different forms, which depends on what is needed in plotting these lines in
the Cartesian plane. The different forms are:
Name Form Some notes
Standard
ax + by = c
form
m = slope
Slope- b = y-
intercept y = mx + b intercept
form used as
cost equation
m = slope
Point-slope
y – y1 = m(x - x1) (x1,y1) is a
form point in the line
(x1,y1)
Two-point
and (x2,y2) are
form points in the line
a = x-
Intercept intercept
form b = y-
intercept
Vertical
Vertical x=a line with a as x-
intercept
Horizontal
Horizontal y=b line with b as y-
intercept
Among these forms, we are going to encounter the standard form, the vertical line
and horizontal line in our future lessons. It’s best that we concentrate on these three
forms.
Next, we need to know how to plot linear equations in the Cartesian plane. Each
linear equation will be represented in the Cartesian plane as a line, which is the set
of all the points that satisfy the linear equation. A basic concept in linear equations is
that two points make a line, and therefore, that is all we need to find out. Using the
standard form, ax + by = c, it would be easy to find the x-intercept, and the y-
intercept. Take note that the x-intercept is the point where a line intersects with the
x-axis. The x-axis is the set of points wherein the y-coordinate (also known as
“ordinate”) is zero. Points such as (0,0), (1,0), (2,0), (3,0), and so forth, make up
the x-axis. Conversely, the y-intercept is the point where a line intersects with the y-
axis. The y-axis is the set of points wherein the x-coordinate (also known as
“abscissa”) is zero. Points such as (0,0), (0,1), (0,2), (0,3), and so forth make up the
y-axis.
To summarize, we only need to find two points:
the x-intercept, which is obtained by setting y=0; and
the y-intercept, which is obtained by setting x=0.
After which, we now have two points, and a line can be easily drawn connecting
these two points.
To illustrate, let us use the linear equation used above: 8x + 3y - 12 = 60.
Renaming the equation to follow the form ax + by = c, we get 8x + 3y = 72. The
subtraction property of equality was used, wherein 4 was deducted from each side
of the equation. Setting y to be equal to zero, we get:
Therefore, the line representing the linear equation above intersects the x-axis at
the point (9,0).
To get the y-intercept, we set x to be equal to zero:
Therefore, the line intersects the y-axis at the point (0,24). Now we have two points:
(9,0) and (0,24). Plot these points into the Cartesian plane, and connect these two
points. The result would be the line representing the linear equation 8x + 3y – 12 =
60.
All the points in that line satisfy this linear equation. Let us try three points in this
line to check whether they satisfy the equation.
Checking:
Point #1 (3,16)
Point #2 (6,8)
Point #3 (7.5, 4)
Last thing we need to remember is how to solve systems of linear equations. Two or
more linear equations with the same set of variables form a system of linear
equations. The solution we obtain would be true for all equations in that system.
To illustrate, we use the same linear equation, but we add a second linear equation:
6x – 4y = 4. The system of linear equations would then look like this:
There are four methods we can use to solve systems of linear equations:
Graphical Method – useful if we need rough estimates, or if you’re sure that the
answer is a full integer, without fractions or decimals. This simply requires plotting each of
the equations in the system into the Cartesian plane. This was already exhaustively
explained above. The point/s where the lines intersect is/are the solution/s. The best use of
this method is to confirm the correctness of the solution obtained from the next three
methods.
Substitution Method – involves solving one of the equations for one variable in
terms of the other. For this illustration, let us solve for x in terms of y using the second
equation:
Since we now have a value of x in terms of y, we can now use the substitution
property of equality, and substitute our x in the first equation with the value of x in
terms of y:
In any of the equations, we can substitute y with 8 and the solve for x. For this
illustration, we use the second equation:
Therefore, the solution to the system of linear equation above is (6,8).
Linear Combination Method (or Elimination Method) – this involves adding one
equation in the system to the other, or subtracting one equation from the other. The
multiplication property of equality can be used to facilitate elimination. A variable must be
eliminated thereafter, which makes is easier to solve for the remaining variable. After the
value of the remaining variable is obtained, solve for the eliminated variable by substituting
back the obtained value of the uneliminated variable into any of the equations. The
following is how elimination method is done on the above system of equations:
The first equation is multiplied by 4, and the second equation is multiplied by 3 to
make the coefficient of y in both equations equal to 12. This facilitates elimination.
Since the signs of the coefficients of y are opposite, we just simply add both
equations. If the signs of the coefficients are the same, subtraction is used. After
obtaining the value of x, we substitute it with the value we obtained, which is 6. Let
us use the first equation:
The solution is (6,8), same as what we obtained using the substitution method. The
graph of both lines is as follows:
Therefore, the region which is at the right of the line is the one that satisfies the
inequality. This region must be shaded.
Case 2 is similar to Case 1, except that the region shaded must be the region to the
left of the line. The line still has to be broken or dotted, since the points in the line
do not satisfy the inequality 8x + 3y – 12 < 60.
For Case 3, it will be similar to Case 1, except that the line must not be broken or
dotted, because the points in the line also satisfy the inequality 8x + 3y – 12 ≥ 60.
Finally, for Case 4, it is similar to Case 2, except that the line must not be broken or
dotted, because the points in the line also satisfy the inequality 8x + 3y – 12 ≤ 60.
As mentioned in the previous lesson, there are four ways of solving systems of linear
equations. However, in solving systems of linear inequalities, the graphical method is
the only one applicable. There is no other way to solve systems of linear inequalities.
The following are the steps in solving systems of linear inequalities:
Next, we just need to find the region that satisfies each inequality. Previously, we
tested points located to the left and to the right of each line. We can actually skip
that, as long as we memorize this rule:
greater than: right or above, line is broken or dotted
less than: left or below, line is broken or dotted
greater than or equal to: right or above, line is included
less than or equal to: left or below, line is included
Since the first inequality is a “greater than” inequality, we shade the region to the
right of the line, and the line must be broken or dotted, since the line is not included
as part of the solution. The second inequality is a “less than or equal to” inequality.
Therefore, we shade the region to the left of the line, and we include the line as part
of the solution.
The solution to the system of inequalities is the region that satisfies both inequalities
(darkest shade of blue), as shown in the following image:
Lesson 3: Linear Programming - Graphical Method (Part 1)
Suppose you were asked to build a pen to keep some pig to be roasted. You are
given 100 meters of fencing and you are asked to build the pen in a rectangle with
the largest possible area. How long should the sides of the rectangle be?
Did you encounter problems like this in high school? If you had calculus, then, yes.
Problems like the one above is an optimization problem. This kind of problems is
solvable using differential calculus. I don’t know if it’s good news to you, but we are
not going to use calculus in this course.
Linear Programming is something simpler. It is the most commonly applied form of
constrained optimization. It seeks to maximize or minimize something, usually
profits, costs, and use of resources. It is an application of our previous lessons in
linear equations and inequalities. Linear Programming has wide applicability in
industry and commerce; thus, it is widely used by managers.
Linear Programming comes from “linear”, meaning this has already been discussed
in the previous lesson, and an archaic use of the word “programming”, to mean
“planning”.
The elements of Linear Programming problems are:
Decision variables – they represent things within your control, such as number
of units to produce, etc. These things are represented by variables since they are
unknown at the time problem solving begins. The goal is to find values of the
variables that provide the best value of the objective function.
Objective function – this is a mathematical expression that combines variables
to express your goal. Linear Programming problems require maximization or
minimization of the decision variables.
Constraints - limit the degree to which the objective can be pursued. It sets
limits on the possible solutions. These constraints, like the objective function, is
expressed mathematically. This is where your newly-acquired skill of transforming
situations into mathematical models come in. The presence of these constraints
makes Linear Programming a constrained optimization.
For our course this short term, we will learn about two ways of solving Linear
Programming problems:
Graphical – we will do exactly what we did when we solved linear
inequalities, because the constraints are usually expressed as inequalities. We will
plot equations, shade regions, look at intersecting regions, and then pick a solution.
Simplex – remember in our lesson on equalities, we learned that there are
four ways of solving systems of linear equations. The fourth one, which is the
matrix, will be the foundation of how we solve Linear Programming problems using
the simplex method. We will solve using this method very soon.
In explaining each of the methods above, we will divide them into two:
Maximization – selecting an alternative which will maximize profits.
Minimization – selecting an alternative which will minimize costs or use of
resources.
For today, we only focus on the Graphical Method, particularly Maximization
problems only. Let us have this example to illustrate how to solve Linear
Programming problems (Maximization) using the Graphical Method:
Green Witch is a store that sells pizza. They have two variants: Meatball Pizza and
Jeeze Pizza (Jalapenos and Cheese). Each pie of Meatball Pizza requires 12 minutes
of preparation, and 20 minutes of baking. The Jeeze Pizza requires 15 minutes each
for preparation and baking. The preparation is done by the staff of Green Witch, and
the baking is done by the oven. The staff have 1,200 maximum minutes available to
do the preparation per week. The oven is only available for 1,800 maximum minutes
to allow for resting and to prevent overheating. Assume that ingredients are always
available and sufficient. Green Witch generates Php 200 profit on each Meatball
Pizza sold, and Php 120 for each Jeeze Pizza sold. How many pieces of Meatball
Pizza and Jeeze Pizza should be manufactured per week to realize the maximum
profit possible?
First thing we have to do is to extract all the elements needed in creating the Linear
Programming problem or model.
Decision Variables: X and Y can be used, but I find it easier to use the first
letter of each product as much as possible. Let us use M for Meatball Pizza and J for
the Jeeze Pizza.
Objective Function: Our objective is to maximize the profit. As you can
deduce from our introductory lesson, the profit model is expressed as P(x) R(x) –
C(x) or P(x) = profit per unit sold x units sold. Fortunately for us, the latter
mathematical model is easier to use, and the data needed to use this is already in
the problem. For each M sold, profit is 200. For each J sold, profit is 120. Therefore,
our objective function is:
Max P = 200M + 120J
Constraints: There is a limit placed on the labor time and machine time, but
there is no limit on the materials, because of the assumption that ingredients are
always available and sufficient. Therefore, we only have two constraints…for now.
Let us start with preparation. For every M, 6 minutes are used. For every J, 10
minutes. The sum of all the time spent in preparation must not exceed 3,360
minutes because that is the only time available. This inequality best captures this
scenario:
12M + 15J ≤ 1,200
For baking, a machine called oven is used. For every M, 30 minutes are used. For
every J, 24 minutes. The sum of all the time spent in using the oven must not
exceed 1,260 minutes because that is the only time available for the oven to
operate. This scenario is best portrayed by the following inequality:
20M + 15J ≤ 1,800
We also have to set a minimum number for M and J. The Cartesian plane includes
negative numbers for each of the two axes. We don’t want the negative
numbers. Wag nega. It would be impossible for Green Witch to produce -3 Meatball
Pizzas or -2 Jeeze Pizzas. But it is possible that we only produce purely Meatball
Pizzas, therefore no Jeeze Pizzas, or vice-versa.
Therefore, there is the need for what we call the non-negativity constraints. This
ensures that the possible values to solve this problem will never be negative. These
are the non-negativity constraints:
M≥0
J≥0
Now our entire Linear Programming model looks like this:
Max P = 200M + 120J
s.t.
(1) 12M + 15J ≤ 1,200
(2) 20M + 15J ≤ 1,800
(3) M ≥ 0
(4) J ≥ 0
The acronym “s.t.” means “subject to”
We are now ready to plot the lines. Just refer to our steps in solving linear
inequalities.
The red area contains the set of points that satisfy the preparation constraint only.
The blue area contains the set of points that satisfy the baking constraint only. The
purple area (blue+red) contains the set of points that satisfy both constraints. We
are only to consider the points in Quadrant I, because these are the points that
satisfy both of our non-negativity constraints.
The purple area therefore is what we call the feasible region. The feasible region is
the set of all points that satisfy ALL of the constraints.
The optimal solution, or the best alternative which will answer the problem, will
come from this region.
After plotting the lines, next would be to plot the objective function using different
assumed values. Let’s take for example:
In the image above, we have plotted the objective function using 4 different
assumed values. This is what we call the objective line approach in finding the
optimal solution.
If you observe the four lines, you can see that they go from left to right, that is
because the objective line approach involves graphing the objective line and moving
it away from the point of origin (for maximization; for minimization, towards the
point of origin). The last point that the objective line touches before leaving the
feasible region is the maximum point. Since our objective is to maximize, then this is
the point we’re looking for.
Personally, I will not recommend this approach, since it adds more elements to our
graph. Plus, it also brings more inconvenience to us. It also takes more time.
The better approach for me personally is the corner point approach in finding the
optimal solution. Corner points are the vertices of the feasible region. These points
are intersections of the constraint lines. All corner points are intersections of two or
more constraint lines, but not all intersections of two or more constraint lines are
corner points.
In this illustration, the corner points are (0,0), (0,80), (75,20) and (90,0). We are
going to test all these corner points using the objective function.
Corner (0,0): 200(0) + 120(0) = 0
Corner (0,80): 200(0) + 120(80) = 9,600
Corner (75,20): 200(75) + 120(20) = 17,400
Corner (90,0): 200(90) + 120(0) = 18,000
Among the four corner points, point (90,0) yields the most profit at Php 18,000. This
is our optimal solution. If you observe the graph with plotted objective lines, you will
also see that the last point that the objective line touches before leaving the feasible
region is also the point (90,0).
Therefore, Green Witch must produce and sell 90 Meatball Pizzas and 0 Jeeze Pizzas.
Let us analyze further this answer. Let’s test this point in each of the constraints
(except non-negativity constraints):
12M + 15J
12(90) + 15(0)
1,080
20M + 15J
20(90) + 15(0)
1,800
Notice that in the preparation constraint, only 1,080 minutes of the available 1,200
minutes were used. There is an extra 120 minutes left. This is what we call slack, or
unused resources. We will be making use of slack variables in the simplex method,
so keep this in mind. In the baking constraint, all of the available 1,800 minutes
were used. Therefore, we don’t have slack in the baking constraint.
A certain patient is diagnosed with Vitamin L and Vitamin P deficiency. The doctor
recommends taking two supplements, Robust and Enduranz to cover up the
patient’s deficiencies. Robust contains 2 mg of Vitamin L and 12 mg of Vitamin P,
and Enduranz contains 8 mg each of Vitamin L and Vitamin P. The patient is advised
to load up with at least 60 mg of Vitamin L and 120 mg of Vitamin P daily. Robust
and Enduranz cost Php 20 and Php 30 per capsule, respectively. The patient would
want the most economic combination or Robust and Enduranz while meeting the
required daily intake of Vitamins L and P, as recommended by the doctor.
The process of preparing the objective function and constraints are very much the
same, except that usually, constraints in minimization are “greater than” inequalities,
as compared to “less than” inequalities usually used in maximization.
We now extract the elements needed in creating our Linear Programming model.:
Decision Variables: Let R be the number of Robust capsules to purchase, and E be
the number of Enduranz capsules to purchase daily.
Objective Function: Our objective is to minimize the costs, while still meeting
minimum requirements. Each R will cost 20 pesos, and each T will cost 30 pesos. Therefore,
our objective function is expressed as:
Minimum
requiremen Robust Enduranz
t
Vitamin L 60 mg 2 mg 8 mg
Vitamin P 120 mg 12 mg 8 mg
Cost per Php Php
capsule 20.00 30.00
The plotting of constraint lines into the Cartesian plane is exactly the same as with
maximization. Just be mindful of the region you have to shade, since minimization
problems mostly involve “greater than” inequalities.
Among the values yielded by substituting each corner point into the objective
function, the corner point (6,6) has the lowest value. Therefore, the most economic
decision is to buy and take 6 Robust capsules and 6 Enduranz capsules a day.
Let’s substitute the optimal solution into the constraints for further analysis:
2R + 8E ≥ 60
2(6) + 8(6) ≥ 60
12 + 48 ≥ 60
12R + 8E ≥ 120
12(6) + 8(6) ≥ 120
72 + 48 ≥ 120
Both Vitamin L and Vitamin P requirements are met at the minimum. If there would
be some excess over the minimum requirement, then we would call
that surplus. Surplus is the counterpart of slack. There would be surplus in
minimization problems, while there would be slack in maximization problems.
Lesson 4: Linear Programming - Simplex Method (Part 1)
The simplex method is a method for solving problems in linear programming. This
method was invented by George Dantzig in 1947. It tests adjacent vertices of the
feasible region in sequence so that at each new vertex the objective function
improves or is unchanged.
Requisites:
o The objective is maximization
o ALL decision variables are constrained to be non-negative
o All constraints are “less than” or “less than or equal to” inequalities
Big M method – involves adding an artificial variable with a coefficient M
which is a very large number. The artificial variable will not be a basic variable, and
thus will have a value of 0 when optimality is achieved. This method, together with
the two-phase method and dual method can solve both maximization and
minimization problems.
Two-phase method – involves the following steps:
1. Bring the constraints into equality form. For each constraint in which
the slack variable and the right-hand side have opposite signs, or in which there is
no slack variable, add a new artificial variable that has the same sign as the right-
hand side.
2. Phase I: minimize the sum of the artificial variables, starting from the
BFS where the absolute value of the artificial variable for each constraint, or of the
slack variable in case there is no artificial variable, is equal to that of the right-hand
side.
3. If some artificial variable has a positive value in the optimal solution,
the original problem is infeasible; stop.
4. Phase II: solve the original problem, starting from the BFS found in
phase I.
Dual method – this involves deriving another linear programming problem
(called the dual) from the original linear programming problem (called
the primal or initial). The solution from the dual is also the solution to the initial
problem. We will be using this method for minimization problem.
Gauss-Jordan method – this works for systems of linear equations only.
Optimal solutions derived using the Graphical method will be the same as when we
use the Simplex method. To prove this, let us use the same problems we solved
using the graphical method:
[Maximization] Green Witch is a store that sells pizza. They have two variants:
Meatball Pizza and Jeeze Pizza (Jalapenos and Cheese). Each pie of Meatball Pizza
requires 12 minutes of preparation, and 20 minutes of baking. The Jeeze Pizza
requires 15 minutes of preparation and 15 minutes of baking. The preparation is
done by the staff of Green Witch, and the baking is done by the oven. The staff
have 1,200 maximum minutes available to do the preparation per week. The oven is
only available for 1,800 maximum minutes to allow for resting and to prevent
overheating. Assume that ingredients are always available and sufficient. Green
Witch generates Php 200 profit on each Meatball Pizza sold, and Php 120 for each
Jeeze Pizza sold. How many pieces of Meatball Pizza and Jeeze Pizza should be
manufactured per week to realize the maximum profit possible?
We will be using the standard simplex method in solving the maximization problem,
and the dual method in solving the minimization problem.
The standard method requires “renaming” the objective function for it to conform to
a standard format which is all decision variables to the left, and 0 to the right.
P – 200M – 120J
S1 represents the slack (or the unused time) in preparation, while S 2 represents the
slack in baking. S1 and S2 are the slack variables. In solving using the simplex
method, the non-negativity constraints are not needed.
We now have to construct the initial simplex table. We just need to copy the
coefficients into the table:
The constraints should occupy the first rows and the last row should contain the
objective function. Next step would be to select the most negative number in the
last row. In this case, the most negative number is -200. -200 belongs to the “M”
column. This column now becomes our pivot column.
Note: Perform the minimum test only for positive elements in the pivot column. Do
not subject to the minimum test those rows whose element in the pivot column is
negative.
The intersection of the pivot column and the pivot row is called the pivot element.
The aim now is to construct row operations that would make the pivot element be
equal to 1 and the rest of the elements in the pivot column be equal to 0. The basic
variable S2 must also be replaced with M. Basic variables are those decision variables
which appear at the left side of the simplex table.
It is important to name the rows R1, R2, R3, and so forth. Since we only have 3 rows,
we stop at R3.
Our first row operation would be R2/20 which becomes our new R2. Applying the row
operation to ALL the elements of R2:
As mentioned earlier, the rest of the elements in the pivot column must be equal to
zero. To do whis, we have the row operations -12R 2 + R1 to be applied to ALL
elements of R1, and 200R2 + R3 to be applied to ALL elements of R3.
In the simplex table above, we can see that we have reached optimality because
there are no more negative coefficients in the last row. Now it’s time to extract our
optimal solution:
The equivalents of each basic variable at optimality can be seen at the right side of
the simplex table. Therefore,
S1 = 120
M = 90
P = 18,000
Non-basic variables (those not found at the left) are equal to zero. Therefore,
J=0
S2 = 0
s.t.
2R + 8E ≥ 60
12R + 8E ≥ 120
We now have to construct our initial matrix. We just copy the coefficients into a
matrix. Note that the constraints go first, and followed by the objective. The initial
matrix looks like this:
s.t.
2x + 12y ≤ 20 (take note we are using a “less than or equal to” inequality because it
is a maximization problem)
8x + 8y ≤ 30
Now that we have our dual linear programming model, which is a maximization
problem, we can now proceed to solving using the standard method, although there
will be slight changes, which will be discussed later.
We first standardize the objective function and convert our inequalities into
equations, so that we can now begin constructing our initial simplex table. Again, we
place all decision variables to the left of the objective function, and all constants into
the right. Then, the constraints are to be converted into equations by adding slack
variables. Our model now looks like this:
P - 60x + 120y = 0
2x + 12y + R = 20
8x + 8y + E = 30
Notice that the slack variables we added to the constraints are the variables in the
primal or initial linear programming model, R and E.
Notice that the basic variables are not written in the left side of the simplex table.
We don’t need that because the values or R and E that are in the last row will be the
answers we are looking for.
We continue to solve the simplex tables until we reach optimality, i.e., all coefficients
in the last row must all be non-negative (since we are solving this as a maximization
problem).
We still have not reached optimality, because there is still a negative number in the last row.
We then repeat the process.
After the second set of row operations, we have reached optimality, since there are no more
negative coefficients in the last row. Therefore, it’s now time to extract the answers from
the last simplex table:
As mentioned earlier, we just look at the last row. The coefficient under the R
column is the value of R at optimality. The coefficient under the E column is the
value of E at optimality. For the minimum cost, we look at the coefficient in the last
row that is on the right side of the simplex table.
R=6
E=6
P = 300 (This is the answer to the dual maximization problem, which is also the
answer to the primal/initial minimization problem)
Final answers: R = 6; E = 6; C = 300
Example:
Max P = 2x + 6y
s.t.
x + 3y ≥ 60
3x + 4y ≥ 120
x ≥ 10
x, y ≥ 0
2. Infeasibility – this is a case wherein the linear programming model produces no
solution, as there is not even a single point in the Cartesian plane that satisfies all
the constraints. Infeasibility can be caused by errors in solving, errors in setting
constraints, or having unrealistic constraints.
Example:
Max P = 2x + 6y
s.t.
x + 2y ≤30
3x + 4y ≥ 120
x, y ≥ 0
3. Alternative optimal solutions – this is a caused by the objective line being parallel
to a binding constraint. As a result, instead of only touching one point as it leaves
the feasible region, it touches more than one. Therefore, there are many optimal
solutions.
Example:
Max P = 2x + 6y
s.t.
x + 3y ≤ 60
3x + 4y ≤ 120
x ≥ 10
x, y ≥ 0
4.Redundant constraints – this is a constraint line that does not touch the feasible
region. Thus, this constraint does nothing to affect the feasible region, hence, it is
redundant. Eliminating the redundant constraint will also not change the feasible
region, and ultimately, the optimal solution as well.
Example:
Min P = 4x + 5y
s.t.
x + 3y ≥ 30
3x + 4y ≥ 120
x ≥ 10
x, y ≥ 0
The above special cases are shown to you using graphical representations. This will allow
you to easily spot if there is a special case. The same is true with the simplex method.
Special cases will also manifest themselves as you solve using the simplex method.
Each source is able to supply a fixed number of units of the product, usually called
the capacity or availability or supply, and each destination has a fixed demand, often
called the requirement.
To facilitate the process of solving transportation problems, it is advised to set up a
table of sources and destinations, along with their corresponding capacity and
requirements, and the distribution or delivery or shipping costs from one particular
source to one particular destination.
McJo is a restaurant that sells their famous McChicken Joy. Their business dresses
their own chicken at 3 locations: Capatan, Buntun, and Atulayan. Their branches are
located inside malls, specifically Eastwood, Fisher Mall, and Glorietta.
The dressing areas are able to supply the following numbers of kilos of chicken per
month:
The branches require the following number of kilos of chicken in their operations per month:
Each row represents a source, and each column represents a destination. Supply
forms the last column, and demand forms the last row. The blue cells will contain
the cost of transporting one kilogram of chicken from a source to a destination. The
green cell is the total demand or supply.
This is one of the first things you must observe before proceeding to solve a
transportation problem, because unbalanced transportation problems require an
additional step before proceeding to solve the problem as if it was a balanced
transportation problem. We will discuss that later. For now, let us focus on balanced
transportation problems. From the problem, we can easily see that it is a balanced
transportation problem, because 150 + 175 + 275 = 200 + 100 + 300.
Now that the table is set up, we can now begin solving the problem. Solving
transportation problems are divided into two phases:
1. Finding an initial basic feasible solution
2. Finding the optimal solution
-------------------------------------------------------------------------------------------------------
Let us first find an initial basic feasible solution. There are three methods we can use
to find an initial basic feasible solution:
Northwest Corner Rule
Minimum Cell Cost Method (MCCM)
Vogel’s Approximation Method (VAM)
All three methods involve allocating the commodity from the sources to the
destinations. They only differ on how and where to allocate. We will be
demonstrating the first phase of solving transportation problems using all three
methods.
NORTHWEST CORNER RULE - begins with an allocation at the top left-hand corner
(The Northwest corner) of the table and proceeds systematically along either a row
or a column and make allocations to subsequent cells until the bottom right-hand
corner is reached, by which time enough allocations will have been made to
constitute an initial solution.
Steps:
1. Start by selecting the cell in the most “Northwest" corner of the table.
2. Assign the maximum amount to this cell that is allowable based on the
requirements and the capacity constraints.
3. Exhaust the capacity from each row before moving down to another row.
4. Exhaust the requirement from each column before moving right to another
column.
5. Check to make sure that the capacity and requirements are met.
Let us use the problem above to demonstrate how the Northwest corner rule is
done.
The northwest corner is the corner of Atulayan and Eastwood, with a cost of 6. We look at
the smaller between Atulayan’s capacity (150) and Eastwood’s requirement (200). Smaller
number is 150, so we place 150 in the north west corner. Since Atulayan’s supply is
completely exhausted, the Atulayan column is cancelled (indicated by gray cell color). We
also update Eastwood’s supply to reflect the 50 kilograms remaining demand after getting
150 of supplies from Atulayan.
Next, we proceed to the cell intersecting Buntun and Eastwood. This cell is the new
northwest corner among the uncancelled cells. Again, compare Buntun’s supply (175) and
Eastwood’s remaining demand (50). The smaller number is 50, therefore write 50 in that
cell. That allocation fulfills Eastwood’s requirements. We then have to cancel the Eastwood
row. We also have to Buntun’s remaining availability which is now 125.
The new northwest corner among the uncancelled cells is the one intersecting Buntun and
Fisher Mall. Compare Buntun’s remaining supply (125) against Fisher Mall’s demand (100).
Smaller number is 100, so we place 100 into the cell. This allocated completely fulfill’s Fisher
Mall’s demands, so the entire Fisher Mall column is cancelled.
The new northwest corner is now the cell of Buntun and Glorietta. Compare Buntun’s
remaining supply (25) and Glorietta’s demand (300). Smaller number is 25, so place 25 into
the cell. This allocation exhausts Buntun’s supply, so the entire Buntun column is cancelled.
There is only one remaining cell, the bottom-right corner. The demand and supply must be
equal at this point. Allocate 275 to the cell of Capatan and Glorietta. This ends the
Northwest corner rule. Our final initial basic feasible solution is:
Next, select the lowest cost from among the remaining uncancelled cells. That is the
cell of Capatan and Fisher Mall. Just repeat the same steps. After repeating steps 1-
3, until all commodities are distributed, the final table will look like this:
Notice that the cost under this method is lower than the northwest corner rule,
because this method considers costs, and allocates to the lowest costs first, while
the northwest corner rule doesn’t consider costs.
VOGEL’S APPROXIMATION METHOD (VAM)
Steps:
1. Determine the penalty cost for each row and column by subtracting the
lowest cell cost in the row or column from the next lowest cell cost in the same row
or column.
2. Select the row or column with the highest penalty cost (breaking ties
arbitrarily or choosing the lowest-cost cell).
3. Allocate as much as possible to the feasible cell with the lowest transportation
cost in the row or column with the highest penalty cost.
4. Repeat steps 1, 2, and 3 until all rim requirements have been met.
We will use the same problem in demonstrating the VAM.
From among the penalty costs, Row 2 has the highest penalty cost. We then allocate
the maximum possible to the cell in Row 2 with the least cost, which is the cell of
Buntun and Eastwood, with a cost of 7. Allocate the maximum commodity possible,
which is 175. Cancel the row of Buntun, and update the demand of Eastwood.
Next, we recompute the penalty costs, using only the remaining uncancelled cells.
Highest penalty is Column 2. Lowest cost in Column 2 is 5 (Capatan and Fisher Mall).
Allocate the maximum possible to that cell, then update the demands and supplies. Cancel
completely fulfilled or exhausted demands and supplies.
We again compute for penalty costs, using the remaining uncancelled cells.
Highest penalty cost is Row 3. Lowest cost in Row 3 is 4 (Capatan and Eastwood).
Allocate the maximum possible to that cell, then update the demands and supplies.
Cancel completely fulfilled or exhausted demands and supplies.
At this point, there are two cells remaining. Allocate first to the cell with the lower
cost, and the if there is an excess, allocate to the last cell. That would be 150 each
for the two remaining cells.
Final answer is as follows:
Let us compute for the total distribution costs:
-------------------------------------------------------------------------------------------------------
In other words, for each kilogram of chicken allocated to the cell of Atulayan and
Eastwood (a route not at present used), total cost will be reduced by Php 1.00. This
indicates that the initial solution derived in Phase 1 is not optimal because a lower
cost can be achieved by allocating additional kilograms to be delivered from
Atulayan to Eastwood.
Our goal is to determine which of the empty cells in Phase 1 would reduce cost the
most, so we are looking for the most negative number, just like in the simplex
method.
Before testing the remaining empty cells, let us identify a few of the rules of the
stepping-stone process:
1. always start with an empty cell and form a closed path of cells that now have
allocations.
2. In developing the path, it is possible to skip over both unused and used cells.
3. In any row or column there can be only one addition and one subtraction.
Now let’s test another empty cell, the cell of Buntun and Eastwood:
This just means that allocating every one kilogram of chicken to these routes above
would result to increases in cost of Php 2 and 5, respectively.
The most negative among these numbers is -1, Atulayan – Eastwood and Buntun –
Eastwood. Therefore, we can choose any of these. Allocations to these new routes
means a one-peso reduction in transportation costs per kilogram of chicken. We
would then want to allocate as many kilograms of chicken as possible.
Let’s choose Atulayan – Eastwood. Based on the table, the maximum amount of
chicken we can re-allocate is 25 kilograms. We then re-allocate based on the
stepping stone loop we have created. After re-allocation, our table now looks like
this:
After this, we just repeat the stepping-stone method, until all resulting numbers are
non-negative.
Let’s try another iteration of the stepping stone method for illustrative purposes:
Notice that there are no more resulting negative numbers, which means we have
reached optimality. Therefore, the optimal allocation is as shown above.
Notice also that in the second iteration of the stepping stone, the Buntun –
Eastwood route produced a result of 0, which means that there is no improvement
whether we allocate to Atulayan – Eastwood or to Capatain – Eastwood. This is an
evidence of alternative optimal solutions. Let us try allocating to Buntun – Eastwood
instead of Atulayan – Eastwood:
Let’s compute for the cost:
The distribution cost of the two alternative solutions is the same, and the cost of Php
4,525.00 is already the minimum cost possible.
We just have to find the U and V values using the empty cells, starting with the
northwesternmost corner that is unoccupied. We also set the U value of that cell to
zero. We then use this formula to obtain the other U and V values:
Cij = Ui + Vj
We begin with the cell of Atulayan and Fishermall (remember to use only occupied
cells):
Next, let us use the cell of Atulayan and Glorietta.
Notice that the Kij values obtained using the modi method is the same as with the
stepping-stone method above. Next thing we have to do is to select the most
negative number. In this case, it’s a tie between K 11 and K21. Choose any of the two,
and then re-allocate.
You will have to trace a loop again just like in the stepping stone method to
determine from which to subtract the allocation made to the new cell.
We have to repeat the modi method to check if we have reached optimality. Doing
so, we will obtain the following Ui and Vj values:
Since demand (650) is greater than supply (600), we need to add a dummy source
that will “supply” the remaining 50 demand that will be unsatisfied.
The addition of a dummy row or a dummy column has no effect on the initial
solution methods or on the methods for determining an optimal solution. The
dummy row or column cells are treated the same as any other cell.
Once the unbalanced transportation problem has been made balanced, we may now
proceed to solving the problem just like how we solve balanced transportation
problems.
There are four cranes in a construction site. Each crane must be allocated to one
job. The time required to set up each crane for each job is as follows:
There are two requisites that have to be satisfied in order for Hungarian Method to
be used:
The problem must be a minimization problem
The matrix must be square, i.e. rows = columns
From the above conditions, we can infer that maximization assignment problems and
unbalanced assignment problems are unsolvable using the Hungarian Method.
Actually, not. We can just make adjustments to conform to the requisites of the
Hungarian Method before we can solve that. We will go to that at the end of this
lesson, but for now, let us solve a balanced, minimization problem, like the one
above.
2. From the matrix in step #1, find the minimum of each column, and subtract from each
column the minimum value. The resulting matrix is called the reduced matrix. Do not use
the original matrix. Use the final matrix derived in step #1. The minimum value in column 1
is 2; in column 2, 0; column 3, 0; and column 4, 1. Subtract these values from all the values
in that column only. After performing step #2, your matrix should now look like this:
3.Find the minimum number of vertical/horizontal lines required to cover the zeroes in the
matrix. (Note: Do not use diagonal lines!)
This is one way to cover all the zeroes, and we have used
4 lines.
Now check if the minimum number of lines to cover zeroes is equal to the dimension
of your matrix. Our matrix is a 4x4 one, so our dimension is 4, which is not equal to
3, the minimum number of lines. We then proceed to step #4. If dimension is equal
to the minimum number of lines, then we have reached optimality, and the optimal
solution is among the covered zeroes.
4. Find the minimum of uncovered values, and subtract the minimum from all the
uncovered values and add it to the corner points. The corner points are those where
the lines intersect, represented by the red circles in the matrix below.
The yellow cells are the covered values, the red cells are
also covered values, but they are corner points. The blue cells are the uncovered
values. So, from among the values in the blue cells, we find for the minimum. In this
case, it is 3. We then subtract 3 from all the blue cells, and add them to the red
cells. The yellow cells are untouched. After performing step #4, our matrix looks like
this:
Minimum value from uncovered values (blue cells) is 1. So we subtract 1 from all
blue cells, and add 1 to all red cells. Yellow cells are unaffected.
Now, we have reached optimality, since dimension of the matrix is equal to the
minimum lines needed to cover all zeroes.
5. Make the assignment. Each 0 in the final matrix is a possible allocation. The
systematic way to assign would be to start from the row or column with the least
number of zeroes. Because if there are less zeroes in a row or column, we also have
less options in assigning. In this case, minimum number of zeroes is 2, for all rows
except the 4th row, and for all columns except the 3rd So we can start from there.
Let’s assign crane #1 to job #1:
For maximization problems, we need to first select the largest number in the entire
matrix, and then subtract all the other numbers from that largest number to create a
minimization matrix.
Now we can proceed to solving using the Hungarian method. At this point, proceed
to Step #1 to begin solving. After making the optimal assignments, refer to the
original maximization matrix to find for the maximum production.
Operator 1 to Machine A
Operator 2 to Machine D
Operator 3 to Machine C
Operator 5 to Machine B