 Hi, I'm Zor. Welcome to Unizor Education. Today's topic is combinatorics, problems with combinations, and this is the second series of problems, another set of six problems, which I would like to present to you. If you are watching this on YouTube or any other website rather than Unizor.com, I do suggest you to switch to Unizor.com, because the lecture is part of the whole advanced mathematics course, which you can take together with exams for registered students, etc. The site is completely free, but it allows you to gradually move from one topic to another and check basically your progress on the way you do. Alright, so let's get back to the problems. Combination problems, problem number one. Okay, let's consider the company has six vacancies to fill. Now three of them require skill A, two of them require skill B, and one is unskilled worker, so anybody can actually work. Now, I have eight applicants. Four of them possess the skill A, and another four and only A, so it's not like two skills, it's only skill A, and these four have only skill B. So my question is, how many different ways to fill these six positions exist if they are using these eight candidates? Alright, so the answer is, since we have only four people who have this skill A, and I have three positions, so basically it means that I have the number of combinations from four by three different ways to satisfy these three positions using four people. Well, incidentally this is equal to four times three times two divided by three times two by one, which is four. And yes, indeed, if you have to pick three out of four, it means you can leave alone one or another or another or another, so you can have one of the four people to leave and take the rest three to the position. So we have four different ways to satisfy from this set of applicants the first skill. Now for the second skill, we also have four candidates and only two positions to fill, which means for the second skill, we have number of combinations from four by two, which is equal to four times three divided by one times two, which is six. So I have six ways of satisfying two positions out of four, so it can be like the first and the second or the first and the third or the first and the fourth, etc. pairs of people from these four. Now there is one left here because three I have already used to fill up the A, and there are two people of skill B, so altogether I have three people left among applicants. So these three might actually fill this last one position by how many ways. Well obviously it's three different choices I have, so it's supposed to be three, or if we go through this, you know, combinatorics kind of a lingo, I should put one out of three, number of choices which I have to make by one out of three, which is obviously three. So I have four different ways, four different choices to satisfy my skill A, six different ways to satisfy B, and three different ways to satisfy the unskilled workers. So altogether it means that I have four times six times three, which is seven to two different ways to fill up these six vacancies using eight people with these skills. That's it. That's the first problem. Second problem. Okay, consider you have a number six, and you would like to represent it as a sum of three non-negative numbers. For instance, five plus zero plus one. That's the representation. The sum is equal to six, or zero plus zero plus six, or one plus two plus three. All these are representations. So my question is how many different representations of this type do exist? And I would like to consider this representation as a different from this one. This is not, I mean the result is six exactly in both cases, but this is one representation and this is another. So I'm talking about representation of three numbers and different sequences of the same numbers are different representations. Okay, so how many different representations as a sum of three non-negative numbers exist? Well, as I was saying many times, combinatorics problems are tricky in a way that if you are applying an incorrect logic, you get an incorrect result, but you have no really way to check whether result is correct or incorrect other than trying to do the problem differently from different angle, different logic, or sometimes even direct calculation of how many different variations of something exist. Now, in this particular case, I would like actually to start from direct calculation of how many different ways I can represent six as a sum of three, as a sum of three numbers. Now, so I have three numbers. Now, the first number can be either zero or one or two or three or four or five or six. With number zero as the first one, I have certain number of choices for the second and the third number. For instance, let me just enumerate all the choices. It's zero, six, right? And the sum is equal to six. Or one and five, or two and four, or three and three, or four and two, or five and one, or six and zero. So, with the first zero and the second and third, one of these, these are completely enumerating my representation of number six as a sum of three numbers if the first one is zero. Now, let me do exactly the same with what if the first one is, the first number is one? Well, then the second can be either zero, in which case the third is equal to five, or one and four, or two, three, or three, two, or four, one, or five, zero. Well, notice that the number of combinations is one less. Why? Well, because in this case the sum of these is supposed to be six because this is zero. In this case, sum of these is supposed to be five because one is already the first number. So, I have to accumulate to six. So, for these two, I have only five to be equal to. And to five representing, to represent five as a sum of two numbers, it's one less than to represent six as sum of two numbers. Now, similarly, it goes down. So, it will be zero, four, because the sum is supposed to be equal to six. So, the sum of these two should be four, or one, three, or two, two, or three, one, or four, zero. Again, one less, as you see. Well, obviously, it goes down exactly the same way, let me do this for the five. So, it's zero, one, or one, zero. There are only two combinations if the first number is five. So, the second and the third are either zero, one, or one, zero. And finally, if the first one is six, I have only one combination. So, what does it look like? Well, it looks like one, two, three, four, five, six, seven. It looks like I have seven here, six here, five here, four here, three here, two here, and one here. And sum, from one to seven, seven, 13, 18, 22, and six, 28. So, I have directly calculated 28. Now, that's not interesting, right? I mean, we are studying the combinations. So, we should really approach this using some combinatorial logic, right? Okay. So, let me now apply some combinatorial logic. The modeling of this particular problem using certain construction which I am going to present to you. And by the way, I did have a very similar problem in the lecture when I was explaining basically about the combinations. And I was using an example of picking three bottles of wine, red, white, or sparkling, out of the liquor store. And I wanted to buy five bottles and there are three kinds of bottles like red, white, and sparkling. So, out of these choices, I have to pick the five bottles. So, that's exactly the same kind of a problem. And I will use exactly the same approach. So, here's how I will do it. I will put six numbers one. Now, these six numbers one represent basically a unit. So, what I will do, I will use two plus signs which I can position anywhere before or in between or after. For instance, I can position one here and one here. What does it signify? Well, it signifies two plus three plus one. Two plus three plus one. That's six. Or I can position here, not zero, plus. I can position plus here and plus here. What does it mean? It means zero, six, zero. So, the first number is zero because there are no ones. Then there are six ones. So, it's six and no ones after this zero. So, any combination, that's my claim right now. Any combination of three numbers which are summed together give six, and the numbers are obviously, as I was saying before, non-negative, can be represented in certain combination of ones, six ones, and two pluses. So, this is my model basically. So, my initial problem, the problem of, okay, how can I represent the number six as a three non-negative numbers? So, this is my initial problem. Now, I have changed the problem. I'm modeling this to the problem completely different. I have a string of six plus two eight characters. I have eight characters. Now, two of them are pluses. And now, basically, my question is which characters I use for pluses, character number. In this case, if I will number the characters, it will be this or this or this and this. So, whatever the numbers I choose basically determines my representation of number six as a sum of three numbers. So, the whole problem actually is reduced to one particular formula. How many different combinations of two characters out from eight exist? So, that's it. And the answer is the same 28. So, as you see, we have come up with a completely different logic here. Well, it's not a different logic. It's the logic. Whatever it was before was a direct calculation. So, but this logic gives exactly the same number, which basically kind of indicates that we are correct. I mean, it might be an accident that by accident we have the same number and incorrect logic, but it's a rare occasion. So, just to confirm, I would like to say that any combination, any problem which is related to combinatorics, it's difficult to check it unless you either apply some other logic completely different and come up with the same number or the same formula, or you're using certain calculation, direct calculation, like enumeration which I did before to prove that you are right. That's the only way to prove it. And that's why I was saying that combinatorics is a little tricky because you don't really have a good way to check your logic. Okay, so that's this problem. Next. All right, we have to pick Olympic team of five members. Whatever the sport is, doesn't really matter. So, we need five Olympians. All right. National championship occurred and there are 10 top participants in this national championship. From these 10, we have to choose our five. But there is one little consideration. Among these 10 top national champions, one of them has a gold medal from the previous Olympic and another has a silver medal from the previous Olympic. And condition is that those guys who had these medals in the previous Olympic are supposed to be automatically become a member of the Olympic team for the next Olympic Games. So, out of these 10, two are basically predetermined to make it into the team of five. So, what does it mean? Well, it means that the remaining three out of five, because two are already there. So, remaining three should be chosen out of remaining eight, because from 10 top two are already there. So, that's what it means. We have to have the number of combinations of three out of eight, which is eight times seven times six, one two, three, which is 56. So, that's the answer. There are 56 different ways we can form the team, the Olympic team. Considering this particular condition, the two are already automatically included. That's an easy one, right? Next. Okay, we have tennis. Tennis championship. We have 20 participants. Everyone plays against everyone else, once, one match, okay? Well, question is how many matches we have to play? Again, let me start from direct calculation. So, the player number one is supposed to play with all others, right? So, that's 19 others. So, he plays 19 games. Player number two, well, there are also 19 others, but player number one has already been played against, right? It's one of the games for the number one was against number two. So, we don't really put him into this count again. So, there are only 18 new ones, which I, which number two did not play it. Well, obviously, number three is supposed to play against 17 new guys, because with number one and number two, he has already played and we counted it, etc. Number 20 plays, well, doesn't play with anybody, but number 19 plays with one, which is number 20 actually, right? So, that's my, that's my original calculation. So, the calculation shows I have a sum of 19 plus 18 plus 17 plus, etc. plus two plus one. Well, zero, we don't really need zero. That's the answer, right? Well, what is this? This is a arithmetic progression. Now, I do not want to remember any formulas, as you know. I'm trying to derive them on the spot. So, how can I sum the arithmetic progression? Always the same way, very easily. You just reverse the sequence. That's the same sum and you sum them up vertically. This is s plus s, which is two s. 19 plus one is 20. 18 plus two is 20. 20 plus 20 plus 20. So, how many times I have 20? Well, 19 times, right? So, it's 20 times 19. So, that's two s from which s is equal to 10 times 19, which is 190, right? That's my answer. Now, let's go to the combinatorics world. In combinatorics, I basically have to choose from 20 a pair and then another pair and then another pair. So, the question is how many pairs I have from, I can choose from 20 objects, which is a number of combinations from 20 by 2, which is 20 by 19, 1, 2, which is 190. Same thing as you see. So, the arithmetic progression formula actually is the same as this one. Okay? All right. That's done. Okay. Another thing. Let's consider you have six digit numbers. Now, what are they? Well, from 100,000 to 999,999. How many of these numbers are? Well, that's from a million you have to subtract. There are 900,000 numbers, right? So, I'm considering all six digit numbers from 100,000 to 900, etc. My question is, you see, this number has nines in it. This number does not. So, certain numbers in this interval have a digit nine among these six digits and some numbers do not have this. My question is, which numbers are more numerous, those numbers which have the number nine among them or those numbers which do not? Well, quite frankly, intuitively, it seems to be, well, nine is only one particular digit. I mean, if you will consider, for instance, numbers from 1 to 10, there is only one number with a number nine and nine numbers without a number nine, right? So, it looks like the numbers which do not have a number nine among these digits supposed to be like significantly more numerous. I mean, that's my intuitive feeling. Well, I'm wrong. Let's just calculate. So, we have to calculate how many numbers in this interval contain the digit nine in it. Well, it can be one digit nine or it can be two digit nines. In this case, all six digits are equal to nine. So, these are all numbers which contain digit nine. Now, it's easier to calculate how many do not contain number nine. Let's calculate it this way. How many candidates I have for the first digit? It should be from one to two to three, four, five, six, seven and eight. It cannot be nine because we are counting those which do not contain number nine. So, for the first digit, I have eight different candidates, right? For the second digit, well, second digit can be zero, right? First digit cannot be zero, but the second one can be zero. So, it's from zero to eight, no nines, right? So, I have nine different choices. Now, for number three, number four, number five and number six digits, I also have nine choices. So, how many numbers are without the digit nine? Well, that's the product. And I have it calculated. It's four, seventy-two, three, ninety-two. But let's just think. You see, nine hundred thousand numbers, that's total numbers. Among them, this number, four hundred and seventy-two thousand, three hundred and ninety-two, do not contain nine. Now, this is slightly more than a half, but only slightly. Half is four hundred and fifty thousand, right? So, it's slightly more than a half. So, number of numbers without the digit nine is greater than half, but not by much, just a little bit. I mean, considering. It's not like overwhelming, like ninety percent or eighty percent. No, it's just slightly more than fifty percent. But anyway, that's the number. And the answer to this problem is there are more numbers without digit nine than with, because the remaining, whatever the remaining is, obviously contain digit nine, right? So, it's slightly less, those with digit nine in their representation, decimal representation, but not by much. So, let me just subtract. If you subtract, you will have 806724, right? Something like this. So, you see this is four hundred something and this is four hundred something. This is without digit nine and this is with digit nine in one of the positions, all right? Okay. And the last problem, which is a continuation of this one. Think about this way. If you take only a single digit, one digit, numbers. So, it's basically from one to nine. Eight of them do not contain the number nine, and one, which is nine, basically contain. If you have two digits numbers, you will have a different proportion. So, in this case, it's like eight to one. In this case, if you will calculate, it will be a smaller proportion. So, my question now is, what if you have n digits and digit numbers, okay? What's the proportion of numbers which contain nine versus those which do not contain nine? Well, and in this particular case, just to make it easier, I would formulate the problem slightly different. It's not just n digits exactly. It's up to n digit numbers. So, it can be one or two or three digits up to n digit numbers. So, among all the different numbers, from zero to nine, nine, etc., nine, which is n digits. So, in this interval, how many numbers do not have nines versus those which do? So, what I will do, I will calculate the proportion, basically, of those without the number nine towards the total number. And I will see if it's greater than half or more than half or something like this, right? So, how many total I have? Well, the total is, since it's n digits, it's n position. So, obviously, the total is 10 to the n's degree, right? If I have one digit, it's 10 numbers. If I have two digits, it's 100, which is 10 square. If I have three digits, it's up to a thousand, which is 10 cube, etc. If I have n digits, it's 10 to the n's. This is total number of numbers. Now, how many of them do not contain nine? Well, I have nine digits. Now, some of them can be equal to zero, because I started with zero, just because it's easier for me to basically say that on every position out of these nine can be either zero or one, etc. up to eight, except nine. So, I can have a certain number of zeros in front. So, it would be smaller than n digits number. It would be, let's say, you know, two digits number, one digit number, three digits number, whatever it is. So, all the numbers are allowed, in this case, with all the number of digits up to n, which means on every place, I can have either zero or one, etc. up to eight. So, it's nine choices, nine choices for every place up to n. Well, if I have nine choices for this place, nine choices for this, etc., etc., nine choices for this, obviously, I have nine to the n's degree. So, nine to the power of n, different numbers. So, the ratio of numbers without nine to a total is this. So, it's 0.9 to the n's degree, to the power of n, right? That's what it is. Well, let's think about it. My question now is, when is it greater than half? Where is it less than half? Now, this is less than one, right? The base of this exponential function is less than one, which means as n increasing, the total would be decreasing, right? Because we are multiplying 0.9 by 0.9, which is less than one, so it's smaller, and then by 0.9, which is even smaller and smaller and smaller. So, as n increasing, the 0.9 to the power of n is decreasing, and the graph actually would look like this, with n equal to zero equal to one, and then it goes smaller and smaller. Somewhere, it will cross the one-half boundary. So, my question is, where exactly is this one-half boundary? So, before a certain n, my 0.9 to the n's degree is greater than half, which means there are more numbers without nine than with. But after this boundary, my number of numbers without nine is smaller than those with nine. Well, I just directly calculated. So, 0.9 to the power of 6 is equal to 0.531 441, and that's what you probably should have done yourself, with a calculator. And 0.9 to the seventh degree is 0.478297. So, as you see, if I have no more than six digits in my numbers, from one to six digits, all numbers up to six digits. So, all numbers up to 999999. Then, among these numbers, those which do not contain nine are a majority, more than half of them. But, if I will consider more, one more position, seven positions, or even more, obviously, because it's decreasing, among those numbers, and it's about 10 million numbers of these, right, that those which do not have nine are minority. They are at seven digits. It's already less than half, and then it goes smaller and smaller and smaller. So, that's the answer. Up to six positions, if we consider numbers which do not have more than six digits, then those which contain the number nine are minority, and those do not contain nine majority. If you cross this number, if you go to seven positions and more, you will get majority of numbers with number nine, for whatever reason. I know it's kind of an interesting and it's a little bit counter-intuitive. By the way, number nine is chosen arbitrarily. I can as well have number one or five or any other number. The calculations are exactly the same. All right, so that's it for today. I do recommend you to go to unizord.com and go through this lecture again. Just try to solve the problems just by yourself, and then you can just read the solutions which are in the notes for this lecture. And obviously, I'll always encourage you to register on this website, because it will allow you to basically take the whole course in a sequence with with exams, so you can check how you progress, and your parents or supervisors can actually mark certain topics as completed and stuff like this. All right, thanks very much and good luck.