User:Passion&Warfare/sandbox

Abstract Proof
Here we prove the same result as above, but with results about sets and functions to provide a simpler proof.

Firstly, define $$\mathcal{S} $$ to be a set of people, with $$ |\mathcal{S}| = N, $$ and let $$\mathcal{B} $$ be the set of dates in a year.

Define the birthday function $$ b:\mathcal{S} \mapsto \mathcal{B} $$ to be the map that sends a person to their birthdate. Then it is obvious that everyone in $$\mathcal{S}$$ has a unique birthday if and only if the birthday function is injective.

Now we consider how many functions, and how many injective functions, exist between $$\mathcal{S}$$ and $$\mathcal{B}$$

Since $$|\mathcal{S}| = N$$ and $$|\mathcal{B}|=365$$, it follows that there are $$365^N$$ possible functions, and there are $$\dfrac{365!}{(365-n)!} $$ possible injective functions.

By definition, the probability of everyone in $$\mathcal{S}$$ having a unique birthdate is the fraction of injective functions out of all possible functions (ie, the probability of the birthday function being one that assigns only one person to each birthdate), which gives: $$P($$Everyone in $$\mathcal{S}$$ has a unique birthdate$$) = \dfrac{365!}{365^N(365-N)!}$$

Hence, $$P($$At least 2 people share a birthdate$$) = 1 -\dfrac{365!}{365^N(365-N)!}$$