Birthday Problem variation

504 Views Asked by At

I am trying to find the probability formula for a variation of the Birthday Problem.

Suppose that there were just two people, there were $n$ possible birthdays for both, and each person could have multiple birthdays. Person $A$ would have $a$ birthdays, and person $B$ would gave $b$ birthdays.

Given $n$, $a$, and $b$, what would be the probability formula to determine if any of the birthdays matched? Obviously if $a=n$ then the probability is $100%$. If both $a$ and $b$ are $1$, then the probability is $(n-1)^2/n$ (I think). But I was trying to find the general probability formula for this. Any ideas anyone?

2

There are 2 best solutions below

4
On

Hint: There are $\binom{n}{a} \binom{n}{b}$ total possible combinations of birthdays for $A$ and $B$. The number of combinations in which $A$ and $B$ do not share a birthday is $\binom{n}{a+b} \cdot \frac{(a+b)!}{a!b!}$.

1
On

Notice that if we treat the birthdays as the numbers $\{1,\ldots,n\}$, then we can assume without loss of generality that $A$'s birthdays are $\{1,\ldots,a\}$. The probability that all of $B$'s birthdays are in the remaining days (i.e. that there is no match) is $$\frac{\binom{n-a}{b}}{\binom{n}{b}},$$ which simplifies to $$\frac{(n-a)!(n-b)!}{n!(n-a-b)!}.$$ It's questionable how much simpler this is, but it's nice to see it written symmetrically in $a$ and $b$.

I know this is very similar to the other answer, but it's a different way to think about it, and it's too long for a comment.