 Hi, I'm Zor. Welcome to Unizor Education. Continuing topics related to permutation. And today I would like to talk about permutations with repetition. Now, let me explain what it is. In the previous lecture, when I was talking about permutations, I was actually discussing the idea of having certain number of objects put into some order. And now the number of variations of how we can put all these objects into a certain order was basically n factorial, where n is the number of objects. Now, why? Because we have to choose which object is number one and we have n possibilities. Then, after this is done, this step number one is done, we have remaining n minus one objects in our set. And so for the candidate for number two, we have n minus one choices. So we have to multiply by n minus one if we would like to know how many different pairs we have. Now, we continue this process and every step we diminish the number of choices because something is already taken from the pile. So it goes all the way to one and that's what makes n factorial. Now, permutations with repetition basically means that we are not really physically extracting the object from the pile and put as object number one and then object number two, etc. We are copying this. Now, the example can be something like this. You have only two letters a and b and you would like to construct words of the lengths three, three letters, choosing these letters. So I'm not really like taking out the object, I'm just using. So I'm copying from here or from here to the place number one. And there are basically in this case two choices, right, a or b. Then I pick for the letter number two again from the same set, a or b. And it's also two choices. And then again for the number three spot, I will have again two choices a or b. So every time I have exactly the same number of choices, the number of choices is not diminishing as in the regular permutations case. When I'm extracting from the pile and put as this is number one, this is number two, etc. diminishing the pile. Now here I'm not diminishing anything, I'm just using these a and b. So the number of choices remains exactly the same. Now instead of therefore multiplying these number of choices, diminishing number of choices. In case of repetition, we are multiplying the same number again and again and again. So the point is that in this particular case it's n to the power of n. Now if we would like to choose not exactly the same number of objects to use. Like in this case we have only two objects, but the number of the lengths of the words which I'm making is three. So this is not necessarily to have exactly the same number. I can have any number since I am using with the copying basically methodology. I can have any number of objects from this set in the group. Now I can have let's say the group of the lengths k. In this case k is equal to three. Well whatever the lengths of the group is, for every member I have exactly the same number of choices. And if the length of the group is k, so it's n to the power of k. Now in this particular case, the number of letters in every word is three. So I have two choices for the first letter and for each of them I have two choices, the same two choices. For the second letter in the word and for every pair I have exactly two choices for the third. So it's two times two times two which is two to the third degree. So n in this case is equal to two. That's how many objects we have in our initial set. And k is basically the lengths of the group we are putting together using these particular objects. So that's the formula. This is a generalized formula which obviously should be proven and the obvious methodology is proven by induction. I'm not going to do it right now. I would rather leave it to you as an exercise. And the logic is exactly the same as the logic which I was using to prove the formula for regular permutations, the n factorial in the previous lecture. The only difference is that the number of elements in the initial set is not diminishing as steps are covered one after another. It's the same n and n and n. And we have to make actually any number of steps depending on what's the size of the group we want. So induction by let's say by k in this particular case, what is the length of the group is one for instance. Then obviously we have n choices, what if the group length is k, then we have this, we assume it. Well, I'm not going to talk about it. This is your exercise. Now, instead, what I will do is I will have a couple of examples. I have four examples here, practical examples, real problems where permutations with repetitions are used. So here they are. Now, first one, let's consider you have six questions on the exam. Now, each question can be either yes or no. So basically you have your six answers, yes or no, yes or no, whatever. And one particular result of the exam, which is the answers to all these questions, represents one particular permutation with repetition. Repetition because obviously yes and no can be repeated as many times. So this is, yes and no, this is our initial set of choices and we have to make six choices. So instead of using the formula, which I hate, I use the formula very, very rarely because I have to remember it, etc. I'll just use the logic. Well, let's just consider. Now, I'm facing the question number one. I have two choices, yes or no, right? So I have already two different variations. Now, with each of these, I'm going to the question number two and I'm also presented with only two different choices, yes or no. So for a couple of questions, I have so many variations, two times two, because with each of answers to the first question, I have two questions, I have two answers to the second question. And with each of these four answers to my first two questions, I have two different versions of the third question and to the fourth and to the fifth and to the sixth. So that's the result. And obviously I have two to the sixth degree, which is 64. That's the answer. So I have 64 different combinations of the answers to exams. Now, what actually can be done, let's say, if you would like to computerize checking of these things? Well, you can have, for instance, you can consider converting all these 64 different variations into about 64 different numbers if you want. Basically, it means that, well, let's say the answer no would be zero and then answer yes would be one. And then you can use this type of technique and you can construct 64 different numbers and there is only one number which is correct. So as soon as your preparation, converging the whole answer into one of the 64 different numbers is done. So the answer, the sheet with answers yes or no, is converted into one number from one to the 64. All you have to do then and can compare this with one particular number which represents six correct answers. Let's say it's 37, whatever the number is. So if the answer is equal to 37, the exam is passed. If not, it's failed, basically that's it. Well, considering that any wrong answer constitutes the failure of the entire exam. I like that. Anyway, next question. Next problem, is it? Okay. You have three different dishes and I can offer you beef stew, chicken parmesan and grilled salmon. Three different dishes. So you have three choices. You have beef stew, you have chicken parmesan and grilled salmon. And what you have to do is you have to pick one particular dish and you do it within a week, seven days in a row. So for seven days in a row, each day you are picking either this or this or this. And it's fine. You can have two beefs in two different days. That's okay. It's permutations with repetition. So what's the available choices are? Well, for instance, B, B and B. And B and B and B. So every time, seven B's in a row, seven days you're eating beef stew. Yeah, that's a choice. Or B, C, C, C, C, whatever. One B and then six C's. That's another choice. So how many choices altogether? How many different variations of a week of meals you can have? Well, again, let's think about combinatorically. For the first day, you have three choices. Now with each of these, you have three choices for the second day. Because we are talking about permutations with repetition, right? So again, the number is three. Now for the third day, you have exactly the same three choices. So for each of these, you have again three new ones. And three and three and three and three, one, two, three, four, five, six, seven. Seven days in a row. Each day you have a choice of three dishes. So it's three to the seventh degree. You calculated yourself with this. Next. Next, I am a New Yorker. And I love to go to performances. I have four different things which I like. I like cinematography. I like jazz. I like musicals. And I like drama. So that's my choices. Now, I'm not very rich, so I can go to the performance like this only, let's say, once in a quarter. So it's four times a year. So four times a year I go to one of these performances. So what's the total number of different combinations of different performances I can view in a year? Well, I can have four times I go to cinematography. Or I can have two musicals and two jazz, for instance. I mean, whatever the combinations are. The question is how many are all together? Well, considering that the order is important here. So that's what I... For instance, if I go in the first quarter I go to the movie and the second quarter I go to the movie. And then I have, let's say, two drama performances. That's not the same if I do it in reverse order. So the order is important. So for the first quarter I have four different choices. With each of them I have four different choices for the second quarter and for the third and for the fourth. So four times I'm going to one of these four shows. So I have four to the fourth degree. That's my answer. Now, finally, I have to construct three digits I'm using as a number. Now, how many different three-digit numbers exist? Well, from pure arithmetic we know that three-digit numbers are from 0 to 999, right? So how many of them? Nine hundred, right? So I have nine hundred different three-digit numbers. Now, how can I get the same number using the combinatorics? Well, let's just think about it. If I have a three-digit number, what are my choices for the first digit? Now, remember that the first digit cannot be zero, so it can be one, two, three, etc. So for the first digit I have nine choices. Now, with each of them I have ten choices from zero to nine for the second digit, right? So with each of these I have ten of these and the same for the third digits. For the third digit. And this is nine hundred. So this is a little twist because it's not the same number of choices on the same step. Now before, all these problems before, we had exactly the same set of initial elements, initial objects, and we choose from the same set again and again and again. In this case, because of the peculiarity of our numerical system, we are saying that the first step is a choice of only nine digits out of ten, because the three-digit number cannot start with zero, right? So that's why this number is slightly changing. This is a little twist in this program, in this particular test. Well, that's it. I would recommend you to read the notes to this lecture on Unisor.com. And well, if you are using signed-on procedures and you have your supervisor who can basically enroll you in some course, well, that actually makes the whole thing much more practical and the whole educational process would be much more beneficial for you. So thanks very much and good luck.