Solving Cyclotomic Polynomials by Radical Expressions
Total Page:16
File Type:pdf, Size:1020Kb
Solving Cyclotomic Polynomials by Radical Expressions Andreas Weber and Michael Keckeisen Abstract: We describe a Maple package that allows the solution of cyclotomic polynomials by radical expressions. We provide a function that is an extension of the Maple solve command. The major algorithmic ingredient of the package is an improvement of a method due to Gauss which gives radical expressions for roots of unity. We will give a summary for computations up to degree 100, which could be done within a few hours of cpu time on a standard workstation. Keywords: solution in radicals, roots of unity, cyclotomic polynomials, Galois theory, Gauss algorithm Introduction extent, reducing the needed amount of memory at the same Niels Henrik Abel and Evariste Galois showed that polyno- time. For instance, the computations of radical expressions mial equations of degree higher than four cannot be solved by for the 47th, 59th, or 83rd root of unity failed with the previ- radical expressions in general. As Galois stated in his work, ous implementation, but can now be accomplished within a radical solutions exist if and only if the Galois group of the few hours. polynomial is solvable. Since the Galois group of a cyclotomic polynomial is The Algorithm Abelian, its Galois group is solvable, and so its solutions can First, we will show how the task of computing radical solu- be expressed by radical expressions. tions for cyclotomic polynomials can be reduced to the one Carl Friedrich Gauss proved this special case already in of calculating radical expressions for roots of unity. Second, 1797 and published it in 1801 in his master-work Disquisi- we will sketch the algorithm for the latter task, which mainly tiones Arithmeticae [1] as an extension of his work to deter- is the one given in [2]. mine which regular polygons can be constructed by compass and ruler. In this book Gauss describes an algorithm to com- RADICAL SOLUTIONS FOR CYCLOTOMIC POLY- pute radical expressions for primitive roots of unity. NOMIALS We implemented a variant of the algorithm of Gauss in The n-th cyclotomic polynomial over the rational numbers is Maple, which has an improved time complexity compared to of the form Gauss’ original proposition. n The hard part of the proof and of the algorithm is to com- x p x Q n n j n p x x pute a radical expression for a primitive -th root of unity, gcd j where p is a prime number. The improvement in our algo- rithm reduces the asymptotic time complexity in this case and its degree is from s Y Op p m logp r r i i n p p i i to i Q Op m log p s r i p n where i and is the Eulerian -Function, cf. i m p where is the largest prime factor of . An analysis of [3, p. 13 and 169]. From the defining formula of it can the algorithm and the statement and proof of the proposition be seen that the inverse image of is finite. Thus, to on which the improvement is based can be found in [2]. We determine whether or not an irreducible factor q of a polyno- also refer to this paper for a description of the underlying mial is cyclotomic, it suffices to compare the j -th cyclotomic j ideas of Gauss’ algorithm and the statement of the theorems polynomial with q for all in . Maple provides the that yield its correctness. function numtheory[invphi] to calculate ; the compu- Compared to the Maple-code given in [2], we managed tational costs of this function is negligible for the range of to improve the practical speed of the algorithm to a great arguments which are feasible for computing radical expres- sions. Arbeitsbereich Symbolisches Rechnen, Fakultat¨ fur¨ Infor- n p x matik, Universitat¨ Tubingen,¨ 72076 Tubingen,¨ Germany, E-mail: Given the -th cyclotomic polynomial n , the task of n g fweber,keckeise @informatik.uni-tuebingen.de; WWW: http://www- computing radical solutions can be reduced to finding a sr.informatik.uni-tuebingen.de radical expression for one root of unity, because this root will MapleTech Vol. ???, No. ??, pp. 1–5; ISSN 1061-5733 $6.00 c Birkhauser¨ Boston 1999 1 Solving Cyclotomic Polynomials by Radical Expressions be primitive, e. g. a multiplicative generator for the others. second strategy is simply to reverse the ordering; this can be Further, it suffices to find a primitive n-th root of unity to done by setting SwapPrimeOrder := true. As had to be ex- compute primitive roots of unity for all prime factors of n by pected in all our experiments the obtained computation times applying some relatively simple recursion formulas, see e. g. were far worse than with our default setting and the com- [4]. puted radical expressions were also larger; some examples are given below in Table 2. RADICAL EXPRESSIONS FOR PRIMITIVE p -TH ROOTS OF UNITY How to Use the Library The hard part of the algorithm is to find a radical expression The library is included in the file ‘radsolvelib‘. p for a primitive p-th root of unity, where is a prime number. This part involves the computation of Gaussian periods, cf. read ‘radsolvelib‘: p x All functionality is available via the function radsolve. [1, 343]. If p denotes a primitive -th root of unity the f k f k period for two integers and is defined by The command radsolve serves as an extension to the Maple solve command. It returns radical solutions for all cyclo- f X tomic factors of a polynomial with integer coefficients and em kg f k p calls solve for the others. m Calling Sequence: radsolve(poly) p g p where e and is a primitive -th root. In Maple a f primitive p-th root can be computed by the function primroot Parameters: poly — an univariate polynomial with in the package numtheory. integer coefficients The Gaussian periods are generators of intermediate fields The command radsolve(poly) returns the solutions of Q of the number field p , which is a number field of degree the univariate polynomial poly as radical expressions p over the rationals. Using the modern terminology of intermediate fields the algorithm of Gauss works roughly as for all the irreducible factors of poly that are either cy- follows. Starting with the rationals, compute a radical ex- clotomic or of degree lower than four. pression for a generator of an intermediate field of prime de- In general, explicit solutions in terms of radicals for gree, i.e. an appropriate Gaussian period. After this task has polynomial equations of degree greater than four do been accomplished, compute a radical expression for a gen- exist if and only if the Galois group of the polynomial erator of another intermediate field (i.e. another Gaussian pe- is solvable. This is the case for cyclotomic polynomi- riod) whose relative degree over the other intermediate field als, since their Galois group is cyclic. radsolve(poly) is of prime order. Continue this task until a radical expres- computes radical expressions for such cases and calls Q g p sion for a generator of p , i.e. has been solve for the other factors of poly. In cases, where ex- computed. plicit solutions can’t be computed, implicit solutions The difficult part of Gauss’ algorithm is the lifting of rad- are given in terms of RootOfs. ical expressions from one intermediate field to another one. We will not give the details of this lifting here but we refer to Note that to obtain explicit solutions for the general [2]. quartic polynomial equation you have to set the global The algorithm described above works for several sequences variable EnvExplicit to true, as explained in the topic of intermediate fields to be constructed. All permutations on help to solve. the list of prime factors of p give a possible sequence in the construction of the intermediate fields. Different permu- The output from radsolve is a sequence of solutions. tations give different results in general, and also the compu- The behaving of radsolve(poly) can be changed by us- tational costs are greatly affected by the choice of an appro- ing the following global variables (default values in priate sequence of intermediate fields. Our default strategy brackets): in the choice of the intermediate fields is as follows: first take the largest prime factor, then the second largest and so AllSolutions (false): If AllSolutions is set to false, Q radsolve(poly) on, until we just get the final field p as a relative exten- returns only one solution (no matter which sion of degree 2 of the last intermediate field. Note that we exponent belongs to the factor) for every irreducible have to count multiplicities as separate factors. This strategy factor of poly. If it is set to true, all solutions are given. seems to be preferable over others, because bigger relative extensions — which cause more computations — occur in UseRootsymbols (false): if UseRootsymbols is set to smaller intermediate fields. However, as a tool for experi- true, RootOfs are used to represent primitive roots of mental mathematics we provide another strategy, too. The unity of prime factors of n , where n is the degree of 2 MapleTech Solving Cyclotomic Polynomials by Radical Expressions the cyclotomic polynomial, although these roots could To verify the results, one can use radnormal for smaller be expressed in radicals explicitly. This saves time and degrees only. One has to use numeric evaluation for larger space. If UseRootsymbols is set to false, all RootOfs degrees. The following method works for very large expres- are substituted by their radical expressions.