Damn! It's not just MY birthday!

It is well known from the "birthday paradox problem" that the chances at least two people among 23 have the same birthday is larger than 0.5.

http://en.wikipedia.org/wiki/Birthday_problem

However, it is still not nice if someone else's birthday is the day after yours or the day before yours!

Find the minimum number of people n n such that the chances that at least two have birthdays that are at most one day apart is larger than 0.5.

Note: Forget about leap years.


The answer is 14.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

2 solutions

Melika Abolhasani
Jul 27, 2014

The number of outcomes in which among n people no two are born in two consecutive days is equivalent to the number of integral solutions to this equation x 1 + x 2 + . . . . + x n + 1 = 365 n x_1+x_2+....+x_{n+1} = 365-n where

x 1 0 , x 2 1 , x 3 1 , . . . . x n 1 , x n + 1 0 x_1 \ge 0, x_2 \ge 1, x_3 \ge 1, .... x_n \ge 1, x_{n+1} \ge 0

and x 1 + x n + 1 1 x_1+x_{n+1} \ge 1

The reason is you can think of choosing one day for each person, and then x i x_i determines the number of days between (i-1)'th birthday and i-th birthday. x 1 x_1 is the number of days before the first person's birthday, and x n + 1 x_{n+1} is the number of days after the last person's birthday. Unlike other x i x_i 's these two can be zero but not simultaneously. Call the number of integral solutions to the above equation A. This number must be multiplied by n! of course.

The probability that this does not happen is :

1 A × n ! 36 5 n 1-\frac{A\times n!}{365^n}

Daniel Ploch
Aug 8, 2014

I took a more direct approach. If one modeled the calendar year as a circular ring with 365 spaces on it, designating any one slot as a birthday would thus 'X out' that square, plus the adjacent squares, if we're trying to avoid collisions.

In the same way that...

A n = k = 0 n 1 ( 365 k ) A_n = \prod_{k=0}^{n-1} (365 - k)

...generates the numerator for the classical birthday problem...

A n = k = 0 n 1 ( 365 3 k ) A_n = \prod_{k=0}^{n-1} (365 - 3k)

...generates the numerator for this problem. Letting f ( n ) = 1 A n 36 5 n f(n) = 1 - \frac{A_n}{365^n} , we can simply calculate:

f ( 13 ) < 1 2 < f ( 14 ) f(13) < \frac{1}{2} < f(14)

If, for example, n = 182, then A n is positive (because you can choose the even numbered days), even though your formula says A n is not positive. However, because the answer is only 14, your counting is a fair approximation :)

Ohad Klein - 6 years, 9 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...