Probability question: getting matching cards from two decks

Take two standard decks of 52 cards and shuffle them together. Now deal the cards out in a single row. How would you compute the probability that somewhere in that row of 104 cards there are two matching cards next to each other? Where “matching” means the same suit and rank. Not the probability of a specific card (e.g. the two of clubs) being next to it’s mate from the other deck, but of any two “mates” being next to each other.

My intuition tells me that it’s probably fairly likely that in any random shuffle, there will be at least one matching pair SOMEWHERE in there, but I don’t know how to go about computing the probability.

Risking the wrath of those smarter at mathematics than me, I’d presume this to be 52^2 or the odds of an adjacent pair are 1:2704

That sounds high to me. Remember that half the cards in the stack have a match. Prob & Stat was my never my strong suit, but I’d say it was closer to 1:2, if not exactly that.

This appears to be the same as keeping the decks separate and turning over 1 card from each deck. As the size of the decks increases, the probability of a match approaches .63 = 1-1/e where e=2.71828…

Well the chance that any card except the end card (which would have no neighbour to it’s right) picked at random have a matching (suite or rank) neighbour to their right (choice of direction arbitary) is:
12+13+3+3/104= 31/104

so the odds are alot higher than stated in the previous two posts (my own guesitmate would be something in the region of 995/1000).

I’ll think on it some more.

Well, I can say from personal experience that this is too high. This question came to mind because I’ve been playing a lot of the solitaire game Forty Thieves recently. It’s a two-deck game that deals out forty cards and then the remaining 64 are turned over one at a time. I’ve started to notice that it happens pretty often that sometime during the game, I’ll turn over a card and then the next card is its mate. I haven’t paid strict attention or written anything down, so I don’t have actual stats, but it seems to happen at least once every two or three games.

Your computation might be for the odds of a particular card turning up next to its mate, but not for any card.

For matching two decks, there’s a better explanation here:

This page gives the same answer as my previous reference: 1/e is the probability of no match, and 1-1/e is the probability of a match, or almost 2/3, which I think is the same as Q.E.D. said.

It also says “for any reasonably large number of cards, say, 10 or more, the probability that [you get a match] is almost independent of the number of cards in the deck.”

The odds of one pair being the same card for any pair is 1/103 (52 cards in the deck x 2 - the first card being matched), and there are 103 possible pairs (every card except the last is the first card in a pair). So the probability of no same cards being paired at all = 102/103 ^ 103 = 37% (rounded), and the probability of at least one pair being the same is 63%.

Royal Nonesuch, by matching Roadfood doesn’t mean the same card from a different deck, but sharing the same rank or suite.

Roadfood, I know the game you are referring to, the best way is to imagine laying out all the cards:

probabilty first and second card match = 31/103

probabilty 2nd and 3rd match with no previous matches = 30/10272/103 + 29/10231/103

probailty 3rd and 4th match with no previous matches =

my head will explode working this out, but to suffice to say your looking at binomial expansion.

sorry mistake,

prob. 2nd and 3rd match with no previous matches= 72/103*31/102

just to give you an idea of how damn hard the question you asked is!:

prob. 3rd and 4th with no previous matches = (1-(72/103 * 31/102))(1/4 + 1/13) 30/101 * (1-(1/4+1/13)) * 31/101

MC Master of Ceremonies, the OP stated that the cards must match rank AND suite.

D’oh, Sorry yes your’re right, I think the sentence after confused me or I should invest in a pair of reading glasses.

but now I’ve started down the wrong line, can anyone tell me what the probabilty is of laying out two decks of 52 cards, where NO card is next to another of either the same rank or suite?

37%, as per my first post. Get them reading glasses post-haste! :slight_smile:

None of the methods listed so far for Roadfood’s OP are exact (though they are close). For the OP, you can calculate it by the sum of:

[(-2)[sup]n[/sup] * (104 - n)! * C(52,n)] / (104!)

from n=0 to 52.

This is the probability that no cards are paired. The probability that there is at least one pair is 1 minus this, which is 63.39019684%.

This looks like it could be much more complicated, so I don’t know if I’ll get around to trying that one out or not.

This problem is the mathematical equivalent of “Montmort’s problem”. His (correct) solution was first printed about 1708.

No match is the series

p=1/2! - 1/3! + 1/4! - 1/5! + . . .1/(n-1)! (Here n=52)

The value of this series converges extremely fast. The value reached where n=9 and n=10,000,000,000 is the same for the first six digits right of the decimal and all n in between.

This isn’t the same as Montmort’s problem, that’s a mistake made earlier by rowrrbazzle.

Montmort’s problem would be equivalent to shuffling the two decks separately, then simulataneously dealing cards, one at a time, from the two decks, and seeing when a match occurs.

  1. In the OP’s problem, there’s no guarantee that the cards will alternate (a card from deck 1, a card from deck 2, a card from deck 1,…).

  2. Even if they did alternate in the OP, Montmort’s problem counts a match only if they match on that particular deal. In the OP, the match counts if, say, the last card from deal 5 matches the first card from deal 6.

If you’re still not convinced, consider what happens if we have two decks, two cards each. In Montmort’s problem, the probability of no match is 1/2. In the OP, here are the possible deals (say the cards in each deck are 0 and 1):


1/3 of these have no match.


I’m not sure what you meant by #2 above. Montmort is a probability, it applies to every deal. If you know there is a match, there’s no problem and the probablity is simply 1. And I don’t see in the OP anything about multiple deals.

I also don’t understand your example. It looks to me like combinations 1, 3 and 6 are matches. Isn’t that 1/2?