 Hi, I'm Zor. Welcome to Unisor Education. We are talking about combinatorics right now, more precisely about permutations, even more precisely about partial permutations. Well, obviously this lecture is on Unisor.com, which I strongly recommend you to use just as a course of mathematics for well, for young students. All right, so what we have learned so far about permutation was that if you have a group of n different objects and you would like to put them in certain order, well, you have to pick the object number one out of this pile, right? So you have n different choices. With each of these choices you have n minus one choices for object number two because object number one is already chosen, right? So it's picked from the pile. You have n minus one left. So you have n minus one choices for the second one. Now with each of these we will have n minus two choices for object number three, etc., etc., down to the very end of this line, and that gives you n factorial different permutations, different positioning, if you wish, of this set of n different objects into an ordered set. n factorial different ways of ordering, if you wish. All right. So we have number of objects and we have certain places we are putting them in. Place number one, place number two, place number n. Well, this lecture is about a slight deviation from this particular task. What if we don't have as many as n different places? We have to place certain number of objects from this group into a smaller number of places. Let's say we have k places. Now so basically our task is not only to position certain objects in certain order, but we have to actually pick only k objects out of n and put them into these positions. Well, we will just do exactly the same logic as we used in case we want to place all of these objects into an ordered set. Let's just examine how many choices we have. For object number one out of these k, we have to pick out of the whole set of n objects, which means we have n different choices. With each of these we have n minus 1 choices for the next object, object number two. So this is number one, this is number two, n minus 2 obviously, etc. Now, what is the last member? It's supposed to have a number k, right? Because we have only k places to put our object. So the numerical sequence would be this is number one, this is number two, and the last one would be number k. Well, as very easily seen, it's n minus k plus 1. Well, this is the formula, basically. It's called a number of permutations from n objects k, k permutation, well, we have to have objects, k objects out of n. That's what it is. So the first index I use the number of objects given, and the second index is the number of places to put these chosen k objects in. Well, sometimes it's written pay p and k on the top or on the left. Sometimes there are different notations. Sometimes it's just a function p of n comma k. So whatever the notation is, this is the final formula which we have derived. Now, I usually insist on proving these things, and we have proved by induction the formula for permutations of n objects, regular permutations. Now, this is called partial permutations, and the formula can be very, very easily proven by induction by, let's say, by k or something like this. So the logic is exactly the same, the proof is exactly the same, logically speaking, obviously, as the proof for the formula for the regular permutations. Now, the only thing which I would like to add is I would like to make this formula a little bit shorter. You see what I did here? I cut it. So what did I cut? Let's just examine. What is before this cut line? It's n minus k plus 1. What's after? It's n minus k. Right? So out of all the numbers from 1 to n, I'm using only these ones and these from 1 to n minus k I'm not using, which means I can actually say that I have divided the whole product of all numbers from 1 to n, which is n factorial, by the product from 1 to n minus k, which is n minus k factorial. So this is exactly the same formula. This one is the same as this one. I'm just making longer this product by all the numbers from 1 to n minus k and then I divide basically by the same number from 1, the product from 1 to n minus k. So this is a little shorter formula. Now, I don't want usually to tell you, okay, remember this formula or something like this. Now, remember the way how we derive this formula, the logic of this formula, how many choices are for the place number 1, how many choices for place number 2, etc. This way, you will always be able to repeat the logic whenever it's necessary. You just have to recognize the problem as the problem of partial permutations and then just repeat the logic. I do encourage you to not remember formula. I do encourage you to remember the logic behind this formula. Now, here we have a little twist which I wanted to talk about. So we are talking about partial permutation of k objects out of n. Now, if we are talking about partial permutations of n objects out of n, well, that's actually the regular permutation. That's all the different regular permutations the set of n objects can have. So this is supposed to be equal to our original formula of number of permutations of n objects. Partial permutations of n out of n is exactly the same as regular permutation of n objects. Now, let's talk about this formula. Now, the formula before that, the formula which says this, this formula obviously is correct in both cases because if k is equal to n, it would be n minus n plus 1, which is 1. So we have a product of all numbers from 1 to n. But this formula gives us a little different. So if n is equal to k, then this formula gives zero factorial, right? n minus n minus n. Wow, zero factorial is something new. We always excuse the noise. Now, we always are saying that factorial is the product of numbers from 1 to our number. Well, this is zero factorial. So it makes absolutely no sense in that particular definition. So what do we do? We have to get n factorial, right? Because n comma n partial permutations of n out of n supposed to be n factorial. So how can I get n factorial by one and only one way? I have to define zero factorial as equal to 1. Well, it seems to be quite artificial right now. First of all, I can define zero factorial because it has absolutely no relationship with the original definition of the factorial. So the factorial for numbers 1, 2, 3, etc. is defined exactly as I said before. The product of all the numbers from 1 to that number. The factorial of zero is not defined, so I can just introduce a new definition. Now, as I said, it seems to be a little artificial. But well, there are two considerations I would like to make, two points. First of all, something like 3.5 to a zero degree. We all know that everything in zero degree, the power of zero is equal to 1. By definition, basically. At the same time, I would like to say that higher mathematics do justify this type of thing. You see, the factorial as I defined it right now, 1 factorial is 1, 2 factorial is 1 times 2 and factorial is 1 times 2 times etc. And this is the function which is defined only for natural arguments. Now, there is a special function in higher mathematics. It's called gamma function. Which basically for all integer positive numbers, for all natural numbers, is exactly equal to n factorial. But it's defined for every number in between. And in particular, this function at zero is equal to 1. As well as this function at 1 is also equal to 1. So, if you have the graph of n factorial, right now I can say that 1 factorial is 1, 2 factorial is 2, 3 factorial is 6. So, these are points. And this function, the gamma function defines it this way. Actually, it's this way. It looks like a little parabola here. So, the zero factorial equals to 1 is justified by existence of this gamma function and also some considerations which we had in some other departments of mathematics where things also didn't seem to be very natural, but nevertheless we accepted them. So, accept that zero factorial is 1 by definition, end of story. Forget about gamma function, forget about all these higher mathematics. We just define it on elementary level. Zero factorial is 1 and the factorial for all natural numbers is equal to a product of numbers from 1 to that number. Okay. With this definition, this is true and there is no problem with any formula using this using the product from n to n minus k plus 1 or using a shorter formula n factorial divided by n minus k factorial. Well, this is the theory of partial permutations. Now, let's just have a couple of examples just to make sure that we understand everything. Alright, example number one. I have four examples here. You have ten dishes on the menu. So, you came to a restaurant, you have ten dishes on the menu and you would like to have a dinner. So, you would like to have three dishes. I'm not right now talking about main and appetizer, etc., etc. Let's just be simple. There are ten dishes and you have to pick three and this is the dinner which means you have to take the first, the second and the third. Three-course meal. Well, this is a typical problem of partial permutations because for the first dish you have ten choices. Okay, after this is done, you have only nine choices left and we do assume that we don't want to eat the same dish twice or three times in a row. Alright, so it's always different dishes supposed to be. Now, so the second course you have nine choices. So, with each of these ten you have nine the second and with each pair of 90 of the first and the second course you have eight for the third course. So, your result is 720. That's basically a typical partial permutation problem. And you have a couple of others, very easy one. Okay, now we have a traveling salesman who has to visit six different stores with samples of the products he represents, some manufacturer, whatever. Now, in the morning he thinks that, well, the stores are positioned in such a way that he can visit only four stores to visit today. So, now he has to, number one, choose which store stores to visit, number two in what sequence, right? So, that's exactly the problem of partial permutations. So, out of the six stores he has to visit, he has to pick one as the number one and that would actually give you six choices, right? So, out of these six he has to pick which one he will visit first, then he has to pick which one he has to visit the second and he has only five choices left because one is already visited. Then for number three store he has only four choices and for number four he has three choices. If you multiply them you get something which you will calculate and that's the answer. That's how many different choices, plans for the day he might actually have. So, he has this number of different plans for today of how to visit the stores with his products. Next, you have a word. I chose the word money and mind you all that letters are different. It's very important and I always emphasize that when we are talking about permutations, so far we were dealing with permutations of different objects. When objects are, some of the objects are identical would be a subject of another lecture. Okay, so you have the word money. It has five letters, right? And you have to construct different three-letter words like M-O-N or N-O-Y or Y-M-O, etc., etc. So, how many different three-letter words can be constructed out of these five different letters? Well, exactly the same logic. You see, I'm repeating the logic again and again because I would like you to remember the logic, not the formula. So, how many choices we have for the first letter? Well, five, obviously, right? With each of these, we can have only four letters left, so we have four different choices for the second letter. And for the third letter, correspondingly, we have one less, which is three. And that's the result, which is what? Sixty. So, sixty different three-letter words we can construct out of these five letters. And obviously, I'm not talking about which words do exist in English, language or not. We're talking about formal words. All right. And the last example I have, which is, again, exactly the same type. Okay. You bought an old house, which needs renovations, okay? So, you have invited somebody who basically listed everything, which needs to be done. So, there are twenty different renovations. Twenty different renovations, that's a lot of work. We can do only once a week, let's say, one renovation a week. So, let's think about the first months. So, the first month, it has four weeks and approximately. So, we can make four different renovations. So, the question is, what are, how many different plans for the first month's renovation? We can, in theory, have. Well, again, if we'll consider that all renovations are more or less requiring more or less the same amount of efforts, and they're all different, of course, we have a lot of choices. For the first week, we have twenty different choices. We can pick any one of those and do it. With each of them, we will have nineteen choices for the second week renovation efforts, right? And for the third, we have eighteen and then we have seventeen. So, for four weeks, we have that many different combinations of different plans which we can make for the months, for the first months. For the second months, it would be sixteen, fifteen, fourteen and thirteen, the product of these numbers, because the number of renovations is gradually decreasing. But for the first months, it's this. Okay. That's it. That's all I wanted to talk about as far as the partial permutations are. So, again, think about the logic behind. The logic, basically, is multiplying and diminishing numbers from the biggest to whatever is necessary. If you want, you can always derive the formula of this in a factorial fashion, meaning that zero factorial is equal to one. And obviously, I do recommend you to go to unizord.com and go through the notes for this lecture and whatever the problems will be presented. So, thanks very much and good luck.