 Hi, I'm Zor, welcome to Unisor Education. We continue talking about combinatorics. This is part of the Advanced Mathematics for Teenagers course presented on Unisor.com. And I do suggest you to watch this lecture only after you visit the website where this lecture is linked to and try to solve all these problems that are all presented in the notes for this lecture with answers, so you can check yourself and only then listen the lecture itself, the logic actually is explained in notes as well. Alright, so we have spent some time talking about poker games, which are definitely related to combinatorics. Now this is about lottery, which is also very much a combinatorial kind of activity. Personally I don't play lottery, I don't think many people who understand the combinatorics and theory of probabilities do, but it's okay, I mean there is nothing wrong with playing the lottery and hoping for some kind of a chance, it's always fine to put some couple of dollars away for good cause for the government. Anyway, so let's just solve these problems related to lottery. Now the game of the lottery which I will be using is played according to the following rules. There are 49 numbers from 1 to 49, eventually 6 of them will be declared the winning numbers and you are actually supposed to guess 6 numbers and depending on how many of whatever you guess with whatever the winnings are really are, you will get the prize. So the fundamental task which we will start with is let's consider you pick these 6 cards and what's the probability of having K winning numbers among them. So there are 6 winning numbers and you picked 6 yourself. So the question is how many different combinations are there that among your 6 numbers include exactly K winning numbers and the rest 6 minus K are supposed to be not among the winning numbers. Okay, well to solve this problem we have to basically find, we have to find how many different combinations of K winning numbers out of 6 are possible and that's possible in this number of ways, number of combinations of K numbers out of 6 winning. Now the other 6 minus K numbers are supposed to be the non-winning numbers. Now there are 43 non-winning numbers, right? 49, 6 winning, 43 non-winning numbers. So the rest 6 minus K of whatever you have chosen must be among these. So if you will multiply them together you will get the number of different combinations of 6 cards which you can choose with exactly K of them being the winning numbers. Well obviously the greater the number K, the less number of combinations and if K is equal to 6 for instance, so you guessed correctly all 6 numbers. Well that means you have guessed all the numbers and the numbers will be as follows. In case of K is equal to 6 we will have 6 factorial divided by 6 factorial divided by 0 factorial times. That's number of combinations from 6 by 0. I mean by 6 so you have to subtract 6 minus 6 would be 0 and this is 6 factorial from there. Now this is 43 factorial divided by, this is 6, 0 factorial and 43 minus 0 that's 43 factorial. Well which is equal to 1 and that's to be expected, right? I mean there's only one winning combination of 6 numbers and if you want your combination to have exactly 6 numbers corresponding to the winning numbers well that's the only one combination. So out of how many by the way? Well the total number of combination is number of combinations by 6 from 49 and I have actually this number calculated it's 13,998,000, oh stop, 1983,000. Doesn't make much of a difference quite frankly, 816. So almost 14 million different combinations of 6 numbers exist. So out of these 14 million only one is a jackpot winning all 6 of them. Now I also have just for an example numbers for K is equal to 3. So how many different combinations are there? With exactly 3 numbers the winning and 3 correspondingly not winning. So that would be 6 factorial divided by 3 factorial and 3 factorial and 43 factorial divided by 3 factorial and what 40 factorial that right? Yeah. Now the answer is 246,820. That's number of combinations with 3 winning numbers. Again out of 14 million which is not much quite frankly. The chances to win 3 are well better than 1 obviously when you win all 6 numbers but still pretty slim. Now finally I calculated this for K is equal to 0 and that would be 6 factorial divided by 0 factorial and 6 factorial times 43 factorial divided by 0. So it's 6 factorial and it's 7 factorial. And this is actually a lot. 6 million 96,454. So it's 6 million. Well 6 million out of almost 14 million it's almost half. So almost half of all the combinations have absolutely no numbers among the winning. So that's the most frequently occurring combination. Okay so that's the end of the first problem. We have solved basically this for any K and these are just examples and this is a simple game of picking 6 numbers out of 49. There are some more complicated rules and that's a little later I will address. Okay so now let's talk about just a very slight modification to this problem. I would like to know not exactly number of combinations with exactly K winning numbers. I would like to know if it's K or greater. In particular I'm interested is in K is equal to 2. Why? Because when you have two winning numbers you have the lowest possible price. With one winning number guessed correctly or 0 of course you don't have any money back. So you basically lose the price of the ticket. But if you have guessed at least two winning numbers out of 6 you will get something back in return. So it's constituting the winning, some winning. I mean it's a small winning if K is equal to 2 but obviously the greater the number of winning numbers the greater the price is. But the minimum price is when K is equal to 2. So the number of winning numbers is 2 and I'm interested Okay what's my chances to win just in general? Which means I have to calculate whatever I had before and the formula was this. If I calculated for K and K plus 1 and K plus 2 etc up to 6 K is somewhere between 0 and 6 right? And add them together I will have greater or equal than K. Now in case of 2 I have to calculate this formula 4, 2, 3, 4, 5 and 6 and add them together right? That's the one way to address this problem. Another way to address this problem would be from all the different combinations subtract those combinations which have 0 or 1 winning number which is 0 would be this and 1 would be this. It's just a little bit maybe easier to calculate. These are two numbers you have to subtract. Here you have to add together 4K equals 2, 3, 4, 5 and 6, 5 different numbers. So the result is supposed to be the same right? Now do I have this result? Yes I do. It's 2,1,1,1,7,7,4. So about 15% of the cases are winning. The rest are 0 or 1 winning numbers and you don't win anything. So in about 2 million out of 14 which is about 15% there is some return back. 85% of the lottery tickets what by people are not winning at all. Okay so these two methodologies of solving greater or equal that's my second problem. Now the third problem I'm slightly modifying the conditions of the game the rules of the game. Not only I'm choosing the original six winning numbers let's call it main winning numbers but I also would like to have one extra bonus number. It's called the power ball or bonus ball the ball because the numbers are chosen written on the balls from some kind of mechanical device. That's how the winning numbers are established. So there is a power ball lottery which has again 49 numbers. Six main ones are considered to be the main winning numbers and one additional as a bonus number. And now let's consider two different problems. Problem number three is how many different combinations are when you guess correctly K main winning numbers plus one bonus number. Okay so out of whatever numbers you have chosen well six actually you have one definitely the bonus one and the others other K are among the winning numbers. So what's the number of combinations which satisfy this particular requirement. Well let's just think about again how many different ways to choose K winning numbers out of six. Well obviously it's number of combinations from six by K. Now one number which is the bonus number is already chosen basically so we don't have any freedom of choice there. So one of our six is definitely this bonus number and it's not really part of any kind of additional combinations. There is only one combination it's one of one. And what's left well from the six numbers which I am choosing I have K which are winning and one which is bonus. And these other six minus K minus one numbers are supposed to be among non-winning and non-bonus right. So it's 42 from 49 I have to subtract six winning and the bonus. So I subtract seven so 42 remaining. Now so this is number of combinations of my non-winning non-bonus. This is the main winning numbers and the product is number of combinations of six out of six numbers which I pick of K main winning and one bonus. So that's the problem number three. Now the problem number four is K main winning and no bonus. What choices do I have here? Exactly the same different number of combinations to pick up K winning numbers out of the six main. But then all other which is six minus K numbers among those which I have chosen are supposed to be non-winning and non-bonus right. So the rest six minus K should be out of 42 from 49 I subtracted six main and a bonus so 42 remain. So my other six minus K is supposed to be from there. By the way let me just six minus K minus one change it to five minus K if you don't mind. That's the same thing. Now here is an interesting thing I have calculated how many different combinations are to have K winning numbers and bonus and to have K winning numbers and no bonus. In theory if I add them together I should have exactly the same number as in the problem one when bonus was not really involved at all. And I just had K winning numbers out of the six main numbers right. Well the result from that problem if you remember is this one. So question is is this plus this equals to this. If it does it confirms that all my calculations are correct. Well let's check it out. You see there is a multiplier number of combinations from six by K in this, this and this. So all I have to prove is that this number of combinations plus this number of combinations equal to this number of combinations. Well let's try. So C 42, well I can convert it to factorial immediately. So 42 factorial divided by 5 minus K factorial and 42 minus 5 is 37 plus K factorial. That's this one. Now this one is equal to 42 factorial divided by 6 minus K factorial and 42 minus 6 is 36 so 36 plus K factorial. Okay I have to prove that some of these is equal to this. Well let's see. Now for obvious reasons right because this is the product of all the numbers from 1 to n minus 1. If I multiply by n it will be multiplication of the product of all numbers from 1 to n which is n factorial by definition right. So in this case I will use this particular property. You see 6 minus K is one greater than 5 minus K right. So if I will multiply this by 6 minus K I will have 6 minus K factorial. So what I will do is I will replace this with this. I multiply by 6 minus K and put 6 minus K factorial without changing this. Right? Using this. In this case n is equal to 6 minus K. So 6 minus K and 5 minus K factorial that's what it is. 6 minus K would cancel out if 5 minus K factorial remains. Here I will do exactly the same thing. This is 37 plus K one greater than 36 plus K. I would like to have here 37 plus K. So 6 minus K remains. I would like to have 37 plus K factorial. Which means I have to multiply by 37 plus K to cancel the 37 plus K right. Now why did I do it? Well because now I have the same denominator. So now I can just add them together as two fractions with the same denominator. So it's 42 factorial. I can actually factor out 42 factorial that I have 6 minus K plus 37 plus K. Divided by 6 minus K factorial and 37 plus K factorial. Now 6 plus 37 is 43. K and K goes. So 43 times 42 factorial is 43 factorial right. Again using the same identity. 6 minus K factorial and 37 plus K factorial. Which is equal to this one. 43 factorial divided by 6 minus K factorial and divided by difference. So 43 minus 6 is 37 minus K with minus so it's plus K. So the checking is working. Calculations were correct. Thank you very much. Alright I do suggest you to go to the Unizor.com website. And again go through these simple problems. And try to solve them yourselves. Just by yourself again. Check with an answer. And well basically I think it will be a very good exercise for you. If you will just do it by yourself. And then you can read the logic if you want. Which is also presented on the website. So that's it for this lecture. Thank you very much and good luck.