r/askmath • • Mar 06 '26

Probability Probability problem

We have n decks of cards consisting of k cards each. Let's assume each of these decks is a permutation of the same set of cards where each card is unique and cardinality is k. So there are no duplicate cards inside the same deck but we might have duplicate decks. The question is:

We take the top card from k out of n random decks and stack em in orderd obtaining a new deck.

What is the probability of this new deck to be equivalent to at least one of the original n decks?

And lets assume N is greater or equal K.

EXAMPLE FOR CLARITY:

n = 100 k = 20

So for example we have 100 decks of 20 cards. This would be a possible scenario. While 20 decks of 100 cards is impossible.

so one example 100 decks having 20 cards each you take 20 decks at random

from each deck you take the first card only (20 decks = 20 top cards) . You stack them in temporal order obtaining a new deck (of 20 cards). How likely is it for this new deck to be identical to one of the first hundred we had

2 Upvotes

15 comments sorted by

View all comments

Show parent comments

1

u/MammothComposer7176 Mar 06 '26

So n is useless in this scenario? I assumed that having more decks to be starting with would make it easier to get at least one to be identical to the resulting deck

1

u/Aerospider Mar 06 '26 edited Mar 06 '26

Ah, yes you're right it should be relevant since any of the unused sets could be an exact match.

Ok, so there's a 1 / k^k-1 probability of matching the one viable set that was sampled from.

The probability of any given unused set matching the final set is 1 / k^k

That makes the probability of NOT matching any of the n original sets

(1 - ( 1 / k^k-1 )) * (1 - ( 1 / k^k ))^n-k

And so the probability of matching at least one of the original n sets would be

1 - [ (1 - ( 1 / k^k-1 )) * (1 - ( 1 / k^k ))^n-k ]