Using Stirling’s Approximation to calculate how many ways to distribute certain objects among a group of children.

factorialprobabilityprobability distributionsprobability theorystatistics

I have written the question and my solution to each part below. I would like to please know if you think they are correct and if not what is the correct approach? Thank you so much!

Question

The kids in a kindergarten are going outdoors for a walk. But before they can go out into the winter weather, they need to put on their hat, gloves and boots. Unfortunately, the organization of the kindergarten is a bit chaotic. Assuming that there are $N$ children in the kindergarten and that $N$ is sufficiently large to justify Stirling's approximation,

a) Calculate how many ways there are to distribute $N$ hats over the $N$ children, when every child receives exactly one hat. Call this number $g_{\text{hats}}$ and use Stirling's approximation for $\ln g_{\text{hats}}$:

b) Calculate how many ways there are to distribute $2N$ gloves over the $2N$ hands, one glove per hand. Call this number $g_{\text{gloves}}$ and use Stirling's approximation for $\ln g_{\text{gloves}}$.

c) Calculate how many ways there are to distribute $2N$ boots ($N$ pairs of boots) over $N$ children ($2N$ feet), with the requirement that every left foot gets a left-footed boot and every right foot gets a right-footed boot. Note that one child is allowed to get boots from different pairs. Call this number gboots and use Stirling's approximation for $\ln g_{\text{boots}}$.

d) What is the value of $\ln(g_{\text{gloves}}/g_{\text{boots}})$ for large $N$?

N.B., the children, hats, gloves and boots are all distinguishable.

Solution

(a) Using Stirling's approximation, we can approximate the natural logarithm of $N!$ as:
$$
\ln(N!) \approx N\ln(N) – N
$$

(b) Using Stirling's approximation, we can approximate the natural logarithm of $(2N)!$ as:
$$
\ln\bigl((2N)!\bigr) \approx 2N\ln(2N) – 2N
$$

(c) So the total number of ways to distribute the $2N$ boots is: $1 \cdot N!$ Using Stirling's approximation, we can approximate the natural logarithm of this number as:
$$
\ln(1 \cdot N!) \approx N \ln(N) – N
$$

So, in this case, the approximation for $\ln(g_{\text{boots}}) = \ln(1 \cdot N!) \approx N\ln(N)-N$.

(d)
\begin{align}
\ln(g_{\text{gloves}})
&= \ln\bigl((2N)!\bigr)
= \ln\bigl( (2N) \cdot (2N-1) (2N-2) \cdots 2 \cdot 1 \bigr) \\ \ln(g_{\text{boots}})
&= \ln(N!) = \ln(N (N-1) (N-2) \cdots 2 \cdot 1) \\
\ln \left(\frac{g_{\text{gloves}}}{g_{\text{boots}}}\right)
&= \ln(g_{\text{gloves}}) – \ln(g_{\text{boots}}) = \ln(2N)) – \ln(N)
\end{align}

We can use the Stirling's approximation for large $N$,
$$
\ln(x!) \approx x\ln(x) – x
$$

so
$$
\ln \left(\frac{g_{\text{gloves}}}{g_{\text{boots}}}\right)
\approx \bigl(2N\ln(2N)- 2N\bigr) – \bigl(N\ln(N) – N\bigr).
$$

As $N$ becomes large, the difference between $2N$ and $N$ is insignificant and the value of $\ln(g_{\text{gloves}}/g_{\text{boots}})$ is
approximately $N\ln(2)$ for large $N$.

Best Answer

  1. We have $N$ hats for $N$ children, so we get $N!$ outcomes.

  2. For the gloves, I'll consider two options.

    1. We have $N$ pairs of right glove and left glove, then we have $N!$ options to put the right gloves on the right hands and $N!$ options to put the left gloves on the left hands, yielding $N!^2$ gloves.
    2. We have $2N$ gloves, and each glove fits on all hands. Then we can freely choose, yielding $(2N)!$ gloves.
  3. The boots are the same as Option 1 for the gloves, meaning $N!^2$.

Using Option 1 we have $N!^5$ options in total, using Option 2 we have $N!^3(2N)!$ options in total.

Since we look at a kindergarden, we work with the fairly precise approximation $\exp(\frac{1}{12n+1})f(n)\le n!\le\exp(\frac{1}{12n})f(n)$, where $f(n)=\sqrt{2\pi n}(\frac{n}{e})^n$. This gives $\frac{1}{12N+1}\le\ln(N!)-\ln(f(N))\le\frac{1}{12N}$ for the hats, $\frac{2}{12N+1}\le\ln(N!^2)-2\ln(f(N))\le\frac{2}{12N}$ for the boots and gloves using Option 1, and $\frac{1}{24N+1}\le\ln((2N)!)-\ln(f(2N))\le\frac{1}{24N}$ for the gloves using Option 2.

Using Option 1 we get $\ln(N!^2/N!^2)=0$ for the ratio. Using Option 2 we get $\frac{1}{24N+1}-\frac{2}{12N}\le\ln((2N)!/N!^2)-\ln(f(2N)/f(N)^2)\le\frac{1}{24N}-\frac{2}{12N+1}$. A closer look further gives $\ln(f(2N)/f(N)^2)=\ln\frac{\sqrt{2\pi(2N)}(\frac{2N}{2})^{2N}}{\sqrt{2\pi N}^2(\frac{N}{e})^{2N}}=\ln\frac{2^{2N}}{\sqrt{\pi N}}$.

Finally, here are the numbers for plausible numbers of children. Notice that the error bounds computed above go in the same direction, meaning we know that $N!>f(N)$. The actual approximation error for $\ln(N!)$ is $\frac{1}{12N}-\frac{1}{12N+1}=\frac{1}{12N(12N+1)}$.

enter image description here