Inclusion-exclusion principle for multisets

331 Views Asked by At

Lets say I want to count the number of monic polynomials of degree $d$ in $\mathbb{F}_p[X]$ that have no roots in $\mathbb{F}_p$. Fix a $1 \leq k \leq d$ and choose $k$ distinct elements of $\mathbb{F}_p$. Since the number of monic polynomials that have these $k$ values as distinct roots in $\mathbb{F}_p$ is simply $p^{d-k}$ and we can choose the $k$ values in $\binom{p}{k}$ ways, we can use the inclusion-exclusion principle to get the number of monic polynomials of degree $d$ in $\mathbb{F}_p[X]$ that have no roots in $\mathbb{F}_p$ as $$\sum \limits_{k=0}^{d} (-1)^k \binom{p}{k} p^{d-k}$$ This much is well-known.

My question is: why fix $k$ distinct elements of $\mathbb{F}_p$? Lets reinterpret roots as corresponding to linear factors in $\mathbb{F}_p[X]$ so that we can count with multiplicities too. Suppose we choose a multiset of size $k$ comprising the $k$ values we assign as roots (with multiplicity). Then again, the number of monic polynomials that have these $k$ values as roots (or $k$ linear factors corresponding to these roots) in $\mathbb{F}_p$ is simply $p^{d-k}$ and we can choose the $k$ values in $p^{\bar{k}}/k!$ ways. Now why can we not apply the inclusion-exclusion principle to get the number of monic polynomials of degree $d$ in $\mathbb{F}_p[X]$ that have no roots in $\mathbb{F}_p$ as $$\sum \limits_{k=0}^{d} (-1)^k \frac{p^{\bar{k}}}{k!} p^{d-k}$$ The two values do not agree (try $d=4$ for instance), and I know that the second approach is wrong (because the first one is irrefutable).

But why exactly?

UPDATE: On going back to first principles and studying the exact form of the general inclusion-exclusion principle, I see the error of my ways. I now understand the source of the error, and don't need answers. So this question can be closed if others don't find it interesting enough. Sorry and thanks.