I've been stuck for ages on this
Solve A(B^-x) < (B-x)!
B and A are constants, specifically,
A = (365! / 0.25)
B = 365
x is an integer
halp
Thanks for your effort.
I'd actually already solved it iteratively using a calculator, but the people setting the question wanted a more analytic solution
The trick is to use Stirling's (simple) formula, ln (x!) approximately equal to x.ln (x) - x
I still didn't get a solution before I ran out of time.
the range you came up with though was correct, which at least shows I was on the right track (I think!)
I'll try with the Stirling's formula.
I used inequality in this form while iterating.
$\displaystyle \forall$ $\displaystyle x \leq 0$ Find $\displaystyle x$ such that $\displaystyle \displaystyle\prod_{i=0}^{|x|}\frac{365}{365 + i}$
and
$\displaystyle \forall$ $\displaystyle x > 0$ Find $\displaystyle x$ such that $\displaystyle \displaystyle\prod_{i=0}^{|x|}\frac{365 - i}{365}$
blimey! I havn't used iterative processes for years... I'm an undergrad physicist and
If it helps, the problem is thus:
What is the minimum number of people you need in a room for there to be a 75% chance that two people share the same birthday.
my workings:
P(n people do NOT share the same birthday) = 1 x (1- 1/365) x (1 - 2/365) x ... x ( 1 - n/365)
here the first factor is the first person entering the room, etc
we are looking for n such that
PRODUCT'SUM' from i=0 to i = n-1
(1 - i/365) = 0.25 *
LHS = PRODUCT'SUM' 365^n (365 - i)
= 365 ^ n [365 ! / n !]
which, fitting this all into the * equation, gives us
365 ! / 0.25 = 365^-n * n!
hmm, perhaps I made an error when I last did it... anyway this was where I got stuck.
though do remember that I have already handed my solutions in, I would still like to see the solution
If you are trying to solve it, as it is, I suggest you not to use Stirling's formula. $\displaystyle 365! \approx e^{1796}$ but from Stirling's you get $\displaystyle 365! \approx e^{1788}$.
Another way to find n is to use Taylor series expansion $\displaystyle e^x \approx 1 + x$ for the probabilities as each person enters the room.
Substitute,
$\displaystyle e^{\frac{-1}{365}} \approx 1 - \frac{1}{365}$
$\displaystyle e^{\frac{-2}{365}} \approx 1 - \frac{2}{365}$
.
$\displaystyle e^{\frac{-(n-1)}{365}} \approx 1 - \frac{(n-1)}{365}$
Probability of n people not sharing birthday becomes,
$\displaystyle \bar{P} = e^{\frac{-(0+1+2+...+(n-1))}{365}}$
which can be further reduced since,
$\displaystyle 1+2+...+(n-1) = \frac{n(n-1)}{2}$
Now,
$\displaystyle \bar{P} = e^{\frac{-n(n-1)}{2 \times 365}}$
Since,
$\displaystyle P = 1 - \bar{P} = 1 - e^{\frac{-n(n-1)}{2 \times 365}}$
Using $\displaystyle \ln$ simplify,
$\displaystyle n^2 - n = 2 \times 365 \times \ln{(\frac{1}{1 - P})}$
For $\displaystyle P = 0.75$, you get $\displaystyle n \approx 32$
Hope this helps.