Presentation is loading. Please wait.

Presentation is loading. Please wait.

Congruence class arithmetic. Definitions: a ≡ b mod m iff a mod m = b mod m. a  [b] iff a ≡ b mod m.

Similar presentations


Presentation on theme: "Congruence class arithmetic. Definitions: a ≡ b mod m iff a mod m = b mod m. a  [b] iff a ≡ b mod m."— Presentation transcript:

1 Congruence class arithmetic

2 Definitions: a ≡ b mod m iff a mod m = b mod m. a  [b] iff a ≡ b mod m.

3 It is possible to do arithmetic with congruence classes. To add two congruence classes modulo n, we just select any element a from the first class and any element b from the second class, and then compute a + b as we would integers. The sum of the two congruence classes is then defined to be equal to the congruence class containing the sum a + b.

4 For example, let n=6. Suppose that we wish to add the congruence class [3] to the congruence class [52]. According to the algorithm described above, we just select an element from each class, add them together, and see which class the resulting sum is in. Clearly 3 and 52 are elements of our classes, so the sum is in the congruence class containing 55 which is congruent to 1 mod 6.

5 Things are fine so far, but suppose that we selected elements other than 3 and 52 from their respective congruence classes? After all, the rule for addition says that we can use any elements from each class to do the addition. Will this work? Let's try some examples. 9 and 15 are in the same class as 3. 4 and 46 are in the same class as 52. 9+4=13 15+46= 61. Both are congruent to 1 mod 6.

6 These examples illustrate that addition of congruence classes is well defined. [3] + [52] = [55]=[13]=[61]= [1].

7 The rule for multiplication is similar to that for addition: to multiply two congruence classes, we select any elements a and b from each of the classes and multiply them together. The product of the congruence classes is then defined to be the congruence class containing the product ab. We modify the above examples to illustrate multiplication of congruence classes.

8 In moving from the set of integers to congruences modulo n, we go from an infinite set to a set with just n elements, the n congruence classes. Concretely, we can think of the n congruence classes as being represented by the possible remainders for division by n: 0, 1,..., n – 1. We can do addition, subtraction, and multiplication with this set.

9 Since arithmetic for these operations is well defined for congruences, we can be somewhat lax about where we reduce to remainders modulo n.


Download ppt "Congruence class arithmetic. Definitions: a ≡ b mod m iff a mod m = b mod m. a  [b] iff a ≡ b mod m."

Similar presentations


Ads by Google