This also isn't right because it counts too many boards with A or 2 on it.
I must have been thrown by wheelflush's name before.
It's 36.5% for A2KK, and I get 49.5% for A23K.
For the first one, I counted all boards that have at least 3 different ranks 3-8. For the second one, I counted all boards that had at least 3 different ranks 3-8 plus boards that have either an A or a 2 and at least 2 other ranks 4-8.
The first one I did both analytically and by examining each board, and they agree. The second one I just examined each board.
Here is the analytical expression for the first one where A-E are some cards between 3 and 8:
ABCxx: C(6,3)*4^3*C(24,2)
ABCCx: C(6,2)*4^2*4*C(4,2)*24
ABCCC: C(6,2)*4^2*4*C(4,3)
ABCDx: C(6,4)*4^4*24 +
ABCDD: C(6,3)*4^3*3*C(4,2) +
ABCBC: 6*4*C(5,2)*C(4,2)^2 +
ABCDE: C(6,5)*4^5)/C(48,5)
==============================
625344 / C(48,5) = 0.365206178342164
A2KK script:
Code:
deck = c(1:13,101:113,1001:1013,10001:10013)
cards.out = c(1,2,13,113)
deck = deck[-which(deck %in% cards.out)]%%100
boards = combn(deck,5)
f = function(hand) {
hand = unique(hand)
sum(hand <= 8 & hand > 2) >= 3
}
sum(apply(boards,2,f))/ncol(boards)
[1] 0.365206178342164
A23K script:
Code:
deck = c(1:13,101:113,1001:1013,10001:10013)
cards.out = c(1,2,3,13)
deck = deck[-which(deck %in% cards.out)]%%100
boards = combn(deck,5)
f = function(hand) {
hand = unique(hand)
sum(hand <= 8 & hand > 2) >= 3 | (any(c(1,2) %in% hand) & sum(hand <=8 & hand >= 4) >= 2)
}
sum(apply(boards,2,f))/ncol(boards)
[1] 0.495206458666218
Last edited by BruceZ; 07-28-2014 at 08:18 AM.