How to find the possible combinations of 13 cards in poker?
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
From a standard 52 cards deck, given 13 random cards, I'm trying to find the possible combinations to be put in 3 slots (the total number of combinations as well as the list of combinations itself)
First slot is 5 cards
Second slot is 5 cards
Third slot is 3 cards
No ordering in each slot. (A, B, C, D, E) is the same as (C, D, A, B, E)
How would I go about approaching this? Thank you
probability
add a comment |Â
up vote
0
down vote
favorite
From a standard 52 cards deck, given 13 random cards, I'm trying to find the possible combinations to be put in 3 slots (the total number of combinations as well as the list of combinations itself)
First slot is 5 cards
Second slot is 5 cards
Third slot is 3 cards
No ordering in each slot. (A, B, C, D, E) is the same as (C, D, A, B, E)
How would I go about approaching this? Thank you
probability
Are the first and second slots distinguishable?
â Tiwa Aina
Jul 15 at 3:59
@TiwaAina yes they are.
â Jack Smother
Jul 15 at 4:10
In order to actually list the combinations, you need an algorithm to generate all the subsets of $13$ objects taken $3$ at a time. Computer scientists have developed several such algorithms. For example, see section 7.2.1.3 of "The Art of Computer Programming, Volume 4A, Combinatorial Algorithms, Part 1" by Donald Knuth. Alternatively, if you just want results and don't care where they come from, if you are a Python programmer you could use the itertools.combinations() function.
â awkward
Jul 15 at 12:16
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
From a standard 52 cards deck, given 13 random cards, I'm trying to find the possible combinations to be put in 3 slots (the total number of combinations as well as the list of combinations itself)
First slot is 5 cards
Second slot is 5 cards
Third slot is 3 cards
No ordering in each slot. (A, B, C, D, E) is the same as (C, D, A, B, E)
How would I go about approaching this? Thank you
probability
From a standard 52 cards deck, given 13 random cards, I'm trying to find the possible combinations to be put in 3 slots (the total number of combinations as well as the list of combinations itself)
First slot is 5 cards
Second slot is 5 cards
Third slot is 3 cards
No ordering in each slot. (A, B, C, D, E) is the same as (C, D, A, B, E)
How would I go about approaching this? Thank you
probability
edited Jul 15 at 3:53
asked Jul 15 at 3:46
Jack Smother
1033
1033
Are the first and second slots distinguishable?
â Tiwa Aina
Jul 15 at 3:59
@TiwaAina yes they are.
â Jack Smother
Jul 15 at 4:10
In order to actually list the combinations, you need an algorithm to generate all the subsets of $13$ objects taken $3$ at a time. Computer scientists have developed several such algorithms. For example, see section 7.2.1.3 of "The Art of Computer Programming, Volume 4A, Combinatorial Algorithms, Part 1" by Donald Knuth. Alternatively, if you just want results and don't care where they come from, if you are a Python programmer you could use the itertools.combinations() function.
â awkward
Jul 15 at 12:16
add a comment |Â
Are the first and second slots distinguishable?
â Tiwa Aina
Jul 15 at 3:59
@TiwaAina yes they are.
â Jack Smother
Jul 15 at 4:10
In order to actually list the combinations, you need an algorithm to generate all the subsets of $13$ objects taken $3$ at a time. Computer scientists have developed several such algorithms. For example, see section 7.2.1.3 of "The Art of Computer Programming, Volume 4A, Combinatorial Algorithms, Part 1" by Donald Knuth. Alternatively, if you just want results and don't care where they come from, if you are a Python programmer you could use the itertools.combinations() function.
â awkward
Jul 15 at 12:16
Are the first and second slots distinguishable?
â Tiwa Aina
Jul 15 at 3:59
Are the first and second slots distinguishable?
â Tiwa Aina
Jul 15 at 3:59
@TiwaAina yes they are.
â Jack Smother
Jul 15 at 4:10
@TiwaAina yes they are.
â Jack Smother
Jul 15 at 4:10
In order to actually list the combinations, you need an algorithm to generate all the subsets of $13$ objects taken $3$ at a time. Computer scientists have developed several such algorithms. For example, see section 7.2.1.3 of "The Art of Computer Programming, Volume 4A, Combinatorial Algorithms, Part 1" by Donald Knuth. Alternatively, if you just want results and don't care where they come from, if you are a Python programmer you could use the itertools.combinations() function.
â awkward
Jul 15 at 12:16
In order to actually list the combinations, you need an algorithm to generate all the subsets of $13$ objects taken $3$ at a time. Computer scientists have developed several such algorithms. For example, see section 7.2.1.3 of "The Art of Computer Programming, Volume 4A, Combinatorial Algorithms, Part 1" by Donald Knuth. Alternatively, if you just want results and don't care where they come from, if you are a Python programmer you could use the itertools.combinations() function.
â awkward
Jul 15 at 12:16
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
1
down vote
accepted
Since you say "first," "second," and "third," it seems to me that the slots are distinguishable.
We can put $5$ cards (out of the $13$ we start with) in the first slot in $binom135$ ways.
We can put $5$ cards (out of the $13-5=8$ we now have) in the second slot in $binom85$ ways.
We can put the remaining $3$ cards in the third slot in $binom33=1$ way.
Put this together for a total of $binom135binom85binom33=72072$ possible combinations.
This is given the fact that the 13 cards have already been chosen. If we have to choose the 13 from a deck and then distribute among the slots, we would multiply our result by $binom5213$ (and end up with $45,766,697,267,491,200$), since there are $binom5213$ ways to choose $13$ cards out of a set of $52$.
Addendum: Here's some context for that last number. If you wanted a file with every combination of cards in slots (using Ks to denote King of Spades, for instance), you would need over one exabyte of storage for that one file!
lol 1 exabyte. Thank you for the information. :D
â Jack Smother
Jul 15 at 4:30
any idea how to print out the results for the 72072? i see there would be three for loops and a lot of lists
â Jack Smother
Jul 15 at 4:31
@JackSmother I'm not a very good programmer (I only know basic Python and Java). Using Python, I would make a set of lists containing every size-5 subset of your deck-of-thirteen (e.g. deck13 = ["Ah", "2h",...,"Ks"]). Then, for each of these lists, I would make a set of every possible slot2 based on the cards in the lists I'm iterating over. Then, I would make Cartesian product of the set of slot1 lists and their corresponding set of slot2 lists. Finally, in each of the lists, I would append a list of the 3 cards left over. I recommend going on StackOverflow for a better implementation.
â Tiwa Aina
Jul 15 at 4:55
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
Since you say "first," "second," and "third," it seems to me that the slots are distinguishable.
We can put $5$ cards (out of the $13$ we start with) in the first slot in $binom135$ ways.
We can put $5$ cards (out of the $13-5=8$ we now have) in the second slot in $binom85$ ways.
We can put the remaining $3$ cards in the third slot in $binom33=1$ way.
Put this together for a total of $binom135binom85binom33=72072$ possible combinations.
This is given the fact that the 13 cards have already been chosen. If we have to choose the 13 from a deck and then distribute among the slots, we would multiply our result by $binom5213$ (and end up with $45,766,697,267,491,200$), since there are $binom5213$ ways to choose $13$ cards out of a set of $52$.
Addendum: Here's some context for that last number. If you wanted a file with every combination of cards in slots (using Ks to denote King of Spades, for instance), you would need over one exabyte of storage for that one file!
lol 1 exabyte. Thank you for the information. :D
â Jack Smother
Jul 15 at 4:30
any idea how to print out the results for the 72072? i see there would be three for loops and a lot of lists
â Jack Smother
Jul 15 at 4:31
@JackSmother I'm not a very good programmer (I only know basic Python and Java). Using Python, I would make a set of lists containing every size-5 subset of your deck-of-thirteen (e.g. deck13 = ["Ah", "2h",...,"Ks"]). Then, for each of these lists, I would make a set of every possible slot2 based on the cards in the lists I'm iterating over. Then, I would make Cartesian product of the set of slot1 lists and their corresponding set of slot2 lists. Finally, in each of the lists, I would append a list of the 3 cards left over. I recommend going on StackOverflow for a better implementation.
â Tiwa Aina
Jul 15 at 4:55
add a comment |Â
up vote
1
down vote
accepted
Since you say "first," "second," and "third," it seems to me that the slots are distinguishable.
We can put $5$ cards (out of the $13$ we start with) in the first slot in $binom135$ ways.
We can put $5$ cards (out of the $13-5=8$ we now have) in the second slot in $binom85$ ways.
We can put the remaining $3$ cards in the third slot in $binom33=1$ way.
Put this together for a total of $binom135binom85binom33=72072$ possible combinations.
This is given the fact that the 13 cards have already been chosen. If we have to choose the 13 from a deck and then distribute among the slots, we would multiply our result by $binom5213$ (and end up with $45,766,697,267,491,200$), since there are $binom5213$ ways to choose $13$ cards out of a set of $52$.
Addendum: Here's some context for that last number. If you wanted a file with every combination of cards in slots (using Ks to denote King of Spades, for instance), you would need over one exabyte of storage for that one file!
lol 1 exabyte. Thank you for the information. :D
â Jack Smother
Jul 15 at 4:30
any idea how to print out the results for the 72072? i see there would be three for loops and a lot of lists
â Jack Smother
Jul 15 at 4:31
@JackSmother I'm not a very good programmer (I only know basic Python and Java). Using Python, I would make a set of lists containing every size-5 subset of your deck-of-thirteen (e.g. deck13 = ["Ah", "2h",...,"Ks"]). Then, for each of these lists, I would make a set of every possible slot2 based on the cards in the lists I'm iterating over. Then, I would make Cartesian product of the set of slot1 lists and their corresponding set of slot2 lists. Finally, in each of the lists, I would append a list of the 3 cards left over. I recommend going on StackOverflow for a better implementation.
â Tiwa Aina
Jul 15 at 4:55
add a comment |Â
up vote
1
down vote
accepted
up vote
1
down vote
accepted
Since you say "first," "second," and "third," it seems to me that the slots are distinguishable.
We can put $5$ cards (out of the $13$ we start with) in the first slot in $binom135$ ways.
We can put $5$ cards (out of the $13-5=8$ we now have) in the second slot in $binom85$ ways.
We can put the remaining $3$ cards in the third slot in $binom33=1$ way.
Put this together for a total of $binom135binom85binom33=72072$ possible combinations.
This is given the fact that the 13 cards have already been chosen. If we have to choose the 13 from a deck and then distribute among the slots, we would multiply our result by $binom5213$ (and end up with $45,766,697,267,491,200$), since there are $binom5213$ ways to choose $13$ cards out of a set of $52$.
Addendum: Here's some context for that last number. If you wanted a file with every combination of cards in slots (using Ks to denote King of Spades, for instance), you would need over one exabyte of storage for that one file!
Since you say "first," "second," and "third," it seems to me that the slots are distinguishable.
We can put $5$ cards (out of the $13$ we start with) in the first slot in $binom135$ ways.
We can put $5$ cards (out of the $13-5=8$ we now have) in the second slot in $binom85$ ways.
We can put the remaining $3$ cards in the third slot in $binom33=1$ way.
Put this together for a total of $binom135binom85binom33=72072$ possible combinations.
This is given the fact that the 13 cards have already been chosen. If we have to choose the 13 from a deck and then distribute among the slots, we would multiply our result by $binom5213$ (and end up with $45,766,697,267,491,200$), since there are $binom5213$ ways to choose $13$ cards out of a set of $52$.
Addendum: Here's some context for that last number. If you wanted a file with every combination of cards in slots (using Ks to denote King of Spades, for instance), you would need over one exabyte of storage for that one file!
edited Jul 15 at 4:28
answered Jul 15 at 4:16
Tiwa Aina
2,576319
2,576319
lol 1 exabyte. Thank you for the information. :D
â Jack Smother
Jul 15 at 4:30
any idea how to print out the results for the 72072? i see there would be three for loops and a lot of lists
â Jack Smother
Jul 15 at 4:31
@JackSmother I'm not a very good programmer (I only know basic Python and Java). Using Python, I would make a set of lists containing every size-5 subset of your deck-of-thirteen (e.g. deck13 = ["Ah", "2h",...,"Ks"]). Then, for each of these lists, I would make a set of every possible slot2 based on the cards in the lists I'm iterating over. Then, I would make Cartesian product of the set of slot1 lists and their corresponding set of slot2 lists. Finally, in each of the lists, I would append a list of the 3 cards left over. I recommend going on StackOverflow for a better implementation.
â Tiwa Aina
Jul 15 at 4:55
add a comment |Â
lol 1 exabyte. Thank you for the information. :D
â Jack Smother
Jul 15 at 4:30
any idea how to print out the results for the 72072? i see there would be three for loops and a lot of lists
â Jack Smother
Jul 15 at 4:31
@JackSmother I'm not a very good programmer (I only know basic Python and Java). Using Python, I would make a set of lists containing every size-5 subset of your deck-of-thirteen (e.g. deck13 = ["Ah", "2h",...,"Ks"]). Then, for each of these lists, I would make a set of every possible slot2 based on the cards in the lists I'm iterating over. Then, I would make Cartesian product of the set of slot1 lists and their corresponding set of slot2 lists. Finally, in each of the lists, I would append a list of the 3 cards left over. I recommend going on StackOverflow for a better implementation.
â Tiwa Aina
Jul 15 at 4:55
lol 1 exabyte. Thank you for the information. :D
â Jack Smother
Jul 15 at 4:30
lol 1 exabyte. Thank you for the information. :D
â Jack Smother
Jul 15 at 4:30
any idea how to print out the results for the 72072? i see there would be three for loops and a lot of lists
â Jack Smother
Jul 15 at 4:31
any idea how to print out the results for the 72072? i see there would be three for loops and a lot of lists
â Jack Smother
Jul 15 at 4:31
@JackSmother I'm not a very good programmer (I only know basic Python and Java). Using Python, I would make a set of lists containing every size-5 subset of your deck-of-thirteen (e.g. deck13 = ["Ah", "2h",...,"Ks"]). Then, for each of these lists, I would make a set of every possible slot2 based on the cards in the lists I'm iterating over. Then, I would make Cartesian product of the set of slot1 lists and their corresponding set of slot2 lists. Finally, in each of the lists, I would append a list of the 3 cards left over. I recommend going on StackOverflow for a better implementation.
â Tiwa Aina
Jul 15 at 4:55
@JackSmother I'm not a very good programmer (I only know basic Python and Java). Using Python, I would make a set of lists containing every size-5 subset of your deck-of-thirteen (e.g. deck13 = ["Ah", "2h",...,"Ks"]). Then, for each of these lists, I would make a set of every possible slot2 based on the cards in the lists I'm iterating over. Then, I would make Cartesian product of the set of slot1 lists and their corresponding set of slot2 lists. Finally, in each of the lists, I would append a list of the 3 cards left over. I recommend going on StackOverflow for a better implementation.
â Tiwa Aina
Jul 15 at 4:55
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2852167%2fhow-to-find-the-possible-combinations-of-13-cards-in-poker%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Are the first and second slots distinguishable?
â Tiwa Aina
Jul 15 at 3:59
@TiwaAina yes they are.
â Jack Smother
Jul 15 at 4:10
In order to actually list the combinations, you need an algorithm to generate all the subsets of $13$ objects taken $3$ at a time. Computer scientists have developed several such algorithms. For example, see section 7.2.1.3 of "The Art of Computer Programming, Volume 4A, Combinatorial Algorithms, Part 1" by Donald Knuth. Alternatively, if you just want results and don't care where they come from, if you are a Python programmer you could use the itertools.combinations() function.
â awkward
Jul 15 at 12:16