 Hi, I'm Zor. Welcome to a new Zor education. We continue talking about combinatorics and solving problems. This particular lecture is more of a theoretical character, I should say. You know, I don't like really to memorize formulas. Now, the combinatorics has certain formulas like number of different combinations from something by something, number of permutations, partial permutations. I will actually remind you all these formulas right now before addressing certain problems. But at the same time, the problems which I'm presenting in this particular lecture are of some kind of illustrative character to basically help you to understand the roots of these formulas and how to derive them basically knowing something about the combinatorics. So you don't really have to memorize them. You can always derive them using certain logic and logical approach to combinatorics. Now, all these problems are presented, of course, as a lecture on unizor.com. This is the website and that's where I am recommending you to view this lecture because it has notes right on the side of the lecture. And if it's a problem, for instance, there is an answer first. So you can always try to solve the problem yourself and check the answer and then go and read the logical part of this explanation actually, which basically is the same as I'm presenting right now in video format. All right, so let's go back to the business. First of all, let me talk about the permutations. The first problem which I have is basically prove that number of permutations of n different objects is equal to n and number of permutations of n minus 1 objects. Well, if you know the formula for number of permutations and the formula is very simple, that's the simplest of all, the product of all the numbers from 1 to n, the n factorial. Then it's kind of obvious that p n minus 1 is equal to n minus 1 factorial, which is 1 times 2 times 3, etc., times n minus 2 times n minus 1, right? Now this is 1 times 2 times 3, etc., times n minus 1 times n, right? So obviously these are exactly the same as these and that's why n factorial, which is this, equals to n multiplied by n minus 1 factorial. Now is this a proof? Well, this is a proof obviously, if you kind of know that this is the formula for number of permutations, but I would like actually you to come up with this particular formula logically, because if you do, then the formula that number of permutations of n objects equals to n factorial comes naturally, right? Because this is basically a recursive equation. So let me first stop on this and then we'll do this recursive type of thing. Now, why is number of permutations of n objects is n times greater than number of permutations of n minus 1 objects? Well, let's think about this way. Let's consider n is equal to 4, for instance, in our, just for our example. So n minus 1 is 3. So this is 3 objects, 3 different objects, all right? And our force objects, force object is something like, let's say, rectangle. Now, with each position of these three objects in some order, which actually means with each permutation, you can position the force object immediately before the first one. So it would be a rectangle, triangle, square, and circle. Or you can position it after the first one, or after the second one, or after the third one. So if you have n objects, or rather, no, if you have n minus 1 objects, then you can have before the first one, and then after first, after second, etc., after n minus first. So, altogether, there are n different places, this one, this one, this one, and this one. So if you have n minus 1 objects, then the nth object can be positioned at n different places, thus making a certain permutation of n objects. So that's why the number of permutations of n objects is exactly n times greater than the number of permutations of n minus 1 object. Because for each one of these, there are n different positions of the nth object, and that's why we have n different permutations. So the number of permutations is n times greater. All right, now, having this as an explanation, basically, of what permutation actually is, and having the beginning, the initial condition, the permutation of one object is actually one, because there's only one place where you can place, right? So what does it mean? It means that p2, number of permutations of two objects, is equal to 2 times permutation of one object, which is 2 times 1. p3 is equal to 3 times p2, which is 3 times 2 times 1. p4 is equal to 4 times p3, which is 4 times 3 times 2 times 1, etc. And that's why pn is n factorial, which is the result of multiplication of all numbers from 1 to n. So that's what I think I was trying to convey, the intuitive approach to permutations. This is kind of intuitive understanding of how the permutations are built up with the number of objects growing. And that's basically the result of the formula, which we were mentioning many times before, that the number of permutations of n objects is the result of multiplication of all numbers from 1 to n, right? Okay, that's the problem number one. Let's go on. So again, in this lecture, I'm trying to go through some kind of intuitive and logical approach to all these formulas and explain why they are what they are. Next. Okay, now we're talking about partial permutations of k objects out of n. Okay, first of all, what is a partial permutation? Now again, by the way, if you are talking about the formula, then obviously the formula is exactly what it is. n factorial divided by n minus k factorial. That's the formula for partial permutations. And n factorial is this and n minus k factorial is this, right? So the formula itself is obvious, but I'm looking for logical explanation of this formula, right? So let's think about what exactly is a partial permutation. So we are supposed to take only k objects out of the n and consider them in some order. We don't care about whatever is left after we extracted these k. Now you can imagine that the way how we approach this is the following. So you have a certain number of objects and objects. Okay, now we are supposed to pick k and put it into a certain order. Well, how can we do it? Well, there are many different ways. What I'm suggesting is the following. Let's put all of these n objects in some order and cut first k. Well, that actually makes number one a choice of objects and number two the order of objects, these k objects, right? Now the number of all different permutations of n objects is obviously n factorial, right? As we have just recently recalled. Now, but let's just think about it. If I will change the order of these n minus k objects, it doesn't change the composition of these k and it doesn't change the order of these k. So all the different permutations of n objects which leave these in place and somehow change the order of these n minus k is completely irrelevant. It produces exactly the same combination. So they must be actually consolidated into one partial permutation. So all the different combinations, all the different permutations if you wish of n objects which leave these exactly in place but change the order of these guys in any way we want. Make up together one and the same partial permutations of k objects. Now how many of these are permutations of only these? Well obviously n minus k factorial, right? Or p of n minus k. So that's why the total number of permutations of n objects, we should divide by the number of permutations of only these objects because all of these constitute one, all of these n minus k factorial constitute one partial permutation because the composition and the order of these k remain the same. So that's the logic behind it. So whenever you're asked for, okay what's the formula for partial permutations of k objects out of n, well if you don't remember the formula just think about how can you really extract these k objects and put them into certain order. Well for instance you just do all the permutations of different, of the all n objects, cut the first k and now you're thinking well you do remember the total number of permutations n factorial but then you think that all the permutations of this group which is n minus k factorial really produce the same partial permutation and that's why you have to reduce the total number of permutation in this number of times you can permute, you can change the order of these n minus k objects. So that's the source of this and obviously this is equal to n factorial divided by n minus k factorial because the formula for permutation, regular permutations pn, you always have it in your mind. I mean that's the easiest formula and you always remember it and you don't really have to remember all other formulas because they're all derived using these logical considerations. Next, next we have to prove this one. Now let's just recall that this symbol is number of combinations of k objects out of n different objects. Now what's the difference between this and this? This is number of combinations, this is number of partial permutations. In this case we select the k objects out of n and put them into certain order. In this case order is irrelevant. So any combination which contains exactly the same objects but in different order is exactly the same combination. So let's do exactly the same thing and exactly the same logic. So you have a certain number of objects, you put them into certain order and you basically cut the first k. Now you don't really care about anything of this. All you care is that you have chosen a certain number of objects here. So what this number actually gives you is the total number of compositions of k elements without the ordering them. But let's just think about if you order them in one way you will have one partial permutation of these objects and if you order in another way you will have another partial permutation of these k objects which means that if you take the number of combinations of these k objects then with every combination you have k factorial which is number of permutations of this of different partial permutations of these k objects. That's why this number is k factorial greater than this number or if you wish you can just put it instead of k factorial you can put pk which is exactly the same thing. All right. So again this is the logic behind it. This gives you the composition just the just the combination of certain numbers and this multiplies this number of different combinations by number of different orders these k objects can be put in. So that's my solution. That's the next explanation if you wish. And the last problem which I have is to explain this. So again I need some logical explanation why this is true. Again let me just use exactly the same approach. How can I choose a group of k objects out of n? Well here is how I suggest to do it. I put them in order and there are a number of permutations of different orders of n objects and cut the first k and these are the ones which I have selected. Okay but now let's think about it. If I change the order of these guys in any way I can and there are pk and k factorial different ways to change it. My combination actually remains exactly the same. I would choose exactly the same number because when I'm talking about combinations the order is irrelevant. So all these different permutations are producing one particular combination of k objects. At the same time I can change the order within this group any way I want and they still have exactly the same k objects chosen in my group. So I can do the k factorial different permutations here and n minus k factorial different permutations here and with each of them I can do each of those and it still gives me exactly the same number of the same composition of this group of k elements. So that's why what I'm saying is that out of all the different permutations which is n factorial the group which contains exactly the same elements here and exactly the same elements there and I can change the order of these all these different permutations produce exactly the same combination of these k objects. That's why I have to divide it by the product of these two by the k factorial and n minus k factorial. So again the formula for this thing is n factorial divided by k factorial and n minus k factorial it's derived using this logical explanation. So everything actually starts with a permutation and then you divide or multiply whatever is necessary to to derive the formula which you need. All you have to understand is the logic behind it and there is a definite logic which leads to the formulas like this. That's why you don't really have to remember these formulas you can always derive them on the fly. Okay, I would recommend you to do again this type of logical explanation but in this case try to write it down. It's very interesting actually phenomenon that when the person writes down the logical explanation which he has in mind he understands it clearly much clearer than if he just you know thinks about all this logic. On the website on theunisor.com in the notes for this lecture I was trying to to do exactly this. I was actually writing the logic which I'm talking about right now. I was writing it among the notes. So I do suggest you to write it yourself. I mean you can read whatever I have written but what's important is to rigorously approach this with your own logic and write it down and then you can compare it with whatever logic I present in my notes. Well, I consider my notes although not ideal but relatively okay and try to do something which is on the similar level of rigorousness and logic. That would be a great exercise for you. Well, that's it. Thank you very much and good luck.