Average number of linear factors in a monic polynomial of degree $n$ over $\mathbb{F}_p$

152 Views Asked by At

Let $p$ be a prime and $P_n$ the set of all monic polynomials with coefficients in $\mathbb{F}_p.$

I am interested in the average number of linear factors of polynomials in $P_n.$ In an exercise in TAOCP Knuth argues that it is enough to compute the average number $x$ divides a polynomial chosen uniformly at random from $P_n$ and multiply that by $p.$ Hence he concludes the answer is $$1+p^{-1} + \cdots + p^{1-n} \quad (1).$$

Now, I am a bit confused about this computation. If $x$ divides $u(x) \in P_n$ precisely $k$ times then $u(x) = x^k (x^{n-k}+c_{n-k-1} x^{n-k-1} + \cdots c_1 x + c_0)$ where $c_0 \in \{1,\ldots, p-1\},$ and all other coefficients are arbitrary. Hence we have $p^{n-k-1}(p-1)$ such polynomials and hence the average would be $$ p^{1-n}\sum_{k=1}^n p^{n-k-1}(p-1),$$

which is not the same as $(1).$ Hence I am wondering,

where is the flaw of my reasoning? Can someone explain how $(1)$ is deduced?

1

There are 1 best solutions below

0
On BEST ANSWER

In your approach, it seems that you took the sum of probabilities instead the expected value. The case $k=n$ should be handled separately.

Concerning (1), for every $a\in\mathbb{F}_p$ and $k\le n$, the probability that $(x-a)^k$ divides $P$ is $p^{-k}$ (if you divide with remainder, the remainder polynomial has $k$ free coefficients). The probability that $k$ is the precise exponent of $x-a$ is $p^{-n}$ for $k=n$ and $p^{-k}-p^{-(k+1)}$ for $1\le k\le n-1$.

So, the expected value is $$ \sum_a \left( \sum_{k=1}^{n-1} \big( p^{-k}-p^{-k-1} \big)\cdot k + p^{-n}\cdot n \right) = \\ = p \cdot \bigg( (p^{-1}-p^{-2})\cdot 1 +(p^{-2}-p^{-3})\cdot 2 +\cdots+ (p^{-(n-1)}-p^{-n})(n-1) + p^{-n}n \bigg) = \\ = p(p^{-1}+p^{-2}+\dots+p^{-n}) = 1+p^{-1}+p^{-2}+\dots+p^{-(n-1)}. $$