Re: inverse modulos
From: Ted Hwa (hwatheod_at_xenon.Stanford.EDU)
Date: 12/03/04
- Next message: Tim Brauch: "(Finite) Generating Functions"
- Previous message: HERC777: "Re: Jesus christ What's going on?"
- In reply to: Johnathan Doe: "Re: inverse modulos"
- Next in thread: mensanator_at_aol.com: "Re: inverse modulos"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 3 Dec 2004 05:12:53 +0000 (UTC)
Johnathan Doe <No-spam-here-johnathan_doe@!!!nospamthanks!!!fastmail.com.au> wrote:
: Pawel Gladki wrote:
:> Solving diophantine equations is easy... it uses the extended Euclidean
:> algorithm, for details see e.g.:
:>
:> "http://www.win.tue.nl/~ida/demo/c1s3f2.html"
: Hi, thanks for this. There is a function in the GMP library that makes
: use of the extended Euclidean algorithm, but it's not giving the result
: I want. I thought that the inverse modulo was supposed to be unique
: where it existed, but I must have misunderstood that.
The inverse of a modulo m is unique *modulo m*, if it exists.
For example, a = 17, m = 5. The inverse of 17 modulo 5 is 3, since
17*3 = 51 = 1 + 5*10. (k=10 in the notation of your earlier posts).
I could add any multiple of m (in this case 5) to 3, and it would
still be an inverse: for example 8,13,18,... but these are all
congruent modulo 5 (i.e. they differ from each other by a multiple
of 5). The inverse is unique modulo 5.
In general, if a-b is divisible by m, then we say that a and b are
"congruent" modulo m, and write a = b (mod m).
Ted
- Next message: Tim Brauch: "(Finite) Generating Functions"
- Previous message: HERC777: "Re: Jesus christ What's going on?"
- In reply to: Johnathan Doe: "Re: inverse modulos"
- Next in thread: mensanator_at_aol.com: "Re: inverse modulos"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|