CLICK HERE FOR BLOGGER TEMPLATES AND MYSPACE LAYOUTS

MAPLE Again




REDUCTION MOD P

maple can do computations with integers modulo m.
By using maple:

> modp(117,13);
0
> modp(129,13);
12
> ifactor(129-12);
(3)2 (13)
> 117 mod 13;
0
> 129 mod 13;
12
> 1/17 mod 257;
121
> modp(121*17,257);
1

The functions for reduction modulo m are modp and mod. Given an integer a and
a positive integer m, modp(a,m) reduces a modulo m. The syntax using mod is
a mod m. In our maple session, modp(129,13) returned 12, which means

129 ≡ 12 (mod 13),

and this is indeed the case in as much as 13 divides the difference 129−12. The
call 129 mod 13 also reduced 129 modulo 13. When a and m are relatively prime,
i.e., 1 is their greatest common divisor, modp(1/a,m) or 1/a mod m returns the
multiplicative inverse of a modulo m. We see that 121 is the inverse of 17 modulo
257, and indeed

(121)(17) ≡ 1 (mod 257).

U can try it by u'rself!!!

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • RSS
Read Comments

2 comments:

numbertheorywonders said...
This comment has been removed by a blog administrator.
numbertheorywonders said...
This comment has been removed by a blog administrator.