NANYANG TECHNOLOGICAL UNIVERSITY SEMESTER I EXAMINATION 2013-201 MH702/MAS6/MTH37 Probabilistic Methods in OR December 2013 TIME ALLOWED: 2 HOURS INSTRUCTIONS TO CANDIDATES 1. This examination paper contains FOUR () questions comprises FIVE (5) printed pages. 2. Answer all questions. The marks for each question are indicated at the beginning of each question. 3. Answer each question beginning on a FRESH page of the answer book.. This IS NOT an OPEN BOOK exam. 5. Cidates may use calculators. However, they should write down systematically the steps in the workings.
MH702/MAS6/MTH37 Question 1. A casino offers a gambling game with the following rules. (20 marks) 1. Each play of the game involves repeatedly flipping an unbiased coin until the difference between the number of heads tossed the number of tails is 3. 2. If you decide to play the game, you are required to pay $1 for each flip of the coin. You are not allowed to quit during a play of the game. 3. You receive $8 at the end of each play of the game. Thus, you win money if the number of flips required for one play of this game is fewer than 8, but lose money if more than 8 flips are required. You now wish to find out the expected amount of money to win or lose for each play of the game. (i) Formulate the above gaming process as a Markov chain. Construct the (onestep) transition matrix for this Markov chain. (ii) Determine the amount of money one expects to win or lose for each play of the game. (i) Solution: We formulate the problem as a Markov chain of four states. State 0 difference is 0 State 1 difference is 1 State 2 difference is 2 State 3 difference is 3 The one-step transition matrix hence is 0 1 2 3 0 0 1 0 0 1 0.5 0 0.5 0 2 0 0.5 0 0.5 3 0 0 0 1 (ii) We are going to find the expected first passage time from state 0 to state 3, which is denoted by µ 03. It s done by solving the following linear equations, which come from µ ij = 1 + k j p ikµ kj. µ 03 = 1 + µ 13 2
MH702/MAS6/MTH37 µ 13 = 1 + 0.5µ 03 + 0.5µ 23, µ 23 = 1 + 0.5µ 13 Therefore, µ 03 = 9. It says that one expects to lose one dollar for each play of the game. Question 2. (25 marks) An automatic car wash facility operates with only one bay. Cars arrive according to a Poisson distribution with a mean of cars per hour may wait in the facility s parking lot if the bay is busy. Cars are first-come-first-served. (i) Assume that the service time is constant equal to 10 minutes. Find the average time of a car waiting in the parking lot. (ii) Assume instead that there are three types of service configurations available: fast, normal slow, taking, 8 15 minutes, respectively. Each car will choose one type of service configuration (fast, normal or slow) with probabilities 0.2, 0.6 0.2, respectively. Find the average time of a car waiting in the parking lot. Solution: (i) We apply the M/G/1 queueing model, where λ =, µ = 6, ρ = 2, σ = 0. 3 Hence, L q = λ2 σ 2 + ρ 2 2(1 ρ) = (2/3)2 2(1 2/3) = 2 3 W q = L q λ = 2/3 = 1 6, which means that the average time of a car waiting in the parking lot is 10 minutes. 60 (ii) We apply the M/G/1 queueing model, where λ =, µ = = 0.2 +0.6 8+0.2 15 60 8.6 = 6.9767, ρ = = 0.5733, 8.6 15 σ2 = 0.2 ( 8.6 60 60 )2 + 0.6 ( 8 8.6 60 60 )2 + 0.2 ( 15 8.6 60 60 )2 = 0.0035. Hence, L q = λ2 σ 2 + ρ 2 2(1 ρ) = 2 0.0035 + 0.5733 2 2(1 0.5733) = 0.508 W q = L q λ = 0.508 = 0.1127, which means that the average time of a car waiting in the parking lot is 0.1127 60 = 6.7613 minutes. 3
MH702/MAS6/MTH37 Question 3. (25 marks) Consider the following blood inventory problem facing a hospital. There is need for a rare blood type, namely, type AB, Rh negative blood. The dem D (in pints) over any 3-day period is given by P {D = 0} = 0., P {D = 1} = 0.3, P {D = 2} = 0.2, P {D = 3} = 0.1. At the beginning of each 3-day period, a decision must be made about how many pints of blood to order for a regular delivery. A regular delivery takes 3 days (i.e., the blood ordered at the beginning of this 3-day period will arrive only at the beginning of the next 3-day period). If more blood is demed than is on h at any time, an expensive emergency delivery is made, in which case the ordered blood will arrive immediately. As a special equipment is required to hold the blood, the hospital has only a maximum capacity of holding 3 pints of blood so that excessive blood will be discarded immediately. The cost of regular delivery is $50 per pint, while the cost of an emergency delivery is $100 per pint. Denote the state of the system as the number of pints on h at the beginning of each 3-day period. The hospital wishes to determine how many pints of blood to order for a regular delivery in order to minimize the (long-run) expected average delivery cost (from both regular emergency deliveries) per 3-day period. (i) Formulate this problem as a Markov decision process by identifying the states decisions then finding the value for each p ij (k) C ik. (ii) Formulate a linear programming model for finding an optimal ordering policy (Don t need to solve this model for solution). Solution: Here we choose to formulate a Markov decision process of four states four decisions. State 0 State 1 State 2 State 3 Decision 1 Decision 2 Decision 3 Decision 0 pint on h 1 pint on h 2 pints on h 3 pints on h Order 0 pint Order 1 pint Order 2 pints Order 3 pints Let y ik be the probability that the system is in state i decision k is made. We present in the following table all the values of p ij (k) C ik.
MH702/MAS6/MTH37 p ij (k) State Decision 0 1 2 3 C ik 0 1 1 0 0 0 50 0 + 100 (0. 0 + 0.3 1 + 0.2 2 + 0.1 3) = 100 2 0 1 0 0 50 1 + 100 (0. 0 + 0.3 1 + 0.2 2 + 0.1 3) = 150 3 0 0 1 0 50 2 + 100 (0. 0 + 0.3 1 + 0.2 2 + 0.1 3) = 200 0 0 0 1 50 3 + 100 (0. 0 + 0.3 1 + 0.2 2 + 0.1 3) = 250 1 1 0.6 0. 0 0 50 0 + 100 (0. 0 + 0.3 0 + 0.2 1 + 0.1 2) = 0 2 0 0.6 0. 0 50 1 + 100 (0. 0 + 0.3 0 + 0.2 1 + 0.1 2) = 90 3 0 0 0.6 0. 50 2 + 100 (0. 0 + 0.3 0 + 0.2 1 + 0.1 2) = 10 0 0 0 1 50 3 + 100 (0. 0 + 0.3 0 + 0.2 1 + 0.1 2) = 190 2 1 0.3 0.3 0. 0 50 0 + 100 (0. 0 + 0.3 0 + 0.2 0 + 0.1 1) = 10 2 0 0.3 0.3 0. 50 1 + 100 (0. 0 + 0.3 0 + 0.2 0 + 0.1 1) = 60 3 0 0 0.3 0.7 50 2 + 100 (0. 0 + 0.3 0 + 0.2 0 + 0.1 1) = 110 0 0 0 1 50 3 + 100 (0. 0 + 0.3 0 + 0.2 0 + 0.1 1) = 160 3 1 0.1 0.2 0.3 0. 50 0 + 100 (0. 0 + 0.3 0 + 0.2 0 + 0.1 0) = 0 2 0 0.1 0.2 0.7 50 1 + 100 (0. 0 + 0.3 0 + 0.2 0 + 0.1 0) = 50 3 0 0 0.1 0.9 50 2 + 100 (0. 0 + 0.3 0 + 0.2 0 + 0.1 0) = 100 0 0 0 1 50 3 + 100 (0. 0 + 0.3 0 + 0.2 0 + 0.1 0) = 150 Question. (30 marks) The local one-person barber shop can accommodate a maximum of 5 people at a time ( waiting 1 getting hair-cut). Customers arrive according to a Poisson distribution with a mean rate of 5 per hour. However, customers will leave without entering the barber shop if they find upon arrival that the barber shop is already full. The time spent by the barber to cut hair for each customer has an exponential distribution with a mean of 15 minutes. (i) What is the probability that a customer can get directly a hair cut upon arrival? (ii) What is the expected number of customers waiting for a hair cut? (iii) How much time can a customer expect to spend in the barber shop? (iv) What fraction of potential customers are turned away? Hint: For the M/M/1/K queueing model we have the following results when ρ 1: P 0 = L = 1 ρ 1 ρ, P K+1 n = 1 ρ 1 ρ K+1 ρn, 0 n K ρ (K + 1)ρK+1, L 1 ρ 1 ρ K+1 q = L (1 P 0 ) 5
MH702/MAS6/MTH37 Solution: We apply the M/M/1/K queueing model, where λ = 5, µ =, ρ = 5, K = 5. Hence, P 0 = 1 ρ 1 5/ = 1 ρk+1 1 (5/) = 0.0888 6 L = P 1 = P 0 ρ = 0.0888 5 = 0.1110 ( ) 2 5 P 2 = P 0 ρ = 0.0888 = 0.1110 ( ) 3 5 P 3 = P 0 ρ = 0.0888 = 0.1388 ( ) 5 P = P 0 ρ = 0.0888 = 0.2168 ( ) 5 5 P 5 = P 0 ρ = 0.0888 = 0.2711 ρ (K + 1)ρK+1 = 1.25 1 ρ 1 ρ K+1 1 1.25 6 1.256 1 1.25 = 3.1317 6 L q = L (1 P 0 ) = 3.1317 (1 0.0888) = 2.2205 λ = λ(1 P K ) = 5 (1 0.2711) = 3.65 W = L λ = 3.1317 3.65 = 0.8593 W q = L q λ = 2.2205 3.65 = 0.6093 Therefore, the solutions are (i) 0.0888 (=P 0 ), (ii) 2.2205 (=L q ), (iii) 0.8596 60 = 51.5577 minutes (=W ), (iv) 0.2711 (=P 5 ). END OF PAPER 6