home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: sci.math
- Path: sparky!uunet!mcsun!Germany.EU.net!Urmel.Informatik.RWTH-Aachen.DE!martin
- From: martin@math.rwth-aachen.de ( Martin Schoenert)
- Subject: Re: Quadratic Residue Question
- Message-ID: <martin.711805467@bert>
- Sender: news@Urmel.Informatik.RWTH-Aachen.DE (Newsfiles Owner)
- Nntp-Posting-Host: bert.math.rwth-aachen.de
- Organization: Rechnerbetrieb Informatik / RWTH Aachen
- References: <1992Jul17.185526.26121@leela.cs.orst.edu> <1992Jul17.210332.2105@cs.umn.edu> <Jul.17.21.03.32.1992.829@no.rutgers.edu>
- Date: 22 Jul 92 11:44:27 GMT
- Lines: 40
-
- In his article of 18-Jul-92 bumby@no.rutgers.edu (Richard Bumby) writes:
-
- Euler's expression for the Legendre symbol, which only makes sense if
- p is prime, can be calculated in O(log p) steps by repeated squaring.
- It is fairly common for textbooks in elementary number theory to note
- that reciprocity leads to a fast computation of Legendre symbols, but
- it turns out not to be significantly faster than Euler's criterion.
-
- In GAP (a system for computational group theory, which supports large
- integers) computing the value of $J(n/m)$ where $n$ and $m$ are both
- about 100 digits long takes roughly 600 ms on a DECstation 5120. But
- computing $J(n/m)$ using quadratic reciprocity takes only 6 ms. Thus for
- numbers of this size it is already about 100 times faster.
-
- This is to be expected. As you note Euler's expression can be computed
- in $O(log p)$ steps. However, it is important to note that each of those
- steps involves a multiplication of two numbers with $O(log p)$ digits,
- and therefore about $O((log p)^2)$ bit operations. So evaluating Euler's
- expressions takes a total of $O((log p)^3)$ bit operations. On the other
- hand the algorithm that uses quadratic reciprocity also takes $O(log p)$
- steps, but the numbers are getting smaller with each step. The behaviour
- is very similar to the Euclidean algorithm, and in fact the total time is
- $O((log p)^2)$ (just like the Euclidean algorithm).
-
- You continue:
-
- Thus quadratic reciprocity must be important for some other reason :-).
-
- --
- R. T. Bumby ** Rutgers Math || Amer. Math. Monthly Problems Editor
- bumby@math.rutgers.edu || P.O. Box 10971 New Brunswick, NJ08906-0971
- bumby@dimacs.rutgers.edu || Phone: [USA] 908 932 0277 * FAX 908 932 5530
-
- Indeed.
-
- Martin.
-
- --
- Martin Sch"onert, Martin.Schoenert@Math.RWTH-Aachen.DE, +49 241 804551
- Lehrstuhl D f"ur Mathematik, Templergraben 64, RWTH, D 51 Aachen, Germany
-