Given the following problem:
A national singing contest has five distinct entrants from each state. Use a generating function for modeling the number of ways to pick $20$ semifinalists if there are at most three people from each state.
Up until this question, I've been dealing with only identical objects. I'd like to say that the function will be
$$g(x)=(1+x+x^2+x^3)^{50}$$
but the problem with this is that I'm assuming that all of the contestants are identical. How can I take account for the fact that each contestant is distinct?
If the contestants are all distinct, you can take account of that by changing your coefficients:
Of the $5$ entrants from each state, there are $\binom{5}{0}$ ways to choose 0 of them, $\binom{5}{1}$ ways to choose $1$, $\binom{5}{2}$ ways to choose $2$, and so on. So, the generating function for contestants from a single state is $$ f(x)=\binom{5}{0}+\binom{5}{1}x+\binom{5}{2}x^2+\binom{5}{3}x^3=1+5x+10x^2+10x^3, $$ since we cut off at $3$ per state.
So, in all, $$ g(x)=(1+5x+10x^2+10x^3)^{50}. $$