Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

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

Given a population of size $n,$ what is the probability of the event $E$ in which any two people neither share the same birthday nor have birthdays falling on consecutive days?

This problem came up in a recitation for my probability class and didn't really receive satisfactory treatment. I have determined to the best of my abilities that it hasn't appeared in any recent threads.

The way I thought of solving this problem was to consider the complementary event. It seemed reasonable to assume that an outcome would be decided by 1) choosing two days to ignore 2) choose a "starting position" for the first bin (3 choices) and 3) deposit $n$ balls into $\lfloor \frac{563}{3} \rfloor $ bins such that no two balls occupy the same bin. The answer that this gives is $\mathbb{P} (E) = 1 - \frac{3\cdot \binom{365}{2} 121!}{(121-n)! 365^n}.$ I'm pretty sure this is wrong, as you could have a group of 121 people with birthdays staggered by $1$ (eg. Jan 1, Jan 3, ...) Where is the fallacy (and the correct answer?)

share|cite|improve this question
up vote 1 down vote accepted

For the answer,


1) First find the number of ways to pick $n$ birthdays (from $365$) such that no two are consecutive.

2) Second, once you have such a set, find the number of ways to assign those birthdays to the $n$ people.

Combine and use that to compute the probability.

The answer I get for


$\binom{366-n}{n}$. See this answer on how to derive that:



The final answer



share|cite|improve this answer

Your Answer


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