 Hi, I'm Zor. Welcome to Unizor Education. Continuing the combinatorics topics. Today's lecture is about simple permutation problems. They are really simple. I do strongly recommend you to, if you didn't do it before, to go to Unizor.com website where this lecture is presented with notes and all the problems which I'm going to solve right now are presented among these notes with actually logic to solve it. And I recommend you to try to solve all these problems just yourself. Don't read the solution which is also presented. But only after that it makes sense actually to listen again to the lecture, to compare your solution to whatever I'm presenting here. Because the whole thing is actually aimed as a tool to develop your logic. So this is all about logic. Combinatorics is very logical thing. So I recommend you to do it yourself first and then go to the lecture. Alright, so let's just do one by one. I have six problems to discuss. They are really simple. So yes, and one more statement which I would like to make. Don't try to remember the formulas of the combinatorics. Probably the only formula which you really might remember is the number of permutations of n. Different objects is n factorial. It's simple, it's like it goes immediately into your mind. But everything else, the number of combinations with repetition, without repetition, all logically derived from this. From this one and only formula about number of permutations which is n factorial. So what you have to remember is not the formula but the logic which leads to any formula of the combinatorics. So that's very important. And that's why I'm not really using any formula here. Like calculate how many different combinations from 5 by 2 or something like this. I'm not asking about all these calculations of the formulas. But I am presenting logic behind the solution. And that's very important. So forget the formulas. Now, three digits numbers. Okay, how many different three digits numbers are between 500 and 799? Inclusive. So both ends are included. Alright. Well, let's just think about it. All these numbers start with either 5 or 6 or 7. So for the choice of the first digit of our three digit number, we have three different choices. Now, everything else actually is not fixed, which means any other place can have any other digit. 00 or 53 or 99 or whatever it is. So all other combinations are valid. And how many combinations we have? We have from 0 to 9 as the second digit and from 0 to 9 as the third digit. So our choice is among all these numbers which have three choices for the first digit, 10 choices for the second and 10 choices for the third. So altogether it makes three times 10 times 10 different choices, different three digit numbers which are among these. Well, you can obviously say that it's very simple to calculate because if you need all the numbers between this and this, you have to subtract from 800 500 because this is inclusive on both ends. So you have to subtract from 500 800 and you will get 300, which is exactly the same as this one. Yes, obviously you are right. And the purpose of this particular problem was not the derivation of the number 300, which is kind of obvious from the subtraction thing, but to present the logic how to derive it combinatorically. And that was the only purpose of this problem. Okay, now the second problem. Exactly the same problem, but I'm interested only in even numbers. Again, from the general considerations, you can say that the even numbers are basically half of whatever we have here, right? So if all together I have 300, the first one is even, the last one is odd. So basically we can break them into pairs and each pair contains even odd, even odd. So half of this, it's supposed to be 150, right? Half of the 300. But let's check if we can derive this particular number combinatorically. Now, what is the main characterization of the even number? Well, it's the last digit which is supposed to be even, right? So if the number ends with zero, two or four, six or eight, it's even. I'm talking about only the last digit. Everything else is really irrelevant, right? So for the third digit we have, in case we are looking for even number, zero, two, four, six and eight, which is five different choices, here I have to have by five, which is obviously equal to 150. So we can derive exactly the same 150 using a purely combinatorial considerations. Three choices for the first digit, ten choices for the second and five choices for the last, the third digit. And we get 150. All right, that's the second problem. Let's move on. Third problem. Okay, let's consider you have 52 cards, regular deck of cards. Now, well, let's say you are poker player, which means you are looking for number 21. Well, there is a famous literary work, which is called the Queen of Spades in Russian Literature. And so there was a guy, a gambler, who was looking for a combination three, seven and eight. So he got three, he got seven and then instead of eight, instead of ace, he's got the Queen of Spades. And that basically the whole fiber of this particular literary work. So, but let's think about the combination three, seven and eight. My question is, let's say we shuffle the cards and then the first three cards are three, seven and eight in this particular order. My, so the question is how many different combinations of three, seven and eight as the first three cards in this order exist when you shuffle the cards, when you shuffle the deck of cards? Well, let's just think about it. For the first card, which is supposed to be three, I have three choices, sorry, four choices. Four choices are clubs, diamonds, hearts and spades, right? So we have four different trees, three of hearts, three of spades, etc. Now, next is, I need the seven and there are also four sevens. Again, seven of clubs, of diamonds, of hearts and of spades. So I have to multiply it by four. So I have four choices for the first card, four choices for the second card and four choices for the ace. Because again, there are four different aces. Now, all other cards can be in any order. I don't really care and all these permutations of other cards. Now, I have three out of 52 I fixed. So the rest is 49. So all other 49 cards can be in any order. So I have to multiply it by 49 factorial. That's the only formula and factorial, which I encourage you to remember. All right. So the total number of different card decks actually, when the top three are three seven and ace are this number, whatever this number is. The number actually. All right. So again, four choices for the first, four choices for the second, four choices for the third and 49 factorial for everything else. That's the total number of different permutations of deck when the first three cards are three seven and ace. Next problem. Next problem we have 10 participants in some competition. Now, this competition has a gold and silver and the bronze medals. All right. So my question is out of 10, out of 10 different participants in the competition. Well, the results can be obviously different. Different people can take different places. So my question is how many different results of the entire competition are possible when we are fixing the first three places? How many different results of the medal distribution? Let's say, yeah, that's a proper way. How many different medal distributions among 10 people exist? Right. Again, it's just the number of choices. How many choices do we have for the gold medal? Well, it can be any other of 10, any participant in the competition out of 10. Now, when this is chosen, when the gold medal is chosen, there is only nine participants which can get the silver medal. And after the silver medal is assigned, we have eight people to get eight choices actually for the bronze medal. So basically what I'm saying is that this is 720 different ways how three medals can be distributed among 10 participants. So basically you can envision it in the following model. Let's say you have 10 participants, so you put them into order. Number one, number two, number three, number four, five, six, etc. So how many different permutations, how many different ordering we can have from 10 people? Well, obviously 10 factorial, right? Now, but the first three are fixed. So no matter how these guys are permuted, the first three will have exactly the same medals and it's the same distribution, right? So I have to 10, 9, 8, 7, right? So I have to divide it by 7 factorial, which is exactly the same as this 10 factorial is the product of all numbers from 10 to 1 and this is from 7 to 1. So whatever is reduced and 10, 9, and 8 remaining. So that's another kind of consideration. So you have 10 factorial, but we have to divide by 7 factorial because any permutation among these non-medal receivers is basically producing the same distribution of medals among the participants. So that's the answer. Next. Oh yes, by the way, this is a typical example of partial permutations because we are permuting only the 3 out of 10 in some order. All right, we have rows of flowers. We have 20 different rows of flowers. Okay. So you are a gardener and you have 20 different rows where you have to put flowers. Your task is to put the same number of flowers in every row and you would like to have all rows different. So if one row contains flowers like A, B, C, D, and E another row should contain these flowers in some different order. So that's the purpose. The purpose is to have all 20 rows different. So no two rows are identical. Question is how many different types of flowers, bushes or whatever you call it, how many types of flowers you should buy to satisfy this demand? Well, let's just consider one. Is one sufficient? No, obviously, because if you put one the same to all 20, it will be all 20 identical. Next. If you have two, so you have two types of flowers. Well, you can put one flower and then the next flower into the first row. Now you would like the second row to be different. So you can probably put the second type on the first place and the first type on the second place. Then the third row comes and you're out of choices. There are no more choices. It's either number one, number two or number two, number one. That's it. So again, question is how many at minimum of different types of flowers you need to basically make these rows differently? Well, let's just think about it. It's really simple. If you have n different types of flowers, n different types of flowers, you can position them in n factorial different ways, because this is the permutations. So our purpose is to buy n as small as possible, but such that n factorial should be greater or equal to the pointy rows which we have. So one and two are definitely too small. Three factorial is six, which is too small. Four factorial, which is one times, two times, three times, four, which is 24. Well, that covers it. So if you have four types of flowers, you can position them in different orders. And there are 24 different orders, which is sufficient to make 20 rows of four types of flowers each. They're all different. All right? So basically what I'm talking about, you have A, B, C, D, you have A, C, B, D, et cetera, et cetera. All the different combinations. They were all different and there are 24 different combinations. And these are different types of flowers which you can put in. So the answer is four. Okay. Okay, it's another typical partial permutation problem. Let's say you're graduating from the med school and you have to have a hospital where you will go through your residency program. Now let's assume there is certain agency. You submit your documents to this agency and they are helping you to find the place for your residency. Now the agency is in charge of 20 different hospitals. Now you are supposed to say which is your number one hospital, your choice, and which is your number two hospital. So you have to make two main choices. Now the question is, obviously, how many different partial permutations, if you wish, how many different choices of number one and number two hospitals you can make out of 20? Again it's a typical partial permutation problem and again the typical logical consideration is for the hospital number one you have 20 different choices. And for the hospital number two you have, obviously, 19 different choices. So that should be the answer. Now a different approach can be, okay, I'll put all my 20 hospitals in a row from the first to the 20s. Now there are 20 factorial different ways of putting my 20 hospitals in some order. And I cut the first two. This is number one, this is number two. Now permutations among these 18 is absolutely irrelevant, which means I have to divide the total number of permutations by these to get the number which is exactly the same as this one to get the number of permutations I'm looking for. So that's the result. And this is my last problem. What I would suggest if you didn't do it before, go to the Unisor again to the website, to this particular lecture and read the notes. Try not to read the solutions which are presented there as well. Just the problems themselves. And again try to come up with some your own solution and then check against the answer which is presented there as well. Obviously I always suggest you to go to the website and sign in as a student. You need a supervisor or a parent who will be in charge of your educational process because that would allow you to take exams and would allow your parent or supervisor to basically make a judgment and yourself actually to make a judgment on how well you progress in your education. And again don't forget that all these problems and the logical considerations, etc. they are not something which you exactly need in your, will need in your practical life in the future. These are all exercises for your mind. Just to develop your brain as much as physical exercises in the gym help you to develop your muscles. So that's the proper attitude I would say towards problems like these. So hopefully you're not gamblers for instance, you're not facing the difficult calculations of card combinations, etc. It's only to develop your logical and analytical abilities. Thanks very much and good luck.