|
-
April 16th, 2009, 03:44 AM
#1
Modular Arithmetic
Hello to all, i try to implement modular arithmetic in C++ but finding it quite difficult to understand what is modular arithmetic.
I reading a book title: Algorithms by S. Dagupta, C H Papadimitriu, and U. V. Vaziran in chapter 1.
Substitution rule If x x0 (mod N) and y y0 (mod N), then:
x + y x0 + y0 (mod N) and xy x0y0 (mod N):
x + (y + z) (x + y) + z (mod N) Associativity
xy yx (mod N) Commutativity
x(y + z) xy + yz (mod N) Distributivity
This content is taken from http://www.cs.berkeley.edu/~vazirani...thms/chap1.pdf
I hope someone can explain this to us.
Thanks for your help.
Thanks for your help.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|