-1

I just know this rule :ab mod n = [(a mod n)(b mod n)] mod n. How can it be proved that the following rule is true ?

x^7 mod n = {(x^4 mod n)(x^2 mod n)(x^1 mod n)} mod n
Jyrki Lahtonen
  • 140,891
ZWHmepsy
  • 27
  • 4

1 Answers1

1

The basic idea of congruences is to say that one number is equivalent to another by a relation. Numbers that are equivalent are said to belong to the same equivalence class.

In the case of mod, the equivalence relation is "leave the same remainder when divided by n". So if we consider for example 22 and 48 mod 13, they both leave remainder 9. $22=13+9$, and $48=3.13+9$, and so 22 and 48 belong to the equivalence class of mod13. We write $22\equiv48 \mod 13$. We usually simplify the right hand number and write $22\equiv9\mod13$.

This allows us to express general numbers in terms of the moduli (13 from the example just given), and a remainder.

In your example, the moduli is $n$, and we can write $a$ and $b$ as:

  • $a=jn+x$
  • $b=kn+y$

$a\equiv x \mod n$, and $b\equiv y \mod n $.

$ab=(jn+x)(kn+y)=jkn^2+n(jy+kx)+xy = n(jkn+jy+kx)+xy$. The remainder when divided by n is therefore $xy$, and we write $ab\equiv xy \mod n$, and as this the same as $(a \mod n)(b \mod n) \mod n $, we have proved your result.

To prove the $x^7$ result, use $x^7=x^4x^3$ and apply the theorem, and then reapply the theorem to $x^3=x^2x$.

JMP
  • 22,637
  • I can't really understand your explanation. Does abc mod n = { [(a mod n)(b mod n)] mod n * (c mod n) } mod n equals to abc mod n = [ (a mod n)(b mod n) (c mod n) ]mod n ?? – ZWHmepsy Apr 03 '15 at 13:35
  • for example 1243 mod 713 = {(1232 mod 713) · (128 mod 713) · (122 mod 713) · (12 mod 713)} mod 713 – ZWHmepsy Apr 03 '15 at 13:39
  • abc mod n == (a mod n) (bc mod n) mod n == (a mod n)(b mod n)(c mod n) mod n – JMP Apr 03 '15 at 13:39
  • Why? is it following that "abc mod n == (a mod n) (bc mod n) mod n =={ (a mod n)[(b mod n)(c mod n) mod n ] } mod n" ? – ZWHmepsy Apr 03 '15 at 13:44
  • bc mod n can be expanded like ab mod n, and x mod n mod n = x mod n – JMP Apr 03 '15 at 13:46
  • { (a mod n)[(b mod n)(c mod n) mod n ] } mod n == (a mod n)(b mod n)(c mod n) mod n ??? – ZWHmepsy Apr 03 '15 at 14:16
  • @ Jon Mark Perry Is there any book that you could recommend to me for solving this problem ?? – ZWHmepsy Apr 03 '15 at 14:53
  • gauss http://en.wikipedia.org/wiki/Carl_Friedrich_Gauss invented modular arithmetic : http://www.amazon.com/Disquisitiones-Arithmeticae-Carl-Gauss/dp/0300094736 – JMP Apr 06 '15 at 08:54