# Number of microstates

I need some help with this problem:

Consider a system of $N$ distinguishable particles. Each of these particles can be in a state with energy $\epsilon$ or $-\epsilon$. Consider that the states with energy $\epsilon$ are M-fold degenerate, and those with energy $-\epsilon$ are P-fold degenerate. Using the micro canonical ensemble, determine the entropy $S(E,N)$

I haven't been able to correctly calculate the number of microstates $\Omega (E,N)$. I know that in the case where the states are not degenerate, it's just:

$$\Omega(E,N)= \frac{N!}{N_{+}!(N-N_+)!}$$

where $N_+$ is the number of particles with energy $\epsilon$, but in this case I do not know how to take into account the degeneracies.

Any help will be truly appreciated.

Every one of $N_+$ ($N_- = N - N_+$) particles with the energy $\epsilon$ ($-\epsilon$) is in one of $P$ ($M$) possible states. Hence there is the additional factor $P^{N_+}M^{N_-}$ and the answer is $$\Omega(E,N) = \frac{N!}{N_+! N_-!} P^{N_+} M^{N_-}$$