2

Let $B(k,n)$ be the probability that a consecutive birthday chain of length $k$ can be found in $n$ people, excluding leap days and assuming that December 31 and January 1 are consecutive. After some calculations, I found that (formulae marked with * are found by myself after original question asked; formulae marked with ** are found in other answers):

  1. $B(n,n)=\dfrac{n!}{365^{n-1}}, B(n-1,n)^*=\dfrac{n!(-n+729)}{2\times365^{n-1}},\\ B(n-2,n)^*=\dfrac{n!(3n^2-4379n+1598698)}{24\times365^{n-1}},\\ B(n-3,n)^*=\dfrac{n!(-n^3+2192n^2-1602349n+390615698)}{48\times365^{n-1}},\\ B(n-4,n)^*=\dfrac{n!(15n^4-43890n^3+48180125n^2-23517139722n+4306546085848)}{5760\times365^{n-1}},\\B(2,n)^{**}=1-\dfrac{1}{365^{n-1}}\displaystyle{\sum_{k=1}^{n}\dfrac{1}{k!}(\prod_{i=1}^{k-1}(365-k-i))(\sum_{j=0}^{k-1}(-1)^j\dfrac{k!}{j!(k-j)!}(k-j)^n})$ (Note: all above formulas of the form $B(n-k,n)$ is only applicable for $n\geq2k+1$)
  2. $B(k,n)=0$ if $k>n$
  3. Non-trivial values: $B(3,6)=\frac{5716075620}{6478348728125},B(3,7)=\frac{3625913148606}{2364597285765625},B(3,8)=\frac{2102766321011580}{863078009304453125},\\B(4,8)=\frac{28850283423864}{863078009304453125},B(3,9)=\frac{1143143305602772486}{315023473396125390625},B(4,9)=\frac{18799017437778480}{315023473396125390625}$

However, I wasn't able to find the general form of $B(k,n)$. How can I generalize this probability?

Reference:

  1. Consecutive birthdays probability

2 Answers2

3

(Choose $k$ people out of $n$ people)$\times$(choose a particular day $d$ from $365$ days)$\times$(number of ways these $k$ people can have birthdays on days $d,d+1,\cdots,d+k-1$)$\times$(number of possible birthdays for the other $n-k$ people, with either no birthdays on $d-1$ or no birthdays on $d+k$) $$=\binom{n}{k}\times\binom{365}{1}\times k!\times\left(\binom{2}{1}364^{n-k}-363^{n-k}\right)$$

Hence $$P(k,n)=\frac{\frac{n!}{(n-k)!}\times\left(2\times364^{n-k}-363^{n-k}\right)}{365^{n-1}}$$

Obviously here $k\le365$.

QED
  • 12,644
  • It seems that the above general formula doesn't match with point 3 of my findings. – StrongestStrike Oct 17 '20 at 10:12
  • Is my reasoning incorrect? It does match with the first point. Are you sure the probabilities in 3 are calculated correctly. If yes can you elaborate how you obtained those probabilities? – QED Oct 17 '20 at 11:16
  • I just listed all the possibilities that satisfies. For example, for calculating P(2,3), assume the first birthday is day 0. Then, if the second birthday is day 0, there are 2 choices for the third birthday(day 1 or day 364); if the second birthday is day 364 or day 1, there are 365 choices for the third birthday, since the condition is already satisfied; if the second birthday is on day 2 or day 363, there are 3 choices for the third birthday(day 1, day 364 or day 3/day 362); – StrongestStrike Oct 17 '20 at 12:03
  • if the second birthday is everywhere else, there are 4 choices for the third birthday(day 1, day 364 and the 2 days besides the second birthday). Adding these possibilities gets (12+2365+23+3604)/365^2=2178/133225. To check this answer, I used C++ to count every list of 3 birthdays that satisfies the condition, and the answer 2178 is outputed. The numerator for P(2,4), 1576910, is also checked by C++. – StrongestStrike Oct 17 '20 at 12:07
-1

The first result is more than doubtful, since $\frac{n!}{365^{n-1}}>1$ for $n\gg1$.

  • 1
    There cannot be a birthday chain with length $>365$. Hence $P(n,n)=0$ if $n>365$, for $n\le365$, the result is indeed corrrect. – QED Oct 17 '20 at 08:04