Solutions to Homework Assignment 7 1. I go to the store and buy five light bulbs. Each has an expected lifetime of one year. What is the probability that all will be working after 6 months? After one year? What is the probability any will be working after 10 years? Consider the failure of a lightbulb to be an event generate by a Possion process with parameter 1 event/year. Thus, the probability a given light bulb will be working after t years is the probability of no events in t years = e^(-t). Assuming all the light bulbs operate independently, the probability that all will be working after a year is (e^(-1))^5=e^(-5). After half a year it's e^(-5/2) The probability there will be any working after 10 years = 1 -prob that all fail. The prob that any one fails in 10 years = 1 - e^(-10). Hence the result is 1-(1-e^(-10))^5 2. Customers arrive at a fast-food restaurant at the rate of five per minute, and wait to receive their orders for an averagee of five minutes. Customers eat in the restaurant with a probability of 0.5 and carry out their orders with a probability of 0.5. A meal requires an average of 20 minutes to eat. What is the average number of customers in the restaurant? A customer who eats in the restaurant is inside for 25 minute while the takeout customer is in for 5 minutes. Hence, the average customer is in the restuarant for 15 minutes. The arrival rate is five cusotmers/min. Thus by Little's thm, the average number of customers in the restaurant is N = lambda*T= 15*5=75. 3. A person enters a bank and finds all four clerks busy serving customers. There are no other customers in the bank, so the person will start service as soon as one of the customers in service leaves. Customers have an independent, identical, sxponential distribution of service times. (a) What is the probability that the person will be the last one to leave the bank, assuming no other customers arrive? 1/4. This is an example of the memoryless (markov) property of the exponential distribution. Once, he begins service, he is like the other customers. All have an equally prob of finishing first (or last), regardless of who started first. (b) If the the average service time is one minute, what is the average time the customer will spend in the bank? The average time in the bank = average service time (=1) + the average time waiting. The later term is 1/4 since there are four servers which is equivalent to a single server with has an average service time of 1/4. So the result is 5/4. (c) Will the answer to (a) change if there are some additional customers waiting in a common queue, and the customers begin service in the order of arrival? No. Again it's the memoryless property. 4. An absent-minded professor schedules two student appointments for the same time. The appointment durations are independent and exponentially distributed with mean thirty minutes. The first student arrives on time but the second arrives five minutes late. What is the expected time between the arrival of the first student and the departure of the second? There are two possibilities: the second student arrives after the first has left or the second arrives while the first is still there. In the first case, the expected time will be 35 minutes: the first five minutes plus an average meeting time. In the second case, the expected time is the first five minutes plus 60 minutes since by the markov property, if the second student arrives while the first is still there, he will have to wait an average of 30 minutes and then his appointment will average 30 minutes. The probability of the first situation is 1-e^{-5/30} and the probability of the second is e^{-5/30} Hence, E{time} = (5+30)*(1-e^(-5/30)) + (35+30)*e^(-5/30) = 35 + 30*e^(-5/30) =~ 55.394 5. Persons arrive at a taxi stand with room for five taxis according to a Poisson process with rate one per minute. A person boards a taxi upon arrival if one is available and otherwise waits in line. Taxis arrive at the stand according to a Poisson process with rate two per minute. An arriving taxi that finds the stand full departs immediately; otherwise, it picks up a customer if at least one is waiting, or else joins the queue of waiting taxis. What is the steady state distribution of the taxi queue size? What is the probabilty an arriving customer will find a taxi waiting? What is the average wait for a customer? Hint: you need only a single queue. Consider a Markov chain with state n = Number of people waiting + number of empty taxi positions Then the state goes from n to n+1 each time a person arrives, and goes from n to n-1 (if n>=1) when a taxi arrives. Thus the system behaves like an M/M/1 queue with arrival rate 1 per min and departure rate 2 per min. Therefore the occupancy distribution is Pn = (1-ro)*ro^n where ro = 1/2. State n, for 0<=n<=4 corresponds to 5,4,3,2,1 taxis waiting, while n>4 corresponds to no taxi waiting. Therefore P{5 taxis waiting} = 1/2 P{4 taxis waiting} = 1/4 P{3 taxis waiting} = 1/8 P{2 taxis waiting} = 1/16 P{1 taxis waiting} = 1/32 and P{no taxi waiting} is obtained as 1 - sum of the above. 6. A communication line capable of transmitting at a rate of 50Kbps will be used to accomodate 10 sessions each generating Poisson traffic at a rate of 150 packets/min. Packet lengths are exponentially distributed with a mean length of 1000 bits. (a) For each session, find the average number of packets in its queue, the average number in the system and the average delay per packet when the line is allocated to the sessions by using: (1) 10 equal capacity time-division multiplexed channels. (2) statistical multiplexing (b) Repeat (a) for the case where 5 of the sessions transmit at a rate of 250 packets/min while the other 5 at a rate of 50 packets/min. (a) For each session the arrival rate is lambda = 150/60 = 2.5 packets/sec. When the line is divided into 10 lines of capacity 5 Kbps, then mu is 5 packets/sec for each line and the average packet transmission time is 1/mu = 0.2 sec. The corresponding utilization factor is rho = lambda/mu = 0.5. We have for each session The average number in each queue is Nq = rho^2/(1-ro)=0.5, The average number is each line is N = rho/(1-rho)=1, The average delay is T = N/lambda = 0.4 sec. For all 10 sessions collectively, Nq and N must be multiplied by 10 to give Nq = 5 and N = 10. When statistical multiplexing is used, all sessions are merged into a single session with 10 times larger lambda and mu; lambda = 25, 1/mu = 0.02. We obtain rho = 0.5, Nq=0.5, N=1, and T = 0.04 sec. Therefore Nq, N and T have been reduced by a factor of 10 over the TDM case. (b) For sessions transmitting at 250 packets/min we have rho=(250/60)*0.2 = 0.833, and we have Nq=(0.833)^2/(1-0.833)=4.158, N = 4.99, T= N/lambda = 4.99/(250/60) = 1.197 sec For the sessions transmitting at 50 packets/min we have rho = (50/60)*0.2 = 0.166, Nq = 0.033, N = 0.199 T = 0.199/(50/60) = 0.239 The corresponding averages over all sessions are: Nq = 5 * (4.158 + 0.033) = 20.95 N = 5 *(4.99 +0.199) = 25.95 T = N/lambda = N/(5*lambda1 + 5*lambda2) = 25.95/(5*(250/60)+5*(50/60)) = 1.038 sec When statistical multiplexing is used, the arrival rate of the combined session is 5*(250+50) = 150 packets/sec and the same values for Nq, N and T as in (a) are obtained.