Jump to content

Cornacchia's algorithm

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Derlay (talk | contribs) at 10:14, 23 April 2010 (create article). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

In computational number theory, Cornacchia's algorithm is an algorithm for solving the Diophantine equation , where and d and m are coprime. The algorithm was described in 1908 by G. Cornacchia[1].

The algorithm

First, find any solution to ; if no such 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 ; otherwise there is no solution.

Example

Solve the equation . A square root of −6 (mod 103) is 32, and 103≡7 (mod 32); since and , there is a solution x=7, y=3.

References

  1. ^ Cornacchia, G. (1908). "Su di un metodo per la risoluzione in numeri interi dell' equazione ". Giornale di Matematiche di Battaglini. 46: 33–90.

Morain, M.; Nicolas, J.-L. (12 September 1990). "On Cornacchia's algorithm for solving the diophantine equation " (PDF). Basilla, Julius Magalona (12 May 2004). "On Cornacchia's algorithm for solving the diophantine equation " (PDF). {{cite web}}: line feed character in |title= at position 63 (help)