gunbj
gunbj
  • Threads: 22
  • Posts: 84
Joined: Apr 11, 2018
July 1st, 2018 at 3:38:48 PM permalink
Hey everyone,

Just for fun, since I can't find it anywhere on the internet, I'm trying to calculate the combinations of hands at 3CP with a 52 card deck + 2 Jokers that act as wild cards and give the player only the best poker hand possible.

I have calculated the combinations for all natural hands and they are correct. So then I'm trying to calculate the combinations of hands with 1 Joker and then with 2 Jokers to then sum and obtain the total number of combinations, but I can't figure out entirely how to calculate the combinations for a pair, flush, straight and straight flush with 1 Joker, plus the combinations for a straight flush with 2 Jokers.

If I'm correct, the number of combinations for a 3oak with 1 joker would be c(13,1)*c(4,2)*c(2,1)=156, right?
Also I believe I'm correct in saying that with 2 Jokers there cannot be any combinations for pairs, flushes, straights and 3oak cause any card and 2 jokers would be ranked as a straight flush.
gordonm888
Administrator
gordonm888
  • Threads: 60
  • Posts: 5077
Joined: Feb 18, 2015
Thanked by
gunbj
July 1st, 2018 at 4:38:48 PM permalink
Quote: gunbj


If I'm correct, the number of combinations for a 3oak with 1 joker would be c(13,1)*c(4,2)*c(2,1)=156, right?
Also I believe I'm correct in saying that with 2 Jokers there cannot be any combinations for pairs, flushes, straights and 3oak cause any card and 2 jokers would be ranked as a straight flush.


Yes and yes.

Quote: gunbj

I can't figure out entirely how to calculate the combinations for a pair, flush, straight and straight flush with 1 Joker


For 1 joker let's first do combinations for a straight flush. I'll do it without the combination formula.

A straight flush occurs when you have a joker and two suited cards that are either connected or one gapped (one rank apart.)

Considering only ranks, there are 13 connected 2-card combinations (AK, KQ...2A) and 12 one gapped combinations (AQ, KJ...3-A).
There are four possible suits and 2 possible jokers.

So 4 * (13+12) * 2 = 200 straight flush combinations with 1 joker.

Flush combinations. 4 possible suits, requiring 2 cards from a suit but we need to correct for straight flushes (I.e. not double count the straight flushes.

Flushes with one Joker= c(4,1)*c(13,2) *c(2,1) - 200

Straight combinations: Like the straight flush calculation: considering only ranks we count 13 connectors and 12 one-gappers. In this case the suit options for any connector or one gapper are 2 of 4 suits.

Straights with one joker = c(4*2)*(13+12) *2

Pairs. With a one joker hand the pairs involve all the 2-card combos that are not 3oak, straights, flushes or straight flushes so:

Pair w/one joker combos = c(52,2)*c(2,1) -(3oak) - (Straights) - (Flushes) - (Straight flushes.)

Then divide everything by c(54,3) to get probabilities!

For 2 jokers, every hand is a straight flush. Combinations = c(2,2) * c(52,1) = 52.
So many better men, a few of them friends, are dead. And a thousand thousand slimy things live on, and so do I.
gunbj
gunbj
  • Threads: 22
  • Posts: 84
Joined: Apr 11, 2018
July 1st, 2018 at 5:45:10 PM permalink
Thank you, looks good!

Just one last question out of curiosity:

How can I calculate the number of combinations for a specific pair with 1 Joker (say Aces)? Would I have to calculate the combinations of flushes, straights, 3oak, and straight flushes involving an Ace, and then subtract them from the c(4,1)*c(52,1)*c(2,1) calculation or is there a different/faster way?
charliepatrick
charliepatrick
  • Threads: 39
  • Posts: 2952
Joined: Jun 17, 2011
July 2nd, 2018 at 10:50:30 AM permalink
Interesting idea as people might prefer it as higher hands would happen more often (although of course the dealer might equally make them!)

btw some games used slightly wild Jokers (c.f. Pai Gow poker) in that they complete a straight or flush but otherwise can only be Aces - this would make the maths different as KK? would be a pair of Kings.
gordonm888
Administrator
gordonm888
  • Threads: 60
  • Posts: 5077
Joined: Feb 18, 2015
Thanked by
gunbj
July 2nd, 2018 at 1:50:53 PM permalink
Quote: gunbj

How can I calculate the number of combinations for a specific pair with 1 Joker (say Aces)? Would I have to calculate the combinations of flushes, straights, 3oak, and straight flushes involving an Ace, and then subtract them from the c(4,1)*c(52,1)*c(2,1) calculation or is there a different/faster way?



Yes, that approach will work. But if I were just calculating this (as opposed to programming some generic way to solve this in a code or spreadsheet) I would use this method:

First card is a Joker, c(2,1).
Second card is an ace (c(4,1)
Third card can be anyone of the other 51 non-joker-cards except:
Not one of the other three aces (would give you trip aces.)
Not one of the four kings or four queens (that would give you a straight or straight flush.)
Not one of the ten same-suit cards of rank 2-J (that would give you a flush.)
So the 3rd card could be any of 51-3-4-4-10 = 30 possibilities.

So third card is c(30,1) or just plain 30 combinations.

Pair of Aces with 1 joker = c(2,1)*c(4,1)*c(30,1) = 240 combinations.

Note that if you had asked about a hand with one joker making a pair of 10s that the answer is different, because if two cards are assumed to be Joker and Ten, then the third card cannot be an 8,9,J or Q because all of those will give you a straight or straight flush. The 3rd card has only 24 possibilities and the three card hand has a total of 192 combinations.
So many better men, a few of them friends, are dead. And a thousand thousand slimy things live on, and so do I.
  • Jump to: