- How Many Cards Dealt In Gin Rummy
- Number Of Cards Dealt In Gin Rummy Free
- Number Of Cards Dealt In Gin Rummy
- Number Of Cards Dealt In Gin Rummy Card Game
Recently I picked up the game of Gin Rummy, which is a card game for two players using a standard deck of 52 cards (Gin_Rummy). Players always have hands of 10 cards, and the strongest kind of hand in the game is called a Gin, where all cards can be used to create melds. I was curious, what is the probability of a player being dealt Gin right away?
Gin has two kinds of melds: Sets of 3 or 4 cards sharing the same rank, e.g.8♥8♦8♠; and runs of 3 or more cards in sequence, of the same suit. e.g. 3♥4♥5♥ or more. In order to make Gin (melds with all 10 cards), it’s clear that you either need two runs of 5 cards, or a combination of melds of sizes 4-3-3. Here are some examples:
How Many Cards Dealt In Gin Rummy
- In gin rummy of play is to form melds as in rummy—either sequences of three or more cards of the same suit or sets of three or more cards of the same rank. After drawing, a player whose unmatched cards (less one discard) total 10 points or less may “knock” (by physically rapping.
- Deal the correct number of cards. In Progressive Rummy the number of cards dealt is different for each hand: deal number one is 6 cards per player; deal number two is seven cards; deal number three is eight cards, etc., until deal number seven where 12 cards are dealt. This is the last hand of the game.
- Gin rummy is a two-player card game played with one standard deck of 52 cards with no jokers. In gin rummy, cards rank low to high, with Ace being the lowest and King being the highest ranking cards.
Number Of Cards Dealt In Gin Rummy Free
(5-5 split)
A♥ 2♥ 3♥ 4♥ 5♥ 9♠ 10♠ J♠ Q♠ K♠
Gin rummy is played with a standard 52-card pack of cards. The ranking from high to low is King, Queen, Jack, 10, 9, 8, 7, 6, 5, 4, 3, 2, Ace.
Number Of Cards Dealt In Gin Rummy
(4-3-3 split)
4♥ 4♠ 4♦ 4♣ 6♥ 7♥ 8♥ 2♣ 2♥ 2♠
In order to find the probability we simply need to count the number of possible Gin hands, and divide by the number of hands of size 10, given mathematically by 52 Choose 10. While it’s probably possible to count the Gin hands “by hand” with combinatorics, that task was too annoying for me to do at the time, and so I chose to devise an algorithm to count them instead.
When I started thinking about this problem, I found a web forum where one user had devised a brute force algorithm, iterating over all possible hands, to count the number of Gin hands, which took several hours to compute. Rather than iterate through every possible hand of 10 cards, my approach was to first compute all the possible melds that can be made, and then combine those melds (in the combinations 5-5 and 4-3-3), to see if they were valid hands. A combination of melds could be invalid if the melds have the same cards, for example, the following three melds all contain a 4:
4♥ 4♠ 4♦ 4♣ 3♥ 4♥ 5♥ 4♣ 5♣ 6♣
Number Of Cards Dealt In Gin Rummy Card Game
In the case above, the hand is not a valid hand of 10 cards, so this combination of melds is not counted as a Gin hand.
The algorithm also had to be careful not to count hands twice. This is possible because some hands of 10 cards can actually make Gin in multiple ways. For example, the following meld combinations are actually made from the same hand:
A♣2♣3♣4♣5♣ 6♣7♣8♣9♣10♣
A♣2♣3♣4♣ 5♣6♣7♣ 8♣9♣10♣
A♣2♣3♣ 4♣5♣6♣7♣ 8♣9♣10♣
A♣2♣3♣ 4♣5♣6♣ 7♣8♣9♣10♣
For this reason, when building hands from melds, the algorithm needs to check if the resulting hand has been made before. I achieve this in my algorithm by inserting Gin hands into a hash table the first time they are made, and check this table for every meld combination, so that hands are not double counted.
I wrote the algorithm in C++, and the resulting code runs in about 500 milliseconds on my machine. I have made the source code available.
The result is that there are 51200 possible hands that make Gin. This means the probability of being dealt Gin is 1 in 308,984