IEOR 46: Introduction to Operations Research: Stochastic Models Chapters 5-6 in Ross, Thursday, April, 4:5-5:35pm SOLUTIONS to Second Midterm Exam, Spring 9, Open Book: but only the Ross textbook, the CTMC notes, the first four pages of the 993 Physics paper and one 8 page of handwritten notes, which should be turned in with the exam. Honor Code: Students are expected to behave honorably when taking exams. After completing the test, please testify to your adherence by writing the following on your bluebook and signing your name: I have neither given nor received help while taking this test. Justify your answers; show your work.. The Limatibul-Segal Insurance Company: Claims Received and Outstanding (5 points, all parts count the same) The Limatibul-Segal (LS) Insurance Company started selling automobile insurance in Thailand and Israel but now operates worldwide. Your goal is to analyze the anticipated claims to be received and outstanding at future times. Make the following assumptions: Policyholders have accidents resulting in claims randomly over time according to a Poisson process with rate, per year. There is a random delay from when each accident occurs until a claim is received by the LS Insurance Company. These delays are independent random variables, each distributed according to the random variable D, where P (D t years) = e t/.9, t. If an accident has occurred resulting in a claim, but that claim has not yet been received by the LS Insurance Company, the claim is called an outstanding claim. Let A(t) be the total number of accidents that occur over the time interval [, t]. Let C(t) be the number of claims received by time t for accidents that occur over the time interval [, t]. Let X(t) be the number of outstanding claims (i.e., claims that have not yet been received) at time t for accidents that occur over the time interval [, t]. (Note that A(t) = C(t) + X(t) for each t.) Let X( ) be the number of outstanding claims at any time, after the system has been operating for a long time, i.e., the limit of X(t) as t. Give expressions for the following quantities, either explicit numbers or formulas, as indicated: (a) E[D] (number wanted) Since D has an exponential distribution, E[D] =.9 years. (b) P (A(.) = ) (formula wanted for exact value) Since {A(t) : t } is a Poisson process with rate λ =,, A(.) has the Poisson
distribution with mean λt =,. =,. Hence, P (A(.) =, ) = e, (, ), (, )! (c) E[A(.) A(.3) = 3, ] (number wanted) Since {A(t) : t } is a Poisson process, the conditional number of points in the interval [.] given that A(.3) = 3 has a binomial distribution with parameters n = 3 and p = /3; see Section 5.3.5 in Ross. The expected value is thus np = 3 (/3) =, while the variance is np( p) = /3 666.67. Since the second moment is the sum of the variance and the square of them mean, the conditional second moment is np( p) + (np), so that E[A(.) A(.3) = 3] = np( p) + (np) = 3 rounded in the last decimal place. + () =,, 666.67 (d) E[X(t)] (formula wanted for exact value) This part of the problem and all remaining parts revisit the take-home-exam problem for homework 7, Exercise 5.66. The number of outstanding claims at time t can be represented as the number of customers in an infinite-server queue, specifically in the M/G/ model; see Example 5.8. We could be applying Theorem on the third page of the 993 Physics paper here and for the following parts as well. If G is the cdf of D, then m(t) E[X(t)] = λ t G c (u) du; see formula (5.8) on page 39 of the book. Hence, we have m(t) E[X(t)] =, t e u/.9 du = 9( e t/.9 ), t (e) E[X( )] (number wanted) Apply the previous result: As t, e t/.9. Hence, m(t) m( ) E[X( )] = 9. For the M/G/ model, in general, we have m(t) m( ) E[X( )] = λe[d], where here m(t) is,.9 = 9. (f) P (X(t) ) (formula wanted for exact value)
We have already found the mean value in part (d). We now must use the fact that the distribution of X(t) is Poisson. We have e m(t) m(t) k P (X(t) ) =, k! where m(t) E[X(t)] as given in part (d). k= (g) P (C(t) ) (formula wanted for exact value) In the setting of the infinite-server queue, the variable C(t) records the number of service completions (or departures) by time We now need to use the fact the departure process from an M/G/ queue is a nonhomogenerous Poisson process with rate λg(t) at time t; see Example 5.5 in the book. This is also part of Theorem in the Physics paper. Here we have C(t) Poisson with mean ν(t) E[C(t)] = = λt t t λg(s) ds λg c (s) ds = λt m(t), where m(t) = E[X(t)] in part (d). (Recall that A(t) = C(t) + X(t), so clearly we have the mean formula given. Finally, paralleling part (g), we have e ν(t) ν(t) k P (C(t) ) =, k! where ν(t) is given above. k= (h) P (X( ) > 96) (approximate number wanted) Justification of the reasoning here is important. The random variables X(t) and X( ) have Poisson distributions with the mean values given in parts (d) and (e). Since the Poisson distribution with a large mean can be approximated accurately by the normal distribution, we can use a normal approximation. We need the variance, but the variance equals the mean for a Poisson distribution. Thus we have, V ar(x( )) = E[X( )] = 9. Thus we can do the standard normal approximation: ( ) X( ) E[X( )] 96 E[X( )] P (X( ) > 96) = P > V ar(x( )) V ar(x( )) ( ) 96 E[X( )] P N(, ) > V ar(x( )) ( = P N(, ) > = P ( N(, ) > 6 ) 3 3 ) 96 9 9 = P (N(, ) > ).8
using the table on page 8. (We approximate by the standard normal in the second line.) (i) P (X(.) and C(.) ) (formula wanted for exact value) The important fact here is that the random variables begin discussed, X(.) and C(.), are independent; see Theorem of the Physics paper. We already know that they have Poisson distributions with specified means. Hence, we have P (P (X(.) and C(.) ) = P (X(.) )P (C(.) ), where the two probabilities on the right are given in parts (f) and (g) above, after setting t =.. (j) Are either of the stochastic processes {X(t) : t } or {C(t) : t } (possibly nonhomogeneous) Poisson processes? If so, which are? Explain. As already discussed, the stochastic process {C(t) : t } is a Poisson process; see Theorem of the Physics paper. But the process {X(t) : t } is not a Poisson process. For example, it is easy to see that its sample paths are not necessarily nondecreasing. This may seem surprising, because X(t) has a Poisson distribution for each t. Closing remark: Convenient approximate values can be obtained in parts (f) - (j) by using normal approximations, just as in part (h), because all the random variables involved have Poisson distributions with large means.. The DMV (5 points, all parts count the same) You can get a new automobile driver s license at the New York Department of Motor Vehicles (DMV) on 34th Street. The standard process for getting a new license involves passing through a network of three queues. In particular, you go through three steps: First, you get in a single line to wait for your turn to be served by a single clerk to get the correct form; second, you get in a single line to wait for a photographer to take your picture; and, third, you wait in a single line (you actually sit in a waiting room with order maintained by being assigned a number) for one of several clerks to complete the processing, prepare your license and collect your money. Your goal is to analyze the performance in this service system. Make the following assumptions: Suppose that customers arrive according to a Poisson process with a rate of per minute. Suppose that the service times at each step have exponential distributions. Suppose that the service times of different customers and of the same customers at different steps are all mutually independent. Suppose that all arriving customers go to the first clerk. Suppose the mean service time there is 5 seconds. Suppose that there is unlimited waiting space and that all customers are willing to wait until they can be served (Nobody gets impatient and abandons.) Suppose that only /4 of all arriving customers seek new licenses and must complete the second and third steps. The other 3/4 of the arriving customers go elsewhere after finishing the first stage. Suppose that the mean time required for the photographer to take a picture is minute. Suppose that the mean time for each of 4
the final clerks to complete the processing, prepare your license and collect your money is minutes. (a) How many clerks are need at the third stage (to complete the processing, prepare your license and collect your money) in order for the total customer arrival rate at the third stage to be strictly less than the maximum possible service rate (assuming all servers are working)? Because only /4 of the customers go on to the second stage to have their pictures taken, the arrival rate at the second and third stages is /4 =.5 per minute. Each clerk at the third stage serves at rate. per minute. If there are s clerks, then the maximum service rate at the third stage (which prevails whenever all the clerks there are busy) is.s. We require that.5 <.s or s > 5. That is, we must have at least 6 clerks at the third stage in order for the total customer arrival rate at the third stage to be strictly less than the maximum possible service rate (assuming all servers are working). That condition is needed to ensure the existence of a proper steady state. Otherwise the number in the system would explode (without customer abandonment). Henceforth assume that there are 8 clerks at the third stage. (b) Suppose that the first customer of the day (who finds a completely empty system upon arrival) wants to get a new driver s license. What is the expected total time that this initial customer must spend at the DMV in order to get the license? The first customer never has to wait. This customer only experiences his three service times. This customer s expected times at the three stations are, respectively,.5,. and. minutes, so the customers expected total time in the system is.5 minutes. (c) What is the variance of the total time that this initial customer must spend at the DMV in order to get the license? Since the service times are independent exponential random variables, the variance of the sum is the sum of the variances, while the variance of each is the square of the mean. Hence the variance of the times spent are (.5) =.65, = and () =. Finally, the variance of the total time is.65. (d) Suppose that the second customer of the day also wants to get a new driver s license, and suppose that this second customer finds the first customer still being served by the first clerk. What is the expected total time that this second customer must spend at the DMV in order to get the license? We use properties of exponential distributions. First, by the lack of memory property the remaining time of the first customer at the first clerk is exponential with mean.5 minutes, just as it was at the beginning. After that, we should consider what happens first: service of 5
the first customer by the photographer or service of the second customer by the first clerk. (We now use properties of the minimum of two independent exponential random variables.) The expected time required for the first of these two events is /( + 4.) =. minutes. The second customer finishes first with probability 4/(4 + ) = 4/5, while the first customer finishes first with probability /5. If the first customer finishes first, then the first customer no longer can be in the way of the second customer. So the total remaining expected wait for the second customer is.5, by part (b) above. On the other hand, if the second customer finishes first, then the remaining expected time for the second customer is + + = minutes, because both customers have a full service time at the photographer, after which the second customer will have his own clerk at the third stage. Thus the expected total time required for the second customer is.5 +. + (/5)(.5) + (4/5)(.) =.45 +.5 + 9.6 =.3 The expected waiting time for the second customer is.5 minutes longer than the expected waiting time of the first customer under these circumstances. (e) Give an expression for the steady-state probability that there are exactly 4 customers either waiting or being served at the first clerk. Here we recognize that the first clerk behaves as a simple M/M/ queue with unlimited waiting room. This is a birth-and-death (BD) process with an infinite state space. The birth rates are all λ j = λ, while the death rates are all µ j = µ. We give the transition rate diagram for this BD process below. We have the steady-state probability of j customers either waiting or being served as α j, where αq =, where Q is the rate matrix, but this simplifies because we have a BD process. In particular, we have α j = r j k= r, k where r = and r j = ρ j, where ρ = λ/µ =.5 (because all the birth rates are identically λ = and all the death rates are identically µ = 4. Thus the steady-state distribution is geometric. In particular, we have α 4 = ( ρ)ρ 4 = (.5)(.5) 4 = (.5) 5 = /3 (f) What is the expected number of customers either waiting or being served at the first clerk in steady state? The mean of the geometric distribution is ρ/( ρ) =. (This is the geometric distribution on the set of nonnegative integers {,,,...} as opposed to the geometric distribution on the set of positive integers {,, 3,...}.) (g) Give an expression for the steady-state probability that exactly 4 customers complete service from the first clerk during one specified minute in steady state. 6
Rate Diagram for the M/M/ Queue birth rates 3 death rates Figure : A rate diagram showing the transition rates for the birth-and-death process counting the number of customers in the system, for the M/M/ queue. Now we use the fact that in steady state the departure process from the first queue is also a Poisson process with the same rate as the arrival rate, which is per minute; see Theorem 6.5 of the CTMC notes. Let C(t) be the number of customers that complete service from the first clerk during an interval of length t. Then Since t =, we get P (C(t) = 4) = e t (t) 4 4! P (C() = 4) = e () 4 (h) Give an expression for the steady-state probability that there are 4 customers either waiting or being served at the photographer. In steady state, the number of customers at the second queue is also distributed as the steady state of a BD process; see Theorems 6.6 and 6.7 of the CTMC notes. The mean service time at the second queue is 4 times greater than the mean service time at the first queue, but only /4 of the customers at the first queue go to the second queue. By independent thinning, the arrival process to the second queue is also a Poisson process, but with rate.5. The mean service time is now. Here the birth rates are λ j = λ =.5, while the death rates are µ j = µ =. 7 4!
But the traffic intensity ρ λ/µ - the arrival rate divided by the service rate - is precisely the same as at the first queue. Hence the answer is identical to the answer in part (e). (i) Give an expression for the steady-state probability that there are 3 customers either waiting or being served at the first clerk, and 5 customers either waiting or being served at the photographer. Recall from the discussion of reversibility, that the steady-state numbers at the three queues are independent random variables; see Theorem 6.7 of the CTMC notes. Let X j be the number of customers either waiting or being served at queue j. Let ρ j be the traffic intensity at queue j. Hence, P (X = 3 and X = 5) = P (X = 3)P (X = 5) = ( ρ )ρ 3 ( ρ )ρ 5 = (/) = /4 (j) Give an expression for the steady-state probability that there are 3 customers either waiting or being served at the first clerk, 5 customers either waiting or being served at the photographer and 6 customers being served by the 8 clerks at the final stage. The previous part generalizes. First, We have P (X = 3 and X = 5 and X 3 = 6) = P (X = 3)P (X = 5)P (X 3 = 6) = P (X 3 = 6)/4, where it remains to compute P (X 3 = 6). The steady-state distribution at queue 3 is also the steady state of a BD process, but now we have multiple servers. In particular, now we have a M/M/8/ queue. (This model is called the Erlang delay model; see Section 8.9. of Ross.) In steady state, the process {X 3 (t) : t } is also a BD process. As before, the birth rates are λ j = λ =.5, but now the death rates are different: µ j = jµ =.j for j 8 and µ j = 8µ =.8 for j 8. We give the transition rate diagram for this BD process below. We again have r j α j = k= r, k where r = as in part (e), but now the death rates are not the same in each state, so we have different values for r k. In particular, now Hence we have r k = λ k /µ k k! for k 8 and r k = 8!(λ/8µ) k for all k 8. See the explicit formula given in Section 8.9. on page 554. 8
Rate Diagram for the M/M/s Queue birth rates 8 9 8 9 8 8 9 8 death rates Figure : A rate diagram showing the transition rates for the birth-and-death process counting the number in system for the M/M/8 queue, having 8 servers. 9