Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Consider a generalized deck of $n$ cards. That is, $n$ objects (generalized cards) characterized by a pair of discrete indices: $(i,j)$, where $i$ is the rank and $i=1,\dots,R$ and $j$ is the suit and $j=1,\dots,S$.

For a regular deck we have $R=13$ (Ace to King) and $S=4$ (Spades to Hearts). In addition we consider a $T$-"tuple" of cards with $T \leq S$. A $T$-tuple is $T$ (or more) cards of the same rank (same i index) in a row within the shuffled deck.

Question: How many arrangements of these cards n have $T$-tuples in them?

intuitive: My question originated from the special case of a regular deck and $T=2$ i.e. pairs. How many arrangements of the $52$ cards have no pairs in them? (and from there one can easily calculate the probability of finding no pairs in a shuffled deck) for example a shuffled deck that goes like 8 3 7 4 6 7 5 4 K Q K K ...etc hits a pair in the last 2 cards

share|cite|improve this question
What do you mean by an "arrangement" having "a pair." Does that meant that two consecutive cards in the arrangement have are the same denomination? – Thomas Andrews Jun 26 '13 at 13:53
For pairs the answer is here:… – Byron Schmuland Jul 20 '13 at 23:54

Jair Taylor's wonderful answer to this MSE question shows you how to find the number of arrangements of the $n$ cards without pairs. The answer is $$\int_0^\infty (q_S(x))^R \, \exp(-x)\,dx,$$ where $q_S$ is the polynomial $q_S(x) = \sum_{i=1}^S \frac{(-1)^{i-S}}{i!} {S-1 \choose i-1}x^i$.

When $S=4$ and $R=13$ the number of pair-free arrangements is $$\int_0^\infty q_4(x)^{13} \, \exp(-x)\,dx =4184920420968817245135211427730337964623328025600$$ and the corresponding probability is about $.045476$.

For sequences of a different length, say triples, you need to replace the $q$ functions with other polynomials. You can even mix things up, and forbid patterns of different lengths for different values, e.g. no face cards occur in pairs, aces and twos cannot occur in triples, but otherwise no restrictions.

To learn how to do these calculations, and much more, I strongly recommend Jair's arXiv paper: Counting words with Laguerre series.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.