 Hi, I'm Zor. Welcome to Unisor Education. Continue talking about combinatorics. We are solving some problems related to combinatorics, primarily the permutation problems. This is the second series of the permutation problems. I suggest you to go to unisor.com to watch this lecture because there are some notes which are accompanying the lecture. And in addition, if you are a student who signed in to unisor.com, you can take exams and you can basically go through the whole process of having all these lectures in a row, basically getting a complete course of advanced mathematics for high school. Alright, so back to permutation problems. There are six problems. They are all relatively simple. And let me just start it one by one. So the problem number one, we have a certain number of letters. In this case, I have chosen a name of the game, tic-tac-toe as a collection of letters from which we would like to make new words. Now when I'm talking about words, I don't really mean English words. I mean just any sequence of characters which is using the characters, all the characters from this word or words, whatever. So in this case, we have letters, T-I-C-T-A-C-T-O-E. And all these letters must be used in different combinations to form new nine characters' words. I don't count dashes. So I'm just using the words, the letters from this word. The question is how many different words, nine characters' words I can construct from it. Well, what's a little twist in this particular problem? Why is it not nine factorial? Because this nine factorial is basically the number of all the permutations of nine characters. Well, it's all the permutations of nine different characters. In this case, we have three times the same letter T repeated, two times the letter C repeated. So if I'm changing the places among the T's, it doesn't really change the ultimate word. So if I will have the words T-T-T and then I-C-A-C-O-E, if I will take this word for instance. Now, no matter how many times I'm changing the places between these T's, it will be exactly the same word, right? So somehow I have to get it into account. So it's very simple actually. Let's always consider a group of three T's and another group of two C's. Any permutation which differs only by permutations within these groups is actually exactly the same, right? So I have to group all my permutations using certain number of... using the factors which are characterizing the number of permutations within the group. So if I have divided into let's say three groups and these are all similar and these are all similar and these are all similar, then what can I do? Well, I can permute all these, I can permute all these and I can permute all these and it will still be the same, exactly the same kind of the word. So if I will divide my ninth factorial by the number of permutations of the group of three T's, which is three factorial, and I also have to divide it by all the permutations of the group of C, C factorial, why? Because again, any permutation of C's within the group gives me exactly the same word, same as T's. So that's where I have to divide by them and that will be the final answer. So this is basically a typical problem on permutations when certain objects within the set and permutings are identical. So this is permutations with identical objects. Problem number two. I have six different subjects, mathematics, physics, chemistry, English, history, and geography. Okay, I have to put all these six lessons in these six subjects in a schedule for a day, let's say for today. Now, obviously they're all different, so there are six factorial different ways I can put them into a sequence of lessons for a day, right? Now, there is however one particular requirement. History and geography are taught by the same teacher, and out of court he was asking actually to schedule these two subjects together, so he doesn't really have a big gap between them. So my question now is how many permutations of these six lessons exist such that history and geography stands always together? Well, we can approach this problem differently. For instance, we can start positioning history and geography together. Where can we position them? Well, we can position them as number one and number two, group or number two and number three, or number three and four, or four and five, or five and six. So one, two, three, four, five. There are different positions of this pair, and also each pair can have it in both orders, history, geography, or geography, history. So I have ten different positions. Now, the rest, whatever I have left, I have four different subjects left and four different places. Wherever these two are, then other four places are available, right? So the other four subjects can be in any permutation among these four positions. So basically I have to multiply it by four factorial to get the total number. So ten positions of my pair, plus with each of them four factorial of different permutations of whatever is left. So that's how it's supposed to be, right? Now four factorial is one, two, three, four, two, one, two, four, so it's two, four, three. So that's supposed to be an answer. Let me approach this problem slightly differently. The question is whether I will come up with the same result. Okay, here is how I can make it differently. Let's consider, instead of six subjects, I have five objects. One, two, three, four, and five would be a combination of this. Now, five objects can be put into different sequence one after another in five factorial different ways, right? But for each of them, and my history and geography will stand together basically, right? But what I would like to say that for each position of the history and geography as a total, as an object, I can actually have them in different orders, history object, history first and geography second, or geography first and history second. So I have to multiply by two. Now five factorial is 24 120, so it's two times 120, so I have again 240. So slightly differently I have approached the same problem and get the same result, which basically confirms that I was right. That's actually very good if you can approach the problem from two different angles and get the same result. So that's the end of problem. Next, the problem is just the calculation program. Ten factorial minus nine factorial divided by eight factorial. Now, this is a simple thing just as an exercise of what factorial actually is. Now, factorial is the product of all the numbers from the beginning of one up to the number which I have. So this is the product of all numbers from one to ten. Now, here is eight factorial. So I can actually write it like ten times nine times eight factorial, right? Because this is all the numbers from one to eight and then nine and then ten. That makes ten factorial. Now nine factorial, I will use nine times eight factorial. And divided by eight factorial, which is eight factorial times 90 minus nine, ten by nine, 90 minus nine, divided by eight factorial. And this is 81. This is just a calculation, so you don't forget what factorial actually is. I told you these problems are very simple, right? So this is the proof of the simplicity. Okay, now I have the following problem. Well, there is a king who is in charge of three different kingdoms. We have upland, midland, and downland. And he has three daughters, Mary and Lisa. So he is putting together his will, his elderly. So in his will, he obviously decides to put three daughters in charge of three kingdoms. The only requirement is, for whatever reason, that N should not have, I don't know, the reason doesn't really matter. We are interested in all the different permutations of three princesses among three kingdoms, but those where N is not in charge of upland. Well, let's think about how we can calculate it. Well, one way to calculate it is the following. How many different permutations of three objects are, well, six factorial? So what I will do, I will put them in a row, Mary and Lisa, or N, Mary, Lisa, Lisa, Mary, N, etc. The first one will get upland, the second one will get midland, and the third one will get downland. So these are all different ways without this requirement about the N should not have the upland, right? So these are all combinations which are possible of distribution of three kingdoms among three princesses. Now, obvious condition is that no princess should be in charge of two kingdoms, one by one basically, right? So question number two, which distributions we don't really want to have? We don't have distributions when N is in charge of upland. So these are bad distributions which we should exclude. How many of them are? Well, if N is in charge of upland, then I have only two princesses in charge of two lands, and I can put them in any order, Mary, Lisa in charge of midland downland, or Lisa Mary in charge of midland downland, right? So I have basically two different ways, two different distributions with N in charge of upland. So this is a bad distribution which I have to subtract and there are two of them, right? Six, sorry, it's not six factorials, it's three factorials which is equal to six. I had in mind the calculation. So I have four different ways. So basically what I'm saying is that to get the number which we want in this particular case, what we did, we took all the permutations and subtracted those permutations which we don't want because it might be a little bit difficult to think about how to do only the right way. Sometimes it's easier to do the wrong way and subtract it from the all the different choices which we make. And this is this example of that type of a problem, all right? So first all the permutations which is three factorial which is six and I subtract two when N is in charge of upland which we should really avoid according to the will of the king, all right? Next, okay, you have accumulated 12 science fiction books of your three favorite writers. Three Isaac Asimov, four Ray Bradbury and five Arthur Clarke. So you have 12 books, three of Asimov, four Bradbury and five Clarke. You have to put it on a shelf but obviously we'd like to put them on a shelf in such a way that the books of the same author are together. Let's say you have three Asimovs and then four Bradbury's and then five Clarke's or four Bradbury's, three Asimovs and five Clarke's or any other way. The question is how many different ways of putting these books on a shelf when the groups are preserved by author, how many exist? Actually this problem reminds one of the previous ones where I have this tic-tac-toe word. When we have something which we call well identical, it's not really identical but anyway it looks very close to this. All right, so the total number of different distributions is 12 factorial but this is not really the distributions which we are interested in. This is not the way to approach this problem because then we cannot really decipher which distribution, which position is good and which is bad. So this is not a good approach. What is the good approach? Well, let me start it differently. Let's consider this problem not as 12 books but as three groups of books. Now, why am I grouping them? Well, because I know that the books of the same author should be together, right? So it should be either Asimov, Bradbury Clarke or Bradbury Clarke, Asimov, or etc. So I have three different groups which I can put in any order. First, I will order by group and I have, since I have three different authors, I have three factorial different ways to put these three authors in a row. So if these are letters ABC, so it's ABC, Asimov, Bradbury Clarke or Asimov, Clarke, Bradbury, or Bradbury, Asimov, Clarke, or Bradbury Clarke, Asimov, or Clarke, Asimov, Bradbury, or Clarke, Bradbury, etc. So these are all six combinations. There are no others, right? So that's how first I position the authors. Fine, this is done. Now, with each of these distributions, let's say, Asimov, Bradbury, Clarke, I can put each group within each group in any order, right? So, which means I can actually, I can permute, I can change the places within the first group and within the second group and within the third group. And these are completely independent ones, which means I can actually multiply them. So, if I will multiply this by all the different permutations within the group of the Asimov, which is three factorial, since there are three books, and within the group of Bradbury, which has four books, so it's four factorial, and within the group of Clarke, which is five factorial. So that would give me a complete number of all the permutations which I'm actually interested in. So, first I put my groups in position, there are three groups, and then I can put into certain position books in every group. And since they are independent, with each of these positions, can be each of those positions, I'm multiplying them. So, that's the answer. Now, I didn't come up with a real number, I mean, that's something which you can do yourself if you really want. All right, now, next and the last problem is how many four-digit numbers are divisible by five? So, four positions, four-digit numbers, and they are divisible by five. So, let's just think about what our choices are. Well, we have four positions, right, for four digits. What can be the first digit? Well, it can be anything but zero, right, because we are talking about four digits, so the first one cannot be zero, so everything counts, yes, so it's from one to nine. Now, what can be the second digit? Anything from zero to nine. Same thing, the third. Now, what can be the fourth digit, the last one? Divisibility by five means it should end up with either zero or five, right? Numbers which are divisible by five have the last digit, zero or five. That's a necessary and sufficient condition for divisibility by five. So, these are our choices. They are independent, which means we have to really multiply the number of choices. So, it's nine times ten times ten and times two. That's the answer, which is what? Ageing problems. Well, that's it. I do recommend you to go to Unisor.com and try to solve these problems yourself now after you have listened to this lecture. Well, actually it would be even better if you did it before you listened to this lecture, but anyway, since we are already at the end. And don't forget that if you sign on to Unisor.com as a student and you have a supervisor or a parent who is in charge of your educational process who can enroll you into the course and you can take exams just to verify how you are progressing on your way in advanced mathematics. Everything is free, so you're welcome. Thanks a lot. That's it for today and good luck.