 Hi, I'm Zor. Welcome to Unizor Education. I would like to continue talking, actually solving problems in theory of probabilities. This is part of the advanced math course for teenagers presented at Unizor.com. I suggest you to watch this lecture from this website, but before you're doing this, on this website there are notes for this lecture as well as for any other lecture and considering this is the problem solving, try to solve these problems yourself just looking at the notes. There are some answers so you can check yourself and then listen to the lecture. I think it's always good even if you don't really successfully solve the problem, it's still good if you just think about it, about the approach how to solve it. Alright, so let's do it. This is a set of problems which I... this is number five. Alright, it has four different problems and let's just start. Okay, the first problem, I have just recently been in Thailand and there are many Buddhist temples over there. You have to take off your shoes when you step into the temple. Now let's imagine that you are within a group of N tourists, so they're all wearing shoes, but let's assume that they're all wearing exactly the same shoes. So left is obviously different from right, but all the lefts are the same and all the rights are the same. So you leave your shoes at the entrance into the temple, step into the temple, look whatever is in there, now you're at the exit and you would like to find your own pair of shoes. What is the probability that you will get your own pair of shoes? Well, considering they all look the same, so basically it's kind of a random choice, so you basically random choose a pair of shoes left and the right and what's the probability of getting your own shoes? So this is actually a very, very simple problem because you actually are engaged in the two-step process. Step number one, you have to choose the left pair and step number two, you have to choose the right pair. There are N different pair of shoes, so the probability that everyone would get its own pair is basically the probability of putting all these left shoes in the proper order. So in order to calculate it, you basically have to multiply the number of choices for the first person, which is N, number of choices for the first one, which is N minus 1, etc., etc., up to 1. So basically there are N factorial different permutations of left shoes and only one of them is actually the correct one when everyone gets its own pair of shoes. Now let's talk about the right shoes. Right shoes also should really have exactly the same kind of a problem. We have to put all these right shoes in the proper order so everyone will get his own shoes. So that's another N factorial variations. So with each of these, we have each of those, so the total number of different variations is N factorial square and the probability of people getting the right shoes would be 1 over N factorial square. So this is simple. So again, when you are exiting, when the group actually is exiting the entire group is exiting this temple, the probability of them to get to shoes, whatever their own, is this one, which is very small obviously. Even for two people, the two factorial is two, so it's one fourth. So if two people came out from the temple, so you have L1 and right one and you have L2 and right two. This is for the first guy, this is for the second guy. So you have two choices for the first one and the two choices for the left one and two choices for the right one. So basically the first one will get the probability of one-half and the second one will be the probability of one-half. Multiply, that's one-quarter. So if two people, then you have only one-fourth chance to get your own pair of shoes. But if it's more, obviously it grows very, very quickly, this denominator. All right. The second is about supplying electricity. Now, you know that electricity from the power station to, let's say, whoever the consumer, maybe the entire city or whatever, it's going through substations basically. It doesn't go in one wire uninterrupted. So let's assume that you have, from the power source to the consumer, you have two substations sequentially connected to each other. Now, obviously, if one of the substations goes out of commission, breaks, accident, whatever, then the entire chain is broken and the consumer will not get electricity, right? So let's assume that we know the probability of breaking during one-year period. Let's call this p, all right? So during one year, the probability of breaking of one particular substation, one, is p. Now, question is, what is the probability of uninterrupted supply during that period of one year? Okay, this is relatively simple problem again, but I would like actually to expand it a little bit further. That's why I start with this simple problem. So let's just think about it. If we want uninterrupted supply of electricity, it means that this should not break and this should not break. If the probability of the break is p, then the probability of not breaking is 1 minus p, right? But now we need the probability of not breaking this and the probability of not breaking that. And let's assume that for the purpose of this problem that these substations are relatively independent from each other. So if one breaks doesn't mean that another breaks. I mean, just completely independent things. So if we would like this event to occur and this event to occur, then the probability of the independent events is the product of their probabilities, right? This uninterrupted and this uninterrupted. So this is the answer, basically. That's the probability of uninterrupted work. Now, the second part of this problem is, what if I would like to make the probability of uninterrupted work to be equal to some constant which is satisfactory for me as a consumer? Okay, for instance, my satisfaction is probability of 99% of uninterrupted supply during the period of one year. Now, question is what would be the value of the probability of the break of each station in this case to achieve the probability of uninterrupted supply, the 0.99? Well, let's just basically have to solve the equation, right? So 1 minus p equals the square root of 0.99 and p equals 1 minus the square root of 0.99 which has approximately 0.005. Okay, this is a relatively small number which characterizes the probability of the breaking of one substation during the period of one year if we want to achieve the probability of uninterrupted supply 0.99. Very, very small number. Now, a similar problem, but I have instead of 2, I have n different substations. Now, what would be the probability of uninterrupted supply in this case? Well, basically it's exactly similar to the case with two substations. So now we have the probability of uninterrupted supply of electricity through the first substation, 1 minus p, and 1 minus p, and 1 minus p, so it's n times, so the answer would be 1 minus p to the power of n. Now, what's interesting is, as n is increasing, what happens with this probability? Well, think about it, p is smaller than 1, it's from 0 to 1, right? It doesn't matter how small it is, but it's from 0 to 1, which means 1 minus p is also from 0 to 1. It's some kind of a positive fraction less than 1. Now, if I'm multiplying it by itself, it becomes smaller and smaller and smaller, right? 1 half multiplied by 1 half is 1 fourth, times 1 half is 1 eighth, et cetera, it's getting smaller and smaller. So this thing is getting down as n is increasing. It means that if my substations are connected sequentially, then the more substations I have of the same quality with the probability of breaking during the period of 1 year equals to p. So the more substations I have, the smaller the probability of uninterrupted supply is, and obviously it's natural because since breaking of any one of them breaks the entire chain, obviously the probability of breaking entire chain is increasing with the number of components is increasing. It's always the problem with big and complicated systems. The more components you have, the more probability of the entire system to fail. That's basically kind of the large numbers if you wish about the economy. But let's change the connection. Let's introduce certain redundancy. Let's go back and instead of connecting sequentially, we will connect in parallel these substations. So this is the source and I would like to connect them to substations in parallel to one consumer. Now what happens in this case? Again, the probability of the breaking is p in this case. Now, I'm talking about uninterrupted supply. So uninterrupted supply would be when either or is working correctly. I don't care how electricity goes this way or this way. I have introduced a redundancy into my schema, right? So I'm supposed to get better actually, right? Well, let's see if it works. Now when I do not have an electricity, I do not have an electricity if both are broken. So I do not have electricity with the probability of p squared. So I do have uninterrupted supply one minus p squared. That's the probability. So the probability of breaking the connection between my consumer and the source is p squared. So the probability of not being broken is one minus p squared. Now, what if I would like to make it again 0.99, this probability on the consumer side? What would be the probability of breaking in this case? Well, p squared equals to 0.01, p is equal to 01. Remember the last time in the sequential case I needed this probability of breaking, very, very small. This is the 10%, relatively large probability of breaking. I don't care if it's 10% because I know that I still have the probability of uninterrupted supply, 0.99. So obviously this is much more reliable kind of a connection. Now in the real world case, by the way, usually it's a combination of both. It's parallel but inside each branch I have a certain number of sequential. So this is a redundancy. And sequential is sequential connection we need because we cannot really pull very long wire. But we can do this parallel arrangement just to increase the reliability of the system. And finally if I have n different parallel lines, obviously I will have this probability. Of uninterrupted supply. Now this probability is obviously increasing as n increasing. Because the p is less than 1, so p to the power of n is decreasing. So 1 minus p to the power of n is increasing as n goes to. Increasing basically to 1 because p to the power of n decreasing to 0. So 1 minus p to the power of n is increasing to 1, which means absolute reliability. So the more parallel lines we arrange, the more reliable our connection is. And as I was saying, we usually have in the real practical world, we have a combination of sequential in each of these parallel lines. But we do have the whole network of electric substations, if you wish, to transfer the electricity from place to place. That gives you both the technical requirements and reliability. Alright, so that's important. The parallel lines are increasing reliability, sequential decreasing reliability. Alright, now I have, my last problem is the following. Okay, imagine a city which needs to solve certain engineering problem. I don't know this engineering problem, it doesn't really matter. Now, city usually deal with certain number of companies when city needs something to be done. And basically asking these companies to provide the solution. So let's assume that we have n different engineering companies. Now, based on the prior experience with these companies. I mean, some of them are more qualified, some of them are less qualified. Well, it doesn't mean that more qualified company is better. What it means, the probability of being able to solve the problem might be different in different companies. Well, maybe there are some smarter people in that company. And usually they solve certain problems better than some other company. But it doesn't mean that this particular problem will be solved by these people and not solved by the other company. Maybe it's just the other way around. So, what city decides to do is the following. It gives certain amount of time, let's say a week, to the first company and say, solve me the problem. And the probability of solving the problem by the company number i is pi, or I usually use index n in this case. So, n is probability of company number n to be able to solve the problem during this certain, like a week, let's say. Now, what if during the first week, the first company is not able to solve the problem? Well, then the city says, okay, company number two. You have your week, try to solve the problem. And the probability for the company number two is p2, obviously. Et cetera, et cetera, up to the very last company. I mean, obviously the whole process is finished when some company solves the problem. But if it's not, then I'm continuing asking different companies one after another, one after another, up to the ends. And here is another complication. For instance, nobody solves the problem. Then the city thinks, well, maybe I didn't give enough time. So, let me start the loop from the beginning. And it gives another week to the first company if it doesn't solve to the second company, et cetera, et cetera. And there is certain limitation, take 10 periods. Now, if after 10 loops of all around nobody solves the problem, well, city says, okay, maybe it's such a difficult problem. I shouldn't really engage in this at all and drops the project. So, that's the condition of the problem. Now, what's the question? The question is, what's the probability of company number K to solve the problem? That's what we have to find. Now, it's company number K, which means I'm not going directly to company number K and asking to solve the problem. I'm asking first company number one, maybe it will solve, maybe not. Then company number two, until the turn goes to number K, in case previous are failing to solve the problem. And even if K cannot solve the problem in the first round, maybe after I loop through all of the companies, I will return again to the number K, maybe it will solve for the second time, et cetera. So, how can we approach this problem? This is probably a little bit more complex problem than previous ones. Here is what I suggest. Today, I'm introducing event Eij, which is company number i solves the problem on round j. Round means my first n companies failed, then again n companies failed, and j minus times all companies failed. But on a j's round, the company number i did solve the problem. So, let me first concentrate on this particular event and find its probability. So, as I was saying, if my company number i solves the problem on the round number j, it means that the previous j minus one rounds for all companies failed. What's the probability of this? Well, the probability of this is 1 minus p1. That's the probability of failures for the first company, then the second company, then all n companies failed, right? And then we have another round, and j minus one rounds, they're all failures, right? So, I have to really put it into the power of j minus one. That's the failure of j minus one round complete round. Now, on j's round, I'm talking about company number i which solved the problem, which means that the previous companies from number one to number i minus one failed. So, I have to multiply it by the probability of failure, the first i minus one companies. Okay? So, this is my complete failure on j minus y round. Then I'm multiplying because it's all independent events. Then my first i minus one companies should fail, and the i's company should succeed, and this is p i. So, this is the probability of my event e i j. The probability of company number i to solve on round j means the first j minus one round should be all failures, all n failures, and on the j's round, my first i minus one should fail and the i's should succeed. That's what it means that the company number i solved the problem on round number j. Okay? So, I can actually use this for the company number k. So, if I want to know the probability for the company number k to solve the problem on the round number j, that's actually this, but instead of i, I should use number k. That's what I'm talking about. So, I will use the product sign. That's a capital pi, Greek letter pi, one minus p n to n from one to n, and all this in the power of j minus one times product from n from one to k minus one, right? Oops, to k minus one of one minus p n. And finally, I have to multiply everything by p k. So, that's the formula for the case company. For the case company to succeed on the round number j, right? But that's not what I'm asking. I'm asking what's the probability for the company number k to succeed without specifying the number of attempts. So, what does it mean? Well, very simply. What I'm actually asking is for event e k succeeding for the company number k, which is a combination of e k one or e k two or, etc. e k and my last attempt is t. Remember, I have agreed that no more than t rounds I will try. So, I actually have to order these. They are completely mutually exclusive events, right? If the company succeeds on number one, on round number one, it has nothing to do with its success on round number two or three or t, right? So, basically I have to add, since events are mutually exclusive, the probability of or is basically a sum of the probabilities. So, I have to sum probability of event e k is sum, which is sigma, probability of e k j, j from one to t, where the p, the probability of this is this. So, that's the final result and that's the answer. It looks really very complex. I have a sum of the product and the product and the product, etc. So, it's a little complicated formula, but if you just consider it step by step, it's really very simple. It's basically a combination of mutually exclusive events. Each one of them is a product of certain independent events and that's how you derive the answer. I just suggest you to go through all these problems again. Just go to unizor.com to notes and there are problems and answers. Just to verify that you have really learned the material well. Thanks and good luck.