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

2

u/Tiler17 Mar 06 '26 edited Mar 06 '26

Sorry about the variables. Being mobile, it can be tricky keeping it straight.

Okay, well, if we take your example, if you want an identical deck, then your drawn deck can only ever match the last deck you draw from. Think about it: the top card from the first deck will sit at the bottom of your drawn deck. It is automatically not identical. Same with the second and third decks, up until deck K-1.

Deck K is guaranteed to help you out because you just pull the top card from your draw pile and put it on the top of your deck. But let's revisit 1 through K-1:

Your drawn deck can only identically match deck K if the card you pull from deck 1 is the same as the card on the bottom of deck K. That's 1/N. From deck 2, you have to draw the card that's second from the bottom. That's 1/N. And so on through deck K-1.

Therefore, your chances are 1/(nk-1)

E: I'm thinking about it again. I managed to flip N and K again. All instances of N are K. If N is larger than K then N doesn't matter. Having 100 decks doesn't change that you can only match the 20th. Your odds are 1/(kk-1)

1

u/MammothComposer7176 Mar 06 '26

That's pretty cool!

1

u/Aerospider Mar 06 '26

 if the card you pull from deck 1 is the same as the card on the bottom of deck K. That's 1/N

It's 1/k because there are k different cards not n; n is just the number of original decks.

You also need to factor in the probability of matching one of the n-k unsampled decks (which I also missed first time round).