- Cornacchia's algorithm
-
In computational number theory, Cornacchia's algorithm is an algorithm for solving the Diophantine equation x2 + dy2 = m, where and d and m are coprime. The algorithm was described in 1908 by Giuseppe Cornacchia[1].
Contents
The algorithm
First, find any solution to ; if no such r0 exist, there can be no solution to the original equation. Then use the Euclidean algorithm to find , and so on; stop when . If is an integer, then the solution is x = rk,y = s; otherwise there is no solution.
Example
Solve the equation x2 + 6y2 = 103. A square root of −6 (mod 103) is 32, and 103 ≡ 7 (mod 32); since 72 < 103 and , there is a solution x = 7, y = 3.
References
- ^ Cornacchia, G. (1908). "Su di un metodo per la risoluzione in numeri interi dell' equazione .". Giornale di Matematiche di Battaglini 46: 33–90.
External links
Morain, M.; Nicolas, J.-L. (12 September 1990). "On Cornacchia's algorithm for solving the diophantine equation u2 + dv2 = m" (PDF). http://www.gage.polytechnique.fr/~morain/Articles/cornac.pdf. Basilla, Julius Magalona (12 May 2004). "On Cornacchia's algorithm for solving the diophantine equation u2 + dv2 = m" (PDF). http://projecteuclid.org/DPubS/Repository/1.0/Disseminate?view=body&id=pdf_1&handle=euclid.pja/1116442240.
Primality tests AKS · APR · Baillie–PSW · ECPP · Elliptic curve · Pocklington · Fermat · Lucas · Lucas–Lehmer · Lucas–Lehmer–Riesel · Proth's theorem · Pépin's · Solovay–Strassen · Miller–Rabin · Trial divisionSieving algorithms Integer factorization algorithms CFRAC · Dixon's · ECM · Euler's · Pollard's rho · p − 1 · p + 1 · QS · GNFS · SNFS · rational sieve · Fermat's · Shanks' square forms · Trial division · Shor'sMultiplication algorithms Ancient Egyptian multiplication · Karatsuba algorithm · Toom–Cook multiplication · Schönhage–Strassen algorithm · Fürer's algorithmDiscrete logarithm algorithms Baby-step giant-step · Pollard rho · Pollard kangaroo · Pohlig–Hellman · Index calculus · Function field sieveGCD algorithms Modular square root algorithms Cipolla · Pocklington's · Tonelli–ShanksOther algorithms Chakravala · Cornacchia · integer relation algorithm · integer square root · Modular exponentiation · Schoof'sItalics indicate that algorithm is for numbers of special forms; bold indicates deterministic algorithm for primality tests (current article is always in bold).Categories:- Number theoretic algorithms
Wikimedia Foundation. 2010.