1 / 16

mod arithmetic

mod arithmetic. mod arithmetic. a mod m is the remainder of a divided by m a mod m is the integer r such that a = qm + r and 0 <= r < m again, r is positive. Examples 17 mod 3 = 2 17 mod 12 = 5 (5 o’clock) -17 mod 3 = 1. congruences.

selia
Download Presentation

mod arithmetic

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. mod arithmetic

  2. mod arithmetic • a mod m is the remainder of a divided by m • a mod m is the integer r such that • a = qm + r and 0 <= r < m • again, r is positive • Examples • 17 mod 3 = 2 • 17 mod 12 = 5 (5 o’clock) • -17 mod 3 = 1

  3. congruences a is congruent to b modulo m if m divides a - b

  4. proof a is congruent to b mod m if and only if the remainder of a divided by m is equal to the remainder of b divided by m.

  5. proof If a is congruent to b mod m and c is congruent to d mod m then a+c is congruent to b+d mod m

  6. proof If a is congruent to b mod m and c is congruent to d mod m then ac is congruent to bd mod m

  7. Mod arithmetic examples • -133 mod 9 = 2 (but in Claire?) • list 5 numbers that are congruent to 4 modulo 12 • hash function h(k) = k mod 101 • h(104578690) • h(432222187) • h(372201919) • h(501338753)

More Related