### SlideShare for iOS

by Linkedin Corporation

FREE - On the App Store

APPROXIMATIONS ...

APPROXIMATIONS

LINEAR PROGRAMMING

PROJECT MANAGEMENT(PERT,CPA)

DECISION THEORY

GAME THEORY

REGRESSION & CORRELATION

QUEUING THEORY

INVENTORY MODELLING

RANDOM VARIABLES & PROBABILITY FUNCTIONS

- Total Views
- 5,720
- Views on SlideShare
- 5,719
- Embed Views

- Likes
- 2
- Downloads
- 180
- Comments
- 0

http://www.slashdocs.com | 1 |

Uploaded via SlideShare as Adobe PDF

© All Rights Reserved

- 1. OPERATIONS RESEARCH rmakaha@facebook.comUNIT 1: APPROXIMATIONSApply given Technologies in estimating solutions in business environment1.1 Newton – Raphson iteration method for solving polynomial equations.1.2 Trapezium Rule for approximating a definite integral1.3 Simpson’ Rule for approximating a definite integral.1.4 Maclaurin Series expansion The Trapezium RuleThe Trapezium Rule is a method of finding the approximate value of an integral between two limits.The area involved is divided up into a number of parallel strips of equal width.Each area is considered to be a trapezium (trapezoid).If there are n vertical strips then there is n+ 1 vertical line (ordinates) bounding them?The limits of the integral are between a and b, and each vertical line has length y1 y2 y3... yn+1 rmmakaha@gmail.com 1
- 2. OPERATIONS RESEARCH rmakaha@facebook.comTherefore in terms of the all the vertical strips, the integral is given by:approx. integral = (strip width) x (average of first and last y-values, plus the sum of all y valuesbetween the second and second-last value)The trapezium rule is a way of estimating the area under a curve. We know that the area under acurve is given by integration, so the trapezium rule gives a method of estimating integrals. This isuseful when we come across integrals that we dont know how to evaluate.The trapezium rule works by splitting the area under a curve into a number of trapeziums, which weknow the area of. rmmakaha@gmail.com 2
- 3. OPERATIONS RESEARCH rmakaha@facebook.comIf we want to find the area under a curve between the points x0 and xn, we divide this interval up undinto smaller intervals, each of which has length h (see diagram above).Then we find that:Where y0 = f(x0) and y1 = f(x1) etcIf the original interval was split up into n smaller intervals, then h is given by: h = (xn - x0)/n intervals,Example rmmakaha@gmail.com 3
- 4. OPERATIONS RESEARCH rmakaha@facebook.comExample #1Example #2 rmmakaha@gmail.com 4
- 5. OPERATIONS RESEARCH rmakaha@facebook.com Maclaurin SeriesThe infinite series expansion for f(x) about x = 0 becomes:f (0) is the first derivative evaluated at x = 0, f (0) is the second derivative evaluated at x = 0, and soon.[Note: Some textbooks call the series on this page "Taylor Series" (which they are, too), or "seriesexpansion" or "power series".]Maclaurin’s Series. A series of the formSuch a series is also referred to as the expansion (or development) of the function f(x) in powers of x, or itsexpansion in the neighborhood of zero. Maclaurin’s series is best suited for finding the value of f(x) for avalue of x in the neighborhood of zero. For values of x close to zero the successive terms in theexpansion grow small rapidly and the value of f(x) can often be approximated by summing only thefirst few terms.A function can be represented by a Maclaurin series only if the function and all its derivatives existfor x = 0. Examples of functions that cannot be represented by a Maclaurin series: 1/x, ln x, cot x. rmmakaha@gmail.com 5
- 6. OPERATIONS RESEARCH rmakaha@facebook.comExample 1 Expand ex in a Maclaurin Series and determine the interval of convergence.Solution. f(x) = ex, f (x) = ex, f (x) = ex, f (x) = ex, ........ , f(n)(x) = exand f(0) = 1, f (0) = 1, f (0) = 1, f (0) = 1, ....... ,f(n)(0) = 1soExample 2. Expand sin x in a Maclaurin Series and determine the interval of convergence.Solution. f(x) = sin x, f(x) = cos x, f(x) = - sin x, f(x) = - cos x, ......Since sin 0 = 0 and cos 0 = 1 the expansion is rmmakaha@gmail.com 6
- 7. OPERATIONS RESEARCH rmakaha@facebook.comSimpsons ruleSimpsons rule can be derived by approximating the integrand f (x) (in blue) by the quadratic )interpolant P (x) (in red).In numerical analysis, Simpsons rule is a method for numerical integration, the numerical ,approximation of definite integrals. Specifically, it is the following approximation: integrals. . rmmakaha@gmail.com 7
- 8. OPERATIONS RESEARCH rmakaha@facebook.com rmmakaha@gmail.com 8
- 9. OPERATIONS RESEARCH rmakaha@facebook.com rmmakaha@gmail.com 9
- 10. OPERATIONS RESEARCH rmakaha@facebook.com Newtons methodIn numerical analysis, Newtons method (also known as the Newton–Raphson method named Raphson method),after Isaac Newton and Joseph R Raphson, is a method for finding successively better approximations ,to the roots (or zeroes) of a real eal-valued function. The algorithm is first in the class of Householders .methods, succeeded by Halleys method method.The Newton-Raphson method in one variable: RaphsonGiven a function ƒ(x) and its derivative ƒ (x), we begin with a first guess x0. Provided the functionis reasonably well-behaved a better approximation x1 is behavedGeometrically, x1 is the intersection point of the tangent line to the graph of f, with the x-axis. The xprocess is repeated until a sufficiently accurate value is reached: A. DescriptionThe function ƒ is shown in blue and the tangent line is in red. We see that xn+1 is a better +1approximation than xn for the root x of the function f.The idea of the method is as follows: one starts with an initial guess which is reasonably close to thetrue root, then the function is approximated by its tangent line (which can be computed using the htools of calculus), and one computes the x-intercept of this tangent line (which is easily done with ), interceptelementary algebra). This x-intercept will typically be a better approximation to the functions root intercept approximationthan the original guess, and the method can be iterated.Suppose ƒ : [a, b] → R is a differentiable function defined on the interval [a, b] with values in the breal numbers R. The formula for converging on the root can be easily derived. Suppose we have .some current approximation xn. Then we can derive the formula for a better approximation, xn+1 byreferring to the diagram on the right. We know from the definition of the derivative at a given point ofthat it is the slope of a tangent at that point.That isHere, f denotes the derivative of the function f. Then by simple algebra we can derive . rmmakaha@gmail.com 10
- 11. OPERATIONS RESEARCH rmakaha@facebook.comWe start the process off with some arbitrary initial value x0. (The closer to the zero, the better. But, ssin the absence of any intuition about where the zero might lie, a "guess and check" method mightnarrow the possibilities to a reasonably small interval by appealing to the intermediate valuetheorem.) The method will usually converge, provided this initial guess is close enough to the .)unknown zero, and that ƒ(x0) ≠ 0. Furthermore, for a zero of multiplicity 1, the convergence is atleast quadratic (see rate of convergence) in a neighbourhood of the zero, which intuitively means convergencethat the number of correct digits roughly at least doubles in every step. More details can be found inthe analysis section below. B. ExamplesSquare root of a numberConsider the problem of finding the square root of a number. There are many methods ofcomputing square roots, and Newtons method is one. ,For example, if one wishes to find the square root of 612, this is equivalent to finding the solution toThe function to use in Newtons method is then,with derivative,With an initial guess of 10, the sequence given by Newtons method isWhere the correct digits are underlined. With only a few iterations one can obtain a solution accurateto many decimal places. rmmakaha@gmail.com 11
- 12. OPERATIONS RESEARCH rmakaha@facebook.comSolution of a non-polynomial equation polynomialConsider the problem of finding the positive number x with cos(x) = x3. We can rephrase that as siderfinding the zero of f(x) = cos(x − x3. We have f(x) = −sin(x) − 3x2. Since cos( ≤ 1 for all x and x) cos(x)x3 > 1 for x > 1, we know that our zero lies between 0 and 1. We try a starting value of x0 = 0.5.(Note that a starting value of 0 will lead to an undefined result, showing the importan of using a importancestarting point that is close to the zero.)The correct digits are underlined in the above example. In particular, x6 is correct to the number ofdecimal places given. We see that the number of correct digits after the decimal point increase from increases2 (for x3) to 5 and 10, illustrating the quadratic convergence. rmmakaha@gmail.com 12
- 13. OPERATIONS RESEARCH rmakaha@facebook.comNewton-Raphson MethodThis uses a tangent to a curve near one of its roots and the fact that where the tangent meets the x-axis gives an approximation to the root.The iterative formula used is:ExampleFind correct to 3 d.p. a root of the equationf(x) = 2x2 + x - 6given that there is a solution near x = 1.4 rmmakaha@gmail.com 13
- 14. OPERATIONS RESEARCH rmakaha@facebook.comUNIT 2: LINEAR PROGRAMMINGHOURS: 20LINEAR PROGRAMMINGIs a technique used to determine how best to allocate personnel, equipment, materials,finance, land, transport e.t.c. , So that profit are maximized or cost are minimized or other optimizationcriterion is achieved.Linear programming is so called because all equations involved are linear. The variables in the problemare Constraints. It is these constraints, which gives rise to linear equations or Inequalities.The expression to the optimized is called the Objective function usually represented by an equation.Question 1:A furniture factory makes two products: Chairs and tables. The products pass through 3 manufacturingstages; Woodworking, Assembly and Finishing.The Woodworking shop can make 12 chairs an hour or 6 tables an hour.The Assembly shops can assembly 8 chairs an hour or 10 tables an hour.The Finishing shop can finish 9 chairs or 7 tables an hour.The workshop operates for 8 hours per day. If the contribution to profit from each Chair is $4 andfrom each table is $5, determine by Graphical method the number of tables and chairs that should beproduced per day to maximize profits.Solution:Let number of chairs be X.Let number of tables be Y. Objective Function is: P = 4X + 5Y.Constraints: WW: X/12 + Y/6 <= 8 X + 2Y <= 96 when X=0 Y= 48 when Y=0 X= 96 AW: X/8 + Y/10 <= 8 5X + 4Y <= 320 when X=0 Y=80 when Y=0 X=64 FNW: X/9 + Y/7 <= 8 7X + 9Y <= 504 when X=0 Y=56 when Y=0 X=72 X>=0 Y>=0 rmmakaha@gmail.com 14
- 15. OPERATIONS RESEARCH rmakaha@facebook.com1009080706050403020 P------ this gives the maximum point100 10 20 30 40 50 60 70 80 90 100Question 2:Mr. Chabata is a manager of an office in Guruwe; he decides to buy some new desk and chairs for hisstaff.He decides that he need at least 5 desk and at least 10 chairs and does not wish to have more than 25items of furniture altogether. Each desk will cost him $120 and each chair will cost him $80. He has amaximum of $2400 to spend altogether.Using the graphical method, obtain the maximum number of chairs and desk Mr. Chabata can buy.Solution:Let X represents number of Desk.Let Y represents number of Chairs. Objective Function is: P = 120X + 80Y.Constraints: X >= 5 Y>= 10 X + Y <= 25 rmmakaha@gmail.com 15
- 16. OPERATIONS RESEARCH rmakaha@facebook.com302520 P Point P (10,15) gives the maximum point151050 5 10 15 20 25 30The Optimum Solution = 120 * 10 + 80 * 15 = 1200 + 1200 = 2400Question 3:A manufacturer produces two products Salt and Sugar. Salt has a contribution of $30 per unit and Sugarhas $40 per unit. The manufacturer wishes to establish the weekly production, which maximize thecontribution. The production data are shown below: Production Unit Machine Hours Labour Hours Materials in KgSalt 4 4 1Sugar 2 6 1Total available per unit 100 180 40Because of the trade agreement sales of Salt are limited to a weekly maximum of 20 units and to honoran agreement with an old established customer, at least 10 units of Sugar must be sold per week.Solution:Let X represents Salt.Let Y represents Sugar. rmmakaha@gmail.com 16
- 17. OPERATIONS RESEARCH rmakaha@facebook.com Objective Function is: P = 30X + 40Y.Constraints: 4X + 2Y <= 100 {machine hours} 4X + 6Y <= 180 {Labour hours} X + Y <= 40 {material} Y>= 10 X<= 20 X>=0; Y>=0;SIMPLEX METHOD:The graphical outlined above can only be applied to problems containing 2 variables. When 3 or morevariables are involved we use the Simplex method. Simplex comprises of series of algebraic proceduresperformed to determine the optimum solution.In Simplex method we first convert inequalities to equations by introducing a Slack variable.A Slack variable represents a spare capacity in the limitation.Simplex Method for Standard Maximization ProblemTo solve a standard maximization problem using the simplex method, we take the following steps:Step 1. Convert to a system of equations by introducing slack variables to turn the constraints intoequations, and rewriting the objective function in standard form.Step 2. Write down the initial tableau.Step 3. Select the pivot column: Choose the negative number with the largest magnitude in thebottom row (excluding the rightmost entry). Its column is the pivot column. (If there are twocandidates, choose either one.) If all the numbers in the bottom row are zero or positive (excludingthe rightmost entry), then you are done: the basic solution maximizes the objective function (seebelow for the basic solution).Step 4. Select the pivot in the pivot column: The pivot must always be a positive number. For eachpositive entry b in the pivot column, compute the ratio a/b, where a is the number in the Answercolumn in that row. Of these test ratios, choose the smallest one. The corresponding number b isthe pivot.Step 5. Use the pivot to clear the column in the normal manner (taking care to follow the exactprescription for formulating the row operations and then relabel the pivot row with the label fromthe pivot column. The variable originally labeling the pivot row is the departing or exiting variableand the variable labeling the column is the entering variable.Step 6. Go to Step 3. rmmakaha@gmail.com 17
- 18. OPERATIONS RESEARCH rmakaha@facebook.comSimplex Method for Minimization ProblemTo solve a minimization problem using the simplex method, convert it into a maximizationproblem. If you need to minimize c, instead maximize p = -c.ExampleThe minimization LP problem:Minimize C = 3x + 4y - 8z subject to the constraints 3x - 4y ≤ 12, x + 2y + z ≥ 4 4x - 2y + 5z ≤ 20 x ≥ 0, y ≥ 0, z ≥ 0can be replaced by the following maximization problem:Maximize P = -3x - 4y + 8z subject to the constraints 3x - 4y ≤ 12, x + 2y + z ≥ 4 4x - 2y + 5z ≤ 20 x ≥ 0, y ≥ 0, z ≥ 0.OR STEPS TO FOLLOW IN SIMPLEX METHOD: i. Obtain the pivot column as the column with the most positive indicator row. ii. Obtain pivot row by dividing elements in the solution column by their corresponding pivot column entries to get the smallest ratio. Element at the intersection of the pivot column and pivot row is known as pivot elements. iii. Calculate the new pivot row entries by dividing pivot row by pivot element. This new row is entered in new tableau and labeled with variables of new pivot column. iv. Transfer other row into the new tableau by adding suitable multiplies of the pivot row (as it appears in the new tableau) to the rows so that the remaining entries in the pivot column becomes zeroes. v. Determine whether or not this solution is optimum by checking the indicator row entries of the newly completed tableau to see whether or not they are any positive entries. If they are positive numbers in the indicator row, repeat the procedure as from step 1. vi. If they are no positive numbers in the indicator row, this tableau represents an optimum solution asked for, the values of the variables together with the objective function could then be stated. rmmakaha@gmail.com 18
- 19. OPERATIONS RESEARCH rmakaha@facebook.com Question 1: Maximize Z = 40X + 32Y Subject to: 40X +20Y <= 600 4X + 10Y <= 100 2X + 3Y <= 38 Using the Simplex method Solution:To obtain the initial tableau, we rewrite the Objective Function as: Z = 40X + 32YIntroducing Slack variables S1, S2, S3 in the 3 inequalities above we get: 40X + 20Y + S1 = 600 4X + 10Y + S2 = 100 2X + 3Y + S3 = 38 X >= 0 Y >=0. TABLEAU 1: Pivot Element X Y S1 S2 S3 Solution S1 40 20 1 0 0 600 S2 4 10 0 1 0 100 S3 2 3 0 0 1 38 Z 40 32 0 0 0 0 Indicator Row Pivot Column TABLEAU 2: X Y S1 S2 S3 Solution X 1 0.5 0.025 0 0 15 S2 0 8 -0.1 1 0 40 S3 0 2 -0.05 0 1 8 Z 0 12 -1 0 0 -600 rmmakaha@gmail.com 19
- 20. OPERATIONS RESEARCH rmakaha@facebook.com TABLEAU 3: X Y S1 S2 S3 Solution X 1 0 0.0375 0 -0.25 13 S2 0 0 0.1 1 -4 8 Y 0 1 0.025 0 0.5 4 Z 0 0 -0.7 0 -6 -648 Indicator Row Pivot ColumnConclusion:Since they are no positive number in the Z row the solution is Optimum. Hence for maximum Z, X =13 and Y = 4 giving Z = 648.NB: a) If when selecting a pivot column we have ties in the indicator row, we then select the pivot column arbitrary. b) If all the entries in the selected pivot column are negative then the objective function is unbound and the maximum problem has no solution. c) A minimization problem can be worked as a maximization problem after multiply the objective function and the inequalities by –1. d) Inequalities change their signs when multiplied by negative number. Question 2: Maximize Z = 5X1 + 4X2 Subject to: 2X1 +3X2 <= 17 X1 + X2 <= 7 3X1 + 2X2 <= 18 Using the Simplex method Solution: Max Z = 5X1 + 4X2 Subject to: 2X1 + 3X2 + S1 = 17 X1 + X2 + S2 = 7 3X1 + 2X2 + S3 = 18 X1 >= 0 X2>=0. rmmakaha@gmail.com 20
- 21. OPERATIONS RESEARCH rmakaha@facebook.com TABLEAU 1: X1 X2 S1 S2 S3 Solution S1 2 3 1 0 0 17 S2 1 1 0 1 0 7 S3 3 2 0 0 1 18 Z 5 4 0 0 0 0 Indicator Row Pivot Column TABLEAU 2: X1 X2 S1 S2 S3 Solution S1 0 5/3 1 0 -2/3 5 S2 0 1/3 0 1 -1/3 1 X1 1 2/3 0 0 1/3 6 Z 0 2/3 0 0 -5/3 -30 TABLEAU 3: X1 X2 S1 S2 S3 Solution X2 0 1 3/5 0 -2/5 3 S2 0 0 -1/5 1 -1/5 0 X1 1 0 -2/5 0 9/15 4 Z 0 0 -2/5 0 -7/5 -32 Pivot ColumnConclusion:Since they are no positive number in the Z row the solution is Optimum. Hence for maximum Z, X1=4 and X2 = 3 giving Z = 32. rmmakaha@gmail.com 21
- 22. OPERATIONS RESEARCH rmakaha@facebook.com Question 3: A company can produce 3 products A, B, C. The products yield a contribution of $8, $5 and $10 respectively. The products use a machine, which has 400 hours capacity in the next period. Each unit of the products uses 2, 3 and 1 hour respectively of the machine’s capacity. There are only 150 units available in the period of a special component, which is used singly in products A and C. 200 kgs only of a special Alloy is available in the period. Product A uses 2 kgs per unit and Product C uses 4kgs per units. There is an agreement with a trade association to produce no more than 50 units of product in the period. The Company wishes to find out the production plan which maximized contribution.Solution: Maximize Z = 8X1 + 5X2+ 10X3 Subject to: 2X1 + 3X2 + X3 <= 400 {machine hour} X1 + X3 <= 150 {component} 2X1 + 4X3 <= 200 {Alloy} X2 <=50 {Sales} X1 >= 0 X2 >= 0 X3 >= 0.Introducing slack variables:Maximize Z = 8X1 + 5X2+ 10X3Subject to: 2X1 + 3X2 + X3 + S1= 400 X1 + X3 + S2 = 150 2X1 + 4X3 + S3 = 200 X2 + S4 =50 X1 >= 0 X2 >= 0 X3 >= 0. rmmakaha@gmail.com 22
- 23. OPERATIONS RESEARCH rmakaha@facebook.com TABLEAU 1: X1 X2 X3 S1 S2 S3 S4 Solution S1 2 3 1 1 0 0 0 400 S2 1 0 1 0 1 0 0 150 S3 2 0 4 0 0 1 0 200 S4 0 1 0 0 0 0 1 50 Z 8 5 10 0 0 0 0 0 Indicator Row Pivot ColumnNB: Ignore S4 in finding pivot row. TABLEAU 2: X1 X2 X3 S1 S2 S3 S4 Solution S1 3/2 3 0 1 0 -1/4 0 350 S2 1/2 0 0 0 1 -1/4 0 100 X3 1/2 0 1 0 0 1/4 0 50 S4 0 1 0 0 0 0 1 50 Z 3 5 0 0 0 -5/2 0 -500 Pivot Column rmmakaha@gmail.com 23
- 24. OPERATIONS RESEARCH rmakaha@facebook.com TABLEAU 3: X1 X2 X3 S1 S2 S3 S4 Solution S1 3/2 0 0 1 0 -1/4 -3 200 S2 1/2 0 0 0 1 -1/4 0 100 X3 1/2 0 4 0 0 1/4 0 50 X2 0 1 0 0 0 0 1 50 Z 3 0 0 0 0 -5/2 -5 -750 Pivot Column TABLEAU 4: X1 X2 X3 S1 S2 S3 S4 Solution S1 0 0 -3 1 0 -1 -3 50 S2 0 0 -1 0 1 -1/2 0 50 X1 1 0 2 0 0 1/2 0 100 X2 0 1 0 0 0 0 1 50 Z 0 0 -6 0 0 -4 -5 -1050 Pivot ColumnConclusion:Since they are no positive number in the Z row the solution is Optimum. Hence for maximum Z, X1=100 and X2 = 50 giving Z = 1050.Two slack variable S1 =0 and S2 =0. This means that there is no value to be gained by altering themachine hours and component constraints. rmmakaha@gmail.com 24
- 25. OPERATIONS RESEARCH rmakaha@facebook.com GENERAL RULE:Constraints only have a valuation when they are fully utilized.These valuations are known as the SHADOW Prices or Shadow Costs or Dual Prices or SimplexMultipliers.A constraint only has a Shadow price when it is binding i.e. fully utilized and the Objective function wouldbe increased if the constraint were increased by 1 unit.When solving Linear Programming problems by Graphical means the Shadow price have to be calculatedseparately. When using Simplex method they are an automatic by product. ֠ MIXED CONSTRAINTS: This involves constraints containing a mixture of <= and >= varieties. Using Maximization problem we use “Less than or equal to” type. (<=). Faced with a problem which involves a mixture of <= and >= variety. The alternative solution to deal with “Greater than or equal to” (>=) type is to multiply both sides by –1 and change the inequality sign. Question 4: Maximize Z = 5X1 + 3X2+ 4X3 Subject to: 3X1 + 12X2 + 6X3 <= 660 6X1 + 6X2 + 3X3 <= 1230 6X1 + 9X2 + 9X3 <= 900 X3 >=10 Solution: The only constraint that need to be changed is X3 >=10 by multiply by –1 both sides and we get: -X3 <= -10 Maximize Z = 5X1 + 3X2+ 4X3 Subject to: 3X1 + 12X2 + 6X3 + S1 = 660 6X1 + 6X2 + 3X3 + S2 = 1230 6X1 + 9X2 + 9X3 <+ S3 = 900 -X3+ S4 = -10 rmmakaha@gmail.com 25
- 26. OPERATIONS RESEARCH rmakaha@facebook.com TABLEAU 1: X1 X2 X3 S1 S2 S3 Solution S1 3 12 6 1 0 0 600 S2 6 6 3 0 1 0 1200 S3 6 9 9 0 0 1 900 Z 5 3 4 0 0 0 0 Indicator Row Pivot Column FINAL TABLEAU: X1 X2 X3 S1 S2 S3 Solution S1 0 15/2 3/2 1 0 -1/2 150 S2 0 -3 -6 0 1 -1 300 X1 1 3/2 3/2 0 0 1/6 150 Z 0 -9/2 -7/2 0 0 -5/6 -750 Pivot ColumnConclusion:Since they are no positive number in the Z row the solution is Optimum. Hence for maximum Z, X1=150 producing Z = $750. Plus production to satisfy constrain (d) 20 units of X3 producing $ 40contribution.Therefore Total solution is 150 units of X1 and 10 units of X3 giving $790.NB: Maximize Z = 5(150) + 3(0)+ 4(10) = $790. rmmakaha@gmail.com 26
- 27. OPERATIONS RESEARCH rmakaha@facebook.com Question 5:Maximize Z = 3X1 + 4X2 Subject to: 4X1 + 2X2 <= 100 4X1 + 6X2 <= 180 X1 + X2 <= 40 X1 <= 20 X2 >=10Solution:The only constraint that need to be changed is X2 >=10 by multiply by –1 both sides and we get: -X2 <= -10Maximize Z = 3X1 + 4X2 Subject to: 4X1 + 2X2 + S1 = 100 {1} 4X1 + 6X2 + S2 = 180 {2} X1 + X2 + S3 = 40 {3} X1 + S4 = 20 {4} -X2 + S5 =-10 {5} TABLEAU 1: X1 X2 S1 S2 S3 S4 S5 Solution S1 4 2 1 0 0 0 0 100 S2 4 6 0 1 0 0 0 180 S3 1 1 0 0 1 0 0 40 S4 1 0 0 0 0 1 0 20 S5 0 -1 0 0 0 0 1 -10 Z 3 4 0 0 0 0 0 0 IndicatorRow Pivot ColumnThe problem is then solved by the usual Simplex iterations. Each iteration improves on the onebefore and the process continues until optimum is reached. rmmakaha@gmail.com 27
- 28. OPERATIONS RESEARCH rmakaha@facebook.com TABLEAU 2: X1 X2 S1 S2 S3 S4 S5 Solution X2 0 1 0 0 0 0 -1 10 S2 4 0 1 0 0 0 2 80 S3 4 0 0 1 0 0 6 120 S4 1 0 0 0 1 0 1 30 S5 1 0 0 0 0 1 0 20 Z 4 0 0 0 0 0 4 -40This shows 10X2 being produced and $40 contribution. The first four constraints have surpluses of80, 120, 30 and 20 respectively. Not optimums as there are still positive values in Z row. TABLEAU 3: X1 X2 S1 S2 S3 S4 S5 Solution X2 0.667 1 0 0.167 0 0 0 30 S2 2.667 0 1 -0.333 0 0 0 40 S3 -0.333 0 0 -0.167 0 0 0 10 S4 1 0 0 0 1 1 0 20 S5 0.333 0 0 0.167 0 0 1 20 Z 0.333 0 0 -0.667 0 0 0 -120This shows 30X2 being produced and $120 contribution. All constraints have surpluses exceptLabour hours. Not optimum as there is a positive value in Z row. rmmakaha@gmail.com 28
- 29. OPERATIONS RESEARCH rmakaha@facebook.com TABLEAU 4: X1 X2 S1 S2 S3 S4 S5 Solution X1 1 0 0.375 0.125 0 0 0 15 X2 0 1 -0.25 0.250 0 0 2 0 S3 0 0 -0.125 -0.125 1 0 0 5 S4 0 0 -0.375 0.125 0 1 0 5 S5 0 0 -0.25 0.25 0 0 1 10 Z 0 0 -0.125 -0.625 0 0 0 -125Conclusion:Since the indicator row is negative the solution is optimum with 15X1 and 20X2 giving $125contribution.Shadow prices are X1 = $0.125 and X2 = $0.625.Non-binding constraints are {3}, {4}, {5} with 5, 5 and 10 spare respectively.֠ DUALITY:There is a dual or inverse for every Linear Programming problem. Because solving Simplex problem inMaximization is quite simple and straightforward, it is usually to convert a Minimization problem intoMaximization problem using dual.The dual or inverse of Linear Programming problem is obtained by making the constraints in theinequalities coefficient of the new objective function.The cofficiences of the original inequalities are combined with the cofficiences of the original objectivefunction as the constraints. Question 6:Minimize Z = 40X1 + 50X2 Subject to: 3X1 + 5X2 >= 150 5X1 + 5X2 >= 200 3X1 + X2 >= 60 X1, X2 >=0 rmmakaha@gmail.com 29
- 30. OPERATIONS RESEARCH rmakaha@facebook.comSolution:The Dual Linear Programming problem is as follows: Maximize P = 150Y1 + 200Y2 +60 Y3 Subject to: 3Y1 + 5Y2 + 3Y3 <= 40 5Y1 + 5Y2 + Y3 <= 50 Y1>=0, Y2>=0, Y3>=0. Y1 Y2 Y3 S1 S2 Solution S1 3 5 3 1 0 40 S2 5 5 1 0 1 50 P 150 200 60 0 0 0 Indicator Row Pivot Column Y1 Y2 Y3 S1 S2 Solution Y2 3/5 1 3/5 1/5 0 8 S2 2 0 -2 -1 1 10 P 30 0 -60 -40 0 -1600 Y1 Y2 Y3 S1 S2 Solution Y2 0 1 1.2 0.5 -0.3 5 Y1 1 0 -1 -0.5 0.5 5 P 0 0 -30 -25 -15 -1750 Conclusion: Since the indicator row is negative the solution is optimum with 5Y1 and 5Y2 giving $1750 contribution. rmmakaha@gmail.com 30
- 31. OPERATIONS RESEARCH rmakaha@facebook.com Question 7:Minimize Z = 16X1 + 11X2 Subject to: 2X1 + 3X2 >= 3 5X1 + X2 >= 8 X1, X2 >=0 Using the Dual problem. Solution:The Dual Linear Programming problem is as follows: Maximize P = 3Y1 + 8Y2 Subject to: 2Y1 + 5Y2 <= 16 3Y1 + Y2 <= 11 Y1>=0, Y2>=0. Y1 Y2 S1 S2 Solution S1 2 1 0 16 5 S2 3 1 0 1 11 Z 3 8 0 0 0 Indicator Row Pivot Column Y1 Y2 S1 S2 Solution Y1 0.4 1 0.2 0 3.2 S2 2.6 0 -0.2 1 7.8 Z -0.2 0 -1.6 0 -25.6Conclusion: Since the indicator row is negative the solution is optimum. Hence P = 3Y1 + 8Y2 is maximum when Y1 = 3.2 and Y2= 0 and P = 25.6 In the primary problem, the solution correspond the slack variable values in the final tableau. i.e. X1= S1 = 1.6 X2= S2 = 0. Hence Z = 16*1.6 + 11*0 => 25.6 rmmakaha@gmail.com 31
- 32. OPERATIONS RESEARCH rmakaha@facebook.com ֠ TERMS USED WITH LINEAR PROGRAMMING: FEASIBLE REGION: Represents all combinations of values of the decision variables that satisfy every restriction simultaneous. The corner point of the feasible region gives what is known as BASIC FEASIBLE SOLUTION i.e. the solution that is given by the coordinates at the intersection of any two binding constraints. BINDING CONSTRAINTS: Is an inequality whose graph forms the bounder of the feasible region. NON BINDING CONSTRAINTS: Is an inequality, which does not conform to the feasible region. DUAL PRICE / SHADOW PRICES: It is important that management information to value the scarce resources. These are known as Dual price / Shadow price. Derived from the amount of increase (or decrease) in contribution that would arise if one more (or one less) unit of scare resource was available. rmmakaha@gmail.com 32
- 33. OPERATIONS RESEARCH rmakaha@facebook.comASSIGNMENT PROBLEM:This is the problem of assigning any worker to any job in such a way that only one worker is assigned toeach job, every job has one worker assigned to it and the cost of completing all jobs is minimized. STEPS TO BE FOLLOWED IN ASSIGNMENT PROBLEM: a. Layout a two way table containing the cost for assigning a worker to a job. b. In each row subtract the smallest cost in the row from every cost in the row. Make a new table. c. In each column of the new table, subtract the smallest cost from every cost in the column. Make a new table. d. Draw horizontal and vertical lines only through zeroes in the table in such a way that the minimum number of lines is used. e. If the minimum number of lines that covers zeroes is equal to the number of rows in the table the problem is finished. f. If the minimum number of lines that covers zeroes is less than the number of rows in the table the problem is not finished go to step g. g. Find the smallest number in the table not covered by a line. i. Subtract that number from every number that is not covered by a line. ii. Add that number to every number that is covered by two lines. iii. Bring other numbers unchanged. Make a new table. h. Repeat step d through step g until the problem is finished. rmmakaha@gmail.com 33
- 34. OPERATIONS RESEARCH rmakaha@facebook.com Question 1: Use the assignment method to find the minimum distance assignment of Sales representative to Customer given the table below: What is the round trip distance of the assignment? Sales Representative Customer Distance (km) A 1 200 A 2 400 A 3 100 A 4 500 B 1 1000 B 2 800 B 3 300 B 4 400 C 1 100 C 2 50 C 3 600 C 4 200 D 1 700 D 2 300 D 3 100 D 4 250 TABLEAU 1: 1 2 3 4 A 200 400 100 500 B 1000 800 300 400 C 100 50 600 200 D 700 300 100 250 TABLEAU 2: 1 2 3 4 A 100 300 0 400 B 700 500 0 100 C 50 0 550 150 D 600 200 0 150 rmmakaha@gmail.com 34
- 35. OPERATIONS RESEARCH rmakaha@facebook.com TABLEAU 3: 1 2 3 4 A 50 300 0 300 B 650 500 0 0 C 0 0 550 50 D 550 200 0 50 TABLEAU 4: 1 2 3 4 A 0 250 0 300 B 600 450 0 0 C 0 0 600 100 D 500 150 0 50 Conclusion: Since the number of lines is now equal to number of rows, the problem is finished with the following assignment: SALES REP CUSTOMER DISTANCE A 1 200 B 4 400 C 2 50 D 3 100 750 km Therefore total round Trip distance = 750 km * 2 => 1500 km Question 2:A foreman has 4 fitters and has been asked to deal with 5 jobs. The times for each job are estimated asfollows. A B C D 1 6 12 20 12 2 22 18 15 20 3 12 16 18 15 4 16 8 12 20 5 18 14 10 17Allocate the men to the jobs so as to minimize the total time taken. rmmakaha@gmail.com 35
- 36. OPERATIONS RESEARCH rmakaha@facebook.comSolution:Insert a Dummy fitter so that number of rows will be equal to number of column. TABLEAU 1: A B C D DUMMY 1 6 12 20 12 0 2 22 18 15 20 0 3 12 16 18 15 0 4 16 8 12 20 0 5 18 14 10 17 0 TABLEAU 2: A B C D DUMMY 1 0 4 10 0 0 2 16 10 5 8 0 3 6 8 8 3 0 4 10 0 2 8 0 5 12 6 0 5 0 TABLEAU 3: A B C D DUMMY 1 0 4 10 0 3 2 13 7 2 5 0 3 3 5 5 0 0 4 10 0 2 8 3 5 12 6 0 5 3 Conclusion: Since the number of lines is now equal to number of rows, the problem is finished with the following assignment: FITTERS JOBS TOTALS A 1 6 B 4 8 C 5 10 D 2 15 Dummy 2 0 39 rmmakaha@gmail.com 36
- 37. OPERATIONS RESEARCH rmakaha@facebook.com THE ASSIGNMENT TECHNIQUE FOR MAXIMIZING PROBLEMS: Maximizing assignment problem typically involves making assignments so as to maximize contributions. STEPS INVOLVED: a) Reduce each row by largest figure in that row and ignore the resulting minus signs. b) The other procedures are the same as applied to minimization problems. Question 3:A foreman has 4 fitters and has been asked to deal with 4 jobs. The times for each job are estimated asfollows. W X Y Z A 25 18 23 14 B 38 15 53 23 C 15 17 41 30 D 26 28 36 29Allocate the men to the jobs so as to maximize the total time taken.Solution: TABLEAU 1: W X Y Z A 0 7 2 7 B 15 38 0 30 C 26 24 0 11 D 10 8 0 7 TABLEAU 2: W X Y Z A 0 0 2 0 B 15 31 0 23 C 26 17 0 4 D 10 1 0 0 rmmakaha@gmail.com 37
- 38. OPERATIONS RESEARCH rmakaha@facebook.com TABLEAU 3: W X Y Z A 0 0 3 1 B 14 30 0 23 C 25 16 0 4 D 9 0 0 0 TABLEAU 4: W X Y Z A 0 0 7 1 B 10 26 0 19 C 21 12 0 0 D 9 0 4 0 Conclusion: Since the number of lines is now equal to number of rows, the problem is finished with the following assignment: A W 25 B Y 53 C Z 30 D X 28 $136 Question 4: A Company has four salesmen who have to visit four clients. The profit records from previous visits are shown in the table and it is required to Maximize profits by the best assignment. A B C D 1 6 12 20 12 2 22 18 15 20 3 12 16 18 15 4 16 8 12 20Solution: TABLEAU 1: W X Y Z 1 6 12 20 12 2 22 18 15 20 3 12 16 18 15 4 16 8 12 20 rmmakaha@gmail.com 38
- 39. OPERATIONS RESEARCH rmakaha@facebook.com TABLEAU 2: W X Y Z 1 14 8 0 8 2 0 4 7 2 3 6 2 0 3 4 4 10 8 0 TABLEAU 3: W X Y Z 1 14 6 0 8 2 0 2 7 2 3 6 0 0 3 4 4 10 8 0 Conclusion: Since the number of lines is now equal to number of rows, the problem is finished with the following assignment: 4 D 20 2 A 22 1 C 20 3 B 16 $78 rmmakaha@gmail.com 39
- 40. OPERATIONS RESEARCH rmakaha@facebook.comTRANSPORTATION PROBLEM:This is the problem of determining routes to minimize the cost of shipping commodities from onepoint to another.The unit cost of transporting the products from any origin to any destination is given. Further more,the quantity available at each origin and quantity required at each destination is known. ⇒ STEPS TO BE FOLLOWED IN ASSIGNMENT PROBLEM: Arrange the problem in a table with row requirements on the right and column requirements at the bottom. Each cell should contain the unit cost approximates to the shipment. Obtain an initial solution by using the North West Corner rule. By this method one begins at the up left corner cell and works up to the lower right corner. Place the quantity of goods in the first cell equal to the smallest of the rows or column totals in the table. Balance the row and column respectively until you reach the lower right hand cell. Find cell values for every empty cell by adding and subtract around the closing loop. If all empty cell have + values the problem is finished. If not pick the cell with most – (negative) value. Allocate a quantity of goods to that cell by adding and subtract the small value of the column or row entries in the closed loop. The closed loop techniques involves the following steps: Pick an empty cell, which has no quantity of goods in it. Place a + sign in the empty cell. Use only occupied cells for the rest of the closed loop. Find an occupied cell that has occupied values in the same row or same column and place a – (negative) sign in this cell. Go to the next occupied cell and place + sign in it. Continue in this manner until you return to the unoccupied cell in which you started. A closed loop exists for every empty cell as long as they are occupied cell equal to number of rows + number of column – 1. rmmakaha@gmail.com 40
- 41. OPERATIONS RESEARCH rmakaha@facebook.com Question 1:A firm has 3 factory (A, B, C) and 4 warehouses (1, 2, 3, 4). The capacities of the factories and therequirements of the warehouse are in the table below.FACTORY CAPACITY WAREHOUSE REQUIREMENTS A 220 1 160 B 300 2 260 C 380 3 300 4 180The cost of shipping one unit from each factory to each warehouse is given below. FACTORY WAREHOUSE COST $ o A 1 3 o A 2 5 o A 3 6 o A 4 5 o B 1 7 o B 2 4 o B 3 9 o B 4 6 o C 1 5 o C 2 12 o C 3 10 o C 4 8Using the Transportation method, find the least cost shipping schedule and state what it is ?.Solution: TABLEAU 1: 1 2 3 4 Capacity 3 5 6 5 A 160 60 -4 -3 220 B 5 7 200 100 4 9 -1 6 300 C 2 5 7 12 200 10 180 8 380 Req 160 260 300 180 900This is the initial solution, which costs (160 * 3) + (60 * 5) + (200 * 4) + (100 * 9) + (200 * 10) + (180 * 8) = $5920.00 rmmakaha@gmail.com 41
- 42. OPERATIONS RESEARCH rmakaha@facebook.com TABLEAU 2: 1 2 3 4 Capacity 3 5 6 5 A 160 4 60 1 220 B 5 7 260 40 4 9 -1 6 300 C -2 5 7 12 200 10 180 8 380 Req 160 260 300 180 900The costs = (160 * 3) + (60 * 6) + (260 * 4) + (40 * 9) + (200 * 10) + (180 * 8) = $5680.00 TABLEAU 3: 1 2 3 4 Capacity 3 5 6 5 A 2 4 220 1 220 B 3 7 260 40 4 9 -1 6 300 C 160 5 7 12 40 10 180 8 380 Req 160 260 300 180 900The costs = (160 * 5) + (40 * 10) + (260 * 4) + (40 * 9) + (220 * 6) + (180 * 8) = $5360.00 TABLEAU 4: 1 2 3 4 Capacity 3 5 6 5 A 2 3 220 1 220 B 4 7 260 4 1 40 9 6 300 C 160 5 6 12 80 10 140 8 380 Req 160 260 300 180 900The costs = (160 * 5) + (80 * 10) + (260 * 4) + (40 * 6) + (220 * 6) + (140 * 8) = $5320.00 rmmakaha@gmail.com 42
- 43. OPERATIONS RESEARCH rmakaha@facebook.com Conclusion: Since all the cell values are positive the solution is optimum with the following allocations: A Supplies 220 to 3 B Supplies 260 to 2 C Supplies 160 to 1 C Supplies 80 to 3 C Supplies 140 to 4 With a minimum cost of $ 5320.00 QUESTION Below is a transportation problem where costs are in thousand of dollars. SOURCES DESTINATIONS A B C CAPACITIES X 14 13 15 500 Y 16 15 12 400 Z 20 15 16 600 REQUIREMENTS 700 300 500 i. Solve this problem fully indicating the optimum delivery allocations and the corresponding total delivery cost. [6 marks] ii. There are two optimum solutions. Find the second one [4 marks]. iii. Solve the same problem considering X A is an infeasible (prohibited / impossible) route and find the new total transportation cost [7 marks]. iv. If under consideration is a road network in a war zone, what is the simple economic effect of bombing a bridge between X and A? [3 marks].Solution: PART (i) TABLEAU 1: A B C Capacity 3 5 6 X 500 0 1 500 Y 200 7 200 4 -4 400 9 Z 4 5 100 12 500 10 600 Req 700 300 500 1500The initial solution = (500 * 14) + (200 * 16) + (15 * 200) + (100 * 15) + (500 * 16) rmmakaha@gmail.com 43
- 44. OPERATIONS RESEARCH rmakaha@facebook.com = $227000000 TABLEAU 2: A B C Capacity 3 5 6 X 500 4 5 500 Y 200 7 4 4 200 400 400 9 Z 0 5 300 12 300 10 600 Req 700 300 500 1500Hence delivery allocations are: X Supplies 500 to A Y Supplies 200 to A Y Supplies 200 to C Z Supplies 300 to B Z Supplies 300 to C With a minimum cost of (500 * 14) + (200 * 16) + (15 * 300) + (200 * 12) + (300 * 16) = $21900 0000PART (ii)The existence of an alternative least cost solution is indicated by a value of zero in an unoccupiedcell in the final table. We add and subtract the smallest quantity in the column or row of the zero toget the alternative. TABLEAU 1: A B C Capacity 3 5 6 X 500 4 5 500 Y 0 7 4 4 400 400 400 9 Z 200 5 300 12 10 100 600 Req 700 300 500 1500 rmmakaha@gmail.com 44
- 45. OPERATIONS RESEARCH rmakaha@facebook.comHence delivery allocations are: X Supplies 500 to A Y Supplies 400 to C Z Supplies 200 to A Z Supplies 300 to B Z Supplies 100 to C With a minimum cost of (500 * 14) + (200 * 20) + (15 * 300) + (400 * 12) + (100 * 16) = $21900 0000PART (iii) TABLEAU 1: A B C Capacity 3 5 6 X --- 300 200 500 Y 400 7 5 4 0 400 9 400 Z 300 5 1 12 300 10 600 Req 700 300 500 1500Hence delivery allocations are: X Supplies 300 to B X Supplies 200 to C Y Supplies 400 to A Z Supplies 300 to A Z Supplies 300 to C With a minimum cost of (300 * 13) + (200 * 15) + (16 * 400) + (300 * 20) + (300 * 16) = $24100 0000PART (iv)The simple economic effect of bombing the bridge between X and A = 24100 0000 – 21900 0000 = 2200 000 rmmakaha@gmail.com 45
- 46. OPERATIONS RESEARCH rmakaha@facebook.com DUMMIES: This is an extra row or column in a transportation table with zero cost in each cell and with a total equal to the difference between total capacity and total demand. In an unbalance transportation problem a dummy source or destination is introduced. QUESTION:The transport manager of a company has 3 factories A, B and C and four warehouses I, II, III andIV is faced with a problem of determining the way in which factories should supply warehouses soas to minimize the total transportation costs.In a given month the supply requirements of each warehouse, the production capacities of thefactories and the cost of shipping one unit of product from each factory to each warehouse in $ areshown below. FACTORY WAREHOUSES I II III IV PRO AVAIL A 12 23 43 3 6 B 63 23 33 53 53 C 33 1 63 13 17 REQUIREMENTS 4 7 6 14 31You are required to determine the minimum cost transportation plan [20 marks].Solution: TABLEAU 1: I II III IV Dummy Capacity 12 23 43 3 0 A 4 2 10 - 51 0 6 B 51 63 5 23 6 33 14 53 28 0 53 C 21 33 -22 1 30 63 -40 13 17 0 17 Req 4 7 6 14 45 76This is the initial solution, which costs (4 * 12) + (2 * 23) + (5 * 23) + (6 * 33) + (14 * 53) + (28 * 0) + (17 * 0) = $1149.00 rmmakaha@gmail.com 46
- 47. OPERATIONS RESEARCH rmakaha@facebook.comTABLEAU 2: I II III IV Dummy Capacity 12 23 43 3 0 A 4 50 60 2 50 6 B 1 63 7 23 6 33 12 53 28 0 53 C -29 33 -22 1 30 63 -40 13 17 0 17 Req 4 7 6 14 45 76The costs= (4 * 12) + (2 * 3) + (7 * 23) + (6 * 33) + (12 * 53) + (28 * 0) + (17 * 0) = $1049.00 TABLEAU 3: I II III IV Dummy Capacity 12 23 43 3 0 A 4 16 20 2 10 6 B 41 63 7 23 6 33 40 53 40 0 53 C 11 33 -22 1 30 63 12 13 5 0 17 Req 4 7 6 14 45 76The costs= (4 * 12) + (2 * 3) + (7 * 23) + (6 * 33) + (40 * 0) + (12 * 13) + (5 * 0) = $569.00 TABLEAU4: I II III IV Dummy Capacity 12 23 43 3 0 A 4 32 42 2 32 6 B 19 63 2 23 6 33 18 53 45 0 53 C 11 33 5 1 52 63 12 13 0 17 22 Req 4 7 6 14 45 76The costs= (4 * 12) + (2 * 3) + (2 * 23) + (6 * 33) + (45 * 0) + (12 * 13) + (5 * 1) = $459.00 rmmakaha@gmail.com 47
- 48. OPERATIONS RESEARCH rmakaha@facebook.comHence delivery allocations are: Factory A Supplies Warehouse I Factory A Supplies Warehouse IV Factory B Supplies Warehouse II Factory B Supplies Warehouse III Factory B Supplies Warehouse Dummy Factory C Supplies Warehouse II Factory C Supplies Warehouse IVWith a minimum cost of (4 * 12) + (2 * 3) + (2 * 23) + (6 * 33) + (45 * 0) + (12 * 13) + (5 * 1) = $459.00 QUESTION:A well-known organization has 3 warehouse and 4 Shops. It requires transporting its goods from thewarehouse to the shops. The cost of transporting a unit item from a warehouse to a shop and thequantity to be supplied are shown below. DESTINATION I II III IV TOTAL SUPPLY SOURCE A 10 0 20 11 15 SOURCE B 12 7 9 20 25 SOURCE C 0 14 16 18 5 TOTAL DEMAND 5 15 15 10Use any method to find the optimum transportation schedule and indicate the cost [14marks]. DEGENERATE SOLUTION:It involves working a transportation problem if the number of used routes is equal to: Number of rows + Number of column – 1.However if the number of used routes can be less than the required figure we pretend that an emptyroute is really used by allocating a zero quantity to that route. MAXIMIZATION PROBLEMS:Transportation algorithm assumes that the objective is to minimize cost. However it is possible touse the method to solve maximization problem by either: Multiply all the units’ contribution by – 1. Or by subtracting each unit contribution from the maximum contribution in the table. rmmakaha@gmail.com 48
- 49. OPERATIONS RESEARCH rmakaha@facebook.comUNIT 3: NON-LINEAR FUNCTIONS:HOURS: 20. NON-LINEAR FUNCTIONS: o MARGINAL DISTRIBUTION: PARTIAL INTEGRATION:Partial integration is a function with more than one variable or finding the probability of a functionwith more than one variables i.e. f(X1, X2, X3, ….Xn) and is just the rate at which the values of afunction change as one of the independent variables change and all others are held constant.Question 1:If f(x, y) = 2(x + y –2xy) given the intervals 0<= x<=1, 0<=y<=1.Find the marginal distribution of x = f(x).Find the marginal distribution of y = f(x).Solution:Pr {0<=x<=1} = 0∫1 2(x + y –2xy)δx = 2 0∫1 (x + y –2xy)δx = 2 [x2/2 + xy + x2y]01 = 2 [½ + y – y] = 2[½] =1Pr {0<=y<=1} = 0∫1 2(x + y –2xy)δy = 2 0∫1 (x + y –2xy)δy = 2 [xy +y2/2 + xy2]01 = 2 [x + ½ – x] = 2[½] =1Question 1:If f(X1, X2) =(X21X2 + X31X22 + X1) given the intervals 0<= X1<=2, 1<=X2 <=3.Find the marginal distribution of x = f(x).Find the marginal distribution of y = f(x).Find the Expected value of X1 (E(X1)).Find the variance of X1 (Var (X1)). rmmakaha@gmail.com 49
- 50. OPERATIONS RESEARCH rmakaha@facebook.comSolution:Pr {0<=X1<=2} = 0∫2 (X21X2 + X31X22 + X1)δx = [X31X2 /3+ X41X22 /4+ X21/2]02 = [8X2 /3+ 4X22 + 2] – [0] = 8X2 /3+ 4X22 + 2Pr {1<=X2<=3} = 1∫3 (X21X2 + X31X22 + X1)δy = [X21X22 /2+ X31X32 /3+ X1X2]13 = [9X21 /2+ 27X31 /3+ 3X2]13 –[X21 /2+ X32 /3+ X1] = 9X21 /2+ 27X31 /3+ 3X2 – X21 /2- X32 /3 - X1 = 8X21 /2+ 26X31 /3+ 2X2Expected value of E(X1) =0∫2 X. f(X1)δx = 0∫2 X(X21X2 + X31X22 + X1)δx = 0∫2 (X31X2 + X41X22 + X21)δx = [X41X2 /4+ X51X22 /5+ X31/3]02 = [4X2 + 32X22 /5 + 8 /3] – [0] = 4X2 + 32X22 /5 + 8 /3Variance of X1 = Var (X1) = 0∫2 ([X1 - E(X1)]2 . f(X1)δx = 0∫2 ([X1 - 4X2 + 32X22 /5 + 8 /3]2 * (X21X2 + X31X22 + X1)δx.Question 2:A manufacturing company produces two products bicycles and roller skates. Its fixed costsproduction is: $1200 per week. Its variables costs of production are: $40 for each bicycle producedand $15 for each pair of roller skates. Its total weekly costs in producing x bicycles and y pairs ofroller skates are therefore c= cost.C(x, y) = 1200 + 40x + 15y for example; in producing x = 20 bicycles and y = 30 pairs of rollerskates/ week.The manufacture experiences total cost of: C(20, 30) = 1200 + 40(20) + 15(30) = 1200 + 800 + 450 = 2450.Question 3:A manufacturing of Automobile tyres produces 3 different types: regular, green and blue tyres. If theregular tyres sell for $60 each, the green tyres for $50 each and the blue tyres for $100 each. Find afunction giving the manufacture’s total receipts or revenue from the of x regular tyres and y greentyres and z blue tyres.R(x, y, z) = 60x + 50y +100z. rmmakaha@gmail.com 50
- 51. OPERATIONS RESEARCH rmakaha@facebook.comSolution:Since the receipts of the sale of any tyre type is the price per tyre times the number of tyres sold:The total receipts are:R(x, y, z) = 60x + 50y + 100zFor example receipts from the sell of 10 tyres of each type would be:R(10,10,10) = 60(10) + 50(10) + 100(10) = 600 + 500 + 1000 = $2100 PARTIAL DIFFERENTIATION:For a function “f” of a single variable, the derivative f measures the rate at which the values of f(x)change as the independent variable x change.A partial derivative of a function i.e. f(X1, X2, X3.. Xn) of several variables is just the rate at which thevalues of the function change as one of the independent variable changes and all others are heldconstant.Question 3:For the function f(x, y) = X3 + 4X2Y3 + Y2Find δf / δx δf / δy f(-2; 3)Solution: δf / δx = 3X2 + 8XY3 δf / δy = 12X2Y2 + 2Y f(-2; 3) = X3 + 4X2Y3 + Y2 = (-2)3 + 4(-2)2(3)3 + (3)2 = -8 + 16(27) +9 = 433Question 4:A company produces electronic typewriters and word processors, it sells the electronic typewritersfor $100 each and word processors for $300 each. The company has determined that its weekly salesin producing x electronic writers and y word processors are given by the following joint costfunction.C(x, y) = 200 + 50x +8y + X2 + 2Y2Find the numbers of x and y of machines that the company should manufacture and sell weekly inorder to maximize profits. rmmakaha@gmail.com 51
- 52. OPERATIONS RESEARCH rmakaha@facebook.comSolution:Revenue function is given by: R(x, y) = 100x + 300yProfit = Revenue – Cost.Then Profit function is given by:P(x, y) = R(x, y) – C(x, y) = (100x + 300y) – (200 + 50x +8y + X2 + 2Y2) = 50x + 292y – 200 - X2 - 2Y2To find the critical points of turning points of x and y. We set the partial derivative = 0.Thus δp / δx => 50 – 2x = 0 50 = 2x x = 25 δp / δy => 292 – 4y =0 292 = 4y y = 73The production schedule for maximum profit is therefore x = 25 type writers and y = 73 wordprocessors which yields a profit of P = 50(25) + 292(73) – 200 – 625 – 2(73)2 = 1250 + 21316 – 200 – 625 – 1065 = 22566 – 11493 = $11083 NECESSARY AND SUFFICIENT CONDITIONS FOR EXTREMA:The necessary condition or the GRADIENT VECTOR of the extrema determines the turningpoints or critical points of a function.Let X0 be a variable representing the turning point and represented mathematically as:X0 = (A0, B0, … N0).In general form; a necessary condition or gradient vector for X0 to be an extrema point of f(x) is thatthe gradient (∇) ≡ ∇f (X0) = 0. rmmakaha@gmail.com 52
- 53. OPERATIONS RESEARCH rmakaha@facebook.comQuestion 1:Given f(X1, X2, X3) =(X1 + 2X3 + X2X3 – X21 - X22 - X23)Find the gradient vector for X0 i.e. ∇f (X0) = 0.Solution:The necessary condition (gradient vector) ∇f (X0) = 0 is given by: δf / δx1 => 1 - 2X1 = 0. 1 - 2X1 = 0. [1] δf / δx2 => X3 - 2X2 = 0. X3 - 2X2 = 0. [2] δf / δx3 => 2 + X2 - 2X3 = 0. 2 + X2 - 2X3 = 0. [3] (a) Finding X1 is given by 1 = 2X1 X1 = ½ (b) Equation 2 is given by X3 - 2X2 = 0. X3 = 2X2. (c) On equation 3 where therefore substitute X3 with 2X2. Thus 2 + X2 - 2X3 = 0. 2 + X2 – 2(2X2) = 0. 2 + X2 – 4X2 = 0. 2 – 3X2 = 0. X2 = 2/3. Therefore X3 = 2X2. X3 = 2(2 / 3) X3 = 4/3. Therefore X0 = (½, 2/3, 4/3) rmmakaha@gmail.com 53
- 54. OPERATIONS RESEARCH rmakaha@facebook.comHessian matrixIn mathematics, the Hessian matrix (or simply the Hessian) is the square matrix of second-orderpartial derivatives of a function; that is, it describes the local curvature of a function of many function;variables.Given the real-valued functionif all second partial derivatives of f exist, then the Hessian matrix of f is the matrixwhere x = (x1, x2, ..., xn) and Di is the differentiation operator with respect to the ith argument andthe Hessian becomesSome mathematicians define the Hessian as the determinant of the above matrix. Bordered HessianA bordered Hessian is used for the second-derivative test in certain constrained optimiza second derivative optimizationproblems. Given the function as before:but adding a constraint function such that:the bordered Hessian appears as rmmakaha@gmail.com 54
- 55. OPERATIONS RESEARCH rmakaha@facebook.comIf there are, say, m constraints then the zero in the north north-west corner is an m × m block of zeroes,and there are m border rows at the top and m border columns at the left.The above rules of positive definite and negative definite can not apply here since a borderedHessian can not be definite: we have zHz = 0 if vector z has a non-zero as its first element, zerofollowed by zeroes.The second derivative test consists here of sign restrictions of the determinants of a certain set of n - hem submatrices of the bordered Hessian. Intuitively, think of the m constraints as reducing theproblem to one with n - m free variables. (For example, the maximization of f 1,x2,x3) subject to the f(xconstraint x1 + x2 + x3 = 1 can be reduced to the maximization of f(x1,x2,1 − x1 − x2) withoutconstraint.)A sufficient condition for X0 a point to be extremism is that theHESSIAN matrix (denoted by H) eval evaluate at X0 is: i. Positive definite when X0 is a Minimum point. ii. Negative definite when X0 is a Maximum point.The Hessian matrix is achieved by finding the 2nd Partial derivation of the first Partial derivative ofeach equation with respect to all variables defined.Thus the Hessian matrix is evaluated at the point X0H δ2f δ2f δ2f /X0 = /δX21, / δX1 δX22,, / δX1 δX23 δ2f δ2f δ2f /δX2 δX21, / δX22, / δX2 δX23 δ2f δ2f δ2f /δX3 δX21, / δX3 δX22, / δX23 rmmakaha@gmail.com 55
- 56. OPERATIONS RESEARCH rmakaha@facebook.comδf / δx1 => 1 - 2X1 = 0.δf / δx2 => X3 - 2X2 = 0.δf / δx3 => 2 + X2 - 2X3 = 0.To establish the sufficiency the function has to have:H /X0 = -2 0 0 0 -2 1 0 1 -2Since the Hessian matrix is 3 by 3 matrix then: Find the 1st Principal Minor determinant of 1 by 1 matrix in the Hessian matrix. Find the 2nd Principal Minor determinant of 2 by 2 matrix in the Hessian matrix. Find the 3rd Principal Minor determinant of 3 by 3 matrix in the Hessian matrix.The Positive definite when X0 is a Minimum point is evaluated as: When 1st PMD = + ve. When 2nd PMD = +ve. When 3rd PMD = +ve.Or When 1st PMD = - ve. When 2nd PMD = +ve. When 3rd PMD = +ve.Thus 3 by 3 Hessian matrix the number of positive number should be greater than one. (Should betwo or more).The Negative definite when X0 is a Maximum point is evaluated as: When 1st PMD = - ve. When 2nd PMD = - ve. When 3rd PMD = - ve.Or When 1st PMD = + ve. When 2nd PMD = - ve. When 3rd PMD = - ve.Thus 3 by 3 Hessian matrix the number of negative number should be greater than two. (Should betwo or more).H /X0 = -2 0 0 0 -2 1 0 1 -2Thus the 1st PMD of (-2) = -2 rmmakaha@gmail.com 56
- 57. OPERATIONS RESEARCH rmakaha@facebook.comThus the 2nd PMD of –2 0 0 -2 = (-2 * -2) – (0 * 0) =4The 3rd PMD = -2 0 0 0 -2 1 0 1 -2 = -2 –2 1 -0 0 1 +0 0 -2 1 -2 0 -2 0 1 = -2 {(-2 * -2) – (1 * 1)} – 0 (0 – 0) + 0 (0 – 0) = - 2 (3) =-6Thus the PMD is equal to –2, 4 and –6 and H/X0 is negative definite and X0 = (½, 2/3, 4/3) represents aMaximum point.Question 2:Given f(X1, X2, X3) =(-X1 + 2X3 - X2X3 + X21+ X22 - X23) i. Find the gradient vector for X0 i.e. ∇f (X0) = 0. ii. Determine the nature of the turning points using Hessian Matrix.Solution:The necessary condition (gradient vector) ∇f (X0) = 0 is given by: δf / δx1 => -1 + 2X1 = 0. -1 + 2X1 = 0. [1] δf / δx2 => -X3 + 2X2 = 0. -X3 + 2X2 = 0. [2] δf / δx3 => 2 - X2 - 2X3 = 0. 2 - X2 - 2X3 = 0. [3] (b) Finding X1 is given by -1 = 2X1 X1 = ½ (b) Equation 2 is given by -X3 + 2X2 = 0. X3 = 2X2. (c) On equation 3 where therefore substitute X3 with 2X2. Thus 2 - X2 - 2X3 = 0. rmmakaha@gmail.com 57
- 58. OPERATIONS RESEARCH rmakaha@facebook.com 2 - X2 – 2(2X2) = 0. 2 - X2 – 4X2 = 0. 2 – 5X2 = 0. X2 = 2/5. Therefore X3 = 2X2. X3 = 2(2 / 5) X3 = 4/5. Therefore X0 = (½, 2/5, 4/5)H δ2f δ2f δ2f /X0 = / δX21, / δX1 δX22, / δX1 δX23 δ2f δ2f δ2f / δX2 δX21, / δX22, / δX2 δX23 δ2f δ2f δ2f / δX3 δX21, / δX3 δX22, / δX23H /X0 = 2 0 0 0 2 -1 0 -1 -2Thus the 1st PMD of (2) = 2Thus the 2nd PMD of 2 0 0 2 = (2 * 2) – (0 * 0) =4The 3rd PMD = 2 0 0 0 2 -1 0 -1 -2 = -2 2 -1 - 0 0 -1 + 0 0 2 -1 -2 0 -2 0 -1 = 2 {(2 * -2) – (-1 * -1)} – 0 (0 – 0) + 0 (0 – 0) = 2 (-4) - (1) = 2 (-5) = - 10Thus the PMD is equal to 2, 4 and –10 and H/X0 is positive definite and X0 = (½, 2/5, 4/5) represents aMinimum point. rmmakaha@gmail.com 58
- 59. OPERATIONS RESEARCH rmakaha@facebook.com NON LINEAR ALGORITHMS: (COMPUTATIONS) 1 THE GRADIENT METHODS:The general idea is to generate successive iterative points, starting from a given initial point, in thedirection of the fast and increase (maximization of the function).The method is based on solving the simultaneous equations representing the necessary conditionsfor optimality namely ∇f (X0) = 0.Termination of the gradient method occurs at the point where the gradient vector becomes null.This is only a necessary condition for optimality suppose that f(x) is maximized.Let X0 be the initial point from which the procedure starts and define ∇f (Xk) as the gradient of f atKth point Xk.This result is achieved if successive point Xk and Xk+1 are selected such that Xk+1 = Xk + rk ∇f (Xk) where rk is a parameter called Optimal Step Size.The parameter rk is determined such that Xk+1 results in the largest improvement in f. In otherwords, if a function h(r) is defined such that h(r) = f(Xk )+ rk ∇f (Xk). This function is thendifferentiated and equate zero to the differentiatable function to obtain the value of rk.Question 3:Consider maximizing f(X1, X2) =(4X1 + 6X2 - 2X21- 2X2X1 - 2X22)And let the initial point be given by X0(1, 1).Hint in X0(1, 1) X1 =1 and X2 = 1Solution:Find ∇f (X0) = (δf/δx1, δf/δx2) = (4 – 4X1 – 2X2; 6 – 2X1 - 4X2) 1st iterationStep 1: Find ∇f (X0) = (4 – 4 – 2; 6 – 2 - 4) = (-2; 0)Step 2: Find Xk+1 = Xk + rk ∇f (Xk) X0+1 = X0 + rk ∇f (X0) X1 = (1, 1) + r(-2; 0) (1, 1) + (-2r, 0) (1 + -2r, 1) (1 – 2r, 1)Thus h(r) = f(Xk )+ rk ∇f (Xk) = f(X0 )+ r ∇f (X0) = f(1 – 2r; 1) = 4(1 – 2r) + 6(1) – 2(1 – 2r)2 – 2(1)(1 – 2r) - 2(1)2. rmmakaha@gmail.com 59
- 60. OPERATIONS RESEARCH rmakaha@facebook.com = 4(1 – 2r) + 6 – 2(1 – 2r) 2 – 2(1 – 2r) - 2. = 4(1 – 2r) – 2(1 – 2r) + 6 – 2 – 2(1 – 2r)2. = (4 – 2)(1 – 2r) + 4 – 2(1 – 2r)2. = 2(1 – 2r) – 2(1 – 2r)2 + 4. = – 2(1 – 2r)2 +2(1 – 2r) + 4. = – 2(1 – 2r)2 + 2 – 4r + 4. h1(r) = 0 – 2(1 – 2r)2 + 2 – 4r + 4 = 0. - 4 * -2(1 – 2r) – 4 = 0. 8(1 – 2r) + - 4 = 0. 8 – 16r – 4 = 0 4 –16r = 0. r=¼The optimum step size yielding the maximum value of h(r) is h1 = ¼.This gives X1= (1 –2(¼); 1) = (1 - ½; 1) = (½; 1) rmmakaha@gmail.com 60
- 61. OPERATIONS RESEARCH rmakaha@facebook.comUNIT 4: PROJECT MANAGEMENT WITH PERT/CPMHOURS: 20 PROJECT MANAGEMENT:TERMS USED IN PROJECT MANAGEMENT:PROJECT: Is a combination of interrelated activities that must be executed in a certain order before the entire task can be completed?ACTIVITY: Is a job requiring time and resource for its completion?ARROW: Represents a point in time signifying the completion of some activities and the beginning of others.NETWORK: Is a graphic representation of a project’s operation and is composed of activities and nodes.Benefits of PERTPERT is useful because it provides the following information: • Expected project completion time. • Probability of completion before a specified date. • The critical path activities that directly impact the completion time. • The activities that have slack time and that can lend resources to critical path activities. • Activity starts and end dates.LimitationsThe following are some of PERTs weaknesses: • The activity time estimates are somewhat subjective and depend on judgement. In cases where there is little experience in performing an activity, the numbers may be only a guess. In other cases, if the person or group performing the activity estimates the time there may be bias in the estimate. • Even if the activity times are well-estimated, PERT assumes a beta distribution for these time estimates, but the actual distribution may be different. rmmakaha@gmail.com 61
- 62. OPERATIONS RESEARCH rmakaha@facebook.com • Even if the beta distribution assumption holds, PERT assumes that the probability distribution of the project completion time is the same as the that of the critical path. Because other paths can become the critical path if their associated activities are delayed, PERT consistently underestimates the expected project completion time.Critical Path Analysis CPA (Network Analysis)Critical Path Analysis (CPA) is a project management tool that: • Sets out all the individual activities that make up a larger project. • Shows the order in which activities have to be undertaken. • Shows which activities can only taken place once other activities have been completed. • Shows which activities can be undertaken simultaneously, thereby reducing the overall time taken to complete the whole project. • Shows when certain resources will be needed – for example, a crane to be hired for a building site.In order to construct a CPA, it is necessary to estimate the elapsed time for each activity – that is thetime taken from commencement to completion.Then the CPA is drawn up a based on dependencies such as: • The availability of labour and other resources • Lead times for delivery of materials and other services • Seasonal factors – such as dry weather required in a building projectOnce the CPA is drawn up, it is possible to see the CRITICAL PATH itself – this is a routethrough the CPA, which has no spare time (called ‘FLOAT’ or ‘slack’) in any of the activities. Inother words, if there is any delay to any of the activities on the critical path, the whole project will bedelayed unless the firm makes other changes to bring the project back on track.The total time along this critical path is also the minimum time in which the whole project can becompleted.Some branches on the CPA may have FLOAT, which means that there is some spare time availablefor these activities.What can a business do if a project is delayed? • Firstly, the CPA is helpful because it shows the likely impact on the whole project if no action were taken. • Secondly, if there is float elsewhere, it might be possible to switch staff from another activity to help catch up on the delayed activity. • As a rule, most projects can be brought back on track by using extra labour – either by hiring additional people or overtime. Note, there will be usually be an extra cost. Alternative suppliers can usually be found – but again, it might cost more to get urgent help. rmmakaha@gmail.com 62
- 63. OPERATIONS RESEARCH rmakaha@facebook.comThe key rules of a CPA • Nodes are numbered to identify each one and show the Earliest Start Time (EST) of the activities that immediately follow the node, and the Latest Finish Time (LFT) of the immediately preceding activities • The CPA must begin and end on one ‘node’ – see below • There must be no crossing activities in the CPA • East activity is labelled with its name eg ‘print brochure’, or it may be given a label, such as ‘D’, below. • The activities on the critical path are usually marked with a ‘//’In the example below • The Node is number 3 • The EST for the following activities is 14 days • The LFT for the preceding activities is 16 days • There is 2 days’ float in this case (difference between EST and LFT) • The activity that follows the node is labelled ‘D’ and will take 6 daysOR rmmakaha@gmail.com 63
- 64. OPERATIONS RESEARCH rmakaha@facebook.comA simple example – baking a loaf of breadHere is a simple example, in which some activities depend on others having been undertaken inorder, whereas others can be done independently.Activity Preceded by Elapsed time (minutes)A weigh ingredients - 1B mix ingredients A 3C dough rising time B 60D prepare tins - 1E pre-heat oven - 10F knock back dough and place in tins C&D 2G 2 nd dough rising time F 15H cooking time E&G 40In this example, there is a clear sequence of events that have to happen in the right order. If any ofthe events on the critical path is delayed, then the bread will not be ready as soon. However, tasks D(prepare tins) and E (heat the oven) can be started at any time as long as they are done by the latestfinish time in the following node.So, we can see that the oven could be switched on as early as time 0, but we can work out that itcould be switched on at any time before 71 – any later than this and it won’t be hot enough whenthe dough is ready for cooking. There is some ‘float’ available for tasks D and E as neither is on thecritical path.This is a fairly simple example, and we can see the LST and LFT are the same in each node. In amore complex CPA, this will not necessarily be the case, and if so, will indicate that there is some‘float’ in at least one activity leading to the node. However, nodes on the critical path will alwayshave the same EST and LFT. rmmakaha@gmail.com 64
- 65. OPERATIONS RESEARCH rmakaha@facebook.comHOW TO CONSTRUCT A CRITICAL PATH NETWORK DIAGRAMHere is the data: Activity Preceded by Duration (days) A - 2 B - 3 C A 4 D B 5 E C 8 F E 3 G D,F 4Here is what to do: 1. Draw the first ‘node’ and number it ‘1’. 2. Draw the line to show any ‘activities’ that are not preceded by any other activities. 3. Tick these activities off to show you have done them A 4. Look at the next activity and see which it is preceded by. In this case it is activity C and it is preceded by activity A 5. Draw this on the diagram and again tick off the activity on the list. 6. Do the same for activity D, E & F. Look carefully at which activity they are preceded by 7. Now do activity G. This one is a little trickier, as it is preceded by more than one activity. However, all you have to do is make them meet at one node – easy! 8. Next, draw a node on the end of the network diagram 9. Now number the nodes, following through the activities. If there are 2 activities starting at the time, you need to number the shortest activity first. rmmakaha@gmail.com 65
- 66. OPERATIONS RESEARCH rmakaha@facebook.comThe diagram is now ready for you to work out (make sure you understand these terms by readingfurther). • Earliest Start Time (EST) – top segment or left segment. • Latest Finish Time (LFT) – bottom segment or right segment. • Float Time • The critical pathThere are many ways to do the above, but the method below is thesimplest, so learn it and follow it! i. Work out which ‘route’ takes longest (which is the critical path) ii. In this case : A C E F G takes 21 days and B D G takes 12 days iii. Consequently, A C E F G is the critical path iv. As these activities take 21 days, you can write ‘21’ days in both the top or left and bottom or right segment of the end node. v. Now work backwards through the nodes on the critical path and enter the LFT in the bottom or right segment and the EST in the top or left segment. vi. Taking off the length of time it takes to complete the activity. So from node 6 would have ‘17’ in both segments.vii. Now work backwards through any other nodes and enter the LFT in the bottom or right segment. You MUST do this backwards for ALL other ‘routes’. You then do the same for the EST for each route, but go forwards this time!viii. Note: Backwards for LFT and Forwards for EST ix. Here it is below! rmmakaha@gmail.com 66
- 67. OPERATIONS RESEARCH rmakaha@facebook.com Activity EST LFT Duration Float(LFT-D-EST) A 0 2 2 0 B 0 12 3 9 C 2 6 4 0 D 3 17 5 9 E 6 14 8 0 F 14 17 3 0 G 17 21 4 0RULES FOR CONSTRUCTING NETWORK DIAGRAM: Each activity is represented by one and only one arrow in the network. No two activities can be identified by the same head and tail events. If activities A and B can be executed simultaneously, then a dummy activity is introduced either between A and one end event or between B and one end event. Dummy activities do not consume time or resources. Another use of the dummy activity: suppose activities A and B must precede C while activity E is preceded by B only. To ensure the correct precedence relationships in the network diagram, the following questions must be answered as every activity is added to the network: What activities must be completed immediately before this activity can start. What activities must follow this activity? What activities must occur concurrently with this activity? rmmakaha@gmail.com 67
- 68. OPERATIONS RESEARCH rmakaha@facebook.com Question 1: ACTIVITY PRECEDED BY DURATION (Weeks) A Initial activity 10 B A 9 C A 7 D B 6 E B 12 F C 6 G C 8 H F 8 I D 4 J G, H 11 K E 5 L I 7Find the critical path and the time for completing the project.Solution: 2 D 4 I 9 19 25 6 25 31 4 29 35 B 9 E 12 L 7 5 K 10 A 31 37 5 42 42 0 1 10 0 0 10 10 7 25 31 Dummy J 11 C 7 G 8 3 F H 8 6 31 31 17 17 6 23 23 8 EARLISET START TIME:Represents all the activities emanating from i. Thus ESi represent the earliest occurrence time ofevent i. Earliest finish time is given by: EF = Max {ESi + D} rmmakaha@gmail.com 68
- 69. OPERATIONS RESEARCH rmakaha@facebook.com LATEST COMPLETION TIME: It initiates the backward pass. Where calculations from the “end” node and moves to the “start” node. Latest start time is given by: LSi = Min {LF – D} DETERMINATION OF THE CRITICAL PATH: A Critical path defines a chain of critical that connects the start and end of the arrow diagram. An activity is said to be critical if the delay in its start will cause a delay in the completion date of the entire project. Or it is the longest route, which the project should follow until its completion date of the entire project. The critical path calculations include two phases:֠ FORWARD PASS: Is where calculations begin from the “start” node and move to the “end” node. At each node a number is computed representing the earliest occurrence time of the corresponding event.֠ BACKWARD PASS: Begins calculations from the “end” node and moves to the “start” node. The number computed at each node represents the latest occurrence time of the corresponding event. DETERMINITION OF THE FLOATS: A Float or Spare time can only be associated with activities which are non critical. By definition activities on the critical path cannot have floats. There are 3 types of floats. 1 TOTAL FLOAT: This is the amount of time a path of activities could be delayed without affecting the overall project duration. Total Float = Latest Head Time – Earliest Tail time – duration. = LS – ES. = LF – ES – D = LF – EF or EC. 1 FREE FLOAT: This is the amount of time an activity can be delayed without affecting the commencement of a subsequent activity at its earliest start time. Free Float = Earliest Head Time – Earliest Tail Time – Duration. = LF – ES – D = ESj – ESi – D. rmmakaha@gmail.com 69
- 70. OPERATIONS RESEARCH rmakaha@facebook.com 1 INDEPENDENT FLOAT: This is the amount of time an activity can be delayed when all preceding activities are completed as late as possible and all succeeding activities completed as early as possible. Independent Float = EF – LS – D. NORMAL EARLIEST TIME LATEST TIME TOTAL FLOAT ACTIVITY TIME ES EF = ES + D LS = LF – D LF =LS – ES A 10 0 10 0 10 0 B 9 10 19 16 25 6 C 7 10 17 10 17 0 D 6 19 25 25 31 6 E 12 19 31 25 37 6 F 6 17 23 17 23 0 G 8 17 25 23 31 6 H 8 23 31 23 31 0 I 4 25 29 31 35 6 J 11 31 42 31 42 0 K 5 31 36 37 42 6 L 7 29 36 35 42 6 Question 2: Draw the network for the data given below then find the critical path as well total float and free float. ACTIVITY (I, J) DURATION (0, 1) 2 (0, 2) 3 (1, 3) 2 (2, 3) 3 (2, 4) 2 (3, 4) 0 (3,5) 3 (3, 6) 2 (4, 5) 7 (4, 6) 5 (5, 6) 6 rmmakaha@gmail.com 70
- 71. OPERATIONS RESEARCH rmakaha@facebook.comSolution: 1 3 2 4 2 6 6 2 2 3 0 5 6 0 0 13 13 3 6 19 19 Dummy 3 7 5 2 4 3 3 2 6 6 ACTIVITY D ES EF=ES+D LS=LF-D LF TOTAL FREE Float Float (0, 1) 2 0 2 2 4 2 2 (0, 2) 3 0 3 0 3 0 0 (1, 3) 2 2 4 4 6 2 2 (2, 3) 3 3 6 3 6 0 0 (2, 4) 2 3 5 4 6 1 1 (3, 4) 0 6 6 6 6 0 0 (3,5) 3 6 9 10 13 4 4 (3, 6) 2 6 8 17 19 11 11 (4, 5) 7 6 13 6 13 0 0 (4, 6) 5 6 11 14 19 8 8 (5, 6) 6 13 19 13 19 0 0 rmmakaha@gmail.com 71
- 72. OPERATIONS RESEARCH rmakaha@facebook.com PERT ALGORITHM: PROBABILISTIC TIME DURATION OF ACTIVITIES.The following are steps involved in the development of probabilistic time duration of activities. Make a list of activities that make up the project including immediate predecessors. Make use of step 1 sketch the required network. Denote the Most Likely Time by Tm, the Optimistic Time by To and Pessimistic time by Tp. Using beta distribution for the activity duration the Expected Time Te for each activity is computed by using the formula: Te = (To + 4Tm + Tp) / 6. Tabulate various times i.e. Expected activity times, Earliest and Latest times and the EST and LFT on the arrow diagram. Determine the total float for each activity by taking the difference between EST and LFT. Identify the critical activities and the expected date of completion of the project. Using the values of Tp and To compute the variance (δ2) of each activity’s time estimates by using the formula: δ2 = {{Tp – To} / 6}2. Compute the standard normal deviate by: Zo = (Due date – Expected date of Completion) / √Project variance. Use Standard normal tables to find the probability P (Z <= Zo) of completing the project within the scheduled time, where Z ~ N(0,1). Question 3:A project schedule has the following characteristics: Activity Most Likely Time Optimistic Time Pessimistic Time 1–2 2 1 3 2–3 2 1 3 2–4 3 1 5 3–5 4 3 5 4–5 3 2 4 4–6 5 3 7 5–7 5 4 6 6–7 7 6 8 7–8 4 2 6 7–9 6 4 8 8 – 10 2 1 3 9 – 10 5 3 7 I. Construct the project network. II. Find expected duration and variance for each activity. rmmakaha@gmail.com 72
- 73. OPERATIONS RESEARCH rmakaha@facebook.com III. Find the critical path and expected project length. IV. What is the probability of completing the project in 30 days.Solution: 3 5 7 9 4 8 4 8 12 5 17 17 6 23 23 2 3 7 4 5 1 2 10 2 0 0 2 2 28 28 3 2 4 6 8 5 5 5 10 10 21 26 Expected job Time Te = (To + 4Tm + Tp) / 6. Variance δ2 = {{Tp – To} / 6}2. Activity Tm To Tp Te δ2 1–2 2 1 3 2 0.111 2–3 2 1 3 2 0.111 2–4 3 1 5 3 0.445 3–5 4 3 5 4 0.111 4–5 3 2 4 3 0.111 4–6 5 3 7 5 0.445 5–7 5 4 6 5 0.111 6–7 7 6 8 7 0.111 7–8 4 2 6 4 0.445 7–9 6 4 8 6 0.445 8 – 10 2 1 3 2 0.111 9 – 10 5 3 7 5 0.445Critical path (*) comprises of activities (1 –2), (2 - 4), (4 –6), (6 –7), (7 –9) and (9 –10)Expected project length is = 28 days.Variance δ2 = 0.111 + 0.445 + 0.445 + 0.111 + 0.445 + 0.445 = 2.00 (on critical path only) rmmakaha@gmail.com 73
- 74. OPERATIONS RESEARCH rmakaha@facebook.com(iv) Probability of completing the project in 30 days is obtained by: Zo = (Due date – Expected date of Completion) / √Project variance. = (30 – 28) / √2. = 1.414 (Look this from Normal tables)Now from Standard Normal tables Z= 0.4207.P (t <= 30) = P (Z <= 1.414) = 0.5 + 0.4207 = 0.9207This shows that the probability of meeting the scheduled time will be 0.9207 COST CONSIDERATIONS IN PERT / CPM:The cost of a project includes direct costs and indirect costs. The direct costs are associated with theindividual activities and the indirect costs are associated with the overhead costs such asadministration or supervision cost. The direct cost increase if the job duration is to be reducedwhereas the indirect costs increase if the job duration is to be increased. 1 TIME COST OPTIMIZATION PROCEDURE:The process of shortening a project is called Crashing and is usually achieved by adding extraresources to an activity. Project crashing involves the following steps: Critical Path: Find the normal critical path and identify the critical activities. Cost Slope: Calculate the cost slope for the different activities by using the Formula: COST SLOPE = Crash cost – Normal cost. Normal Time – Crash Time. Ranking: Rank the activities in the ascending order of cost slope. Crashing: Crash the activities in the critical path as per the ranking i.e. activities having lower cost slope would be crashed first to the maximum extent possible. Calculate the new direct cost by cumulatively adding the cost of crashing to the normal cost. Parallel Crashing: As the critical path duration is reduced by the crash in step 3 other paths become critical i.e. we get parallel critical paths. This means that project duration can be reduced by simultaneous crashing of activities in the parallel critical paths. Optimal Duration. Crashing as per Step 3 and step 4 an optimal project is determined. It would be the time duration corresponding to which the total cost (i.e. Direct cost plus Indirect cost) is a minimum. rmmakaha@gmail.com 74
- 75. OPERATIONS RESEARCH rmakaha@facebook.com Question 4:For the network given below find the optimum cost schedule for the completion of the project: JOB NORMAL CRASH TIME COST $ TIME COST $ 1–2 10 60 8 120 2–3 9 75 6 150 2–4 7 90 4 150 3–4 6 100 5 140 3–5 9 50 7 80 3–6 10 40 8 70 4–5 6 50 4 70 5–6 7 70 5 110Solution: JOB COST SLOPE *1 – 2 30 ---> (4) = (120 –60) / (10 – 8) *2 – 3 25 ---> (3) 2–4 20 ⇒ 3–4 40 --->(5) 3–5 15 3–6 15 4–5 10 ---> (1) 5–6 20 ---> (2) 3 10 6 19 19 38 38 9 2 6 9 7 1 10 10 10 0 0 7 4 5 25 25 6 31 31The critical path = 1 –2, 2 –3, 3 –4, 4 –5 and 5 –7.Expected project Length = 38 days.Associated with 38 days the minimum direct project cost = 60 + 75 + 90 + 100 + 50 + 40 + 50 + 70 = $535 rmmakaha@gmail.com 75
- 76. OPERATIONS RESEARCH rmakaha@facebook.comIn order to reduce the project duration we have to crash at least one of the jobs on the critical path.This is being done because crashing of the job not on the critical path does not reduce the projectlength.1st Crashing:On critical path the minimum cost slope is job 4 –5 and is to be crashed at extra cost of $10 per day. 3 6 19 19 10 36 36 9 2 6 9 7 1 10 10 10 0 0 7 4 5 25 25 4 29 29Duration of project = 36 days and Total cost = $535 + $10 * 2 = $555.2nd Crashing:Now crash job 5 –6 and is to be crashed at extra cost of $20 per day. 3 6 19 19 10 34 34 9 2 6 9 5 1 10 10 10 0 0 7 4 5 25 25 4 29 29Duration of project = 34 days and Total cost = $555 + $20 * 2 = $595. rmmakaha@gmail.com 76
- 77. OPERATIONS RESEARCH rmakaha@facebook.com3rd Crashing:Now crash job 2 –3 for 3 days and is to be crashed at extra cost of $25. 3 6 16 16 10 31 31 6 2 6 9 5 1 10 10 10 0 0 7 4 5 22 22 4 26 26Duration of project = 31 days and Total cost = $595 + $25 * 3 = $670.4th Crashing:Now crash job 1 –2 for 2 days and is to be crashed at extra cost of $30. 3 6 14 14 10 29 29 6 2 6 9 5 1 8 8 8 0 0 7 4 5 20 20 24 24 4Duration of project = 29 days and Total cost = $670 + $30 * 2 = $730. rmmakaha@gmail.com 77
- 78. OPERATIONS RESEARCH rmakaha@facebook.com5th Crashing:Final crash job 3 –4 for 1 day and it is to be crashed at extra cost of $40 and two critical pathsoccurs. 3 6 14 14 10 28 28 6 2 5 9 5 1 8 8 8 0 0 7 4 5 19 19 23 23 4Duration of project = 28 days and Total cost = $730+ $40 * 1 = $770.Optimum Duration of project = 28 days and Total Cost = $770. rmmakaha@gmail.com 78
- 79. OPERATIONS RESEARCH rmakaha@facebook.comUNIT 5: RANDOM VARIABLES AND THEIRPROBABILITY:HOURS: 20. RANDOM VARIABLES AND PROBABILITY FUNCTIONS (DISCRETE): Given a Sample space S = {1,2,3,4,5,6} we may therefore use the variable such as X to represent an outcome in the sample space such a variable is called Random variable. When the outcome in a sample space are represented by values in a random variable the assignment of probabilities to the outcome can be thought of as a function for which the domain is the sample space, we refer to this as the probability function written as Pr. We use the following notation with probability function Pr {X = a} which means the probability associated with the outcome a while Pr {X in E} means the probability associated with event E. Given S = {1,2,3,4,5,6} a. Find the probability of S = 3. b. Find the probability of S = 5. c. Find the probability of X in E when E = 1,2.3.Solution: i. P (S = 3) = 1/6. ii. P (S = 5) = 1/6. iii. P (X in E) = ½. PROBABILITY DENSITY FUNCTIONS: 2 PROPERTIES OF DISCRETE RANDOM VARIABLE: a. It is a discrete variable. b. It can only assume values x1, x2. …xn. c. The probabilities associated with these values are p1, p2. …pn. Where P(X = x1) = p1. P(X = x2) = p2. . . P(X = xn) = pn. Then X is a discrete random variable if p1 + p2. …pn = 1. This can be written as ∑ P(X = x) =1. all x rmmakaha@gmail.com 79
- 80. OPERATIONS RESEARCH rmakaha@facebook.comQuestion 1:The P.d.f. of a discrete random variable Y is given by P (Y=y) = cy2, for y = 0,1,2,3,4.Given that c is a constant, find the value of c.Solution:Y 0 1 2 3 4P(Y =y) 0 c 4c 9c 16c = ∑ P(X = x) =1. all x 1 = c + 4c + 9c + 16c 1 = 30c c = 1/30.Question 2:The Pdf. of a discrete random variable X is given by P (X=x) = a(¾)x , for x = 0,1,2,3...Find the value of the constant a.Solution:= ∑P(X = x) =1. all x P(X = 0) = a(¾)0. P(X = 1) = a(¾)1. P(X = 2) = a(¾)2. P(X = 3) = a(¾)3 and so on.So ∑P(X = x) =a + a(¾) + a(¾)2 + a(¾)3 + … all x = a( 1 + ¾ + (¾)2 + (¾)3 + …) = a ( 1/1- ¾) -> (sum of an infinite G.P with first term 1 and common ratio ¾) = a(4) 4a = 1 a=¼ rmmakaha@gmail.com 80
- 81. OPERATIONS RESEARCH rmakaha@facebook.com EXPECTED VALUE/ MEAN / AVERAGE: For a random variable X associated with a sample space {x1, x2. …xn} the concept of expected value is the generalization of the average of numbers {x1, x2. …xn}. 2 EXPECTED VALUE WITH SAME PROBABILITIES: The expected value of X with same probabilities is given by: E(x) = X1 + X2 + …Xn/n. Question 3: Given that an die is thrown 6 times and the recordings are as follows then calculate the expected mean or mean score Score x 1 2 3 4 5 6 1 1 1 1 1 1 P(X = x) /6 /6 /6 /6 /6 /6Solution: E(x) = X1 + X2 + …Xn/n. = 1 + 2 + 3 + 4 + 5 + 6/6 = 21/6 = 7/2 = 3.5 2 EXPECTED VALUE WITH DIFFERENT PROBABILITIES: The expected value of X with different probabilities is given by: E(x) = P1 * X1 + P2 * X2 + …Pn * Xn. Question 4: Given a random variable X which has a Pdf shown below. Calculate the expected mean. X -2 -1 0 1 2 P(X = x) 0.3 0.1 0.15 0.4 0.05Solution: E(x) = P1 * X1 + P2 * X2 + …Pn * Xn = -2 * 0.3 + -1 * 0.1 + 0 * 0.15 + 1 * 0.4 + 2 * 0.05 = -0.2 rmmakaha@gmail.com 81
- 82. OPERATIONS RESEARCH rmakaha@facebook.com Question 5: A venture capital firm is determined based on the past experience that for each $100 invested in a high technology startup company; a return of $400 is experienced 20% of time. A return of $100 is experienced 40% of the time and zero (0) total loss is experienced 40% of the time. What is the firm’s expected return based on this data?. Solution: S = {400, 100, 0} E(x) = P1 * X1 + P2 * X2 + …Pn * Xn = 400 * 0.2 + 100 * 0.4 + 0 * 0.4. = 80 + 40 + 0 = $120 Question 6: Given that an unbiased die was thrown 120 times and the recordings are as follows then calculate the expected mean or mean score. Score x 1 2 3 4 5 6 Frequency f 15 22 23 19 23 18 Total = 120Solution: E(x) = ∑fx/∑f. = (15 + 44 + 69 + 76 + 115 +108)/120. = 3.558 Question 7: The random variable X has Pdf P(X=x) for x = 1,2,3. X 1 2 3 P(X = x) 0.1 0.6 0.3 Calculate: a. E(3). b. E(x). c. E(5x). d. E(5x + 3). e. 5E(x) + 3. f. E(x2). g. E(4x2 - 3). h. 4E(x2) – 3. rmmakaha@gmail.com 82
- 83. OPERATIONS RESEARCH rmakaha@facebook.com Solution: X 1 2 3 5x 5 10 15 5x + 3 8 13 18 x2 1 4 9 4x2 – 3 1 13 33 P(X = x) 0.1 0.6 0.3 a. E(3) = ∑P(X = x). all x = ∑3P(X = x). all x = 3(0.1) + 3(0.6) + 3(0.3). = 3. b. E(x) =∑xP(X = x). all x =1(0.1) +2(0.6) +3(0.3) = 2.2 c. E(5x) = ∑5xP(X = x). all x = 5(0.1) + 10(0.6) +15(0.3) = 11 d. E(5x + 3) = ∑(5x + 3)P(X = x). all x = 8(0.1) + 13(0.6) + 18(0.3) = 14 e. 5E(x) + 3 = 5(2.2) + 3 = 14 f. E(x2) = ∑ x2P(X = x). all x = 1(0.1) + 4(0.6) + 9(0.3) = 5.2 rmmakaha@gmail.com 83
- 84. OPERATIONS RESEARCH rmakaha@facebook.com g. E(4x2 - 3) = ∑(4x2 – 3)P(X = x). all x = 1(0.3) + 13(0.6) + 33(0.3) = 17.8 h. 4E(x2) – 3 = 4(5.2) – 3 =20.8 – 3 = 17.8 VARIANCE: The expected value of a random variable is a measure of central tendency i.e. what values are mostly likely to occur while Variance is a measure of how far apart the possible values are spread again weighted by their respective probabilities. The formula for variance is given by: Var (x) = E(x – µ)2 this can be reduced to Var (x) = E(x2) - µ2 Question 8: The random variable X has probability distribution shown below. x 1 2 3 4 5 P(X =x) 0.1 0.3 0.2 0.3 0.1 Find: i. µ = E(x). ii. Var(x) using the formula E(x – µ)2 iii. E(x2) iv. Var(x) using the formula E(x2) - µ2 Solution: i. E(x) =µ = ∑xP(X = x). all x =1(0.1) + 2(0.3) + 3(0.2) + 4(0.3) + 5(0.1) =3 ii. Var (x) = E(x – µ)2 =∑(x – 3)2P(X = x). all x rmmakaha@gmail.com 84
- 85. OPERATIONS RESEARCH rmakaha@facebook.com X 1 2 3 4 5 (x – 3) -2 -1 0 1 2 (x – 3)2 4 1 0 1 4 P(X = x) 0.1 0.3 0.2 0.3 0.1 = 4(0.1) + 1(0.3) + 0(0.2) + 1(0.3) + 4(0.1) = 1.4 iii. E(x2) = ∑x2P(X = x). all x = 1(0.1) + 4(0.3) + 9(0.2) + 16(0.3) + 25(0.1) = 10.4 iv. Var(x) = E(x2) - µ2 = 10.4 – 9 = 1.4 STANDARD DEVIATION: Is the square root of its variance given by the following formula: δ = √Var (x). Question 9: From the question given above find the standard deviation for part (iv). δ = √Var (x). δ = √1.4 = 1.183215957 = 1.18 CUMULATIVE DISTRIBUTION FUNCTION: When we had a frequency distribution, the corresponding Cumulative frequencies were obtained by summing all the frequencies up to a particular value. In the same way if X is a discrete random variable, the corresponding Cumulative Probabilities are obtained by summing all the probabilities up to a particular value. If X is a discrete random variable with Pdf P(X = x) for x = x1, x2. …xn then the Cumulative distribution function is given by: F(t) = P(X <= t) = ∑t P(X = x). x = x1 The Cumulative Distribution is sometimes called Distribution function. rmmakaha@gmail.com 85
- 86. OPERATIONS RESEARCH rmakaha@facebook.com Question 10: The probability distribution for the random variable X is given below then constructs the Cumulative distribution table. X 0 1 2 3 4 5 6 P(X =x) 0.03 0.04 0.06 0.12 0.4 0.15 0.2 Solution: F(t) = ∑t P(X = x). x = x1So F(0) = P(X <= 0) = 0.03 F(1) = P(X <= 1) = 0.03 + 0.04 = 0.07 F(2) = P(X <= 2) = 0.03 + 0.04 + 0.06 = 0.13 and so on.The Cumulative Distribution table will be as follows: X 0 1 2 3 4 5 6 F(x) 0.03 0.07 0.13 0.25 0.65 0.8 1Question 11:For a discrete random variable X the Cumulative distribution function F(x) is given below: X 1 2 3 4 5 F(x) 0.2 0.32 0.67 0.9 1Find: a) P(x = 3). b) P(x > 2).Solution: a. F(3) = P(x = 3) => P(x = 1) + P(x = 2) + P(x = 3) = 0.67 F(2) = P(x <= 2) => P(x = 1) + P(x = 2) = 0.32 Therefore P(x = 3) = 0.67 – 0.32 = 0.35 b. P(x > 2) = 1 – P(x <= 2) = 1 – F(2) = 1 – 0.32 = 0.68 rmmakaha@gmail.com 86
- 87. OPERATIONS RESEARCH rmakaha@facebook.com PROBABILITY DISTRIBUTION (CONTINUOUS RANDOM VARIABLES): A random variable X that can be equal to any number in an interval, which can be either finite or infinite length, is called a Continuous Random Variable.PROBABILITY DENSITY FUNCTIONS: There are 2 essential properties of Pdf: Because probabilities cannot be negative. The integral of a function must be non-negative for all choices of interval [a, b] i.e. f(x) >= 0 for all values in the sample space for the random variable X. Since the probability associated with the entire sample space is always 1. The integral of f(x) of the entire sample space = 1.Question 1:A continuous random variable has Pdf f(x) where f(x) = kx, 0<= x <= 4. i. Find the value of constant k. ii. Sketch y = f(x). iii. Find P(1 <= X <= 2½). Solution: i. ∫ f(x) ∂x = 1. all x ∫04 kx ∂x = 1. [kx2/2]04 = 1. 8k = 1 k=⅛ ii. Sketch of y = f(x). ½ y = ⅛x 0 4 P(1<= x <= 2½) = ∫12½[⅛x]∂x. = [x2/16]12½ = 0.328 rmmakaha@gmail.com 87
- 88. OPERATIONS RESEARCH rmakaha@facebook.comQuestion 2:A continuous random variable has Pdf f(x) where Kx 0<= x <= 4. f(x)= k(4 – x) 2<= x <= 4 0 otherwise a) Find the value of constant k. b) Sketch y = f(x). Solution: D =>∫ab P ∂x + ∫ab Q ∂x = 1. =>∫02 kx ∂x + ∫24 k(4 – x) ∂x = 1. => [kx2/2]02 + [4xk - kx2/2]24 = 1. => [4k/2] – [0] + {[16k - 16k/2] – [8k - 4k/2]} = 1. [2k] + {[8k] – [6k]} = 1. 4k = 1 k=¼ c. Sketch y = f(x). X 0 1 2 3 4 Y 0 ¼ ½ ¾ 1 F(x) = kx. X 2 3 4 Y ½ ¼ 0 F(x) = k(4 – x) 1 ¾ ½ ¼ 0 1 2 3 4 rmmakaha@gmail.com 88
- 89. OPERATIONS RESEARCH rmakaha@facebook.com EXPECTED VALUE OR MEAN (CONTINUOUS RANDOM VARIABLE): For a continuous random variable X defined within finite interval [a, b] with continuous Pdf f(x) then the expected value or mean is given by: E(x) = ∫ab x. f(x) ∂xQuestion 3:A continuous random variable has Pdf f(x) where 6 /7x 0<= x <= 1. 6 f(x)= /7x(2 – x) 1<= x <= 2 0 otherwise i. Find E(x). ii. Find E(x2). Solution: D =>∫ab P ∂x + ∫ab Q ∂x = 1. E(x) = ∫ab x. f(x) ∂x E(x) = ∫01 6/7 x2 ∂x + ∫12 6/7 x2(2 – x)∂x = 6/7[x3/3]01 + 6/7[2/3x3 – x4/4]12 = 6/7[⅓ + 6/7{16/3 – 4 – (⅔- ¼)} ] = 6/7[5/4] = 15/14 E(x2) = ∫ab x2. f(x) ∂x E(x2) = ∫01 6/7 x3 ∂x + ∫12 6/7 x3(2 – x)∂x = 6/7[x4/4]01 + 6/7[x4/2 – x5/5]12 = 6/7[¼] + 6/7{8 - 32/5 – (½ - 1/5)} = 6/7[31/20] = 93/70 rmmakaha@gmail.com 89
- 90. OPERATIONS RESEARCH rmakaha@facebook.comVARIANCE AND STANDARD DEVIATION: The variance and Standard Deviation associated with a continuous random variable X on the sample space [a, b] is given by: Var (x) = ∫ab [x - E(x)]2 . f(x) ∂x or Var(x) = E(x2) - µ2 ∂x and Standard deviation = √Var (x). E(x) = µ.Question 4:A continuous random variable has Pdf f(x) where f(x) = ⅛x, 0<= x<= 4.Find: a) E(x). b) E(x2). c) Var (x). d) The standard deviation of x. e) Var(3x +2). Solution: i. E(x) = ∫ab x. f(x) ∂x E(x) = ∫04 ⅛x2 ∂x = ⅛[x3/3]04 = 8/3 ii. E(x2) = ∫ab x2. f(x) ∂x =∫04 ⅛x3 ∂x = ⅛[x4/4]04 = ⅛(64) =8 iii. Var(x) = E(x2) - µ2 ∂x = E(x2) - E2(x) ∂x = 8 – (8/3)2 = 8/9 rmmakaha@gmail.com 90
- 91. OPERATIONS RESEARCH rmakaha@facebook.com iv. Standard Deviation => δ = √Var (x). = √8/9 = 2√2/3 v. Var(3x + 2) = 9 Var(x) this has been obtained form the concept Var (ax)= Var a2(x). 8 = 9 ( /9) =8 MODE: The Mode is the value of X for which f(x) is greatest in the given range of X. It is usually to draw a sketch of y = f(x) and this will give an idea of the location of the Mode. For some Probability Density functions it is possible to determine the mode by finding the maximum point of the curve y = f(x) from the relationship f1(x) = 0. f1(x) = d/∂x * f(x). Question 5: A continuous random variable has Pdf f(x) where f(x) = 3/80(2 + x)(4 – x), 0<= x<= 4. a) Sketch y = f(x). b) Find the mode. Solution: X 0 1 2 3 4 24 27 24 15 Y /80 /80 /80 /80 0 a) 27 /80 Mode 24 /80 f(x) = 3/80(2 + x)(4 – x) 15 /80 0 1 2 3 4 rmmakaha@gmail.com 91
- 92. OPERATIONS RESEARCH rmakaha@facebook.com b) The mode => f(x) = 3/80(2 + x)(4 – x) = 3/80(8 + 2x – x2) 1 f (x) = (2+ 2x) f1(x) = 0. 0 = 2+ 2x 2x = 2 x=1 MEDIAN: The median splits the area under the curve y = f(x) into 2 halves so if the value of the Median is m. Therefore the formula for the median is given by: ∫am f(x) ∂x = 0.5. F(m) = 0.5Question 6:A continuous random variable has Pdf f(x) where f(x) = ⅛x, 0<= x<= 4.Find: a. The median m. Solution: m => ∫am f(x) ∂x = 0.5. F(m) = 0.5 f(x) = ⅛x ∂x 0.5 = m2/16 m2 = 8 m = 2.83 CUMULATIVE DISTRIBUTION FUNCTION: F(x) When considering a frequency distribution the corresponding cumulative frequencies were obtained by summing all the frequencies up to a particular value. In the same way if X is a continuous random variable with Pdf f(x) defined for a<=x<=b then the Cumulative Distribution Function is given by F(t): F(t) = P(X <= t) = ∫at f(x) ∂x rmmakaha@gmail.com 92
- 93. OPERATIONS RESEARCH rmakaha@facebook.com 2 PROPERTIES OF CDF: F(b) = ∫ab f(x) ∂x = 1. If f(x) is valid for -∞ <= x <= ∞ then F(t) = ∫-∞t f(x) ∂x where the interval is taken over all values of x <= t. The Cumulative distribution function is sometimes known as just as the distribution function. Question 6: A continuous random variable has Pdf f(x) where f(x) = ⅛x, 0<= x<= 4. Find: i. The Cumulative distribution function F(x). ii. Sketch y = F(x). iii. Find P(0.3 <=x<= 1.8). Solution:i. F(t) = ∫at f(x) ∂x F(t) = ∫0t ⅛x ∂x = ⅛[x2/2]0t = t2/16 F (t) = t2/16 0<=t<=4 NB: (1) F(4) = 42/16 = 1 0 x <= 0. F(x) = x2/16 0<= x <= 4 1 x >= 4ii. Sketch y = F(x). X 0 1 2 3 4 1 1 9 Y 0 /16 /2 /16 1 rmmakaha@gmail.com 93
- 94. OPERATIONS RESEARCH rmakaha@facebook.com 1 F(x) = 1 9 /16 1 /2 F(x)= x2/16 1 /16 0 1 2 3 4 iii. P(0.3 <= x <= 1.8) = F(1.8) – F(0.3) F(1.8) = (1.8)2/16 = 0.2025 F(0.3) = (0.3)2/16 = 0.005625 Therefore P(0.3 <= x <= 1.8) = F(1.8) – F(0.3) = 0.2025 – 0.005625 = 0.196875 = 0.197 Question 7:A continuous random variable has Pdf f(x) where x /3 0<= x <= 2. -2x f(x)= /3 +2 2<= x <= 3 0 otherwise a. Sketch y = f(x). b. Find the Cumulative distribution function F(x). c. Sketch y = F(x). d. Find P(1 <= X <= 2.5) e. Find the median m. rmmakaha@gmail.com 94
- 95. OPERATIONS RESEARCH rmakaha@facebook.com Solution: i. Sketch y = f(x). X 0 1 2 Y 0 ⅓ ⅔ X 2 3 Y ⅔ 0 ⅔ y = x/3 ⅓ y =-2x/3 +2 0 1 2 3 ii. CDF = F(t) = ∫0t x/3∂x = [x2/6]0t = t2/6 F (t) = x2/6 0<=x<=2 NB: F (2) = 22/6 = ⅔F(t) = F(2) + (Area under the curve y = -2x/3 +2 between 2 and t)So F(t) = F(2) + ∫2t (-2x/3 +2) ∂x = F(2) + [-x2/3 + 2x]2t = ⅔ + {-t2/3 +2t – ( -4/3 + 4)} = -t2/3 +2t – 2 2<= t <= 3 NB: F(2) = -9/3 + 6 – 2 = 1 rmmakaha@gmail.com 95
- 96. OPERATIONS RESEARCH rmakaha@facebook.comTherefore CDF = x2/6 0<= x <= 2. - 2 f(x)= x /3 +2x -2 2<= x <= 3. 1 x >= 3. iii. Sketch of y = F(x). y=1 1 y = - x2/3 +2x -2 2 /3 y = x2/6 1 /3 0 1 2 3 iv. P(1 <= X <= 2.5) = F(2.5) – F(1) as 2.5 is in the range 2<= x <=3. F(2.5) = - x2/3 +2x –2 F(2.5) = - (2.5)2/3 +2(2.5) –2 = 11/12 F(1) = x2/6 as 1 is in the range 0 <= x <= 2. F(1) = x2/6 F(1) = 12/6 = 1/6 Therefore P(1 <= X <= 2.5) = F(2.5) – F(1) = 11/12 - 1/6 = 0.75 v. m => ∫am f(x) ∂x = 0.5 where m is the median. F(2) = ⅔ so the median must lie in the range 0 <= x <= 2. F(m) = m2/6 m2/6 = 0.5 m2 = 3. m = 1.73 rmmakaha@gmail.com 96
- 97. OPERATIONS RESEARCH rmakaha@facebook.com OBTAINING THE PDF FROM THE CDF: The Probability Density Function can be obtained from the Cumulative Distribution function as follows: Now F(t) = ∫at f(x) ∂x a<= t <= b. So f(x) = d/∂x * F(x). = F1(x). NB: The gradient of the F(x) curve gives the value of f(x).Question 8:A continuous random variable has Pdf f(x) where 0 x <= 0. F(x)= x3/27 0<= x <= 3 1 x >= 3. Find the Pdf of X, f(x) and sketch y = f(x).Solution: a. f(x) = d/∂x * F(x). = d/∂x(x3/27). = 3x2/27 = x2/9 Therefore the Pdf is equal to: x2/9 0<=x<=3 f(x) = 0 otherwise. b. Sketch of y = f(x). 1 y = x2/9 0 1 2 3 rmmakaha@gmail.com 97
- 98. OPERATIONS RESEARCH rmakaha@facebook.comQuestion 9:A continuous random variable X takes values in the interval 0 to 3.It is given that P(X > x) = a + bx3, 0 <= x <= 3. i. Find the values of the constants a and b. ii. Find the Cumulative distribution function F(x). iii. Find the Probability density function f(x). iv. Show that E(x) = 2.25. v. Find the Standard deviation.Solution: a. P(X > x) = a + bx3, 0 <= x <= 3. So P(X > 0) = 1 and P(X > 3) = 0. i.e. a + b(0) = 1 and a + b(27) = 0 Therefore a = 1 and 1 + 27b = 0. B = -1/27. So P(X > x) = 1 - x3/27, 0 <= x <= 3. b. Now P(X <= x) = x3/27 (CDF) X3/27 0<=x<=3 F(x) = 1 x > 3. c. f(x) = d/∂x * F(x). = d/∂x(x3/27). = 3x2/27 = x2/9 d. E(x) = ∫ab x. f(x) ∂x =∫03 x. x2/9∂x =∫03 x3/27∂x = [x4/36]03 = 2.25 rmmakaha@gmail.com 98
- 99. OPERATIONS RESEARCH rmakaha@facebook.com e. Var(x) = ∫ab [x - E(x)]2 . f(x) ∂x = ∫ab x2.f(x)∂x - E2(X) =∫03 x4/9∂x – 2.252. =[x5/45]03 - 5.0625. = 0.3375 f. δ = √ Var (x). = √ 0.3375 = 0.581 RELATIONSHIPS AMONG PROBABILITY DISTRIBUTIONS: JOINT PROBABILITY DISTRIBUTION: Question 1: 2(X + Y - 2XY)0<= X<=1, 0<= Y<=1 Given f(X, Y) = 0 Otherwise i. Show that this is a PDF. ii. Find P(0 <= X <=½), (0 <= Y <=¼). iii. Find CDF.Solution: a) =∫ab∂X∫ab∂Y =∫01∂X∫01∂Y [2(X + Y - 2XY)] = 2∫01∂X [(XY + Y2/2 - XY2)]01 = 2∫01∂X [(X + ½ - X)] = 2[(X2/2 + ½X - X2/2)]01 = 2[½ + ½ - ½] =2*½ =1 b) =∫ab∂X∫ab∂Y =∫0½∂X∫0¼∂Y [2(X + Y - 2XY)] = 2∫0½∂X[(XY + Y2/2 - XY2)]0¼ = 2∫0½∂X[(¼X + 1/32 - 1/16X)] = 2∫0½∂X[(3/16X + 1/32)] = 2[(3/32X2 + 1/32X)] 0½ rmmakaha@gmail.com 99
- 100. OPERATIONS RESEARCH rmakaha@facebook.com = 2[(3/128 + 1/64)] = 2 * 5/128 = 5/64 c) F(u, v) =∫ab∂u∫ab∂v =∫0x∂U∫0y∂V[2(U + V – 2UV)] = 2∫0x∂U[(UV + V2/2 - UV2)]0y = 2∫0x∂U[(UY + Y2/2 - UY2)] = 2[(YU2/2 + UY2/2 - U2X2/2)]0X = 2[(X2Y/2 + XY2/2 - X2X2/2)] = X2Y + XY2 - X2X2NB: Given CDF to get PDF we differentiate the function.Given PDF to get CDF we integrate the function.Given a PDF to prove that it is a PDF integrate until the answer is 1.Given PDF the marginal distribution is found by integrating.Given CDF the marginal distribution is found by differentiating. Question 1: Given the CDF = x2 + 3xyz + z. Find the corresponding PDF.Solution: To get the corresponding PDF we differentiate with respect to x, y, z. f(x, y, z) =x2 + 3xyz + z = d/∂x(2x + 3yz). = d/∂y(3z). = d/∂z (3). =3 rmmakaha@gmail.com 100
- 101. OPERATIONS RESEARCH rmakaha@facebook.comUNIT 6 DECISION THEORYHOURS: 20 DECISION THEORY:There are four types of criteria that we will look at.Expected Value (Realist) Compute the expected value under each action and then pick the action with the largest expected value. This is the only method of the four that incorporates the probabilities of the states of nature. The expected value criterion is also called the Bayesian principle.Maximax (Optimist) The maximax looks at the best that could happen under each action and then chooses the action with the largest value. They assume that they will get the most possible and then they take the action with the best best case scenario. The maximum of the maximums or the "best of the best". This is the lotto player; they see large payoffs and ignore the probabilities.Maximin (Pessimist) The maximin person looks at the worst that could happen under each action and then choose the action with the largest payoff. They assume that the worst that can happen will, and then they take the action with the best worst case scenario. The maximum of the minimums or the "best of the worst". This is the person who puts their money into a savings account because they could lose money at the stock market.Minimax (Opportunist) Minimax decision making is based on opportunistic loss. They are the kind that look back after the state of nature has occurred and say "Now that I know what happened, if I had only picked this other action instead of the one I actually did, I could have done better". So, to make their decision (before the event occurs), they create an opportunistic loss (or regret) table. Then they take the minimum of the maximum. That sounds backwards, but remember, this is a loss table. This similar to the maximin principle in theory; they want the best of the worst losses.Example: A bicycle shopZed and Adrian and run a small bicycle shop called "Z to A Bicycles". They must order bicycles forthe coming season. Orders for the bicycles must be placed in quantities of twenty (20). The cost perbicycle is $70 if they order 20, $67 if they order 40, $65 if they order 60, and $64 if they order 80.The bicycles will be sold for $100 each. Any bicycles left over at the end of the season can be sold(for certain) at $45 each. If Zed and Adrian run out of bicycles during the season, then they willsuffer a loss of "goodwill" among their customers. They estimate this goodwill loss to be $5 per rmmakaha@gmail.com 101
- 102. OPERATIONS RESEARCH rmakaha@facebook.comcustomer who was unable to buy a bicycle. Zed and Adrian estimate that the demand for bicyclesthis season will be 10, 30, 50, or 70 bicycles with probabilities of 0.2, 0.4, 0.3, and 0.1 respectively.ActionsThere are four actions available to Zed and Adrian. They have to decide which of the actions is thebest one under each criteria. 1. Buy 20 bicycles 2. Buy 40 bicycles 3. Buy 60 bicycles 4. Buy 80 bicyclesZed and Adrian have control over which action they choose. That is the whole point of decisiontheory - deciding which action to take.States of NatureThere are four possible states of nature. A state of nature is an outcome. 1. The demand is 10 bicycles 2. The demand is 30 bicycles 3. The demand is 50 bicycles 4. The demand is 70 bicyclesZed and Adrian have no control over which state of nature will occur. They can only plan and makethe best decision based on the appropriate decision criteria.Payoff TableAfter deciding on each action and state of nature, create a payoff table. The numbers in parenthesesfor each state of nature represent the probability of that state occurring. ActionState of Nature Buy 20 Buy 40 Buy 60 Buy 80 Demand 10 50 -330 -650 -970 (0.2) Demand 30 550 770 450 130 (0.4) Demand 50 450 1270 1550 1230 (0.3) Demand 70 350 1170 2050 2330 (0.1) rmmakaha@gmail.com 102
- 103. OPERATIONS RESEARCH rmakaha@facebook.comOk, the question on your mind is probably "How the [expletive deleted] did you come up with thosenumbers?". Lets take a look at a couple of examples.Demand is 50, buy 60: They bought 60 at $65 each for $3900. That is -$3900 since that is money they spent. Now, they sell 50 bicycles at $100 each for $5000. They had 10 bicycles left over at the end of the season, and they sold those at $45 each of $450. That makes $5000 + 450 - 3900 = $1550.Demand is 70, buy 40: They bought 40 at $67 each for $2680. That is a negative $2680 since that is money they spent. Now, they sell 40 bicycles (thats all they had) at $100 each for $4000. The other 30 customers that wanted a bicycle, but couldnt get one, left mad and Zed and Adrian lost $5 in goodwill for each of them. Thats 30 customers at -$5 each or -$150. That makes $4000 - 2680 - 150 = $1170.Opportunistic Loss TableThe opportunistic loss (regret) table is calculated from the payoff table. It is only needed for theminimax criteria, but lets go ahead and calculate it now while were thinking about it.The maximum payoffs under each state of nature are shown in bold in the payoff table above. Forexample, the best that Zed and Adrian could do if the demand was 30 bicycles is to make $770.Each element in the opportunistic loss table is found taking each state of nature, one at a time, andsubtracting each payoff from the largest payoff for that state of nature. In the way we have the tablewritten above, we would subtract each number in the row from the largest number in the row. ActionState of Nature Buy 20 Buy 40 Buy 60 Buy 80 Demand 10 0 380 700 1020 Demand 30 220 0 320 640 Demand 50 1100 280 0 320 Demand 70 1980 1160 280 0Remember that the numbers in this table are losses and so the smaller the number, the better.Expected Value CriterionCompute the expected value for each action.For each action, do the following: Multiply the payoff by the probability of that payoff occurring.Then add those values together. Matrix multiplication works really well for this as it multiplied pairsof numbers together and adds them. If you place the probabilities into a 1x4 matrix and use the 4x4matrix shown above, then you can multiply the matrices to get a 1x4 matrix with the expected valuefor each action. rmmakaha@gmail.com 103
- 104. OPERATIONS RESEARCH rmakaha@facebook.comHere is an example of the "Buy 60" action if you wish to do it by hand. 0.2(-650) + 0.4(450) + 0.3(1550) + 0.1(2050) = 720The expected values for buying 20, 40, 60, and 80 bicycles are $400, 740, 720, and 460 respectively.Since the best that you could expect to do is $740, you would buy 40 bicycles.Maximax CriterionThe maximax criterion is much easier to do than the expected value. You simply look at the best youcould do under each action (the largest number in each column). You then take the best (largest) ofthese.The largest payoff if you buy 20, 40, 60, and 80 bicycles are $550, 1270, 2050, and 2330 respectively.Since the largest of those is $2330, you would buy 80 bicycles.Maximin CriterionThe maximin criterion is as easy to do as the maximax. Except instead of taking the largest numberunder each action, you take the smallest payoff under each action (smallest number in each column).You then take the best (largest of these).The smallest payoff if you buy 20, 40, 60, and 80 bicycles are $50, -330, -650, and -970 respectively.Since the largest of those is $50, you would buy 20 bicycles.Minimax CriterionBe sure to use the opportunistic loss (regret) table for the minimax criterion. You take the largestloss under each action (largest number in each column). You then take the smallest of these (it isloss, afterall).The largest losses if you buy 20, 40, 60, and 80 bicycles are $1980, 1160, 700, and 1020 respectively.Since the smallest of those is $700, you would buy 60 bicycles.Putting it all together.Here is a table that summarizes each criteria and the best decision. Action Criterion Buy 20 Buy 40 Buy 60 Buy 80 Best ActionExpected Value 400 740 720 460 Buy 40 Maximax 550 1270 2050 2330 Buy 80 Maximin 50 -330 -650 -970 Buy 20 Minimax 1980 1160 700 1020 Buy 60 rmmakaha@gmail.com 104
- 105. OPERATIONS RESEARCH rmakaha@facebook.comPractice ProblemSince there arent any problems of this kind in the text, work this problem out, and then you cancheck your answer with the instructor.Finickys Jewelers sells watches for $50 each. During the next month, they estimate that they will sell15, 25, 35, or 45 watches with respective probabilities of 0.35, 0.25, 0.20, and ... (figure it out). Theycan only buy watches in lots of ten from their dealer. 10, 20, 30, 40, and 50 watches cost $40, 39, 37,36, and 34 per watch respectively. Every month, Finickys has a clearance sale and will get rid of anyunsold watches for $24 (watches are only in style for a month and so they have to buy the latestmodel each month). Any customer that comes in during the month to buy a watch, but is unable to,costs Finickys $6 in lost goodwill.Find the best action under each of the four decision criteria. DECISION UNDER RISK: A. THE EXPECTED VALUE CRITERION:Muchadura buys and sell tomatoes at $3 and $8 a case respectively. Because tomatoes are perishable,they must be bought a day and sold after that, they become valuable.A 90 days observation of a business reveals the following information in cases. Daily Sales Number Of Days Sold Probability Of Demand 10 cases 18 (18 / 90) = 0.2 11 cases 36 (36 / 90) = 0.4 12 cases 27 (27 / 90) = 0.3 13 cases 9 (9 / 90) = 0.1 Total number of days 90 = 1The Probability of demand = Number of days sold / Total number of days.There are only 4 sales volumes but their sequence in UNKNOWN. The problem is how many casesmust Muchadura stock for selling the following day. If he stocks more or less than the demand onany day he will suffer some losses.Example:If he stocks 13 cases on a particular day and the customer demand on that particular day is 10 cases,then he gets a profit of 3 cases.Let buying price = $3.Let Selling price = $8. rmmakaha@gmail.com 105
- 106. OPERATIONS RESEARCH rmakaha@facebook.comNB: This method if getting Maximum profit = Selling Price – Buying Price per case = $5. Then 10 *5 = $50 and perishable ones = 3 * 3 = $9 and then the Maximum profit = $50 - $9 = $41.For the 3 unsold cases he suffer a loss for each equivalent to the Buying price. All such losses arecalculated in a conditional profit table. I.e. a table of profit on a given supply and demand levels asillustrated below.STOCK ACTION EXPECTED PROFITPossible ProbabilityDemand of Demand Profits 10 11 12 13 10 11 12 1310 50 47 44 41 0.2 10 9.4 8.8 8.211 50 55 52 49 0.4 20 22 20.8 19.612 50 55 60 57 0.3 15 16.5 18 17.113 50 55 60 65 0.1 5 5.5 6 6.5Total 1 50 53.4 53.6 51.4Muchadura must stock 12 cases which give the highest Expected profit of $53.60 on a daily bases toget the maximum profit over a long time. B. EXPECTED PROFIT WITH PERFECT INFORMATION:Suppose Muchadura had perfect information i.e. complete and accurate information about thefuture. Sales demand would still vary from 10 to 13 cases in their respective probabilities. ButMuchadura would not know in advance how many cases would be needed each day.The table below shows the conditional profits value in such situation. STOCK ACTION EXPECTED PROFITPossible ProbabilityDemand of Demand Profits 10 11 12 13 10 11 12 1310 50 0.2 1011 55 0.4 2212 60 0.3 1813 65 0.1 6.5Total 1 10 22 18 6.5Maximum possible profit = 10 + 22 + 18 + 6.5. = $56.50 rmmakaha@gmail.com 106
- 107. OPERATIONS RESEARCH rmakaha@facebook.com C. MINIMISING EXPECTED LOSS:There are two types of Losses: Overstocking Under stocking.OVERSTOCKING:Means you will loss the buying amount.UNDER STOCKING:It means you will loss the profit. STOCK ACTION EXPECTED LOSSPossible ProbabilityDemand of Demand Loss 10 11 12 13 10 11 12 1310 0 3 6 9 0.2 0 0.6 1.2 1.811 5 0 3 6 0.4 2 0 1.2 2.412 10 5 0 3 0.3 3 1.5 0 0.913 15 10 5 0 0.1 1.5 1 0.5 0Total 1 6.5 3.1 2.9 5.1The Expected Minimum Loss is $2.9. The values above the zero diagonal are due to overstockingand those below are due to under stocking. D. THE EXPECTED VALUE OF PERFECT INFORMATION:The expected value of perfect information is calculated as:The expected Profit with perfect information – The expected value Criterion.= 56.50 – 53.60= 2.9In general the expected value of perfect information = Minimum Expected Loss. rmmakaha@gmail.com 107
- 108. OPERATIONS RESEARCH rmakaha@facebook.com E. ITEMS WITH A SALVAGE VALUE:Main items do not become completely worthless after their prime deaths. They will have reducedvalues (Salvage values). The Salvage values must be considered when computing conditional profitsor losses.Consider the previous case when the cost price was $3 and selling price was $8. Any unsold caseswill be disposed / salvage of at $4 the profit will be $4 - $3 = $1.STOCK ACTION EXPECTED PROFITPossible ProbabilityDemand of Demand Profits 10 11 12 13 10 11 12 1310 50 51 52 53 0.2 10 10.2 10.4 10.611 50 55 56 57 0.4 20 22 22.4 22.812 50 55 60 61 0.3 15 16.5 18 18.313 50 55 60 65 0.1 5 5.5 6 6.8Total 1 50 54.2 56.8 58.2Muchadura must stock 13 cases, which give the maximum profit of $58.20. DECISION MAKING UNDER UNCERTAINITY: Under conditions of uncertainty, only payoffs are known and nothing is known about the likelihood of each state of nature. Different persons have suggested several decisions rules for making decisions under such situations: A. MAXIMIN (PESSIMISTIC): It is based upon the consecutive approach to assume that the worst possible is going to happen. The decision maker considers each alternative and locates the minimum payoff for each and then selects that alternative which maximizes the minimum payoffs. STEPS INVOLVED: i. Determine the minimum assured payoffs for each alternative. rmmakaha@gmail.com 108
- 109. OPERATIONS RESEARCH rmakaha@facebook.com ii. Choose that alternative which corresponds to the Maximum of the above minimum payoff. B. MAXIMAX CRITERIA (OPTIMISTIC): Is based upon extreme optimistic, the decision maker selects that particular strategy which corresponds to the maximum of the maximum payoffs of each strategy. STEPS INVOLVED: i. Determine the maximum possible payoff for each alternative. ii. Select that alternative which corresponds to the maximum of the above maximum payoff. C. HURWICZ: In order to overcome the disadvantage of extreme pessimistic (Maximin) and extreme Optimism (Maximax) criteria. Hurwicz introduced the concept of co-efficient of optimism or pessimism as α. Therefore the Hurwicz concept is given by: α Maximin θj {V (ai, θj)} + (1 - α) Maximax θj {V(ai, θj)} D. LAPLACE CRITERION: This criterion is based on what is known as the principal if insufficient reason. Since the probabilities associated with the occurrences of θ1, θ2….θn are unknown, we do not have enough information to conclude that these probabilities will be different. For if this is not the case, we should be able to determine these probabilities and the situation will no longer be a decision under uncertainty. Thus because of insufficient reason to believe otherwise; the states of θ1, θ2….θn are equally likely to occur. The Laplace principal assumes that of θ1, θ2….θn are likely to occur therefore the probability = 1/n where n = number of occurrences. rmmakaha@gmail.com 109
- 110. OPERATIONS RESEARCH rmakaha@facebook.com E. MAXIMIN REGRET CRITERION (SALVAGE): This is a less conservative criterion. In this case a new loss matrix is created such that V(Ai, Qj) is replaced by R(Ai, Qj) which is defined by: Max {V (Ai, Qj) – V(Ai, Qj)} if V is profit R(Ai, Qj)= V(Ai, Qj) – Min {V(Ai, Qj)} if V is loss R(Ai, Qj) is the difference between the best choice in column Qj and the values of V(Ai, Qj) in the same column. R(Ai, Qj) is a regret matrix. Question 1: Given the following data: Customers Category Q1 Q2 Q3 Q4 Supplier A1 5 10 18 25 Level A2 8 7 8 23 A3 21 18 12 21 A4 30 22 9 25 Using the above data: Find i. Maximin Criterion. ii. Maximax Criterion. iii. Hurwicz Criterion. iv. Laplace Criterion. v. (Salvage) Maximin Regret Criterion.Solution: a) Maximin Criterion. Customers Category Q1 Q2 Q3 Q4 Maximin Supplier A1 5 10 18 25 5 Level A2 8 7 8 23 7 A3 21 18 12 21 12 A4 30 22 9 25 9 Maximin = 12 The optimal decision is to take supply level A3 rmmakaha@gmail.com 110
- 111. OPERATIONS RESEARCH rmakaha@facebook.com b) Maximax Criterion. Customers Category Q1 Q2 Q3 Q4 Maximax Supplier A1 5 10 18 25 25 Level A2 8 7 8 23 23 A3 21 18 12 21 21 A4 30 22 9 25 30 Maximax = 30 The optimal decision is to take supply level A4 c) Minimax Criterion. Customers Category Q1 Q2 Q3 Q4 Minimax Supplier A1 5 10 18 25 25 Level A2 8 7 8 23 23 A3 21 18 12 21 21 A4 30 22 19 25 30 Minimax = 21 The optimal decision is to take supply level A3 d) Hurwicz Criterion. Customers Category Q1 Q2 Q3 Q4 Supplier A1 5 10 18 25 Level A2 8 7 8 23 A3 21 18 12 21 A4 30 22 19 25 Hurwicz: = α Maximin θj {V (ai, θj)} + (1 - α) Maximax θj {V(ai, θj)} Let assume that α = ½. Maximin Maximax α Maximin + (1 - α) Maximax 5 25 15 7 23 15 12 21 16.5 9 30 19.5 The optimal decision is to take supply level A4 rmmakaha@gmail.com 111
- 112. OPERATIONS RESEARCH rmakaha@facebook.com e) Laplace Criterion. Customers Category Q1 Q2 Q3 Q4 Supplier A1 5 10 18 25 Level A2 8 7 8 23 A3 21 18 12 21 A4 30 22 19 25 Laplace: = 1/n Expected costs for different actions A1, A2, A3 and A4 are: E(A1) = ¼(5 + 10 + 18 + 25) = 14.5 E(A2) = ¼(8 + 7 + 8 + 23) = 11.5 E(A3) = ¼(21 + 18 + 12 + 21) = 18 E(A1) = ¼(30 + 22 + 19 + 25) = 24 The optimal decision is to take supply level A2 f) Savage Minimax Regret Criterion. Customers Category Q1 Q2 Q3 Q4 Supplier A1 5 10 18 25 Level A2 8 7 8 23 A3 21 18 12 21 A4 30 22 19 25 Q1 Q2 Q3 Q4 Max{ R(Ai, Qj)} A1 0 3 10 4 10 A2 3 0 0 2 3 Minimax A3 16 11 4 0 16 A4 25 15 11 4 25 The optimal decision is to take supply level A2 which gives Minimax. rmmakaha@gmail.com 112
- 113. OPERATIONS RESEARCH rmakaha@facebook.com Question 2: A firm has to decide on its advertising campaign. It has a choice between Tv, Newspaper, Poster and Radio advertising. The return on the advertising medium is measured by the number of potential customers who have the opportunity to see each medium. This will depend on the type of the weather. The figures in the table are the numbers of potential customers in thousands. The firm has funds for using only to one medium. Poor Moderate Good Excellent Tv 200 190 170 130 Newspaper 180 160 150 130 Poster 110 140 140 190 Radio 210 190 160 110Decide which medium the firm should use based on the following information: i. Maximin Criterion. ii. Maximax Criterion. iii. Hurwicz Criterion. iv. Laplace Criterion. v. (Salvage) Maximin Regret Criterion.Solution: a) Maximin Criterion. Poor Mod Good Excellent Maximin Tv 200 190 170 130 130 Newspaper 180 160 150 130 130 Poster 110 140 140 190 110 Radio 210 190 160 110 110 Maximin = 130 The best medium to use for advertising is Tv or Newspaper since they have the highest number of (possible) potential customers of 130 rmmakaha@gmail.com 113
- 114. OPERATIONS RESEARCH rmakaha@facebook.com b) Maximax Criterion. Poor Mod Good Excellent Maximax Tv 200 190 170 130 200 Newspaper 180 160 150 130 180 Poster 110 140 140 190 190 Radio 210 190 160 110 210 Maximax = 210 The best medium to use for advertising is the Radio since it has the highest number of (possible) potential customers of 210. c) Minimax Criterion. Poor Mod Good Excellent Minimax Tv 200 190 170 130 200 Newspaper 180 160 150 130 180 Poster 110 140 140 190 190 Radio 210 190 160 110 210 Minimax = 180 The best medium to use for advertising is the Newspaper with 180 potential customers. d) Hurwicz Criterion. Poor Mod Good Excellent Tv 200 190 170 130 Newspaper 180 160 150 130 Poster 110 140 140 190 Radio 210 190 160 110 rmmakaha@gmail.com 114
- 115. OPERATIONS RESEARCH rmakaha@facebook.com Hurwicz: = α Maximin θj {V (ai, θj)} + (1 - α) Maximax θj {V(ai, θj)} Let assume that α = 0.7 Maximin Maximax α Maximin + (1 - α) Maximax 130 200 151 130 180 145 110 190 109.7 110 210 140 The best medium to use for advertising is the Tv since it has the highest number of (possible) potential customers of 151 g) Laplace Criterion. Poor Mod Good Excellent Tv 200 190 170 130 Newspaper 180 160 150 130 Poster 110 140 140 190 Radio 210 190 160 110 Laplace: = 1/n Expected costs for different actions A1, A2, A3 and A4 are: E(Tv) = ¼(200 + 190 + 170 + 130) = 172 500 E(Newspaper) = ¼(180 +160 + 150 + 130) = 155 000 E(Poster) = ¼(110 + 140 + 140 + 190) = 145 000 E(Radio) = ¼(210 + 190 + 160 + 110) = 167 500 The best medium to use for advertising is Tv since it has the highest number of (possible) potential customers who amount to 172 500 rmmakaha@gmail.com 115
- 116. OPERATIONS RESEARCH rmakaha@facebook.com h) Savage Minimax Regret Criterion. Poor Mod Good Excellent Tv 200 190 170 130 Newspaper 180 160 150 130 Poster 110 140 140 190 Radio 210 190 160 110 Poor Mod Good Excellent Max {R(Ai, Qj)} Tv 90 50 30 20 90 Newspaper 70 20 10 20 70 Minimax Poster 0 0 0 80 80 Radio 100 50 20 0 100 The best medium to use for advertising is Newspaper, which minimize maximum view ship. rmmakaha@gmail.com 116
- 117. OPERATIONS RESEARCH rmakaha@facebook.comUNIT 7: THEORY OF GAMES:HOURS: 20CHARACTERISTICS OF A COMPETITIVE GAME rmmakaha@gmail.com 117
- 118. OPERATIONS RESEARCH rmakaha@facebook.com rmmakaha@gmail.com 118
- 119. OPERATIONS RESEARCH rmakaha@facebook.com rmmakaha@gmail.com 119
- 120. OPERATIONS RESEARCH rmakaha@facebook.com rmmakaha@gmail.com 120
- 121. OPERATIONS RESEARCH rmakaha@facebook.com rmmakaha@gmail.com 121
- 122. OPERATIONS RESEARCH rmakaha@facebook.com rmmakaha@gmail.com 122
- 123. OPERATIONS RESEARCH rmakaha@facebook.com rmmakaha@gmail.com 123
- 124. OPERATIONS RESEARCH rmakaha@facebook.com rmmakaha@gmail.com 124
- 125. OPERATIONS RESEARCH rmakaha@facebook.com rmmakaha@gmail.com 125
- 126. OPERATIONS RESEARCH rmakaha@facebook.com rmmakaha@gmail.com 126
- 127. OPERATIONS RESEARCH rmakaha@facebook.com rmmakaha@gmail.com 127
- 128. OPERATIONS RESEARCH rmakaha@facebook.com rmmakaha@gmail.com 128
- 129. OPERATIONS RESEARCH rmakaha@facebook.com rmmakaha@gmail.com 129
- 130. OPERATIONS RESEARCH rmakaha@facebook.com rmmakaha@gmail.com 130
- 131. OPERATIONS RESEARCH rmakaha@facebook.com rmmakaha@gmail.com 131
- 132. OPERATIONS RESEARCH rmakaha@facebook.com ALTERNATIVELY GAME THEORY: It deals with Decision under Uncertainty which involves 2 or more intelligent opponents in which each opponent aim to optimize his / her own decision at the expense of the other opponent. Typical examples include launching an advertisement campaign. (2) Competing for products or planning war techniques for opposing enemy. In game theory an opponent is referred to as a Player. Each player has the number of choices, limited or unlimited called Strategies. The outcomes payoffs of a game are summarized as functions of different strategies for each player. A game with 2 players were a gain of one player is equal to the loss of another player is called a Two Person Zero Sum game. To illustrate two person zero sum game considers a coin-matching situation in which each of the players A and B select a Head H or Tail T. If the outcome match Head or Tail Player A wins $1 from Player B otherwise Player A loses $1 to Player B. In this game each player has 2 strategies Head or Tail which yields the following 2*2 game matrix expressed in terms of payoff to Player A. Player B H T Player A H 1 -1 T -1 1 OPTIMUM SOLUTION OF TWO PERSON ZERO SUM GAME: Is obtained by using minimax Maximin criterion according to which Player A (whose strategies represents rows) select a strategy (mixed or Pure) which maximize his minimum gains, the minimum being taken over all the strategies of Player B. In similar way Player B selects his strategy that minimize his maximum loses. rmmakaha@gmail.com 132
- 133. OPERATIONS RESEARCH rmakaha@facebook.com 1 VALUE OF THE GAME: Is the maximum guaranteed gain to Player A or the minimum possible loss to Player B denoted by V. When Maximin possible value is equal to Minimax value of the corresponding pure strategies, the game is said to have the Optimum Strategies and has a Saddle point. Player B 1 2 3 4 Maximin Player A 1 8 2 9 5 2 2 6 5 7 18 5 3 7 3 -4 10 -4 Minimax 8 5 9 18The game has a Saddle point which exists at row 2 column 2 and the value of the game = 5. Player B 1 2 3 Maximin Player A 1 1 3 6 1 2 2 1 3 1 3 6 2 1 1 Minimax 6 3 6NB: The optimum solution which shows that Maximin <> Minimax means it is a mixed strategy i.e.there is no agreement (poor strategy). Below and above show that there is no Saddle point whichmeans Maximin <> Minimax. Player B 1 2 3 4 Maximin Player A 1 5 -10 9 0 -10 2 6 7 8 1 1 3 8 7 15 2 2 4 3 4 -1 4 -1 Minimax 8 7 15 4 rmmakaha@gmail.com 133
- 134. OPERATIONS RESEARCH rmakaha@facebook.comConsider the following game G. Player B B1 B2 Maximin Player A A1 2 2 6 -2 -1 A2 -1 Minimax 2 6Maximin = Minimax which is a condition strictly determinable game hence the game is strictlydeterminable whatever λ maybe. The value of the game = 2 with the best strategy for Player A fromA1 and the best strategy for Player B from B1.Question 1:Find the range of values of P and Q, which will render the entry (2,2) a Saddle point of the game. Player B B1 B2 B3 Maximin Player A A1 2 4 5 2 A2 10 7 q 7 A3 4 p 8 4 Minimax 10 7 8Ignoring values of P and Q determine the Maximin and Minimax value of the payoff matrix. TheMaximin =f and Minimax = f thus there exists a Saddle point at position (2,2). This impose acondition on P as P<= f and on Q as Q >= f.Hence the required range for P and Q is = 7<= Q, P<= 7.Question 2:For what values of λ is the game with the following payoff. Payoff is strictly determinable. Player B B1 B2 B3 Maximin Player A A1 λ 6 2 2 A2 -1 λ -7 -7 A3 -2 4 λ -2 Minimax -1 6 2This shows that the value of the game (V) lies between –1 and 2.That is –1 <= V <= 2. For a strictly determinable we have –1 <= λ <= 2. rmmakaha@gmail.com 134
- 135. OPERATIONS RESEARCH rmakaha@facebook.com GRAPHICAL SOLUTION OF 2 BY N & M BY 2 GAMES:The graphical solution of 2 by N and M by 2 is only applicable to games in which at least on of thePlayers have 2 strategies only.Consider the following 2 by N games. Player B Y1 Y2 Y3 Player A X1 A11 A12 A1n X2 A21 A22 A2nThe expected payoff of the corresponding to the pure strategies of B are given below: B’s Pure Strategies A’s Expected Payoff 1 (A11 –A12) X1 + A21 2 (A21 – A22) X1 + A22 N (A2n –A2n) X1 + A2nThis shows that A’s average payoff varies linearly with X1.According to the Minimax criterion for mixed strategies games Player A should select the value Vthat minimize his maximum expected playoffs. This may be done by plotting a straight line asfunction of X1.Question 3:Consider the following 2 by 4 games. Player B 1 2 3 4 Player A 1 2 2 3 -1 2 4 3 2 6Solution: B’s Pure Strategies A’s Expected Payoff 1 (2 – 4) X1 + 4 2 (2 – 3) X1 + 3 3 (3 – 2) X1 + 2 4 (-1 –7) X1 + 6 rmmakaha@gmail.com 135
- 136. OPERATIONS RESEARCH rmakaha@facebook.com B’s Pure Strategies A’s Expected Payoff 1 - 2X1 + 4 2 -X1 + 3 3 X1 + 2 4 - 7X1 + 6 6 6 5 5 4 4 3 3 2 2 1 1 X1 0 1/2 0 X1 -1 -1 -2 -2This is a point of integration of any 2 of the lines or more i.e. lines 2, 3 and 4.A’s optimum strategy is X1 = ½ and X2 = 5/2 and the value of the game is obtained by substitutingX1 in the equations of any of the lines passing the intersection of the point.The value of the game = 5/2.Question 4:Consider the following 2 by 3 game, find B’s pure strategies and A’s expected payoff using thegraphically method. Player B 1 2 3 Player A 1 1 3 11 2 8 5 2Solution: B’s Pure Strategies A’s Expected Payoff 1 - 7X1 + 8 2 - 2X1 + 5 3 9X1 + 2 rmmakaha@gmail.com 136
- 137. OPERATIONS RESEARCH rmakaha@facebook.com 11 11 10 10 8 9 8 8 7 7 6 6 5 5 4 H 4 3 3 2 2 1 1 X1 0 0 X1 -1 Maximin -1 -2 -2Since Player A wishes to Maximize his Minimum expected payoff we consider the highest point ofintersection on the lower elevation of A’s expected payoff equations.This point it represents the maximum value of the game for A.Lines 2 and 3 passes through it defines the relative moves B2 and B3 it along B needs to play.The solution of the original 2 * 3 game reduces to a 2 by 2 payoff matrix. Player B B1 B2 Player A A1 3 11 X1+ X2 = 1 A2 5 2 Y1 + Y 2 = 1Using the method of solution for a 2 * 2 games the optimum strategy can be easily obtained by: X1 = 3 – 11 / (3 + 2) – (5 + 11) = 8 / 11 X2 = 1 - 8 / 11 = 3 / 11The value of the game V = (2 * 3) – (5 * 11) / (3 + 2) – (5 + 11) = 49 / 11 rmmakaha@gmail.com 137
- 138. OPERATIONS RESEARCH rmakaha@facebook.comQuestion 4:Consider the following 2 by 4 game, find B’s pure strategies and A’s expected payoff using thegraphically method. Player B 1 2 3 4 Player A 1 1 3 -3 7 2 2 5 4 -6Solution: B’s Pure Strategies A’s Expected Payoff 1 - X1 + 2 2 - 2X1 + 5 3 - 7X1 + 4 4 13X1- 6 11 11 10 10 9 9 8 8 7 7 6 6 5 5 4 4 3 3 2 2 1 1 X1 0 0 X1 -1 H -1 -2 -2 -3 Maximin -3 -4 -4 -5 -5 -6 -6 rmmakaha@gmail.com 138
- 139. OPERATIONS RESEARCH rmakaha@facebook.comThe solution of the original 2 * 4 game reduces to a 2 by 2 payoff matrix. Player B B1 B2 Player A A1 -3 7 X1+ X2 = 1 A2 4 -6 Y1 + Y 2 = 1Using the method of solution for a 2 * 2 games the optimum strategy can be easily obtained by: X1 = -3 – 7 / (-3 + -6) – (4 + 7) = 11 / 20 X2 = 1 - 11 / 20 = 9 / 20 Y1 = -6 – 7 / (-3 + -6) – (4 + 7) = 13 / 20 Y2 = 1 - 13 / 20 = 7 / 20The value of the game V = (-2 * -6) – (7 * 4) / (3 + 2) – (5 + 11) = 40 / 20 = 2 MINIMAX PROBLEMS:Obtain the optimum strategy for both persons and the value of the game for zero person sum gamewhose payoff matrix is as follows: Player B 1 2 Player A 1 1 -3 2 3 5 3 -1 6 4 4 1 5 2 2 6 -5 0 rmmakaha@gmail.com 139
- 140. OPERATIONS RESEARCH rmakaha@facebook.comSolution: A’s Pure Strategies B’s Expected Payoff 1 - 4Y1 - 3 2 - 2Y1 + 5 3 - 6Y1 + 6 4 5Y1+ 1 5 2Y1+ 2 6 -5Y1+ 0 11 11 10 10 9 Minimax 9 8 8 7 H 7 6 6 5 5 4 4 3 3 2 2 1 1 Y1 0 0 Y1 -1 -1 -2 -2 -3 -3 -4 -4 -5 -5 -6 -6 -7 -7The solution of the original 6 * 2 game reduces to a 2 by 2 payoff matrix. Player B B1 B2 Player A A1 X1+ X2 = 1 3 5 A2 Y1 + Y 2 = 1 4 1Using the method of solution for a 2 * 2 games the optimum strategy can be easily obtained by: X2 = 3 – 5 / (3 + 1) – (4 + 5) =2/5 rmmakaha@gmail.com 140
- 141. OPERATIONS RESEARCH rmakaha@facebook.com X1 = 1 - 2 / 5 = 3 / 5 Y1 = 1 – 5 / (3 + 1) – (4 + 5) =4/5 Y2 = 1 - 4 / 5 = 1 / 5The value of the game V = (1 * 3) – (4 * 5) / (3 + 1) – (4 + 5) = 17 / 5 GENERAL SOLUTION OF M * N RECTANGULAR GAMES:In a rectangular game with M * N payoff matrix if there does exists any saddle point and is notpossible to reduce the size of the game to 2 by 2 payoff matrix.The following methods are generally used to solve the game: Linear programming method. Iterative Method.Question 5:Solve the following game; consider the game problem in which B’s linear programming problem. Player B 1 2 3 Maximin Player A 1 8 4 2 2 2 2 8 4 2 3 1 2 8 1 Minimax 8 8 8 Player B Y1 Y2 Y3 Player A X1 8 4 2 X2 2 8 4 X3 2 2 8B’s linear programming problem is as follows:Maximize Z = Y1 + Y2 + Y3 Subject to: 8Y1 + 4Y2 + 2Y3 <= 1 {1} 2Y1 + 8Y2 + 4Y3 <= 1 {2} Y1 + 2Y2 + 8Y3 < = 1 {3} Y1, Y2, Y3 >= 0 rmmakaha@gmail.com 141
- 142. OPERATIONS RESEARCH rmakaha@facebook.com TABLEAU 1: Y1 Y2 Y3 S1 S2 S3 Solution S1 8 4 2 1 0 0 1 S2 2 8 4 0 1 0 1 S3 1 2 8 0 0 1 1 Z 1 1 1 0 0 0 0 PC TABLEAU 2: Y1 Y2 Y3 S1 S2 S3 Solution Y1 1 0.5 0.25 0.125 0 0 0.125 S2 0 7 3.5 -0.25 1 0 0.75 S3 0 1.5 7.75 -0.125 0 1 0.875 Z 0 0.5 0.75 -0.125 0 0 -0.125 PC TABLEAU 3: Y1 Y2 Y3 S1 S2 S3 Solution Y1 1 0 0 0.107 -0.072 0 0.072 Y2 0 1 0.5 0.036 0.143 0 0.107 S3 0 0 7 -0.179 -0.215 1 0.715 Z 0 0 0.5 -0.143 -0.072 0 -0.1785 rmmakaha@gmail.com 142
- 143. OPERATIONS RESEARCH rmakaha@facebook.com TABLEAU 3: Y1 Y2 Y3 S1 S2 S3 Solution Y1 1 0 0 0.107 -0.072 0 0.072 Y2 0 1 0 0.049 0.159 -0.072 0.057 Y3 0 0 1 -0.026 -0.031 0.143 0.102 Z 0 0 0 -0.156 -0.087 -0.072 -0.2295Conclusion:Since they are no positive number in the Z row the solution is Optimum. Hence for maximum Z, Y1=0.072, Y2= 0.057 and Y1= 0.102 producing Z = $0.2295.Solving a Matrix Game Using the Simplex MethodA game may be solved using the simplex method as follows.Before you start, check for saddle points. If you find one, you have already solved the game; theoptimal strategies are the pure strategies passing through a saddle point. Otherwise, continue withthe following steps. 1. Reduce the payoff matrix by dominance. 2. Add a fixed number k to each of the entries so that they all become non-negative. 3. Set up and solve the associated linear programming problem using the simplex method. 4. Obtain the optimal strategies and the expected value as follows: Column Strategy a. Express the solution to the linear programming problem as a column vector. b. Normalize by dividing each entry of the solution vector by the sum of the entries, or by the value of the objective variable p. c. Insert zeros in positions corresponding to the columns deleted during reduction. rmmakaha@gmail.com 143
- 144. OPERATIONS RESEARCH rmakaha@facebook.com Row Strategy d. Write down the row vector whose entries are the numbers appearing in the bottom row of the final tableau underneath the slack variables. e. Normalize by dividing each entry of the solution vector by the sum of the entries. f. Insert zeros in positions corresponding to the rows deleted during reduction. Value of the Game 1e = /p - k. rmmakaha@gmail.com 144
- 145. OPERATIONS RESEARCH rmakaha@facebook.comUNIT 8: INVENTORY MODELLING:HOURS: 20 INVENTORY SYSTEM MODEL: Inventory deals with manufacturing sufficient stock of goods (parts and raw materials) to ensure a smooth operation of a business activity. 1 GENERALIZED INVENTORY MODEL: The ultimate objective of inventory model is to answer the following two questions: ⇒ How much to order. ⇒ When to order.The answer to the 1st question is expressed in terms of economic order quantity (EOQ), which is theoptimum amount that should be ordered every time an order is placed and may vary with timedepending on the situation under consideration.The 2nd part depends on the type of the inventory type. If the inventory system requires periodicreview i.e. equal time intervals (e.g. every week or month). The time for acquiring a new orderusually coincides with the beginning of each time interval.If a system is of continuous review type a reorder point is usually specified by an inventory level atwhich a new order must be placed.We can express the solution of the general inventory problems as follows:֠ PERIODIC REVIEW CASE: Receive a new order of the amount specified by the order quantity at equal intervals of order time, which can be weekly or monthly.֠ CONTINUOUS REVIEW CASE: When the inventory level reaches the re-order point places an order whose size is equal to the quantity. The order quantity and re-order point are normally determined by minimizing the total inventory cost, the point which can be expressed as a function of its principle components in the following manner. Total inventory cost = Purchasing cost + Setup cost + Holding cost + Storage cost. 1 PURCHASING COST: rmmakaha@gmail.com 145
- 146. OPERATIONS RESEARCH rmakaha@facebook.com Purchasing cost is the price of the quantity of goods to be supplied. The purchasing cost becomes an important factor when the commodity unit prices become dependant on the size of the order. This situation is normally expressed in terms of quantity discount or price break where the unit price of an item decrease with the increase of order quantity. 1 SETUP COST / ORDERING COST: Represents a fixed charge incurred when an order is placed. Thus to satisfy the demand for a given time period, ordering of smaller quantities will result in a higher set up cost during the period than if the demand is satisfied by placing large orders. 1 HOLDING COST / CARRYING COST: Represents the cost of carrying inventory or represents the cost of maintaining inventory e.g. warehouse rental, security, handling, depreciation, stock maintenance, insurance and loses of interest on capital. 1 SHORTAGE COST: Is a penalty incurred when we run out of stock of the needed commodity. It generally includes costs due to the loss of customer’s goodwill as well as potential loss in income. We need to minimize the total cost involved in stocking operations by determining the optimum quantity for the replenishment order Q. INVENTORY NOTATION: 2 Tc – Total inventory cost per unit time. 2 D – Total demand per unit time. 2 Ci – Cost of production or purchase per unit expressed as $ per unit. 2 Q – Quantity per order. 2 Q* - Optimum quantity = EOQ. 2 H – Holding cost or Carrying cost per unit of inventory per time. 2 T – Time between orders or length of inventory cycle Q/D. 2 K – Cost of processing an order or Ordering cost / Setup cost. 2 L – Leading time. 2 Cs – Shortage cost. Total inventory cost = Purchasing cost + Setup cost + Holding cost + Storage cost. Tc = CiD + QH/2 + DK/Q + Cs. rmmakaha@gmail.com 146
- 147. OPERATIONS RESEARCH rmakaha@facebook.com We need to minimize Tc depending on the quantity Q hence by differentiation we get δ(Tc)/δQ = δ(QH/2)/ δQ + δ(DK/Q)/δQ + δ(CiD)/δQ + δ(Cs)/δQ 0 = H/2 – DKQ2 0 = H/2 – DK/Q2 Multiply both sides by 2Q2 we get 0 = HQ2 – 2DK 0 = HQ2 – 2DK HQ2 = 2DK Q2 = 2DK/H Q* = √2DK/H (This is the formula for EOQ)Economic Order Quantity is a deterministic model referred to as Wilson Economic Lot Size. EOQ ASSUMPTIONS: Tc = CiD + QH/2 + DK/Q + Cs. The above model will hold for the following assumptions: 1) Demand should be constant. 2) Replenishment should be instantaneous. 3) Shortages are not allowed. 4) Fixed quantity order per inventory order level should be maintained.Question 1:The demand for an item is 18000 units per month and the holding cost per unit is $14.40 per yearand the cost of ordering is $400. No shortages are allowed and the replenishment rate isinstantaneous. a) Determine the optimum order quantity. b) The total cost per year of the inventory if the cost of one unit is $1. c) The number of orders per year. d) The time between orders.Solution:Since all the information asked for are years. Convert all information in months to years.D = 18000 * 12 = 216000 per year.H = $14.40 per year.K = $400.EOQ => Q* = √2DK/H √2* 21600 * 400/14.40 √172800000/14.40 rmmakaha@gmail.com 147
- 148. OPERATIONS RESEARCH rmakaha@facebook.com √12000000 3464.101615 3464 Tc = CiD + QH/2 + DK/Q. = (1 * 216000) + (3464 * 14.40)/2 + (216000 * 400)/3464 = 216000 + 24940.80 + 24942.26 = 265883.06 The number of orders per year = D/Q =216000/3464 = 62.36 ordersThe time between orders = Q/D = 3464/216000 = 0.016 = 0.02Question 2:The demand for a particular item is 18000 units per year. Holding cost per unit is $1.20 per year andthe cost of procurement is $400. No shortages are allowed and the replenishment rate isinstantaneous. a. Determine the optimum order quantity. b. The number of orders per year. c. The time between orders. d. The total cost per year of the inventory if the cost of one unit is $1.Solution:D = 18000 per year.H = $1.20 per year.K = $400.EOQ => Q* = √2DK/H √2* 18000 * 400/1.20 √14400000/1.20 √12000000 3464.101615 3464 rmmakaha@gmail.com 148
- 149. OPERATIONS RESEARCH rmakaha@facebook.com The number of orders per year = D/Q =18000/3464 = 5.196 orders The time between orders = Q/D or 365/5.196 = 70.24 days = 3464/18000 = 0.1924 = 0.19 days Tc = CiD + QH/2 + DK/Q. = (1 * 18000) + (3464 * 1.20)/2 + (18000 * 400)/3461 = 18000 + 206.40 + 2078.52 = 22156.92Question 3:Suppose a company has soft drinks products. It has a constant annual demand rate of 3600 cases. Acase of soft drinks cost the Harare drinks company $3. Ordering cost is $20 per order and holdingcost is charged at 25% of the cost per unit. There are 250 working days per year and the lead-time is5 days. Identify the following aspects of inventory policy: i. Economic order quantity. ii. Re-order point. iii. Cycle time (Length) = Q/D. iv. The total annual cost.Solution:D = 3600.H = 25% of $3.K = $20 per order.Ci = $3 per unit. i. EOQ => Q* = √2DK/H √2* 3600 * 20/0.75 √144000/0.75 √192000 438.178 438 ii. Re-order point = Daily Demand * Lead-time. = 3600/250 * 5 = 72 crates rmmakaha@gmail.com 149
- 150. OPERATIONS RESEARCH rmakaha@facebook.com iii. Cycle time = Q/Daily demand. Daily Demand is given by = 3600/250 = 14.40 Cycle Time = 438/14.40 = 30.42 days iv. Tc = CiD + QH/2 + DK/Q. = (3 * 3600) + (438 * 0.75)/2 + (20 * 3600)/438 = 10800 + 164.25 + 164.38356 = 11128.633 = 11128.63 RE-ORDER POINT: Is a point in which a new order should be placed? 1 GENERAL RULES TO DETERMINE THE RE-ORDER POINT: i. Determine the number of days the order should be placed (Cycle length) = Q/D. ii. Determine the number of days which is the minimum level to re-order new entities and is given by Lead-time – Cycle Length (Q/D) where Lead-time is the time between the placement of an order and its receipt. iii. Determine the level of inventory (stock) to re-order new items and is given by: Number of days which gives minimum level to order new items * Demand.Question 4:The daily demand for a commodity is approximately 100 units. Every time an order is placed a fixedcost of $100 is incurred and daily holding cost per unit inventory $0.02.If the lead-time is 12 days.Determine: i. Economic order quantity. ii. Re-order point. iii. Cycle time. iv. Minimum inventory level. v. Level of inventory stock. rmmakaha@gmail.com 150
- 151. OPERATIONS RESEARCH rmakaha@facebook.comSolution:D = 100.H = $0.02.K = $100. i. EOQ => Q* = √2DK/H √2* 100 * 100/0.02 √20000/0.02 √1000000 1000 ii. Re-order point = Demand * Lead-time = 100 * 12 = 1200 iii. Cycle time = Q/D = 1000/100 = 10 vi. Minimum inventory level = Lead-time – Cycle Length. = 12 – 10 = 2 daysvii. Level of inventory stock = Minimum inventory level * Demand. = 2 * 100 = 200 orders. EOQ WITH GRADUAL REPLENISHMENT / ECONOMIC PRODUCTION LOT SIZE: Suppose a demand of an item in a company is D units per unit time and the company can produce them at a rate of R units per unit time where R>D. The cost of set-up is $K and the holding cost per unit time is $H. We wish to determine the Optimum manufacturing quantity and the total cost per year assuming the cost of one unit is $Ci. It is assumed that shortages are not allowed. EOQ => Q* = √2DK/H(1 – D/R) rmmakaha@gmail.com 151
- 152. OPERATIONS RESEARCH rmakaha@facebook.comQuestion 5:A company uses 100000 units per year that cost $3 each. The carrying costs are 1% per month andthe ordering cost are $2.50 per year.What is the economic order quantity made the items themselves on a machine with a potentialcapacity of 600000 units per year.Solution:D = 100000.K = $2.50.H = 1% = 0.01 * 12 * 3 = 0.36 EOQ => Q* = √2DK/H(1 – D/R) = √2* 100000 * 2.50/0.36(1 – 100000/600000) = √500000/0.36(1 – 1/6) =√1666666.667 = 1290.994449 =1291.Question 6:A company manufactures an item, which is also used in the company. The demand of this item is18000 units per year and the production rate is 3000 per month. The cost of set up is $500. Theholding cost of 1 unit per month is $0.15.Determine the optimum manufacturing quantity and the total cost per year assuming the cost of 1unit is $2 and shortages are not allowed.Solution:D = 18000 per year.H = $0.15 * 12 = $1.8 per year.K = 500Ci = $2R = 3000 * 12 = 36000 per year. EOQ => Q* = √2DK/H(1 – D/R) = √2* 18000 * 500/1.8 *(1 – 18000/36000) = √18000000/0.36(1 – 0.5) =√18000000/0.18 =3162.27766 = 3162 rmmakaha@gmail.com 152
- 153. OPERATIONS RESEARCH rmakaha@facebook.com Tc = CiD + QH/2 + DK/Q. = (2 * 18000) + (3162 * 1.8)/2 + (18000 * 500)/3162 = 36000 + 2845.8 + 2846.29981 = 41692.09981 = 41692 INVENTORY CONTROL (TYPES OF CONTROL SYSTEMS): There are 2 two basic inventory control systems: Reorder Level Periodic Review system. 1 PERIODIC REVIEW SYSTEM: This is the reviewing of all stocks at fixed intervals periodically. Therefore absolute stocks can be eliminated. Variable quantities can be ordered. 1 THE REORDER LEVEL SYSTEM: The reorder level system results in fixed quantities being ordered at variable intervals dependent upon demand. The reorder level system usually has three (3) control levels namely: The reorder level. The minimum level. The maximum level. NB: The Reorder Level is calculated so that if the worst anticipated position occurs, Stock would be replenished in time. The Minimum Level is calculated so that management will be warned when demand is above average. There may be no danger but the situation needs watching. The Maximum Level is calculated so that management will be warned when demand is the minimum anticipated and consequently the stock level is likely to rise. rmmakaha@gmail.com 153
- 154. OPERATIONS RESEARCH rmakaha@facebook.comQuestion 7:The following is an illustration of a company with a simple manual reorder level system. Normal Usage = 110 per day. Minimum Usage= 50 per day. Maximum Usage = 140 per day. Lead time = 25 – 30 days. EOQ = 5000Using the above data calculate the various control levels i.e. Reorder level. Minimum Usage. Maximum Usage. [20 marks].Solution: a) Reorder Level = Maximum Usage * Maximum Lead time. = 140 * 30 = 4200 units b) Minimum Level = Reorder Level – (Average Lead time * Normal Usage) = 4200 – (27.5 * 110) = 4200 – 3025 = 1175 units c) Maximum Level = Reorder Level + EOQ – (Min Lead time * Min Usage) = 4200 + 5000 – (25 * 50) = 7950Question 8:The following is an illustration of a company with a simple manual reorder level system. Normal Usage = 560 per day. Minimum Usage= 250 per day. Maximum Usage = 750 per day. Lead time = 15 – 20 days. EOQ = 10000Using the above data calculate the various control levels i.e. Reorder level. Minimum Usage. Maximum Usage. [20 marks].Solution: a) Reorder Level = Maximum Usage * Maximum Lead time. = 750 * 20 = 15000 units rmmakaha@gmail.com 154
- 155. OPERATIONS RESEARCH rmakaha@facebook.com b) Minimum Level = Reorder Level – (Average Lead time * Normal Usage) = 15000 – (17.5 * 560) = 15000 – 9800 = 5200 units c) Maximum Level = Reorder Level + EOQ – (Min Lead time * Min Usage) = 15000 + 10000 – (15 * 250) = 21250 rmmakaha@gmail.com 155
- 156. OPERATIONS RESEARCH rmakaha@facebook.comUNIT 9: REGRESSION ANALYSIS ANDCORRELATION:HOURS: 20 CORRELATION: Correlation is a measure of strength of a linear relationship between 2 sets of numbers. There are 2 measures of correlation namely: The Pearson Product Moment Correlation Coefficient represented by r. The Spearman’s Rank Correlation Coefficient represented by R.A coefficient of +1 indicates a perfect Positive relationship whilst a coefficient of – 1 shows perfectnegative correlation.Hence the correlation coefficient will have values ranging between – 1 and + 1 inclusive.A coefficient of zero implies no correlation. SCATTER DIAGRAM: It is a way of representing a set of data by a scatter of plots or dots. One variable is plotted on the X-axis and another on the Y-axis. Normally variable X is the one controlled over (independent variable) and Y variable is the variable that you are interested in (dependent variable). POSITIVE CORRELATION: NEGATIVE CORRELATION: * * * * * * * Delivery * * * * Time * * * * * * * * * * * * Number of deliveries Temperature NO CORRELATION: NON-LINEAR CORRELATION: * * * * ** * * * * * * ** Salary * ** * * * ** * * * * * * ** * * * * * * * ** * * * * * * * ** Age * Quantity producedThe first diagram is a positive because number of deliveries increase so apparently does the deliverytime. The second is a negative correlation because as air temperature increases the heating cost falls. rmmakaha@gmail.com 156
- 157. OPERATIONS RESEARCH rmakaha@facebook.comFor the third correlation shows that there is no correlation existing between salary and age of anemployee. For non-linear correlation it suggests that quantity produced and efficiency are correlated butnot linearly.Given two sets of data represented by the variables X and Y the Product MomentCorrelation Coefficient is given by: r = ∑ (X - r) (Y – Ý) √ ∑ (X - r)2 * (Y – Ý)2OR n ΣXY - ΣX * ΣY r = 2 2 2 2 [n Σ X - (ΣX)] [n Σ Y - (ΣY)]Question 1:Calculate r for the data given below:X 15 24 25 30 35 40 45 65 70 75Y 60 45 50 35 42 46 28 20 22 15Solution:X Y XY X2 Y215 60 900 225 360024 45 1080 576 202525 50 1250 625 250030 35 1050 900 122535 42 1470 1225 176440 46 1840 1600 211645 28 1260 2025 78465 20 1300 4225 40070 22 1540 4900 48475 15 1125 5625 225424 363 12835 21926 15123 rmmakaha@gmail.com 157
- 158. OPERATIONS RESEARCH rmakaha@facebook.com n ΣXY - ΣX • ΣY r = 2 2 2 2 [n Σ X - (ΣX)] [n Σ Y - (ΣY)] 10 * 12835 - 424 * 363 r = 10* 21926 - 179776 * 10 * 15123 - 131769 128350 - 153912 r = 39484 * 19461 - 25562 r = 27719.9959 r = - 0.922150238 r = - 0.92Question 2:Calculate r for the data given below:X 1 2 3 6 5 6Y 5 10.5 15.5 25 16 22.5Solution:X Y XY X2 Y21 5 5 1 252 10.5 21 4 110.253 15.5 46.5 9 240.254 25 100 16 6255 16 80 25 2566 22.5 135 36 506.2521 94.5 387.5 91 1762.75 rmmakaha@gmail.com 158
- 159. OPERATIONS RESEARCH rmakaha@facebook.com n ΣXY - ΣX * ΣY r = 2 2 2 2 [n Σ X - (ΣX)] [n Σ Y - (ΣY)] 6 * 387.5 - 21 * 94.5 r = 6* 91 - 441 * 6* 1762.75 – 8930.25 2325 – 1984.5 r = 546 - 441 * 10576 – 8930.25 340.5 r = 415.7598467 r = 0.819(B) THE SPEARMAN’S RANK CORRELATION COEFFICIENT:When two sets of data are given positions or ranked, we use Spearman’s Rank Correlation Coefficientrepresented by R. It is given by:R = 1 - 6 Σd2 n(n2 -1)Where d = difference between pairs of ranked values. n = number of pairs of ranking. 1 = is an independent number.Question 2:A group of eight students were tested in Maths and English and the ranking in the two subjects aregiven below:Student A B C D E F G HMaths 2 7 6 1 4 3 5 8English 3 6 4 2 5 1 8 7 rmmakaha@gmail.com 159
- 160. OPERATIONS RESEARCH rmakaha@facebook.comSolution:Students Maths English D D2A 2 3 -1 1B 7 6 1 1C 6 4 2 4D 1 2 -1 1E 4 5 -1 1F 3 1 2 4G 5 8 -3 9H 8 7 1 1TOTAL = 22R = 1 - 6 Σd2 n(n2 -1)R = 1 – 6 * 22 8(82 -1)R = 1 - 132 8* 63R = 1 – 0.2619 = 0.738 REGRESSION:This is a statistical technique that can be used for short to medium term forecasting. It seeks toestablish the line of “best fit” for some observed data.These are 2 ways of obtaining the trend of a set of data: 2 The graphical method. 2 The method of least squares. rmmakaha@gmail.com 160
- 161. OPERATIONS RESEARCH rmakaha@facebook.com THE GRAPHICAL METHOD: In this method a scatter diagram is plotted and a straight line is produced through the middle of the points representing the trend line. This line can then be used (when extended) to predict a future value. y * Trend line or line of best fit. * * * * * * * * * * xLeast Squares Regression LinesThis is a method of finding a regression line without estimating where the line should go by eye.If the equation of the regression line is y = ax + b, we need to find what a and b are. We findthese by solving the "normal equations".Normal EquationsThe "normal equations" for the line of regression of y on x are:Σy = aΣx + nb andΣxy = aΣx2 + bΣxThe values of a and b are found by solving these equations simultaneously.For the line of regression of x on y, the "normal equations" are the same but with x and yswapped. rmmakaha@gmail.com 161
- 162. OPERATIONS RESEARCH rmakaha@facebook.com METHOD OF LEAST SQUARES: This method gives an equation of the trend line or regression line. The equation is given by: Y = A + Bx Where B = n ΣXY - ΣX • ΣY or n ΣX2 - (ΣX)2 = ΣXY -n X Y n X2 - nX2 and A = Y - BX x is an independent variable. n is the number of items in the list.Question 3:Consider the following data:X 1 2 3 4 5 6Y 6 4 3 5 4 2 i. Find the equation of the regression line. ii. Find Y when X = 4 using the equation.Solution: X Y XY X2 1 6 6 1 2 4 8 4 3 3 9 9 4 5 20 16 4 4 20 25 6 2 21 36 21 24 75 91 B = n ΣXY - ΣX • ΣY n ΣX2 - (ΣX)2 rmmakaha@gmail.com 162
- 163. OPERATIONS RESEARCH rmakaha@facebook.com B = 6(75) – 21 * 24 6 (91) – (21)2 = 450 – 504 546 – 441 = -18/35 X = ∑X/n 21 /6 = 3.5 Y = ∑Y/n 24 /6 = 4A = Y - BX = 4 – (7/2 * - 54/105) = 4 + 9/5 =29/5 Y = A + Bx = 29/5 – 18/35X(ii) When X = 4 Y = A + Bx = 29/5 – 18/35* 4 = 29/5 – 72/35 = 131/35 or 326/35 rmmakaha@gmail.com 163
- 164. OPERATIONS RESEARCH rmakaha@facebook.comQuestion 4:For data below calculate the equation of the regression Y upon X.X 98 78 74 80 80 83 95 100 97 75Y 14 9 10 11 10 11 12 13 11 9Solution: X Y XY X2 98 14 1372 9604 78 9 720 6084 74 10 740 5476 80 11 880 6400 80 10 800 6400 83 11 913 6889 95 12 1140 9025 100 13 1300 10000 97 11 1067 9409 75 9 675 5625 860 110 9589 74912 B= n ΣXY - ΣX • ΣY n ΣX2 - (ΣX)2 B = 10(9589) – 860 * 110 10 (74912) – (860)2 = 95890 – 94600 749120 – 739600 = 0.1355X = ∑X/n 860 /10 = 86Y = ∑Y/n 110 /10 = 11 rmmakaha@gmail.com 164
- 165. OPERATIONS RESEARCH rmakaha@facebook.comA = Y - BX = 11 – (0.1355 * 86) = 11 – 11.653 = - 0.6533Y = A + Bx = - 0.6533 + 0.1355X rmmakaha@gmail.com 165
- 166. OPERATIONS RESEARCH rmakaha@facebook.comUNIT 10 INTRODUCTION TO QUEUEINGTHEORYHOURS: 20 Introduction to Queuing TheoryQueueing theory is a set of mathematical tools for the analysis of probabilistic systems of customersand servers.In everyday life, it is seen that a number of people arrive at a cinema ticket window. If the peoplearrive “too frequently” they will have to wait for getting their tickets or sometimes do without it.Under such circumstances, the only alternative is to form a queue, called the waiting line, in orderto maintain a proper discipline. Here the arriving people are called the customers and the personissuing the tickets is called a server.Specifically, the theory helps the manager to seek answer to the questions like the following whenactual/expected arrival and service rates are known and a set of assumption is made. • What is the fraction of time the system providing service is expected to be busy (or, idle)? • What are the chances of a certain number of customers present in the system at a random point in time? • On the average, how many customers are expected to be present in the system? • What is the average length of queues formed from time to time? • How much time a customer is expected to spend in the system – in waiting for getting the service? • How much time a customer typically spends in the queue? • What is the expected total cost of providing service for various alternative service levels and, accordingly, what is the optimal level of service to provide?Definitions: • Arrival Rate refers to the average number of customers who require service within a specific period of time. • A Capacitated Queue is limited as to the number of customers who are allowed to wait in line. • Customers can be people, work-in-process inventory, raw materials, incoming digital messages, or any other entities that can be modeled as lining up to wait for some process to take place. • A Queue is a set of customers waiting for service. • Queue Discipline refers to the priority system by which the next customer to receive service is selected from a set of waiting customers. One common queue discipline is first-in- first-out, or FIFO. rmmakaha@gmail.com 166
- 167. OPERATIONS RESEARCH rmakaha@facebook.com • A Server can be a human worker, a machine, or any other entity that can be modeled as executing some process for waiting customers. • Service Rate (or Service Capacity) refers to the overall average number of customers a system can handle in a given time period. • Stochastic Processes are systems of events in which the times between events are random variables. In queueing models, the patterns of customer arrivals and service are modeled as stochastic processes based on probability distributions. • Utilization refers to the proportion of time that a server (or system of servers) is busy handling customers.Queueing Notation:In the literature, queueing models are described by a series of symbols and slashes, such asA/B/X/Y/Z, where A indicates the arrival pattern, B indicates the service pattern, X indicates thenumber of parallel servers, Y indicates the queue’s capacity, and Z indicates the queue discipline. Wewill be concerned primarily with the M/M/1 queue, in which the letter M indicates that timesbetween arrivals and times between services both can be modeled as being exponentially distributed.The number 1 indicates that there is one server; we will also study some M/M/n queues, where n issome number greater than 1.Symbols: Performance Measure Random Expected Variable Value Number of Customers in the N L System Number of Customers in the Nq Lq Queue Number of Customers in Service Ns Ls Time Spent in the System T W Time Spent in the Queue Tq Wq Time Spent in Service Ts Ws System Parameters Number of Servers S Arrival Rate (number per unit of time) λ (Greek letter lambda) Service Rate (number per unit of time) µ (Greek letter mu) Utilization Factor ρ (Greek letter rho) rmmakaha@gmail.com 167
- 168. OPERATIONS RESEARCH rmakaha@facebook.comFormulas:The utilization factor, or ρ (rho), also the probability that a server will be busy at any point in time: λ ρ= Sµ (i)Idle time, or the proportion of time servers are not busy, or the probability that a server will be idleat any given time: 1− ρ (ii)The average time a customer spends in the system: 1 W = Wq + W s = µ −λ (iii)The average number of customers in the queue: λ2 ρ2 Lq = = µ (µ − λ ) 1 − ρ (iv)The average number of customers in the system: L = Lq + Ls (v)The average time spent waiting in the queue: λ ρ Wq = = (vi) µ (µ − λ ) µ (1 − ρ )Those who would commune more directly with the Arab mathematician al Jebr (whose name is thesource for our word algebra) will note that there is another formula for N: λλ λ λ λ µ + 1 − ( λ) λ ρ 2 µµ λ µ µ µ µ ρ Nq + Ns = +ρ= + = = = =N 1− ρ λ µ λ λ 1− ρ 1− µ 1 − 1− µ µ µTherefore: ρ L= 1− ρ (vii)The single most important formula in queueing theory is called Little’s Law: L = λW (viii)Little’s Law can be restated in several ways; for example, here is a formula for W: L W= λ (ix)There are also some formulas that are based on the special characteristics of the exponentialdistribution. These generally are beyond the scope of this course, but one useful example is offeredhere. In an M/M/n system, the probability of a customer spending longer than some specific timeperiod t in the system is given by the following formula. e is the base of the natural logarithms(roughly 2.718): P{T ≥ t } = e ( λ − µ ) t (x) rmmakaha@gmail.com 168
- 169. OPERATIONS RESEARCH rmakaha@facebook.comMEASURES OF THE MODEL i. To find expected (average) number of units in the system, Ls i.e. the average number of customers in the system both waiting and in service. λ µ ρ LS = = , whereρ = λ µ < 1 1− λ µ 1− ρ ii. To find expected (average) queue length, Lq i.e. average number of customers waiting in the queue. λ ρ2 L q = LS − = µ 1− ρ iii. To find mean (or expected) waiting time in the queue (excluding service time), Wq i.e. the average time spent by a customer in the queue before the commencement of his service. λ ρ Wq = = µ ( µ − λ ) µ (1 − ρ ) iv. To find expected waiting time in the system (including service time), Ws i.e. the total time spent by a customer in the system. 1 WS = µ −λ v. To find expected waiting time of a customer who has to wait, (W | W > 0). 1 ( W | W > 0) = µ (1 − ρ ) vi. To find expected length of non-empty queue, (L | L > 0) or Lq’. 1 ( L | L > 0) = 1− ρ vii. To find out the variance of queue length. ρ Var.{n} = (1 − ρ ) 2Inter-Relationship between Ls, Lq, Ws, Wq.Ls = λWs,Lq = λWq,Wq = Ws – 1/ .Lq = Ls – λ/ . rmmakaha@gmail.com 169
- 170. OPERATIONS RESEARCH rmakaha@facebook.comLIMITATIONS FOR APPLICATION OF QUEUEING MODEL: 1. The single channel queueing model can be fitted in situations where the following conditions are satisfied. 2. The service time has exponential distribution. The average service rate is denoted by µ. 3. Arrivals are from infinite population. 4. The queue discipline is FCFS i.e. the customers are served on first come, first served basis. 5. There is only a single service station. 6. The mean arrival rate is less than the mean service rate, i.e. λ < . 7. The waiting space available for customers in the queue is infinite. QUEUEING MODELS: • It involves a customer’s standpoint where a waiting line is created. Customers arrive at the facility and they join a waiting line (or Queue). The server chooses a customer from the waiting line to begin service. Upon the completion of a service, the process of choosing a new (waiting) customer is repeated. • It is assumed that no time is lost between the completion of a service and the admission of a new customer into the facility. • The major actors in queuing situation are Customer and the Server. The interaction between the Customer and the Serve are of interest only in as far as it relates to the period of time the customer needs to complete a service. From the standpoint of customer arrivals we will be interested in the time intervals that separate successive arrivals. • The customer arrivals and service times are summarized in terms of probability distributions normally referred to as: arrivals and service time distribution. • These distributions may represent situations where customers arrive and are served individually {banks or supermarkets}. • Customers may arrive and or be served in groups are referred to as Bulk queues. • In queue model the manner of choosing customer from the waiting line to start service is referred to as Service discipline. • The Service discipline occurs as FCFS rule (first come first service), LCFS rule (last come first served) and SIRO (service in random order). • Customers arriving at a facility may be put in Priority queues such that those with higher priority will receive preference to start service first. • The facility may include more than one server thus allowing as many customers as the number of servers to be serviced simultaneously this is referred as Parallel service. • Facilities which comprise a number of series stations through which the customer may pass before service is completed (e.g. processing of a product on a sequence of machines) is referred to as Queues in series or Tandem queues. rmmakaha@gmail.com 170
- 171. OPERATIONS RESEARCH rmakaha@facebook.com • A combination of Parallel and Series is called Network queues. • Calling source is the source from which calls for service (arrivals of customer) are generated. • Queue size the number of limited customers that may be allowed at a facility may be because of space limitation (e.g. car spaces in a drive-in bank). PURE BIRTH MODEL / PROCESS: Pure birth model is process situation where customer arrive and never leave. E.g. issuing of birth certificates for newborn babies. These certificates are normally kept as permanent records in a Central office administered by the state health department. The birth of new babies and issuing of birth certificates is a completely random process that can be described ay a Poisson distribution. Assuming that λ is the rate at which birth certificates are issued, the pure birth process of having n arrivals (birth certificates) during the time period t is given as: Pn(t) = (λt)n e-λt n!Where n = 0, 1, 2, 3… and λ is the rate of arrival per unit time with the expected number of arrivalsduring t being equal to λt.Question 1:Suppose that the birth in a state are spaced over time according to a an exponential distribution withone birth occurring every 7 minutes on the average.Solution:Since the average inter arrival (inter birth) time = 7 minutes the birth rate in the state is computedas: λ = 24{hours} * 60{minutes} = 205.7 births per day. 7The number of birth in the state per year =: λt = 205.7 * 365 = 75.080 births per yearThe probability of no births in any one-day is computed as: Pn(t) = (λt)n e-λt n! P0(1) = (205.7 * 1)0 e-205.7 * 1 ≈ 0. 0! rmmakaha@gmail.com 171
- 172. OPERATIONS RESEARCH rmakaha@facebook.com Suppose that we are interest in the probability of issuing 45 birth certificates by the end of a period of 3 hours given that 35 certificates were issued in the first 2 hours. We observe that since birth occur according to a Poisson process the required probability reduces to having 45 –35 = 10 births in one (3 – 2) hours. Given λ = 60/7 = 8.57 births per hour. P10(1) = (8.57 * 1)10 e-8.57 * 1 10! P10(1) = (2137018192) * (0.000189712) 3628800 ≈ 0.11172Question 1:Suppose that the clerk who enters the information from the birth certificate into a computernormally wait at least 5 certificates to be accumulated. What it the probability that the clerk will bewaiting a new batch every hour.Solution: λ = / = births per hour. P5(1) = (* 1)5 e- * 1 5! ≈ 0.92868 PURE DEATH MODEL / PROCESS: Pure death model is process situation where customers are withdrawals. Consider the situation of stocking units of an item at start of the week to meet customer’s demand during the week. If we assume that customer demand occurs at the rate µ units per week and that the demand process is completely random, the associated probability of having n items remaining in stock after time t is given by the following Truncated Poisson distribution. Pn(t) = (µt)N - n e-µt where n = 1, 2, 3 … N. (N – n)! rmmakaha@gmail.com 172
- 173. OPERATIONS RESEARCH rmakaha@facebook.com Pn(t) = 1 – N∑ n-1 * Pn(t) Question 2: At the beginning of each week, 15 units of an inventory item are stocked for use during the week. Withdrawals from stock occur only during the first 6 days (business is closed on Sundays) and follow a Poisson distribution with 3 units per day. When the stock level reaches 5 units, a new order of 15 units is placed for delivery at the beginning of next week. Because of the nature of the item all units left at the end of the week are discarded. Solution: We can recognize that the consumption rate is µ = 3 units per day. Suppose that we are interested in computing the probability of having 5 units (reorder level) on day t then we compute it as: Pn(t) = (µt)N - n e-µt (N – n)! P5(t) = (3t)15 - 5 e-3t (15 – 5)! NB: P5(t) represents the probability of reordering on day t. This probability peaks at t = 3 and then declines as we advance through the week. If we are interested in the probability of reordering by day t we must compute the cumulative probability of having 5 units or less on day t. i.e. Pn <= 5(t) = P0(t) + P1(t) + …..+ P5(t). STEADY STATE MEASURES OF PERFORMANCE: The steady state measures of performance is used to analyze the operation of the queuing situation for the purpose of making recommendations about the design of the system. Among these measures of performance are: The expected number of customers waiting. The expected waiting time per customer. The expected utilization of the service facility.The system comprises both the queue and the service facility.Let: rmmakaha@gmail.com 173
- 174. OPERATIONS RESEARCH rmakaha@facebook.com Ls = expected number of customers in system. Lq = expected number of customers in Queue. Ws = expected waiting time in system. Wq = expected waiting time in Queue.Suppose that we are considering a Service Facility with c parallel servers then from the definition ofPn we get:Ls = ∞∑n=0 * npnLq = ∞∑n=c + 1 * (n – c)pnNB: A strong relationship exists between Ls and Ws (also Lq and Wq) so that either measure isautomatically determined from the other.Let λeff be the effective average arrival rate (independent of the number in the system n) then: Ls = λeff * Ws Lq = λeff * WqThe value of λeff is determined from the state dependent λn and the probabilities Pn is given as: λeff = ∞∑n=0 * λnpnNB: A direct relationship exists between Ws and Wq, which is equal to:Expected waiting time in system = Expected waiting time in queue + expected service time. Ws = Wq + 1/µ.Given that µ is the Service rate per busy server, the Expected Service time = 1/µ. Ws = Wq + 1/µ.Multiplying both sides by λeff we obtain: Ls = Lq + λeff/µ = expected number of customers in system.The expected utilization of a service is defined as a function of the average number of busy servers.Since the difference between Ls and Lq must equal the Expected number of busy servers we obtain: Expected number of busy servers = C = Ls – Lq = λeff/µ. rmmakaha@gmail.com 174
- 175. OPERATIONS RESEARCH rmakaha@facebook.comThe Percent utilization of a service facility with c parallel servers is given by: Percent utilization = C/C * 100NB: In summary Given Pn we can compute the system’s measure of performance in thefollowing order:Pn Ls = ∞∑n=npn Ws = Ls/λeff Wq = Ws - 1/µ Lq = λeff * Wq C = Ls – Lq.Question 3:Job orders arriving at a production Facility is divided into three groups. Group1 will take the highestpriority for processing; Group3 will be processed only if there are no waiting orders from group 1and 2. It is assumed that a job once admitted to the facility must be completed before any new job istaken in.Orders from groups 1,2 and 3 occur according to Poisson distribution with mean 4, 3 and 2 per dayrespectively. The service times for the three groups are constant with rates 10, 9 and 10 per dayrespectively.Find the following: I. The expected waiting time in the system for each of the three queues. II. The expected waiting time in the system for any customer. III. The expected number of waiting jobs in each of the three groups. IV. The expected number waiting in the system.Solution: rmmakaha@gmail.com 175
- 176. OPERATIONS RESEARCH rmakaha@facebook.comQUEUEING THEORY QUESTIONSQ1. Arrivals at a telephone booth are considered to be Poisson, with an average time of 10minutes between one arrival and the next. The length of a phone call assumed to bedistributed exponentially with mean 3 minutes. Then,(a) What is the probability that a person arriving at the booth will have to wait?(b) What is the average length of the queues that form from time to time?(c) What is the average length of the queue?(d) The telephone department will install a second booth when convinced that an arrival would expect to have to wait at least 3 minutes for the phone. By how much must the flow of arrivals be increased in order to justify a second booth?(e) Find the probability that an arrival finds that 4 persons are waiting for their turn.(f) Find the average number of persons waiting and making telephone calls. 1 1Ans Here, λ = and µ = 10 3 λ 1 3 3(a) P(W > 0) = 1 − P0 = = × = = 0.3 µ 10 1 10(b) The average length of non empty queues or expected number of customers in the non empty queue. 1 µ (L | L > 0) = Lq, = = 3 = 1.43 ≈ 1 Person µ −λ 1 − 1 3 10(c) The average length of queues (empty + non-empty) or expected number of customers in the queue. 2 1 ρ 2 = = 3 9 Lq = ≈ 0 Customers 1− ρ 1 70 1− 3 λ(d) Wq = µ (µ − λ ) 1 Since Wq = 3, µ = , λ = λ (say) for sec ond booth 3 λ ∴3 = , giving λ = 0.16. 11 −λ 3 3 As, λ = 0.16 ⇒ λ = 0.16 × 60 = 9.6 ≈ 10customers / hourThus, as soon as the arrival rate increases to 10 customers/hour, another booth may be installed. rmmakaha@gmail.com 176
- 177. OPERATIONS RESEARCH rmakaha@facebook.com(e) With 4 people waiting for their turn in the queue implies a total of 5 people in the system. Thus, the probability that an arrival finds 4 persons in the queue is, P ( n = 5 ) = ρ n (1 − ρ ) = 0.35 (1 − 0.3) = 0.0017(f) The average number of people waiting and making calls is given by the expected length of the system. Thus, ρ Ls = 1− ρ 0.3 = = 0.43 1 − 0.3Q2. Customers arrive at a sales counter manned by a single person according to a Poissonprocess with a mean rate of 20 per hour. The time required to serve a customer has anexponential distribution with a mean of 100 seconds. Find the average waiting time of acustomer.Ans Here we are given: 60 × 60 λ = 20 per hour and µ = = 36 per hour 100 The average waiting time of a customer in the queue is given by: λ 20 5 5 × 3600 Wq = = = hours or ,i.e.,125sec onds. µ ( µ − λ ) 36(36 − 20) 36 × 4 36 × 4The average waiting time of a customer in the system is given by: 1 1 1 Ws = = or hour i.e., 225sec onds. µ − λ (36 − 20) 16Q3. Customers arrive at a one-window drive according to a Poisson distribution with meanof 10 minutes and service time per customer is exponential with mean of 6 minutes. Thespace in front of the window can accommodate only three vehicles including the servicedone. Other vehicles have to wait outside this space. Calculate:(i) Probability that an arriving customer can drive directly to the space in front of the window.(ii) Probability that an arriving customer will have to wait outside the directed space.(iii) How long an arriving customer is expected to wait before getting the service?Ans From the given information, we find that:Mean arrival rate, λ = 6 customers per hourAnd mean service rate, µ = 10 customers per hour (i) Probability that an arriving customer can drive directly to the space in front of the window is given by: rmmakaha@gmail.com 177
- 178. OPERATIONS RESEARCH rmakaha@facebook.com 2 λ λ λ λ λ P0 + P1 + P2 = 1 − + 1 − + 1 − µ µ µ µ µ λ λ λ 2 = 1 − 1 + + µ µ µ 6 6 6 2 98 = 1 − 1 + + = or 0.784 10 10 10 1225 (ii) Probability that an arriving customer will have to wait outside the directed space is given by: 1 − (P0 + P1 + P2 ) = 1 − 0.784 = 0.216 or 21.6% (iii) Expected waiting time of a customer being getting the service is given by: λ 6 3 Wq = = = hour or 9 min utes. µ ( µ − λ ) 10(10 − 6) 20Q4. A company distributes its products by trucks loaded at its only loading station. Both,company’s trucks and contractor’s trucks, are used for this purpose. It was found out thaton an average every 5 minutes, one truck arrived and the average loading time was threeminutes. 50% of the trucks belong to the contractor. Find out:(i) The probability that a truck has to wait,(ii) The waiting time of truck that waits, and(iii) The expected waiting time of contractor’s trucks per day, assuming a 24-hours shift.Ans Here we are given: 60Average arrival rate of trucks, λ = = 12 trucks/hr. 5 60Average service rate of trucks, µ = = 20 trucks/hr. 3 (i) The probability that a truck has to wait is given by: λ 12 ρ= = = 0.6 µ 20 (ii) The waiting time of a truck that waits is given by: 1 1 1 Ws = = = hour i.e., 7.5 min utes. µ − λ (20 − 12) 8 (iii) The expected waiting time of contractor’s trucks per day, assuming a 24-hours shift is given by: (No. of trucks per day) x (Contractor’s percentage) x (Expected waiting time of a truck) 50 λ = 12 × 24 × × 100 µ ( µ − λ ) 1 12 54 = 288 × × = or 10.8 hrs. 2 20 × 8 5Q5. Customers arrive at the First Class Ticket counter of a Theatre at a rate of 12 per hour.There is one clerk serving the customers at a rate of 30 per hour. rmmakaha@gmail.com 178
- 179. OPERATIONS RESEARCH rmakaha@facebook.com(i) What is the probability that there is no customer in the counter (i.e. the system is idle)?(ii) What is the probability that there are more than 2 customers in the counter?(iii) What is the probability that there is no customer waiting to be served?(iv) What is the probability that a customer is being served and nobody is waiting?Ans From the given information, we find that:Mean arrival rate, λ = 12 customers per hourAnd mean service rate, µ = 30 customers per hour λ 12 ∴ρ= = = 0.4 µ 30 (i) P (system is idle) = P0 = 1 − ρ = 1 − 0.4 = 0.6 . (ii) P(n>2) = 1–P(n ≤ 2) λ λ λ λ 2 λ = 1 − [ P0 + P1 + P2 ] = 1 − 1 − + 1 − + 1 − µ µ µ µ µ λ λ λ 2 = 1 − 1 − 1 + + µ µ µ = 1 − (1 − ρ ) 1 + ρ + ( ρ ) 2 = 1 − (1 − 0.4 ) 1 + 0.4 + ( 0.4 ) 2 = 1 − 0.6 × 1.56 = 1 − 0.936 = 0.064 Also, P(> n) = ρ n +1 ∴ P(> 2) = 0.42+1 = 0.43 = 0.064 (iii) P(no customer waiting to be served) = P0 + P1 = 0.6 + 0.24 = 0.84 λ λ (iv) P (a customer is being served and none is waiting) = P1 = 1 − = ρ (1 − ρ ) = 0.4 x µ µ 0.6 = 0.24.Q6. A TV repairman finds that the time spent on his job has an exponential distributionwith mean 30 minutes. If he repairs sets in the order in which they come and if the arrival ofsets is approximately Poisson with an average rate of 10 per 8-hour day, what is his expectedidle time each day? How many jobs are ahead of the set just brought in?Ans From the given information, we find that:Mean arrival rate, λ = 10 sets per day.And mean service rate, µ = 16 sets per day. λ 10 5∴ρ= = = µ 16 8 rmmakaha@gmail.com 179
- 180. OPERATIONS RESEARCH rmakaha@facebook.com 5 3P (repairman is idle) = P0 = 1 − ρ = 1 − = . 8 8 3∴ Expected idle time per day = 8 × = 3 hours. 8To determine the expected number of sets ahead of the set just brought in, we shall find theexpected number of sets in the system. Thus, 5 ρ 5 2 Ls = = 8 = = 1 sets . 1− ρ 5 3 3 1− 8Q7. Assume that at a bank teller window the customers arrive in their cars at the averagerate of 20 per hour according to a Poisson distribution. Assume also that the bank tellerspends an average of 2 minutes per customer to complete a service, and the service time isexponentially distributed. Customers, who arrive from an infinite population, are served ona FCFS basis, and there is no limit to possible queue length.(i) What is the expected waiting time in the system per customer?(ii) What is the mean number of customers waiting in the system?(iii) What is the probability of zero customers in the system?(iv) What value is the utilization factor?Ans From the given information, we find that:Mean arrival rate, λ = 20 customers per hourAnd mean service rate, µ = 30 customers per hour λ 20 2 ∴ρ= = = µ 30 3 (i) Expected waiting time in the system per customer is given by: 1 1 1 Ws = = = hour i.e., 6 min utes. µ − λ (30 − 20) 10 (ii) Mean number of customers waiting in the system is given by: 2 2 ρ 2 = = 3 4 Lq = 1− ρ 2 3 1− 3 2 1 (iii) Probability of zero customers in the system is given by P0 = 1 − ρ = 1 − = . 3 3 2 (iv) Utilization factor, ρ = . 3 rmmakaha@gmail.com 180

Full NameComment goes here.Shylette7 months agoMohit Thakurat Mind Roots Technologies 1 year ago