Roots of a random polynomial!

Let P ( x ) P(x) be a polynomial of degree d d , given by P ( x ) = c 0 + c 1 x + c 2 x 2 + + c d x d . P(x)=c_0+c_1x+c_2x^2 +\ldots + c_dx^d. Each of the coefficients are chosen independently and uniformly at random from the p p -element set F p = { 0 , 1 , 2 , , p 1 } , \mathbb{F}_p=\{0,1,2, \ldots, p-1\}, where p p is a given prime number.

An element k F p k \in \mathbb{F}_p is said to be a root of the polynomial modulo p p if and only if P ( k ) 0 ( m o d p ) P(k)\equiv 0 \pmod p (i.e. the prime p p divides the integer P ( k ) P(k) ).

Since the coefficients are random, so is the polynomial P ( x ) P(x) and so are its roots (defined strictly in the above sense). For p = 2017 p=2017 and d = 1008 d=1008 , find the expected number of roots of such a random polynomial.


The answer is 1.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

2 solutions

Abhishek Sinha
Oct 24, 2014

Let Z k Z_k be a random variable which is equal to 1 1 if k k is a root of the polynomial P ( x ) P(x) , and 0 0 otherwise. Hence the number of roots ( N N ) of a random polynomial P ( x ) P(x) may be conveniently expressed as N = k = 0 p 1 Z k N=\sum_{k=0}^{p-1}Z_k . Taking expectation of both sides and using the linearity property of the expectation, we have E N = k = 0 p 1 E Z k = k = 0 p 1 P ( Z k = 1 ) \mathbb{E}N=\sum_{k=0}^{p-1}\mathbb{E}Z_k=\sum_{k=0}^{p-1}\mathbb{P}(Z_k=1) . Now we will evaluate each of the above probabilities.

Note that k Z p k \in \mathbb{Z}_p is a root of the polynomial (i.e. Z k = 1 Z_k=1 ), if and only if c 0 = ( c 1 k + c 2 k 2 + + c d k d ) m o d ( p ) c_0=-(c_1k+c_2k^2+ \ldots +c_d k^d) \mod(p) . Let us now fix a realization of the coefficients { c 1 , c 2 , , c d } \{c_1,c_2, \ldots, c_d\} . Hence the right hand side of the above equation is a fixed number in the set F p \mathbb{F}_p . Since c 0 c_0 is chosen independently and uniformly at random from the set F p \mathbb{F}_p , probability that Z k = 1 Z_k=1 conditional on that realization of { c 1 , c 2 , , c d } \{c_1,c_2, \ldots, c_d\} is the same as the probability that the random variable c 0 c_0 is equal to the right hand side. Since c 0 c_0 is independent of every other coefficients, this conditional probability is simply 1 p \frac{1}{p} . Since this probability is independent of the particular realization of { c 1 , c 2 , , c d } \{c_1,c_2, \ldots, c_d\} , we have P ( Z k = 1 ) = 1 p \mathbb{P}(Z_k=1)=\frac{1}{p} , for all k Z p k\in \mathbb{Z}_p . Thus we have E N = p × 1 p = 1 \mathbb{E}N=p \times \frac{1}{p}=1\hspace{10pt} \blacksquare .

Remark : The crucial technique that is used in the above proof is first conditioning on the random variables c 1 , c 2 , , c d c_1,c_2, \ldots, c_d and then unconditioning it at the end. This is a very useful technique in theoretical computer science and discrete mathematics and goes under the name of Principle of deferrred decisions . If interested, you may search for this keyword in the internet. Good luck !

Abhishek Sinha - 6 years, 7 months ago

Log in to reply

I call it the Law of Total Expectation, namely

E ( X ) = E Y ( E X Y ( X Y ) ) E (X) = E_Y ( E _{X|Y} ( X | Y ) )

Of course, different disciplines can have a different name for the same result.

Calvin Lin Staff - 6 years, 7 months ago

Log in to reply

This also goes by the name : "Law of iterated expectation", especially in the probability theory literature.

Abhishek Sinha - 6 years, 7 months ago

Log in to reply

@Abhishek Sinha It is also called Adam's Law. I have no idea why.

Omkar Kamat - 6 years, 5 months ago
Sri Kanth
Nov 14, 2014

An elementary way to rewrite Abhishek's proof is to write out the sample space with p d p^d points (all possible co-efficient vectors). And then we observe that P ( x + a ) ( m o d p ) P(x+a) (mod p) is another polynomial in the sample space for every 'a' in the field. Further, the map P ( x ) P ( x + a ) P(x) \to P(x+a) is a bijection. It is simple to see that 0 0 is a root for p d 1 p^{d-1} points in the sample space. Using the bijection, we infer that every element of the field is a root for p d 1 p^{d-1} points in the sample space. Therefore, we totally have p d p^d roots for p d p^d polynomials. This means on an average we have 1 root per polynomial.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...