Wednesday, 30 March 2016
To Find Modulo of Large Exponent.
Calculate 7 82 mod 40
Maybe just start calculating. Note that 72=49≡9(mod40) . So 74≡81≡1(mod40) . We got lucky.
It follows that 780=(716)5≡1(mod40) . Thus 782=78072≡49≡9(mod40) .
In general, repeated squaring, and reduction with respect to our modulus (in this case 40 ) gets us to high powers fairly quickly.
A more elaborate way is to use Euler's Theorem. If a is relatively prime to m , then aφ(m)≡1(modm).
Here φ is the Euler Ï• -function. We have φ(40)=16 , so taking a=7 we have a16≡1(mod40) . It follows that a80=(a16)5≡1(mod40) . So a82≡a2=49(mod40) . But 49≡9(mod40) .
Still another way is to factor 40 as 23⋅5 . We then work separately modulo 8 and modulo 5 .
First modulo 8 : We have 7≡−1(mod8) , so 782≡(−1)82≡1(mod8) .
Next modulo 5 : We have 7≡2(mod5) , so 72≡4≡−1(mod5) , and therefore 74≡1(mod5) . (We could also get this directly by using Fermat's Theorem.) It follows that 780≡1(mod5) , and therefore 782≡4(mod5) .
Now we are looking for the numbers that are congruent to 1 modulo 8 and to 4 modulo 5 . For bigger numbers, we can use the Chinese Remainder Theorem. But finding a number congruent to 1 modulo 8 and to 4 modulo 5 can also be done without much machinery.
In general, the technique to use depends very much on the modulus m . If it is huge, and we do not know its prime factorization, then the Binary Method of exponentiation is quite efficient.
Reference Link:
http://math.stackexchange.com/questions/165670/congruence-modulo-with-large-exponents
Reference Link:
http://math.stackexchange.com/questions/165670/congruence-modulo-with-large-exponents
Subscribe to:
Posts (Atom)
How to install google-chrome in redhat without redhat subscription
Install google-chrome in redhat Download the .rpm file of chrome https://www.google.com/chrome/thank-you.html?installdataindex=empty&st...
-
Install google-chrome in redhat Download the .rpm file of chrome https://www.google.com/chrome/thank-you.html?installdataindex=empty&st...