<?xml-model href='http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng' schematypens='http://relaxng.org/ns/structure/1.0'?><TEI xmlns="http://www.tei-c.org/ns/1.0">
	<teiHeader>
		<fileDesc>
			<titleStmt><title level='a'>Counting Roots of Polynomials over Z/p2Z</title></titleStmt>
			<publicationStmt>
				<publisher></publisher>
				<date>2018</date>
			</publicationStmt>
			<sourceDesc>
				<bibl> 
					<idno type="par_id">10417368</idno>
					<idno type="doi"></idno>
					<title level='j'>Houston journal of mathematics</title>
<idno>0362-1588</idno>
<biblScope unit="volume">44</biblScope>
<biblScope unit="issue">4</biblScope>					

					<author>Trajan Hammonds</author><author>Jeremy Johnson</author><author>Angela Patini</author><author>Robert M. Walker</author>
				</bibl>
			</sourceDesc>
		</fileDesc>
		<profileDesc>
			<abstract><ab><![CDATA[Until recently, the only known method of finding the roots of polynomials over prime power rings, other than fields, was brute force. One reason for this is the lack of a division algorithm, obstructing the use of greatest common divisors. Fix a prime integer p and f in (Z/pnZ)[x] any nonzero polynomial of degree d whose coefficients are not all divisible by p. For the case n=2, we prove a new efficient algorithm to count the roots of f in Z/p2Z within time (d+size(f)+log p),2+o(1), based on a formula conjectured by Cheng, Gao, Rojas, and Wan.]]></ab></abstract>
		</profileDesc>
	</teiHeader>
	<text><body xmlns="http://www.tei-c.org/ns/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink">
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1.">Introduction</head><p>Since the days of Diophantus, mathematicians have been interested in finding rational or integer solutions to polynomial equations. In the 1940s, Andr&#233; Weil proved the Riemann hypothesis for zeta-functions of nonsingular curves over finite fields <ref type="bibr">[8]</ref>. In 1949, Weil proposed enticing conjectures that connect finding solutions to polynomials over finite fields with studying the geometry of complex algebraic varieties <ref type="bibr">[9]</ref>. Weil proved these conjectures in the case of curves, yielding a bound for counting the number of points on a curve over a finite field-the Hasse-Weil bound:</p><p>where q is a prime power and N q is the number of points over F 2 q on a curve with genus g. Such bounds on point counts extend to higher dimensions, per work of Weil, Deligne, Dwork, and others.</p><p>We wish to count roots over the prime power ring Z/p k Z. That said, the usual approaches do not work since the polynomial ring (Z/p k Z)[x] does not have unique factorization when k &#8805; 2. Thus we must sleuth for alternate approaches to count roots of nonconstant univariate polynomials over Z/p k Z, since traditional methods for factoring and root counting over finite fields are unavailable.</p><p>As a backdrop, suppose p &#8712; Z is a prime, both m, v &#8712; Z + , f &#8712; Z[x 1 , . . . x v ] is a nonzero polynomial with at least one coefficient being a unit modulo p, and N m (f ) denotes the number of solutions to f &#8801; 0 mod p m in the ring (Z/p m Z) v . Consider the Igusa Poincar&#233; Series <ref type="bibr">[6]</ref>:</p><p>Igusa's proof that Q(f ; t) is rational <ref type="bibr">[5]</ref>, solving a conjecture of Borevich and Shafarevich, relied on Hironaka's resolution of singularities <ref type="bibr">[4]</ref>, which runs in exponential time. Zuniga-Galindo <ref type="bibr">[10]</ref> later derived an algorithm to compute Q(f ; t), where the dependence on v in the complexity was of order 8. While one could in principle use standard generating function tricks to then extract N m (f ) for any given m, Zuniga-Galindo's algorithm only works in the case where f splits completely into linear factors over Q -a severe restriction. Cheng, Gao, Rojas, and Wan, during a meeting at the American Institute for Mathematics (AIM) in May 2017, found an explicit formula for N 2 (f ) when v = 1, but without a proof or complexity bound. We prove their formula is correct and that it has near-quadratic complexity.</p><p>Going forward, given a prime p &#8712; Z + , and k &#8712; Z + , we view the set Z/p k Z := {0, 1, . . . , p k -1} as a ring, and let &#960; p k : Z[x] &#1417; (Z/p k Z)[x] denote the surjective ring homomorphism defined by</p><p>where c := &#960; p k (c) &#8712; Z/p k Z when c &#8712; Z [3, Ch. 9]. Given a polynomial g &#8712; (Z/p k Z)[x], we let g &#8712; Z[x] denote the lift of g-read, &#960; p k ( g) = g-whose coefficients all lie between 0 and p k -1. Also, for g &#8712; (Z/pZ)[x], we say a root of multiplicity one is simple, and a root is degenerate otherwise. </p><p>\ {0} be a nonconstant polynomial of degree d. Fix any prime p not dividing every coefficient of f . We define the maximal multiplicity &#8467; of a root of f modulo p, and a series of polynomials f 1 , . . . , f &#8467; , g, h 1 , h 2 , t all in (Z/pZ)[x] and polynomials L 1 , . . . , L &#8467; &#8712; Z[x].</p><p>(1) We can factor h 1 := &#960; p (f ) as L i,j as a product (possibly empty) of distinct linear terms in</p><p>In terms of the natural logarithm, we define the computational size of f to be</p><p>it is simply the number of bits needed to record the above monomial term expansion of f .</p><p>We now state the main result of this note.</p><p>Main Theorem 1.4. With notation as in Definitions 1.1, 1.2, and 1.3,</p><p>(1) We have</p><p>where deg stands for polynomial degree.</p><p>(2) The polynomials t, f 1 , and h 2 can be computed deterministically in time that is polynomial in d + size(f ) + log(p), where d = deg(f ), counting the necessary arithmetic operations.</p><p>While the first term in formula (1.0.2) counts the roots modulo p 2 that descend to simple roots modulo p, the second term counts the roots modulo p 2 that descend to degenerate roots modulo p.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.">Preliminaries for the Proof</head><p>Throughout, p is an arbitrary prime number. We state a proposition together with two versions of Hensel's Lemma, a crucial tool for proving Theorem 1.4(1).</p><p>Proposition 2.1 (Cf., [3, Sec. 13.5, Prop. 33]). If g &#8712; (Z/pZ)[x] is nonconstant, and there is an</p><p>In [7, Sec. 2.6, Thm. 2.23 + paragraph between Examples 11-12], a derivation of both versions of Hensel's Lemma below is given via Taylor expansion. We note that [7, Sec. 2.6] phrases both versions of Hensel's Lemma in terms of an arbitrary integer r rather than stipulating 0 &#8804; r &#8804; p -1.</p><p>Lemma 2.2 (Hensel's Lemma Version I). Let f &#8712; Z[x] be nonconstant, and suppose there is an r</p><p>Moreover, s is unique. That is, f (r + tp k ) &#8801; f (r) mod p k+1 for all 0 &#8804; t &#8804; p -1, indeed for all t &#8712; Z.</p><p>Notably, we have p roots mod p k+1 when f (r) &#8801; 0 mod p k+1 . Thus Lemma 2.3 can lift roots modulo p k to roots modulo p k+1 . Conversely, all the roots modulo p k+1 are obtained this way.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.">Proof of the Main Theorem</head><p>Proof of Theorem 1.4 <ref type="bibr">(1)</ref>. Recall that in Definition 1.2 we defined polynomials </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Recall that we defined</head><p>; this monic polynomial is a product (possibly empty) of distinct linear terms. Let D(x) &#8712; Z[x] be the lift of h 2 constructed analogously to the L i , taking the corresponding product of the &#8226; lifts of the linear factors. To get 1.4(1), it suffices to show that as maps of sets (a) &#960; p | S : S &#8594; V p (L 1 ) is a bijection, and (b) &#960; p | T : T &#8594; V p (D) is a p-to-1 surjection. But first, we record a lemma. Lemma 3.1. Let &#961; : A 2 (p) &#8594; A 1 (p) be the map of sets sending an element a &#8712; A 2 (p) to its remainder after long division by p. Fix r &#8712; A 2 (p). If f (r) &#8801; 0 mod p 2 , then f (&#961;(r)) &#8801; 0 mod p. Equivalently, if r &#8712; V p 2 (f ), then &#961;(r) &#8712; V p (f ) in terms of the bar notation preceding Definition 1.1.</p><p>(a) &#960; p | S is a bijection: This is vacuous if S is empty, so we may assume S is non-empty. First, given any element r &#8712; U , Lemma 3.1 says &#960; p (r) = &#960; p (&#961;(r)) &#8712; V p (f ), meeting the first hypothesis of Hensel's Lemma 2.2. Because of our stipulations in defining the polynomials f i in (1.0.1), Proposition 2.1 applied to h 1 = &#960; p (f ) implies that &#960; p (&#961;(r)) satisfies the second hypothesis under Hensel's Lemma 2.2 if and only if &#960; p (&#961;(r)) &#8712; V p (L 1 ). Equivalently, r &#8712; S and it will be the unique lift to A 2 (p) of &#961;(r) &#8712; A 1 (p) as stipulated in Hensel's Lemma 2.2, since r &#8801; &#961;(r) mod p. Thus we may conclude that &#960; p | S is both surjective and injective, hence bijective.</p><p>Before proceeding, we record another lemma.</p><p>Lemma 3.2. Given r &#8712; A 1 (p) and r := &#960; p (r) &#8712; Z/pZ, the following assertions are equivalent to saying (x -r) 2 | h 1 :</p><p>(1) r is a degenerate root of h 1 , i.e., both f (r) &#8801; 0 mod p and f &#8242; (r) &#8801; 0 mod p.</p><p>(</p><p>Indeed, per the stipulations on the f i in (1.0.1), all of these assertions mean f 1 (r) = 0 in Z/pZ.</p><p>(b) &#960; p | T is a p-to-1 surjection: This is vacuous if T is empty, so we may assume T is non-empty. We note that &#960; p (T )</p><p>given r &#8712; T , Lemmas 3.1 and 3.2 apply to &#961;(r). Let</p><p>Then the integer polynomial (1/p) &#8226; E(x) is a lift of t(x). Next, since h 2 divides h 1 in (Z/pZ)[x], we note that any r &#8712; A 1 (p) for which D(r) &#8801; 0 mod p also satisfies L i (r) &#8801; 0 mod p for some i &#8805; 2 by Lemma 3.2. Thus f (r) &#8801; E(r) mod p 2 . Additionally, t(r) = 0 &#8712; Z/pZ, so (1/p)E(r) &#8801; 0 mod p, hence E(r) &#8801; 0 mod p 2 . Then f (r) &#8801; 0 mod p 2 , so Hensel's Lemma 2.3 says that r can be lifted to p distinct roots s j = r + j &#8226;p &#8712; T of f modulo p 2 where 0 &#8804; j &#8804; p -1. Thus V p (D) &#8838; &#960; p (T ).</p><p>To conclude that &#960; p | T is a p-to-1 surjection onto V p (D), it remains to show that conversely,</p><p>, so by the definition of greatest common divisor (x -u)|h 2 in (Z/pZ)[x]. Thus u V p (D). This completes the proof of claim (b), so we are done.</p><p>Corollary 3.3. With notation as in Definitions 1.1 and 1.2, exactly</p><p>degenerate roots of f modulo p fail to lift to roots of f modulo p 2 .</p><p>Proof. To start, continuing from the proof of Theorem 1.4(1), the right-hand side is equal to </p><p>and that the set stated in the corollary coincides with {a &#8712; A 1 (p) :</p><p>Proof of Theorem 1.4 <ref type="bibr">(2)</ref>. First note that the decomposition (1.0.1) stated under Definition 1.2 can be found via any classical factoring algorithm (see, e.g., <ref type="bibr">[1,</ref><ref type="bibr">2]</ref>). The gcd of polynomials in (Z/pZ)[x] of degree &#8804; d can be computed in near linear time O(d 1+o (1) (log p) 1+o (1) ), per an algorithm of Knuth and Sch&#246;nhage <ref type="bibr">[2,</ref><ref type="bibr">Ch. 3]</ref>. Also, division with remainder for polynomials of degree &#8804; d in (Z/pZ)[x] takes time O(d 1+o (1) log p), and reduction mod p of a polynomial f &#8712; Z[x] can be done in time linear in size(f ) + log p (see, e.g., <ref type="bibr">[2,</ref><ref type="bibr">Ch. 3]</ref> and <ref type="bibr">[1,</ref><ref type="bibr">Ch. 7]</ref>). Finally, note that the gcd of h 1 and x p -x can be computed in time O(d 1+o (1) (log p) 1+o (1) ) by applying the binary method to the computation of x p mod h 1 (see, e.g., <ref type="bibr">[1, pp. 102-104, 121-122, &amp; 170-171]</ref>).</p><p>Going forward, we may assume that the maximal multiplicity &#8467; &#8805; 1. Now observe that s 1 := gcd (h 1 , x p -x) &#8712; (Z/pZ)[x] has the property that V p (h 1 ) = V p (s 1 ) and s 1 has exactly deg(s 1 ) distinct linear factors. In particular, s 1 factors as</p><p>. So then, s 3 := gcd(s 1 , s 2 ) = &#8467; i=2 f i . So we can then compute f 1 as s 1 /s 3 and h 2 as gcd(s 3 , t) within (Z/pZ)[x]. This amounts to 3 gcds and 2 divisions in (Z/pZ)[x], which is clearly within the stated complexity bound -provided we can compute t efficiently. That t can be computed efficiently is immediate since it only involves a distinct degree factorization in (Z/pZ)[x], a subtraction in Z[x], and a single polynomial division (by p) in Z[x].</p><p>To conclude, now that the main arguments have been recorded, we certainly invite readers to either: (a) generate many simple examples to better appreciate the root counting formula under Theorem 1.4(1); or (b) try implementing the algorithm in a computer algebra system they find palatable. We close the paper by providing the following example.</p><p>Example 3.4. Fix the prime p = 5, and consider the polynomial f &#8712; Z[x] defined by f (x) = x(x + 2) 2 (x + 4) 5 (x + 3) 14 (x 3 + 2x + 1) + 5(x + 2)(x + 4) = x 25 + 66x 24 + 2073x 23 + 41225x 22 + 582597x 21 + 6225421x 20 + 52256469x 19 + 353428921x 18 + 1960388179x 17 + 9032286149x 16 + 34894415443x 15 + 113842103703x 14 + 315375403239x 13 + 745101000855x 12 + 1506289490631x 11 + 2610867590739x 10 + 3879338706288x 9 + 4921047219861x 8 + 5275209809592x 7 + 4688604525204x 6 + 3350344836816x 5 + 1835957176704x 4 + 716433486336x 3 + 174686782469x 2 + 19591041054x + 40.</p><p>In particular, invoking language in the proof of Theorem 1.4(1), we have h 1 (x) = x(x -3) 2 (x -1) 5 (x -2) 14 (x 3 + 2x + 1) &#8712; (Z/pZ)[x] f 1 = x, f 2 = (x -3), f 5 = (x -1), f 14 = (x -2), g = x 3 + 2x + 1, t(x) = (x -3)(x -1), h 2 = gcd(f 2 f 5 f 14 , t) = (x -3)(x -1) &#8712; (Z/5Z)[x].</p><p>Thus Theorem 1.4(1) says that #{a &#8712; A 2 (5) : f (a) &#8801; 0 mod 25} = deg(f 1 ) + 5 &#8226; deg(h 2 ) = 1 + 5(2) = 11. Now, f (x) &#8801; 0 mod 5 when x = 0, 1, 2, 3 &#8712; A 1 <ref type="bibr">(5)</ref>. The simple root x = 0 mod 5 lifts uniquely to the root x = 15 mod 25 per Hensel's Lemma 2.2. Among the three degenerate roots mod 5, only x = 1 and x = 3 satisfy f (x) &#8801; 0 mod 25, and Hensel's Lemma 2.3 lifts them 5-to-1. The values x &#8712; A 2 (5) for which f (x) &#8801; 0 mod 25 are 1, 3, 6, 8, 11, 13, 15, 16, 18, 21, and 23. We note that 1 &#8801; 6 &#8801; 11 &#8801; 16 &#8801; 21 mod 5, while 3 &#8801; 8 &#8801; 13 &#8801; 18 &#8801; 23 mod 5, as indicated under our discussion of Hensel's Lemma 2.3. In line with formula 3.0.1 under Corollary 3.3, we note in passing that only x = 2 fails to lift to a root modulo 25.</p></div></body>
		</text>
</TEI>
