Lecture Wee 3

Discrete Mathematics and Its Applications with MathZone

Info iconThis preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon
UCI ICS/Math 6D 3-Integers-1 Integers Number Theory = Properties of Integers (For this part, assume all values are integers .) “a|b” = “a divides b ” = 5 n Z (b=na) “b is a multiple of a.” “a is a factor of b.” “Multiple” always means “integer multiple” Thrm: If a|b and a|c, then a|(b+c). Thrm: If a|b, then 2200 m a|mb. Thrm: If a|b and b|c, then a|c.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
UCI ICS/Math 6D 3-Integers-2 Division Algorithm Thrm: Thrm: If a,d If a,d Z Z d>0, then d>0, then 5 ! q,r Z Z (0≤r<d a=qd+r) d is the “divisor ( q is the “quotient ,” q = a div d (quotient = # of multiples of d which fit into a, if a≥0) r is the “remainder ,” r = a mod d (“a modulo d”) a d q = a div d r = a mod d 17 5 3 2 5 17 0 5 51 17 3 0 0 17 0 0 -17 5 -4 3 There is a unique. There is one and only one. Functions on pairs (a,d)
Background image of page 2
UCI ICS/Math 6D 3-Integers-3 Congruent . .. Modulo For a, b, m integers with m>0, we say “a is congruent to b modulo m,” written a b (mod m) b (mod m) , iff m | (a-b) Thrm: For a, b, m integers with m>0, a b (mod m) b (mod m) iff 5 k Z a=b+km Z a=b+km Thrm: For a, b, m integers with m>0, a b (mod m) b (mod m) iff (a mod m) = (b mod m) Thrm: For a, b, c, d, m integers with m>0, if a b (mod m) b (mod m) and c d (mod m), then d (mod m), then a+c b+d (mod m) b+d (mod m) and ac bd (mod m). bd (mod m).
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
UCI ICS/Math 6D 3-Integers-4 Applications of Congruences Hashing Functions: h m (n) = (n mod m) Range(h m ) = {n | 0≤n<m} Not injective (not one-to-one) Collisions {0,1,2,3,. ..,m-1} = “Z m Pseudorandom Number Generator: n k+1 =(an k +c) mod m Example: (a,c,m)=(3,4,7), i.e. n k+1 =(3n k +4) mod 7 n 1 =0 ; n 2 =4 ; n 3 =2 ; n 4 =3 ; n 5 =6 ; n 6 =1 ; n 7 =0 ; …
Background image of page 4
UCI ICS/Math 6D 3-Integers-5 Applications of Congruences (cont) Example: (a,c,m)=(3,4,7), i.e. n k+1 =(3n k +4) mod 7 n 1 =0 ; n 2 =4 ; n 3 =2 ; n 4 =3 ; n 5 =6 ; n 6 =1 ; n 7 =0 ; … Ceasar’s Cipher (“Shift Cipher”): p = plaintext, encoded as integer in Z 26 c = ciphertext, encoded as integer in Z 26 Encrypt each letter using a fixed offset k from the alphabet’s start, e.g.: c = E k (p) = (p+k) mod 26 Actually, any bijection, f:Z 26 Z 26 , provides an encryption algorithm: Examples: E(p) = (3n+13) mod 26 E(p) = (15n+7) mod 26
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
UCI ICS/Math 6D 3-Integers-6 Primes n>1 is “prime” iff the only positive divisors of n are 1 and n itself.
Background image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 21

Lecture Wee 3 - Integers Number Theory = Properties of...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online