 Hi, I'm Zor. Welcome to a new Zor education. This lecture is the last one in the series of different combinatorial problems. The series is 2.8 in this particular case, so I have 8 in the first part and 8 in the second part and every series contains like 4, 5, 6 different problems. All right, so this is the last one on combinatorics and it's basically a preparation for the next chapter of this course, which is the probabilities and that's where the combinatorics really play a very very important role. All right, so anyway, let's just solve these problems. They are all presented on unizor.com website and that's where I suggest you to go if you didn't do it yet and try to solve these problems yourself. Because that's actually the whole purpose of the entire course to teach you to solve problems. So to learn how to solve problems you have to solve problems. All right, so let's go. So we have four problems for today. Problem number one, it's basically solving equations and you have a proportion to solve. Okay. So this is number of combinations from y to x and this is y factorial divided by x factorial and y minus x factorial. And let me take the proportion of the first to the last one because it seems to be easier. You have xy here and xy here. So this as relates to this one and this is y factorial divided by y minus x factorial equals to 1 to 24, right? Okay, so that's the proportion. All right, so how can we solve it? It's actually very easy. Why? Because first of all, we know that y and x are natural numbers and in this particular case we can safely assume that y factorial is not equal to zero and y minus x factorial is not equal to zero because y is always greater or equal to x, so y minus x is greater or equal to zero and zero factorial is one. So nothing is zero, so we can safely cancel this out, cancel this out, and what do I have? I have 1 over x factorial equals to 124 or x factorial is equal to 24 or x is equal to 4. 1 times 2 times 3 times 4 equals to 24, right? So that's very easy and we have already solved for x. Now knowing x, we can now take any other proportion and use it. Well, let's say this one to this one. So y factorial divided by, instead of x factorial, I would put the 4 factorial, which is 24 times y minus x, which is 4, right? factorial. Now proportion to this one, which is y plus 2 factorial over x factorial, which is 4 factorial, which is 24 times y plus 2 minus 4 factorial equals 213, right? 1, 2, 3. This goes to this. Alright, so well, this is obvious, right? Now let's talk about these guys. Let's convert them into a regular fraction. So on the top I have y factorial, on the bottom I have y minus 4 factorial, also on the bottom I have y plus 2 factorial, and on the top I have y minus 2 factorial, and that's one-third. Right? Okay. Now let's think about it. What is y factorial is the product of all numbers from 1 to y, and this is product of all the numbers from 1 to y plus 2. So we have two extra multipliers here over this one. We have y plus 1 and y plus 2. Everything before y plus 1 is actually y factorial, right? So I can write this as y plus 2 times y plus 1 times y factorial, and cancel the y factorial. Now this guy, relative to this guy, again, this is 2 greater than this. It has y minus 3 and y minus 2. So what I will do is I will replace this. I can wipe out this. I can wipe out this. So y minus 2 factorial I will replace as y minus 3 and y minus 4 factorial, right? These are three consecutive things, and that gives me canceling of these two guys. All right. Now, obviously I can multiply it here. So I will have 3 times y square minus minus 3y and 2y minus 5y plus 6 equals y square plus 3y plus 2, if I'm not mistaken. Right? y square, 2y and 1y, that's 3y and 2. And here I have, yeah, looks like it. If I didn't make any arithmetic mistakes, I have a quadratic equation here. Unless I did an arithmetic mistake, right? Let me just think about it. So what do I have? I have 2y square minus 15 and minus 3, it's minus 18y plus 18 minus 2 plus 16 is equal to 0 or y square minus 9y plus 8 equals to 0, right? Yes, I reduced by 2. So that's what I have. And solutions are obviously 1 and 8 of this quadratic equation. And 1 is actually not good because x is equal to 4, right? So y cannot be less than 4. So this is not a solution. Now this seems to be the only solution. And if you will check it, and I did, by the way, I substituted x and y, 4 and 8, and I've got the correct result. So that's the solution. It's actually easy as you see, just convert it into a quadratic equation. Next problem. Okay. The game of bridge You have 52 cards deck. You have four players and you just deal 13 cards each. Now question is, how many different distributions of 52 cards among four players exist? Okay. I have two different solutions which basically come to the same result. And here is one of them. How can we deal 52 cards among four players? Well, here's what I suggest. Let's just order all 52 cards in one row. How many permutations are possible? 52 factorial, right? All the different orders. Now I will divide it in four pieces from the first to 13 to the first one, from 14 to 26 to the second one, 27 to, whatever, 38 to the third one, and from 39 to 52 to the fourth one. Now what's wrong with this? It's not 52 factorial distributions of the cards, because I can change the order of these cards just by themselves, and I can change the order of these cards by themselves, and these, and these, and it will still be exactly the same distribution of cards, right? Because it doesn't matter what is the order of cards for one particular player. What the matter is, what's the set of cards the guy got, right? So basically all these 13 factorial permutations of each cards within one particular player actually produce exactly the same distribution of cards, and obviously I have to multiply because with each of these permutations, I can use each of these, and I can use each of these, and each of these, and it will still be exactly the same distribution of cards. So I have to divide 52 factorial by 13 factorial to the power of 4. That's my answer. Another approach to the same problem is, okay, let's first choose 13 cards for the first guy. In any sequence, doesn't really matter, what matter is the combination of 13 cards out of 52, and that's possible to do in this number of different ways, right? Number of combinations from 52 by 13. Now they have 39 cards left. Out of these 39 cards I can pick any 13 and give to the second one. So I have to multiply it by number of combinations of 13 cards out of 39 remaining. Now I have 26 cards remaining, and out of these I can choose any 13 numbers, and that will be my third player's hand. And whatever is left, I don't really have any other choices, is the fourth guy. So that's a different answer than this one, right? Well, let's just think. Is it really different? This is 52 factorial divided by 13 factorial and 5 to 52 minus 13, which is 39 factorial, right? I don't need these parentheses. Now this guy is 39 factorial by 13 factorial and 39 minus 13, which is 26 factorial. Finally, this guy is 26 factorial divided by 13 factorial and 26 minus 13, which is also 13 factorial. And as you see, we have this, and what's remaining, 52 factorial, and 1, 2, 3, 4, 4 times 13 factorial, so it's 13 factorial to the power of 4. We have exactly the same result, approached differently, and that's, as I was saying many times, is a very, very good thing about the solution of your combinatorics problem. If you can approach it from two different directions and get the same result, that's a good sign of the correctness, because it's very difficult to check the correctness of your numbers in combinatorics. Alright, problem number three. Okay, you have a coordinate plane, and you are at point zero zero. Now, let's assume you have only integer lettuce here. So this is your main X, Y. Alright, and you are on every step can move either up or down or left or right by one unit. So from point zero zero, you can get either to point one zero or zero one or minus one zero or minus one minus one in one step. Then the next step, then the next step, etc. Your task is to come from zero zero to this point, which let's call it X, Y, integer coordinates, and let's assume for simplicity that this is all positive, so everything in the first quadrant, okay? So your your task is to get from this to this in the shortest number of ways. Now, what are the shortest ways? Well, obviously in this particular case, X and Y are both positive. So you're moving to the positive direction vertically and positive direction horizontally. It doesn't make any sense to make any step to a negative direction either horizontally or vertically. So what does make sense is to go something like this, this, this, this, and this, or this, this, and this, or this, and this. All of them have actually the same lengths, the same number of steps. Now, question is, if we are talking about only these ways, the shortest ways from zero zero to X, Y, how many of them do exist? Well, in this particular case, you see, this is one way. This is another way. This is another way. Four or five. I mean, it's it's not easy to calculate how many different shortest ways exist in this particular case. So question is how? Here's what I suggest as a model, if you want. Every path which I am choosing contains certain number of vertical steps and certain number of horizontal steps. So I actually have to move in this particular case like one, two vertically and one, two, three horizontally. Well, in a general case, I have to move X steps horizontally and Y steps vertically. In basically any order. It doesn't matter. As long as I don't do anything else. But these steps, I will be on the shortest path. And that's what's very important. All right, so how can I in this case calculate how many different paths exist? Well, here is my suggestion as a model. Let's mark each horizontal step with a letter X, a little letter H, and vertical step with a letter V. Now we are talking about a string of H's and V's in some order which contain exactly X of H's and Y of V's, right? So the total length is X plus Y letters and the letter can be either H or V and we have exactly X, H's and Y letters V. So how many different strings basically exist of the length X plus Y? Where there are certain X, in particular X number of letters H. I don't really have to count V because V will be whatever is left. After I choose X positions where my letter H is located, that's enough to basically determine the path. So the number of paths is the number of different combinations of X positions, where I can put letter H out of X plus Y positions, where everything else is. So it's C of X number of combinations of X letters out of X plus Y letters. So if I, you know, have this number, which is, which happens to be X factorial divided by, sorry, X plus Y factorial, divided by X factorial and X plus Y minus X, which is Y factorial. As you see, it's symmetrical because it doesn't really matter whether I choose X positions where I put H or Y positions where I put V. It doesn't really matter because the result is symmetrical as you see relative to X and Y. So that's the solution. Next. Okay. The next is, okay, let's go back to the game of contract breach. Okay, the contract breach doesn't really matter whether you know how to play it or not. Here is basically an explanation. It's about to take tricks. And the stronger your deck, your hand is, the more chances you have to basically capture more tricks, right? So that's kind of obvious. So you have to somehow evaluate the strengths of your hand. And the suggestion is to disregard smaller cards and pay attention only to Ace, King, Queen and Jack cards. And assign them a numerical value, like I just said. And then you basically add all the numbers which you have. Let's say you have one Ace and then one King and two Queens, let's say, and one Jack. So you add up all these numbers. You have a number which basically numerically identifies the strengths of your hand in this particular way, right? Now it's recommended, again, by people who know the game much better than I do, that if you have at least 12 points, if you calculate the numerical equivalent of your hand, then you can actually start bidding for the game, bidding for the contract. All right, so you evaluate your strengths. If it's 12 or greater, you start saying something which basically is supposed to lead to some kind of a contract. So let's just assume that you do have these 12 points, which are represented as one Ace, one King, that's seven. Two Queens and one Jack and so you have what? You have 12 points. So that's your combination. One Ace, one King, two Queens and Jack. Well, that's the 12 points. So you can actually start bidding for the contract. So now I can explain what the problem is about. The problem is how many different combinations of different hands you can have if it has one Ace, one King, two Queens and one Jack. So that's basically my question. How many different hands you can have with this particular cards? I'm not talking about suits. I'm talking about any Ace, any King, any two Queens and any one Jack. That's what I'm talking about. So number of hands, when you have these one, two, three, four, five cards, specific cards, specific by rank, not specific by suit. All right, so that's the problem. Now instead of solving this particular problem, I would rather expand it into something more general and I think that solution to a more general problem is kind of better understood and more obvious than the solution of this particular problem because you are completely divorced from any kind of meaning, card game, aces, etc. I'm suggesting more mathematical approach and here is the approach. Let's say you have a certain number of objects, sorry, a certain number of types of objects and types of objects. Now, you have a set of these objects, which includes K1 objects of type 1, K2 objects of type 2, etc. Kn objects of type n. So that's what's given. A pile of objects of n different types, you have K1 of one type, K2 of two, of second type, etc., etc. and Kn of the nth type. Your task is to pick exactly K1 objects of this type, K2 of this type, etc., and Kn of the nth type. And the question is how many different ways to pick these number of objects out of these types do exist. And actually it's a very easy problem and the solution to this problem is the following. How many different combinations of J1 objects of the type 1 out of K1 objects exist? Well, obviously it's number of combinations of J1 objects out of K1, right? Now with each of these combinations, I can have certain number of combinations of the second type, which I can choose. I can choose J2 different objects of the type 2 from K2 available, and that's this number of combinations. Well, and obviously I have to continue it, and the last one is Kn and Jn. So the multiplication of these seems to be quite obvious in this particular problem. Now, how is it applicable to our problem? Well, actually it's quite easy. I have five different types of cards. I have aces, I have kinks, I have queens, I have jacks, and I have all other cards which have zero points associated, like 9 or 10 or 2 or whatever else. So all other cards are zero. So if I'm interested in this particular combination, one ace, one king, two queens, and one jack, and all other cards are of no value, which means the other cards belong to this category, I have to choose one card out of how many cards available of this type. Well, that's one out of four. We have four aces. Now, I have to choose one king, so I have to choose one out of four kings. Then I have to choose two out of four queens. I have to choose one out of four jacks and the rest, now this is five, so out of 13 cards, if you take five, you have eight left, right? So all other eight cards should be chosen out of all other, so it's 52 minus 16, that's 36. Other cards. So out of four aces and four kings, and four queens and four jacks, and 36 other cards, I have to pick up correspondingly one, one, two, one, and eight. And the multiplication of these gives me the whole number of all the combinations. Well, that's it. That was the last problem. I would like to really bring your attention to the fact that I have generalized the problem first, which seemed to be an easier just to understand how to solve it. Because all these particulars about the region and aces and queens, whatever, they are actually the kind of shadow, the real meaning of this problem. Real meaning is this. You have certain number of certain types of the objects and you have to pick certain number from each type. That's basically the mathematical sense of this particular problem. And that's how you should really approach it. All right, I should bring you again to Unisor.com. I suggest you to go to this site and solve again all these problems just to inculcate in your mind basically the whole business of solving combinatorial problems. Also, the people who sign in and the signing in is basically a very simple procedure like your email address or something. You can actually be enrolled by a supervisor or your parent or yourself if you want to act as your own supervisor. You can enroll in different parts of the course or the entire course and it will enable for you to basically take exams. And you can take any number of exams. Everything is free, so basically the more the merrier. So that's it. And that was the last lecture I intended for this relatively simple combinatorial problems. That's again some kind of an introduction into the next chapter of this course, which is about probabilities. You really have to know the combinatorics to be able to calculate the probabilities of certain things. So that was the purpose and that's the end of this particular part. Thank you very much and good luck.