Skip to main content
GameDev.net gamedev.net
🔒 Locked

Dealing Cards

Started by ajas95 Dec 20, 2003 at 1:06 PM 5 replies 550+ views
Original Post
ajas95
ajas95
I got a good problem for anyone who likes math puzzles. This sounds like a homework problem, but it''s not... at least not for me. Anyway, you don''t have to post your answer, just think about it (who''s in school right now anyway?) How many different 5-card hands cand you deal from a 52-card deck if you disregard suit... (i.e. all hands with 3 aces and 2 kings are equivalent).
intrest86
intrest86
My number seems way to large for me, but... 175,344 different combinations.
Turring Machines are better than C++ any day ^_~
ajas95
ajas95
no, that''s what I got also. Did you come up with a general case way to get n cards from a deck of 52? My method would be difficult to apply in the general case (say unique 7-card hand instead of 5).

I got it by taking the number of different ranks of cards in the hand (ignoring suit) times the number of distributions of the different ranks times the permutations of those ranks within the 13. wow, that''s a truly horrible explanation
Enselic
Enselic
I get the answer 2538 combinations. This answer isn't possible though because it was rounded. My knowledge in combinatorial maths is limited, so what do I do wrong?

There are 2598960 ways of dealing 5 cards with regard to suits (easy to calculate). Every hand of five card must have 4*4*4*4*4 diffrent ways of being represented if you disregard suit because each card can be one of four suits. So the real answer must be the number of combinations you can deal divided by the number of represenations of a given hand if you only regard the values of the cards. 2598960/(4^5) ~ 2538.04. But AFAIK the answer must be an integer, so what I'm I doing wrong?

ajas95: Could you please change the topic to something more descriptive? Like 'Dealing Cards: Combinatorial Problem'.

[edited by - Enselic on December 20, 2003 6:12:13 PM]
intrest86
intrest86
I never looked for a general case, as the problem was simple enough to solve by hand with a quick set of multiplications. All I did was divide the problem into cases (5 unique cards, 2 cards the same with 3 unique cards, 3 cards the same with 2 unique cards, etc) and add up the combinations for each.
Turring Machines are better than C++ any day ^_~
Krumble
Krumble
You''ve contradicted yourself in the way you''ve stated the problem. When you say ''how many different 5-card hands can you deal...'' you imply that if you have cards ABCDE that hand is different than EDCBA because they were ''delt'' in a different order, but then you say all hands with 3 aces and 2 kings are equivilant... I understand what you are trying to ask, but you''ve just worded it wrong ;p (ps just finished a probability course where this came up
Kevin.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.