# Counting microstates - simple example with boxes

I am trying to understand how to count microstates. E.g. I find this explanation very intuitive: https://phys.libretexts.org/Bookshelves/Thermodynamics_and_Statistical_Mechanics/Book%3A_Thermodynamics_and_Statistical_Mechanics_(Nair)/08%3A_Quantum_Statistical_Mechanics/8.02%3A_Bose-Einstein_Distribution

The authors ask, how many possible configurations exist for n particles in g=2 boxes. These boxes can also be represented by g-1 separations:

Clearly any permutation of the $$n+2$$ entities (dots or partitions) gives an acceptable arrangement. There are $$(n+2)!$$ such permutations. However, the permutations of the two partitions do not change the arrangement, neither do the permutations of the dots among themselves. Thus, the number of distinct arrangements or states is

$$\frac{(n+2)!}{n!2!}$$.

Generalizing for g boxes, one gets: $$W=\frac{(n+g−1)!}{n!(g−1)!}$$

with n being the number of particles and g being the number of boxes. The authors then consider $$N$$ particles, with $$n_1$$ of them having energy $$\epsilon_1$$ each, $$n_2$$ of them with energy $$\epsilon_2$$ each, etc.

Further, let $$g_1$$ be the number of states with energy $$\epsilon_2$$, $$g_2$$ the number of states with energy $$\epsilon_2$$, etc. The degeneracy $$g_\alpha$$ may be due to different values of momentum (e.g., different directions of p⃗ with the same energy $$ϵ=p^2/2m$$) or other quantum numbers, such as spin.
I cannot see why the number of microstates is then

$$W(\{n_\alpha\})= \Pi_\alpha\frac{(n_\alpha+g_\alpha−1)!}{n_\alpha!(g_\alpha−1)!}$$

Haven't I already considered all the possible state to distribute n particles in g boxes? I grasp that this has somewhat to do with the energy of the states. Can someone explain this to me?

Consider the following example: The total energy is E=9. How many ways is there to realize this energy with 6 particles? The answer is 26. All configurations are shown here:

The numbers above the boxes are corresponding to the number of configurations with distinguishable particles. How do I end up with $$W(\{n_\alpha\}) = 26$$ ?

• Can you please edit your question to describe the scenario without relying on the link? Right now I would have to read a lot of (probably) irrelevant stuff to understand your question and your question becomes useless should the link rot. Commented Nov 24, 2023 at 7:01
• @Wrzlprmft done Commented Nov 24, 2023 at 11:15

I think you are already happy with $$\tag1W=\frac{(n+g-1)!}{n!(g-1)!}$$ so that I can focus upon explaining the horrible sudden logical flow swap that happens next.

Yes, you correctly found that there are 26 ways to realise $$E=9$$ with $$N=6$$ indistinguishable particles. However, your nice picturesque scheme is not sorted in a way that is nice for us to follow along and verify that they are correct, so I have to rewrite them. In the following, because there are many zeroes, I will only write down the stuff that is non-zero. In particular, this means that $$\tag2\{n_9=1,n_0=5\}\quad=\quad(5,0,0,0,0,0,0,0,0,1)$$ and so forth. The 26 possibilities are thus $$(5,0,0,0,0,0,0,0,0,1)\\(4,1,0,0,0,0,0,0,1,0)\\(4,0,1,0,0,0,0,1,0,0)\\(4,2,0,0,0,0,0,1,0,0)\\(4,0,0,1,0,0,1,0,0,0)\\(3,1,1,0,0,0,1,0,0,0)\\(2,3,0,0,0,0,1,0,0,0)\\(4,0,0,0,1,1,0,0,0,0)\\(3,1,0,1,0,1,0,0,0,0)\\(3,0,2,0,0,1,0,0,0,0)\\(2,2,1,0,0,1,0,0,0,0)\\(1,4,0,0,0,1,0,0,0,0)\\(3,1,0,0,2,0,0,0,0,0)\\(3,0,1,1,1,0,0,0,0,0)\\(2,2,0,1,1,0,0,0,0,0)\\(2,1,2,0,1,0,0,0,0,0)\\(1,3,1,0,1,0,0,0,0,0)\\(0,5,0,0,1,0,0,0,0,0)\\(3,0,0,3,0,0,0,0,0,0)\\(2,1,1,2,0,0,0,0,0,0)\\(1,3,0,2,0,0,0,0,0,0)\\(2,0,3,1,0,0,0,0,0,0)\\(1,2,2,1,0,0,0,0,0,0)\\(0,4,1,1,0,0,0,0,0,0)\\(1,1,4,0,0,0,0,0,0,0)\\(0,3,3,0,0,0,0,0,0,0)$$ you should check that these correspond to your pictures, with ordering from most excited state to lower.

Now, for the system that you are considering, every $$\epsilon_\alpha$$ is non-degenerate, i.e. $$g_\alpha=1$$ for them all. Consider the state that starts $$(2,3,0,1)$$, its contribution to the microstate count is thus $$\frac{(2+1-1)!}{2!(1-1)!}\cdot\frac{(3+1-1)!}{3!(1-1)!}\cdot1\cdot\frac{(1+1-1)!}{1!(1-1)!}\cdots=1$$ i.e. for all 26 possible partitions, each contributes exactly once to the microstate count. The sum of them all is thus 26, as is wanted.

In particular, the breaking of $$N$$ into $$\{n_\alpha\}$$ is a partition that you clearly already understand. After that, each $$n_\alpha$$ is now to be reinterpreted as a new number of particles, to be distributed into the $$g_\alpha$$ degeneracy boxes for the same energy levels. This calculation quickly gets hairy, and so the example being considered, had no degeneracy in the energy levels.

• Thank you very much for your comment. So the picture with boxes does not apply to internal energy levels. Commented Nov 29, 2023 at 10:05
• Do you know a way to come up with the 26 microstates in this case? Commented Nov 29, 2023 at 10:05
• Your 26 pictures are the same as mine, just different ordering. There should be some partition function trickery to generate the 26 cases, but I am not sure how to have a finite number of particles do that. I simply did the enumeration manually; it is precisely because this is a manual operation that a sensible expansion scheme was important to avoid making mistakes. Commented Nov 29, 2023 at 11:45
• Okay thank you! I suppose to find a general calculation scheme for the energy levels is a different topic. Commented Nov 29, 2023 at 12:47