If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content
Current time:0:00Total duration:7:42

Combination example: 9 card hands

Video transcript

a card game using 36 unique cards for suits diamonds hearts clubs and spades this should be spades not spaces with cards numbered from 1 tonight from 1 to 9 in each suit a hand is chosen a hand is a collection of 9 cards which can be sorted however the player chooses fair enough how many 9 card hands how many 9 card hands are possible so let's think about it there are 36 unique cards and I won't worry about you know the others there's 9 numbers in each suit and therefore suits 4 times 9 is 36 but let's just think of the cards as being 1 through 36 and we're going to pick 9 of them so at first we'll say well look I have nine slots in my hand right 1 2 3 4 5 6 7 8 9 right I'm going to pick 9 cards for my hand and so for the very first card how many possible cards can I pick from well there's 36 unique cards so for that first slot there's 36 but then that's not part of my hand now for the second slot how many will there be left to pick from well I've already picked one so there'll only be 35 to pick from and then for the third slot 34 and then it just keeps going then 33 to pick from 32 31 30 29 and 28 so you might want to say that there are 36 times 35 times 34 times 33 times 32 times 31 times 30 times 29 times 28 possible hands now this would be true if order mattered this would be true if maybe you know I have card maybe I have card 15 here maybe I have it let me put it here maybe I have a 9 of Spades here and then I have a bunch of cards and maybe I have and that's one hand and then I have another so then I have you know cards 1 2 3 4 5 6 7 8 I have eight other cards or maybe another hand as I have the 8 cards 1 2 3 4 5 6 7 8 and then I have the 9 of spades if we were thinking of these as two different hands because we have the exact same cards but they're in different order then what I just calculated would make a lot of sense because we did it based on order but they're telling us they're telling us that that that the cars can be sorted however the player chooses so order doesn't matter so we're over counting we're counting all of the different ways that the same number of cards can be arranged so in order to I guess not over count we have to divide this by the ways in which nine cards can be rearranged so we have to divide this we have to divide this by the way nine cards can be rearranged so how many ways can nine cards be rearranged if I have nine cards and I'm going to pick one of nine to be in the first slot well that means I have nine ways to put something in the first slot then in the second slot I have eight ways of putting a card in the second slot of because I took one to put in the first so I have eight left then seven then six then five taught then four then three then two then one that last slot there's only going to be one card left to put in it so this number right here where you take nine times 8 times 7 times 6 times 5 times 4 times 3 times 2 times 1 or 9 you start with 9 then you multiply it by every number less than 9 every I guess we could say natural number less than 9 this is called 9 factorial and you put it you express it as an exclamation mark so if we want to think about all of the different ways that we can get we can have all of the different combinations for hands this is the number of hands if we cared about the order but then we want to divide by the number of ways we can order things so that we don't over count and this will be an answer and this will be the correct answer now this is a super SuperDuper large number let me get let me just let's figure out how large of a number this is we have let's see 30 let me make sure I'm we have 36 let me scroll to the left a little bit 36 times 35 times 30 times 34 times 33 times 32 times 31 times 30 times 29 times 28 / nine well I could do it this way I could put a parenthesis divided by parentheses 9 times 8 times 7 times 6 times 5 times 4 times 3 times 2 times 1 now hopefully the calculator can handle this and it gave us this number was at 94 million one hundred forty three thousand two hundred and eighty let me put this on the side so I can read it so this number right here this number right here gives us 94 million one hundred and forty-three thousand one hundred and forty-three thousand and two hundred and eighty so that's the answer for this problem that there are 94 million one hundred forty-three thousand two hundred eighty possible nine card hands in this situation now we kind of just work through it we reasoned our way through it there is a formula for this that does exactly the exact same thing and the way that people denote this formulas they say look we have 36 things we have 36 things and we are going to choose nine of them right we don't care about order so sometimes it'll be written as n choose K and choose K let me write it this way so what did we do here we have 36 things we chose nine so this numerator over here this was 36 factorial but 36 factorial would go all the way down to 27 26 25 it would just keep going but we stopped only nine away from 36 so this is 36 factorial so this part right here that part right there is not just 36 factorial it's 36 factorial divided by 36 minus 9 factorial what is 36 minus 9 it's 27 so 27 factorial so let's think about this 36 factorial it'd be 36 times 35 all you keep going all the way times 28 times 27 all the way going all the way down to 1 that is 36 factorial 36 factorial now what is 36 minus 9 factorial that's 27 factorial so if you divided by 27 factorial 27 factorial is 27 times 26 all the way down to one well this and this are the exact same thing there's 27 times 26 so that and that would cancel out so if you do 36 divided by 36 minus 9 factorial you just get the first I guess the largest nine terms of 36 factorial which is exactly what we have over there so that is that and then we divided it by nine factorial and we divided it by nine factorial and this right here is called 36 choose nine and sometimes you'll see this formula written like this n choose K and they'll write the formula as equal to n factorial over n minus K factorial and also in the denominator K factorial and this is a general formula that if you have n things and you're going to you want to find out all of the all of the possible possible ways you can pick K things from those end things and you don't care about the order all you care is about which K things you pick you don't care about the order in which you pick those K things so that's what we did here