Probability of birthday chain

315 Views Asked by At

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

There are 2 best solutions below

1
On

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

4
On

(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$.