Consider a game with a normal deck of 40 cards, that is 10 numbers for each suit.
The game is as follows:
- before every game the deck is shuffled
- I draw a card at a time without replacement, until no cards are left
- every time I draw a card I also say a number at the same time
- the number I will say is known. I always say the numbers 1, 2 and 3 in this order until the end. This means that on the first card I will say 1, on the 6th card I will say 3 and on the 40th card I will say 1.
- I lose the game if at any point the card I draw has the same rank as the number I am saying. I win if I can get to the end of the deck.
How would you compute the probability of winning at such a game?
Here's a solution using my Icepool Python probability package:
You can run this in your browser here.
Here we consider 1, 2, and 3 to be "hands", and see whether each of them contains any of the corresponding rank. (After looking at the link in Michael Lugo's answer, I realized it would be more efficient to swap the roles of the hands and the ranks, but this formulation is more intuitive.) The chance of all three not containing any of the corresponding rank is
$$ \frac{2005028661108720 }{241365994493904000} \approx 0.830701\% $$
Perhaps someone else will come around with a more bespoke / intelligible solution.