# What is the probability of of drawing at least one king and one ace in a five card poker hand?

The title problem is just one specific example of a more generalized problem that I'm trying to solve. I'm trying to write an efficient algorithm for calculating the probability of at least k occurrences each of several dependent events occurring in a particular sample space. It is the presence of wildcards and multiple types of events here that is making the problem difficult for me.

I found this post partially helpful in guiding me: probability of hand with at least 2 kings

I can't figure out how to modify it to accommodate for different card types. I tried subtracting from 1 the sum of the probabilities of drawing a hand containing each proper subset of the minimal set of cards and adding those together. Note that 44 is the number of non-Kings and non-Aces in the deck:

1 -

[

Pr(0K and 0A) : 4C0 * 4C0 * 44C5 +

Pr(1K and 0A) : 4C1 * 4C0 * 44C4 +

Pr(0K and 1A) : 4C0 * 4C1 * 44C4

]

But this of course omits the possibility of getting 2-4 Kings (if and only if none of the other cards is an Ace) and getting 2-4 Aces (if and only if none of the other cards is a King). I need a little push in the right direction to help me develop a generalized solution to this problem.

BTW, I'm looking for a method that is more efficient than enumerating all valid combinations, and summing their probabilities. Assume that the method should work somewhat efficiently such that instead of a five card poker hand, it's a billion card poker hand drawn from millions of decks shuffled together.

• ${48 \choose 5}/{52 \choose 5}$ is probability of no Aces
• ${48 \choose 5}/{52 \choose 5}$ is probability of no Kings
• ${44 \choose 5}/{52 \choose 5}$ is probability of no Aces or Kings
$$\dfrac{ \displaystyle{52 \choose 5} - 2{48 \choose 5} + {44 \choose 5}}{ \displaystyle{52 \choose 5} }$$
which is close to $10\%$.