1 00:00:00,690 --> 00:00:03,820 In this video, we will consider a classical application 2 00:00:03,820 --> 00:00:07,250 of Markov chains, which has to do with the design of a phone 3 00:00:07,250 --> 00:00:08,020 system. 4 00:00:08,020 --> 00:00:11,620 This is a classical problem, which was posed, analyzed, 5 00:00:11,620 --> 00:00:14,420 and solved by a Danish engineer by the name of Erlang. 6 00:00:17,620 --> 00:00:21,040 It was more than 100 years ago when phones just 7 00:00:21,040 --> 00:00:23,150 started to exist, but the technique 8 00:00:23,150 --> 00:00:27,780 remains relevant today to design systems of a similar nature. 9 00:00:27,780 --> 00:00:30,440 As for Erlang, he was trying to figure out 10 00:00:30,440 --> 00:00:33,800 how to design the capacity of a phone system. 11 00:00:33,800 --> 00:00:35,920 That is, how many lines should we 12 00:00:35,920 --> 00:00:39,230 set up for a group of people, say, in a village, 13 00:00:39,230 --> 00:00:43,000 to be able to communicate to the outside world? 14 00:00:43,000 --> 00:00:46,210 So here is a cartoon of the problem, where 15 00:00:46,210 --> 00:00:49,070 these are the phone lines, and we 16 00:00:49,070 --> 00:00:52,250 need to decide how many of these lines to set up, let's say, 17 00:00:52,250 --> 00:00:54,890 B. How to do that? 18 00:00:54,890 --> 00:00:58,890 Well, we don't want B to be too large, much more than needed, 19 00:00:58,890 --> 00:01:02,780 because too many lines would be expensive. 20 00:01:02,780 --> 00:01:05,640 On the other hand, we want to have enough lines 21 00:01:05,640 --> 00:01:08,840 so that if a reasonable number of people place phone 22 00:01:08,840 --> 00:01:11,030 calls during the same period, they 23 00:01:11,030 --> 00:01:14,190 will be able to talk and not get busy signals. 24 00:01:14,190 --> 00:01:18,750 So if B is 10 and 15 people want to talk at the same time, 25 00:01:18,750 --> 00:01:22,020 then 5 would get a busy signal, and that's 26 00:01:22,020 --> 00:01:26,590 probably not what you want as an acceptable level of service. 27 00:01:26,590 --> 00:01:30,930 So we would like B to be just large enough so that there 28 00:01:30,930 --> 00:01:33,500 is a high probability that no one is 29 00:01:33,500 --> 00:01:36,910 going to get a busy signal. 30 00:01:36,910 --> 00:01:40,700 So how do we go about modeling a situation like this? 31 00:01:40,700 --> 00:01:44,200 Well, we need two pieces of information, 32 00:01:44,200 --> 00:01:46,830 one describing how phone calls get 33 00:01:46,830 --> 00:01:51,729 initiated, and once a phone call gets started, how long does it 34 00:01:51,729 --> 00:01:54,700 take until it ends? 35 00:01:54,700 --> 00:01:58,170 We're going to make some very simple but somewhat plausible 36 00:01:58,170 --> 00:01:59,700 assumptions. 37 00:01:59,700 --> 00:02:04,630 We will assume that phone calls originate as a Poisson process. 38 00:02:04,630 --> 00:02:07,190 We will assume that out of that population, 39 00:02:07,190 --> 00:02:08,824 there is no coordination. 40 00:02:08,824 --> 00:02:12,270 At completely random times, people pick up their phone 41 00:02:12,270 --> 00:02:14,200 independent of each other's. 42 00:02:14,200 --> 00:02:17,390 Also, there is nothing special about the various times, 43 00:02:17,390 --> 00:02:19,900 and different times are independent. 44 00:02:19,900 --> 00:02:22,230 So a Poisson model is a reasonable way 45 00:02:22,230 --> 00:02:25,480 of modeling a situation under these assumptions. 46 00:02:25,480 --> 00:02:28,140 We also assume that the rate lambda 47 00:02:28,140 --> 00:02:30,800 is known or has been estimated. 48 00:02:30,800 --> 00:02:33,079 Now, it might be the case that during the night, 49 00:02:33,079 --> 00:02:35,540 the rate would be different than during the day. 50 00:02:35,540 --> 00:02:37,520 In that case, you would design the system 51 00:02:37,520 --> 00:02:40,730 to meet the largest rate of the two. 52 00:02:40,730 --> 00:02:42,660 For the phone calls themselves, we 53 00:02:42,660 --> 00:02:45,460 are going to assume that the duration of a phone call 54 00:02:45,460 --> 00:02:49,460 is a random variable that has an exponential distribution 55 00:02:49,460 --> 00:02:51,950 with a certain parameter mu. 56 00:02:51,950 --> 00:02:56,540 So 1/mu is the mean duration of a phone call. 57 00:02:56,540 --> 00:03:00,150 Duration of phone calls are independent between each other. 58 00:03:00,150 --> 00:03:02,860 So here, again, we assume that the parameter mu 59 00:03:02,860 --> 00:03:03,880 has been estimated. 60 00:03:03,880 --> 00:03:08,990 For example, the mean duration 1/mu could be 3 minutes. 61 00:03:08,990 --> 00:03:13,000 Now, is the exponential assumption a good assumption? 62 00:03:13,000 --> 00:03:16,730 So here is the PDF of an exponential random variable 63 00:03:16,730 --> 00:03:19,030 with parameter 1 over three. 64 00:03:19,030 --> 00:03:22,250 That means that the mean duration is about three minutes 65 00:03:22,250 --> 00:03:23,210 here. 66 00:03:23,210 --> 00:03:25,160 So if you look at this PDF, it means 67 00:03:25,160 --> 00:03:29,260 that most phone calls will be kind of short. 68 00:03:29,260 --> 00:03:32,620 There is going to be a fraction of phone calls 69 00:03:32,620 --> 00:03:35,120 that are going to be larger, and then 70 00:03:35,120 --> 00:03:37,829 a very small fraction of phone calls 71 00:03:37,829 --> 00:03:40,460 that are going to be even larger. 72 00:03:40,460 --> 00:03:42,510 So it sounds reasonable. 73 00:03:42,510 --> 00:03:46,930 However, it's not exactly realistic in some situations. 74 00:03:46,930 --> 00:03:51,590 Typically, phone calls that last a very short time are not 75 00:03:51,590 --> 00:03:54,425 that common as opposed to what an exponential distribution 76 00:03:54,425 --> 00:03:55,650 would indicate here. 77 00:03:58,240 --> 00:04:01,740 So some other distribution might be better, like this one, 78 00:04:01,740 --> 00:04:07,190 for example, here, where during a very small period of time 79 00:04:07,190 --> 00:04:10,660 the wait corresponding to this very short period of time 80 00:04:10,660 --> 00:04:13,020 are kind of small as well. 81 00:04:13,020 --> 00:04:14,830 There are many distributions of this type. 82 00:04:14,830 --> 00:04:18,790 I've just provided here one simple example. 83 00:04:18,790 --> 00:04:23,560 This one is the Erlang of parameter 2 and 2/3. 84 00:04:23,560 --> 00:04:27,200 What it means is that it is the sum of two 85 00:04:27,200 --> 00:04:29,930 independent exponential random variables, 86 00:04:29,930 --> 00:04:32,880 and each one of them of parameter 2/3. 87 00:04:32,880 --> 00:04:35,630 So the mean duration associated with this distribution 88 00:04:35,630 --> 00:04:37,130 is also 3 minutes. 89 00:04:37,130 --> 00:04:40,600 So this might fit better some practical situation. 90 00:04:40,600 --> 00:04:44,210 But here we will keep the simple assumption associated 91 00:04:44,210 --> 00:04:47,080 with an exponential distribution. 92 00:04:47,080 --> 00:04:47,580 All right. 93 00:04:47,580 --> 00:04:49,825 So let's try now to come up with the models 94 00:04:49,825 --> 00:04:54,670 that we can decide how many lines, B, do we want to set up. 95 00:04:54,670 --> 00:04:57,600 The Poisson process run in continuous time. 96 00:04:57,600 --> 00:05:00,270 And call durations being exponential random variables 97 00:05:00,270 --> 00:05:02,700 are also continuous random variables. 98 00:05:02,700 --> 00:05:06,250 So it seems that we are in a continuous time universe. 99 00:05:06,250 --> 00:05:11,360 Here is a cartoon of the evolution of the system. 100 00:05:11,360 --> 00:05:16,380 So here I have in blue when phone calls get initiated. 101 00:05:16,380 --> 00:05:20,650 So this is called 1, a second one, a third, a fourth, 102 00:05:20,650 --> 00:05:22,230 and a fifth one. 103 00:05:22,230 --> 00:05:25,530 And also, I have represented here the duration of the call. 104 00:05:25,530 --> 00:05:30,140 So call 1 lasted that long, call 2 lasted long 105 00:05:30,140 --> 00:05:35,690 until here, 3 up to here, 4 here, et cetera. 106 00:05:35,690 --> 00:05:38,510 So when you look at this kind of system in that way, 107 00:05:38,510 --> 00:05:41,409 and you run through time in a continuous manner, 108 00:05:41,409 --> 00:05:44,145 and here you have 0 line busy. 109 00:05:44,145 --> 00:05:49,250 You have 1 line used, 0, 1, then 2 becomes busy, 110 00:05:49,250 --> 00:05:53,640 3, 2, 1, and 0, and so on and so forth. 111 00:05:53,640 --> 00:05:58,220 Also note that if I look at that system at any time t, 112 00:05:58,220 --> 00:06:01,540 because of our assumptions of a Poisson process 113 00:06:01,540 --> 00:06:04,780 and an exponential duration for phone calls, 114 00:06:04,780 --> 00:06:07,390 and a memoryless property associated 115 00:06:07,390 --> 00:06:11,330 with these processes, it means that the past really 116 00:06:11,330 --> 00:06:13,280 has no information about the future. 117 00:06:13,280 --> 00:06:17,150 And so, in some sense, the Markov property is valid. 118 00:06:17,150 --> 00:06:19,920 So it looks like a continuous time Markov 119 00:06:19,920 --> 00:06:22,210 process would be needed here. 120 00:06:22,210 --> 00:06:25,180 And this is indeed an option, but we have not 121 00:06:25,180 --> 00:06:26,950 studied those in this class. 122 00:06:26,950 --> 00:06:29,290 So we will discretize time instead 123 00:06:29,290 --> 00:06:32,480 and work with a Markov chain. 124 00:06:32,480 --> 00:06:36,470 We are discretizing time in the familiar way, the way we did it 125 00:06:36,470 --> 00:06:39,050 when we studied the Poisson process. 126 00:06:39,050 --> 00:06:41,450 We are going to take the time axis 127 00:06:41,450 --> 00:06:44,700 and split it into little discrete time 128 00:06:44,700 --> 00:06:48,450 slots, each of duration delta. 129 00:06:48,450 --> 00:06:53,770 And delta is supposed to be a very, very small number. 130 00:06:53,770 --> 00:06:57,000 So now under this discretization, 131 00:06:57,000 --> 00:06:59,790 by the definition of the Poisson process 132 00:06:59,790 --> 00:07:03,410 the probability that we'll see 1 arrival during any time 133 00:07:03,410 --> 00:07:08,530 slots of duration delta will be lambda times delta. 134 00:07:11,200 --> 00:07:17,420 Also, if at any time, like here we have 1 simple call active, 135 00:07:17,420 --> 00:07:21,130 the probability that this call will end during any future time 136 00:07:21,130 --> 00:07:24,880 slot of duration delta is mu delta, like here. 137 00:07:28,930 --> 00:07:31,860 Indeed, as we have seen in Unit 9, 138 00:07:31,860 --> 00:07:34,050 an exponential random variable can 139 00:07:34,050 --> 00:07:36,890 be thought of as representing the time 140 00:07:36,890 --> 00:07:42,280 until the first arrival of a Poisson process with rate mu. 141 00:07:42,280 --> 00:07:46,810 What if you have i busy calls at the same time? 142 00:07:46,810 --> 00:07:48,980 Then the probability of having 1 call ending 143 00:07:48,980 --> 00:07:54,200 in a time slot of duration delta will be i mu delta. 144 00:07:54,200 --> 00:07:58,330 Like, for example here, this one could correspond to something 145 00:07:58,330 --> 00:08:00,840 as 2 mu delta. 146 00:08:00,840 --> 00:08:04,230 Indeed, each of the Poisson processes associated 147 00:08:04,230 --> 00:08:06,730 with these calls with rate mu can 148 00:08:06,730 --> 00:08:11,020 be combined into a merged Poisson process of rate i times 149 00:08:11,020 --> 00:08:11,810 mu. 150 00:08:11,810 --> 00:08:14,580 And a call completion will correspond to the time 151 00:08:14,580 --> 00:08:18,230 until the first arrival of this merged Poisson process. 152 00:08:18,230 --> 00:08:23,140 For example, if I go back here in my situation here at time t, 153 00:08:23,140 --> 00:08:25,840 there were still 3 phone calls active. 154 00:08:25,840 --> 00:08:28,840 And I represent here the call number 2, call number 3, 155 00:08:28,840 --> 00:08:32,789 and call number 4 and their remaining duration. 156 00:08:32,789 --> 00:08:36,960 And if you look at these and you combine these 3 157 00:08:36,960 --> 00:08:39,710 associated Poisson processes into 1, 158 00:08:39,710 --> 00:08:42,070 you get a merged Poisson process. 159 00:08:42,070 --> 00:08:45,970 And if you look now at the time arrival of the first event, 160 00:08:45,970 --> 00:08:48,530 which would correspond to here, it 161 00:08:48,530 --> 00:08:50,630 would be an exponential random variable. 162 00:08:50,630 --> 00:08:52,320 The duration here would correspond 163 00:08:52,320 --> 00:08:55,920 to an exponential random variable of parameter 3 mu. 164 00:08:55,920 --> 00:08:59,010 So in that case, if you go back to that representation here, 165 00:08:59,010 --> 00:09:00,510 the probability of a departure would 166 00:09:00,510 --> 00:09:03,731 be 3 times mu times delta. 167 00:09:03,731 --> 00:09:04,230 OK? 168 00:09:04,230 --> 00:09:06,750 So let us continue with our discrete time 169 00:09:06,750 --> 00:09:08,760 approximation of our system. 170 00:09:08,760 --> 00:09:11,360 Again, we have the village, and the lines, the B 171 00:09:11,360 --> 00:09:12,810 that we would like to decide. 172 00:09:12,810 --> 00:09:16,020 We have discretized the time steps. 173 00:09:16,020 --> 00:09:18,200 We have made some approximation. 174 00:09:18,200 --> 00:09:21,480 And we know that during any of these time slots here, 175 00:09:21,480 --> 00:09:23,490 the probability that you would get a new call 176 00:09:23,490 --> 00:09:25,600 is about lambda times delta. 177 00:09:25,600 --> 00:09:28,840 Lambda is the rate of the Poisson process. 178 00:09:28,840 --> 00:09:33,020 And given that you have i calls, the probability 179 00:09:33,020 --> 00:09:37,990 that one of these calls ends will be i times mu times delta. 180 00:09:37,990 --> 00:09:38,490 OK. 181 00:09:38,490 --> 00:09:42,420 If we want to propose a Markov chain model for this system, 182 00:09:42,420 --> 00:09:45,140 we need to specify the states and the transition 183 00:09:45,140 --> 00:09:46,730 probabilities. 184 00:09:46,730 --> 00:09:48,250 What are the states of the system? 185 00:09:48,250 --> 00:09:51,040 If you look at the system at any particular time, 186 00:09:51,040 --> 00:09:53,140 the minimum relevant information to collect 187 00:09:53,140 --> 00:09:55,490 would be the number of busy lines, 188 00:09:55,490 --> 00:10:00,540 something like these 2 lines are busy, or all of them are busy, 189 00:10:00,540 --> 00:10:03,090 or none of them are used. 190 00:10:03,090 --> 00:10:06,590 Now, because of our assumptions, again, about the Poisson 191 00:10:06,590 --> 00:10:09,040 process arrivals and exponential duration 192 00:10:09,040 --> 00:10:12,200 of calls and their memoryless property, 193 00:10:12,200 --> 00:10:14,950 that information is enough to fully describe 194 00:10:14,950 --> 00:10:17,130 the state of our system in such a way 195 00:10:17,130 --> 00:10:19,450 that we get a Markov chain. 196 00:10:19,450 --> 00:10:26,290 So the states are numbers from 0 to B. 0 corresponds 197 00:10:26,290 --> 00:10:29,350 to a state in which all the phone lines are free. 198 00:10:29,350 --> 00:10:31,280 No one is talking. 199 00:10:31,280 --> 00:10:34,930 B corresponds to a case where all the phone lines are busy. 200 00:10:34,930 --> 00:10:37,660 And then you've got states in between. 201 00:10:37,660 --> 00:10:40,850 Now, let us look at the transition probabilities. 202 00:10:40,850 --> 00:10:44,800 Suppose that right now, you are in that state. 203 00:10:44,800 --> 00:10:46,530 What can happen next? 204 00:10:46,530 --> 00:10:49,740 Well, a new phone call gets placed, in which case 205 00:10:49,740 --> 00:10:52,300 the state moves up by 1. 206 00:10:52,300 --> 00:10:55,340 Or an existing call terminates, in which case 207 00:10:55,340 --> 00:10:58,190 the state goes down by 1. 208 00:10:58,190 --> 00:11:00,930 Or none of the two happens, in which case 209 00:11:00,930 --> 00:11:03,090 the state stays the same. 210 00:11:03,090 --> 00:11:06,990 Well, it is also possible that a phone call gets terminated, 211 00:11:06,990 --> 00:11:10,510 and a new phone call gets placed in the same time period. 212 00:11:10,510 --> 00:11:12,430 But when the duration of the time slots 213 00:11:12,430 --> 00:11:15,240 are very, very small, the delta here, 214 00:11:15,240 --> 00:11:19,180 this event is going to have a negligible probability, 215 00:11:19,180 --> 00:11:21,800 order of delta squared. 216 00:11:21,800 --> 00:11:26,500 So we ignore it, as we ignore the fact 217 00:11:26,500 --> 00:11:29,160 that more than one new call can happen, 218 00:11:29,160 --> 00:11:33,710 or more than one call can be terminated during a given slot. 219 00:11:33,710 --> 00:11:37,470 So what is the probability of an upward transition? 220 00:11:37,470 --> 00:11:40,610 That's the probability that the Poisson process has an arrival 221 00:11:40,610 --> 00:11:42,900 during the slots of duration delta. 222 00:11:42,900 --> 00:11:46,850 And as we have seen, this is lambda times delta. 223 00:11:46,850 --> 00:11:49,860 So each one of these upward transitions 224 00:11:49,860 --> 00:11:52,430 has the same probability of lambda times delta. 225 00:11:56,180 --> 00:11:58,520 How about phone call terminations? 226 00:11:58,520 --> 00:12:02,000 If we have i phone calls that are currently active, 227 00:12:02,000 --> 00:12:07,480 the probability that one of them terminates becomes i mu delta. 228 00:12:07,480 --> 00:12:13,140 So here it would be mu delta, and here B mu delta. 229 00:12:13,140 --> 00:12:15,390 Now, let us analyze this chain. 230 00:12:15,390 --> 00:12:17,630 It has the birth and death form that we 231 00:12:17,630 --> 00:12:19,710 discussed in the previous lecture. 232 00:12:19,710 --> 00:12:22,560 So instead of writing down the balance equation 233 00:12:22,560 --> 00:12:24,850 in a general form, we think in terms 234 00:12:24,850 --> 00:12:27,980 of frequency of transitions across some particular cut 235 00:12:27,980 --> 00:12:30,760 in this diagram, so for example here. 236 00:12:33,320 --> 00:12:36,970 The frequency with which transition of this kind 237 00:12:36,970 --> 00:12:40,190 happen or are observed has to be the same 238 00:12:40,190 --> 00:12:43,740 as the frequency of transition of this kind. 239 00:12:43,740 --> 00:12:46,290 The frequency of transition of this type 240 00:12:46,290 --> 00:12:52,060 will be, if you look at pi i here and pi of i minus 1 here, 241 00:12:52,060 --> 00:13:01,910 this transition here will happen with pi i times i mu delta. 242 00:13:01,910 --> 00:13:06,510 And the transition of this type here 243 00:13:06,510 --> 00:13:13,620 will be pi i minus 1 times lambda times delta. 244 00:13:13,620 --> 00:13:16,230 And the frequency of these transitions 245 00:13:16,230 --> 00:13:19,400 have to be the same as the frequency of these transitions, 246 00:13:19,400 --> 00:13:21,520 so we have that equals that. 247 00:13:21,520 --> 00:13:25,770 And then we can cancel the delta in both, 248 00:13:25,770 --> 00:13:28,230 and we are left with this equation here. 249 00:13:31,980 --> 00:13:38,340 So this equation expresses pi of i in terms of pi of i minus 1. 250 00:13:38,340 --> 00:13:43,900 So if we knew pi of 0, then we can calculate pi of 1, 251 00:13:43,900 --> 00:13:48,960 and then in turn calculate pi of 2, and so on and so forth. 252 00:13:48,960 --> 00:13:51,330 And the general formula that comes out of this, 253 00:13:51,330 --> 00:13:55,020 after some algebra, is given by this expression, 254 00:13:55,020 --> 00:13:57,200 which involves pi of 0. 255 00:14:00,260 --> 00:14:01,860 Now, what is pi 0? 256 00:14:01,860 --> 00:14:06,715 Well, we can find it by using the normalization equation, 257 00:14:06,715 --> 00:14:10,620 the summation of pi i equals 1. 258 00:14:10,620 --> 00:14:13,680 You use this normalization, replace each pi 259 00:14:13,680 --> 00:14:17,790 i by their quantities as a function of pi 0, 260 00:14:17,790 --> 00:14:23,000 and then we obtain this equation for pi 0. 261 00:14:23,000 --> 00:14:25,450 So here, again, we use that normalization. 262 00:14:25,450 --> 00:14:28,090 We replaced pi i by their value. 263 00:14:28,090 --> 00:14:31,610 We sum to 1, and we obtain pi of 0. 264 00:14:31,610 --> 00:14:34,070 And then in turn, from this pi of 0, 265 00:14:34,070 --> 00:14:37,430 you can replace the pi of 0 in pi of i, 266 00:14:37,430 --> 00:14:45,230 and you obtain a pi of i as a function of B, lambda, and mu. 267 00:14:45,230 --> 00:14:49,180 So if we know B and lambda and mu, 268 00:14:49,180 --> 00:14:54,660 we can set up this Markov chain, and we can calculate pi 0, 269 00:14:54,660 --> 00:14:58,410 and then pi of i for all i's. 270 00:14:58,410 --> 00:15:00,775 We can then answer a question like this. 271 00:15:00,775 --> 00:15:04,120 After the chain has run for a long time, 272 00:15:04,120 --> 00:15:07,380 how likely is it that at any given random time, 273 00:15:07,380 --> 00:15:10,740 you will find the system with i busy lines? 274 00:15:10,740 --> 00:15:13,950 Well, it will be pi of i. 275 00:15:13,950 --> 00:15:17,010 And also, we can interpret the steady-state probabilities 276 00:15:17,010 --> 00:15:18,360 as frequencies. 277 00:15:18,360 --> 00:15:21,520 So once I found pi of i, it also tells me 278 00:15:21,520 --> 00:15:25,770 what fraction of the time I will have i busy lines. 279 00:15:25,770 --> 00:15:29,710 And you can answer that question for every possible i. 280 00:15:29,710 --> 00:15:32,770 Now, we were initially interested in the probability 281 00:15:32,770 --> 00:15:36,160 that the entire system is busy at any point in time, 282 00:15:36,160 --> 00:15:39,350 in other words, in that state here. 283 00:15:39,350 --> 00:15:42,160 So if a new phone call gets placed, 284 00:15:42,160 --> 00:15:45,390 it is going to find the system in a random state. 285 00:15:45,390 --> 00:15:47,830 That random state is described in steady-state 286 00:15:47,830 --> 00:15:50,270 by the probability pi's. 287 00:15:50,270 --> 00:15:54,020 And the probability that the entire system is busy 288 00:15:54,020 --> 00:15:59,270 is going to be given by pi of B, and this is the probability 289 00:15:59,270 --> 00:16:03,740 that we would like to be small in a well-engineered system. 290 00:16:03,740 --> 00:16:08,900 So again, given lambda, mu, the design question 291 00:16:08,900 --> 00:16:14,040 is to find B so that this probability is small. 292 00:16:14,040 --> 00:16:17,190 Could we figure out a good value for B by doing 293 00:16:17,190 --> 00:16:19,760 a back-of-the-envelope calculation? 294 00:16:19,760 --> 00:16:27,630 Well, let's suppose that lambda is 30 calls per minute. 295 00:16:27,630 --> 00:16:31,180 And let's assume that mu is 1/3 so 296 00:16:31,180 --> 00:16:34,350 that the mean duration is 3 minutes. 297 00:16:34,350 --> 00:16:38,870 So on average, a call lasts for 3 minutes, 298 00:16:38,870 --> 00:16:42,440 and you get 30 calls on average per minute. 299 00:16:42,440 --> 00:16:45,390 Then how many calls would be active on the average? 300 00:16:45,390 --> 00:16:48,590 If a call lasted exactly 1 minute, then at any time 301 00:16:48,590 --> 00:16:51,500 you would have 30 calls being active. 302 00:16:51,500 --> 00:16:54,270 Now, a call lasts, on the average, for 3 minutes. 303 00:16:54,270 --> 00:16:56,562 So by thinking in terms of averages, 304 00:16:56,562 --> 00:16:58,020 you would expect that, at any time, 305 00:16:58,020 --> 00:17:05,490 there would be about 90 calls that are active, 3 times 30. 306 00:17:05,490 --> 00:17:08,180 And if 90 calls are active on the average, 307 00:17:08,180 --> 00:17:14,720 you could say, OK, I'm going to set up my B to be 90. 308 00:17:14,720 --> 00:17:17,420 But that's not very good, because if the average number 309 00:17:17,420 --> 00:17:21,480 of phone calls that want to happen is, on the average, 90, 310 00:17:21,480 --> 00:17:23,740 sometimes you are going to have 85, 311 00:17:23,740 --> 00:17:26,319 and sometimes you'll get 95. 312 00:17:26,319 --> 00:17:28,830 And to be sure that the phone calls will go through, 313 00:17:28,830 --> 00:17:30,630 you probably want to choose your B 314 00:17:30,630 --> 00:17:34,100 to be a number a little larger than 90. 315 00:17:34,100 --> 00:17:36,030 How much larger than 90? 316 00:17:36,030 --> 00:17:40,820 Well, this is a question that you can answer numerically. 317 00:17:40,820 --> 00:17:43,550 By looking at these formulas, if you 318 00:17:43,550 --> 00:17:48,210 decide that your acceptable level of service, pi of B, 319 00:17:48,210 --> 00:17:52,190 has to be less than 1%, then you will 320 00:17:52,190 --> 00:17:58,820 find that the B that you need to design is to be at least 106. 321 00:17:58,820 --> 00:18:02,720 So you actually need some margin to protect against a situation 322 00:18:02,720 --> 00:18:04,990 if suddenly, by chance, more people 323 00:18:04,990 --> 00:18:06,910 want to talk than on an average day. 324 00:18:06,910 --> 00:18:08,950 And if you want to have a good guarantee 325 00:18:08,950 --> 00:18:11,830 that an incoming person will have a very small probability 326 00:18:11,830 --> 00:18:14,690 of finding a busy system, here 1%, 327 00:18:14,690 --> 00:18:18,840 then you will need about 106 phone lines. 328 00:18:18,840 --> 00:18:20,950 So that's the calculation and the argument 329 00:18:20,950 --> 00:18:23,730 that Erlang went through a long time ago. 330 00:18:23,730 --> 00:18:26,600 It's actually interesting that Erlang did this calculation 331 00:18:26,600 --> 00:18:28,994 before Markov chains were invented.