# Question regarding the intuition for calculating the number of Microstates in Maxwell-Boltzmann distribution

I am having a hard time understanding the term used to calculate the $$number$$ of $$microstates$$ in the Boltzmann Distribution, I get that the term $$M=\dfrac{N!}{n_1!\times n_2!\times n_3!\times\cdots},$$ where:

i) $$N!$$ is the number of ways in which each atom can be arranged (under the assumption that each arrangement is unique).

ii) If $$n_1$$ is a macrostate, then $$n_1!$$ is the number of microstates that give the macrostate $$n_1$$; similarly $$n_2$$ and $$n_3$$ are the macrostates and $$n_2!$$ and $$n_3!$$ are the numbers of microstates that lead to the macrostates $$n_2$$ and $$n_3$$.

iii) Therefore the term $$M$$ tells us the number of distinct arrangements (distinct meaning that it doesn't lead to the same macrostate).

Is my understanding up to this point correct ?

Now the terms that confuse me are $$g_1^{n_1}$$ and $$g_2^{n_2}$$. What is degeneracy in layman terms? Why are we calculating that here?

Why are we calculating the number of sub -ontainers here? https://i.stack.imgur.com/aNy5H.jpg

I am interested in this because I was fascinated by how a large collection of atoms is studied collectively and how it's used in various other calculations. My current level of knowledge is Calculus 1 & 2 and AP Physics; any effort to explain in this level is highly appreciated.

• The wikipedia article on this topic is not bad: en.wikipedia.org/wiki/… Mar 24, 2022 at 4:07
• @Andrew I gave it a read ,but I still can't find a layman's explanation as to what's happening when calculating $g_i^{n_i}$. Mar 24, 2022 at 7:52
• This is pretty technical so I'm not sure it's reasonable to expect a "layman" explanation. As you can see, it appears pretty deep into the logic for this calculation, and there are some other issues with the way you've described earlier steps (for example, $n_i$ is an occupation number, not a macrostate), so you may want to carefully go through the earlier steps. Anyway, the reason for $g_i^{n_i}$ is that if there are $g_i$ states that have the same energy $E_i$, then there are $g_i^{n_i}$ ways to put $n_i$ distinguishable particles into those states. ($g_i$ choices for each particle) Mar 24, 2022 at 15:38
• @Andrew ,I know that degeneracy generally means particles in same energy level,so $s$ orbital has a degeracy of 2 ,my question is what is happening here actually ,because $N!/n_1!*n_2!*n_3!*....$ refers to unique arrangement ,(ie) unique Microstates that lead to different Macrostates ,now why are we considering the same set of unique arrangements ,(ie) the number of unique Microstates that lead to the macrostates for the degenerate states .If possible could you write this as an answer ? Mar 24, 2022 at 16:07
• @Andrew I understand that ,say if we have 2 degenerate energy levels and if we have ,3 particles ,then there are 8 ways of arranging the 3 particles into these 2 degenerate states ,now what I don't understand is that how these two terms (ie) $N!/n_1!*n_2!...$ and $g_i^{n_i}$ are brought together ,it would so helpful if you could do that . Mar 24, 2022 at 16:16

This answer is just summarizing the material on wikipedia.

Suppose there are $$M$$ energy levels, $$E_1, E_2, \cdots, E_M$$, and that we have $$N$$ distinguishable particles. For now, suppose that the energy levels are not degenerate. In other words, suppose there is one state associated with each energy level.

Then, we want to count the number of ways we can have $$N_1$$ particles in energy level 1, $$N_2$$ particles in energy level 2, etc.

There are $$\begin{equation} W = {N \choose N_1} = \frac{N!}{(N-N_1)!N!} \end{equation}$$ ways $$W$$ to select $$N_1$$ particles to place in the first energy level. Then there are $$\begin{equation} W = {N-N_1 \choose N_2} = \frac{(N-N_1)!}{(N-N_1-N_2)! N_2!} \end{equation}$$ ways to choose $$N_2$$ particles to go into the second energy level, from the remaining $$N-N_1$$ particles.

Multiplying these results together, we find there are $$\begin{equation} W= {N \choose N_1} {N-N_1 \choose N_2} = \frac{N!}{(N-N_1)!N!} \frac{(N-N_1)!}{(N-N_1-N_2)! N_2!} = \frac{N!}{N_1! N_2! (N-N_1-N_2)!} \end{equation}$$ ways to have $$N_1$$ particles in the first energy level and $$N_2$$ particles in the second energy level.

Here, I will share a screenshot of the wikipedia article I linked above, which nicely shows the cancellation that occurs when computing the number of ways $$W$$ of having a given set of occupation numbers The final step here is to realize that the last factor in the denominator in the second line is simply 1, since $$N$$ is equal to the sum of the occupation numbers in each state, so $$N-\sum_{i=1}^M N_i = 0$$ and then we use $$0!=1$$.

This leads to the result $$\begin{equation} W = N! \prod_{i=1}^M \frac{1}{N_i!} \end{equation}$$ when ignoring degeneracies.

Now we include the possibility that energy level $$i$$ has a degeneracy of order $$g_i$$. This means that there are $$g_i$$ states that have the same energy $$E_i$$.

To account for this hiccup, consider what happens when we place the first of $$N_i$$ particles into the energy level $$E_i$$. There are $$g_i$$ choices for which state we place this particle into. Then we place the second particle, and again there are $$g_i$$ choices, so there are $$g_i^2$$ choices for placing particles 1 and 2. Carrying out this procedure for all $$N_i$$ particles, we find that there are $$g_i^{N_i}$$ ways of placing $$N_i$$ particles into this energy level.

Applying this correction to the previous result for $$W$$, we get the final result $$\begin{equation} W = N! \prod_{i=1}^M \frac{g_i^{N_i}}{N_i!} \end{equation}$$

Loosely speaking, the $$1/N_i!$$ factor is there to count the number of ways to place $$N_i$$ particles into an energy level $$E_i$$, and the $$g_i^{N_i}$$ factor is there to account for the number of ways to assign $$N_i$$ particles to the $$g_i$$ states within that energy level.