Associated Topics || Dr. Math Home || Search Dr. Math

### Random Card Shuffling Probabilities

```
Date: 6/11/96 at 20:37:33
From: Anonymous
Subject: Probability of two cards being....

I was wondering the other day what the probability of say at least two
eights being next to each other in a random shuffling of a deck of
cards.  However a more interesting problem is the probability of at
least two cards (2 eights or 2 queens etc.) being next to each other.
The answer is 1-P(no similar cards are next to each other), but how do
you count that?
```

```
Date: 6/12/96 at 6:10:30
From: Doctor Anthony
Subject: Re: Probability of two cards being....

If you want the probability that no 'eights' are next to each other,
you can model the problem in the following way:

Let 'eights' be represented by stars, *, and non-eights by strips |.
Then
if the cards are laid out in a row at random, you get something like
this:

|||*||||**||||....... and so on.

You will notice that the condition for no two stars to be together is
that a single star must occupy a gap between two strips.  Suppose
therefore that we first lay out the 48 strips (non-eights) in a row.
Now there are 49 gaps available (49 because there is a space before
the first strip and after the last one), and we must choose 4 out of
the 49 in which to place a star.
This can be done in  49_C_4 ways = 211876 ways.
However the number of ways of laying out 48 strips and 4 stars in any
order is
52!/(48!.4!)  = 52_C_4 = 270725

The probability that no eights are together is therefore given by:

(49_C_4)/(52_C_4) = 0.782624

The probability that at least two eights are together is therefore
1 - 0.782624 = 0.217376

These are also the a priori probabilities for any other kind of card,
say kings or sixes. The fact that eights ARE together would however
affect the number of gaps available when considering other face-value
cards, so the probabilities are not independent, if, for example, you
wanted probabilities that no eights and no queens are together.

I will give the matter further thought, but I think your general
request for the probability that NO two cards of the same face-value
are together will prove very complex indeed.

-Doctor Anthony,  The Math Forum
Check out our web site!  http://mathforum.org/dr.math/
```

```
Date: 6/13/96 at 23:16:30
From: Doctor Peter
Subject: Re: Probability of two cards being....

This problem involves counting to number of permutations, since we are
dealing (no pun intended) with the order of the cards in the deck.
There are 52! permutations of the deck, but the calculation of the
number of permutations with at least two like cards together involves
a fairly lengthy recursive formula.  There is not enough space to give
it here, but it involves the number of permutations of the 4 together
plus 3 together plus 2 together all times the rest of the decks'
sheet model based on this, and got that the P(at least 2 together) is

-Doctor Peter,  The Math Forum
Check out our web site!
```
Associated Topics:
College Probability
High School Permutations and Combinations
High School Probability

Search the Dr. Math Library:

 Find items containing (put spaces between keywords):   Click only once for faster results: [ Choose "whole words" when searching for a word like age.] all keywords, in any order at least one, that exact phrase parts of words whole words

Submit your own question to Dr. Math
Math Forum Home || Math Library || Quick Reference || Math Forum Search