Modular arithmetic - Wikipedia.pdf

Modular arithmetic - Wikipedia.pdf - Modular arithmetic...

This preview shows page 1 - 4 out of 10 pages.

2/10/2018 Modular arithmetic - Wikipedia 1/10 Modular arithmetic In mathematics, modular arithmetic is a system of arithmetic for integers, where numbers "wrap around" upon reaching a certain value—the modulus (plural moduli ). The modern approach to modular arithmetic was developed by Carl Friedrich Gauss in his book Disquisitiones Arithmeticae , published in 1801. A familiar use of modular arithmetic is in the 12-hour clock, in which the day is divided into two 12-hour periods. If the time is 7 :00 now, then 8 hours later it will be 3:00. Usual addition would suggest that the later time should be 7 + 8 = 15, but this is not the answer because clock time "wraps around" every 12 hours. Because the hour number starts over after it reaches 12, this is arithmetic modulo 12. According to the definition below, 12 is congruent not only to 12 itself, but also to 0, so the time called "12:00" could also be called "0:00", since 12 is congruent to 0 modulo 12. Definition of congruence relation Examples Properties Congruence classes Residue systems Reduced residue systems Integers modulo n Applications Computational complexity Example implementations See also Notes References External links Time-keeping on this clock uses arithmetic modulo 12. Contents Definition of congruence relation
Image of page 1

Subscribe to view the full document.

2/10/2018 Modular arithmetic - Wikipedia 2/10 Modular arithmetic can be handled mathematically by introducing a congruence relation on the integers that is compatible with the operations on integers: addition, subtraction, and multiplication. For a positive integer n , two numbers a and b are said to be congruent modulo n , if their difference a b is an integer multiple of n (that is, if there is an integer k such that a b = kn ). This congruence relation is typically considered when a and b are integers, and is denoted (some authors use = instead of ; in this case, if the parentheses are omitted, this generally means that "mod" denotes the modulo operation, that is, that 0 ≤ a < n ). The number n is called the modulus of the congruence. The congruence relation may be rewritten as explicitly showing its relationship with Euclidean division. However, b need not be the remainder of the division of a by n . More precisely, what the statement a b mod n asserts is that a and b have the same remainder when divided by n . That is, where 0 ≤ r < n is the common remainder. Subtracting these two expressions, we recover the previous relation: by setting k = p q . For example, because 38 − 14 = 24 , which is a multiple of 12, or, equivalently, because both 38 and 14 have the same remainder 2 when divided by 12. The same rule holds for negative values: Examples
Image of page 2
2/10/2018 Modular arithmetic - Wikipedia 3/10 A remark on the notation: Because it is common to consider several congruence relations for different moduli at the same time, the modulus is incorporated in the notation. In spite of the ternary notation, the congruence relation for a given modulus is binary. This would have been clearer if the notation
Image of page 3

Subscribe to view the full document.

Image of page 4

{[ snackBarMessage ]}

Get FREE access by uploading your study materials

Upload your study materials now and get free access to over 25 million documents.

Upload now for FREE access Or pay now for instant access
Christopher Reinemann
"Before using Course Hero my grade was at 78%. By the end of the semester my grade was at 90%. I could not have done it without all the class material I found."
— Christopher R., University of Rhode Island '15, Course Hero Intern

Ask a question for free

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern