


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Randomized Advance Algorithms Randomized Advance Algorithms
Typology: Lecture notes
1 / 4
This page cannot be seen from the preview
Don't miss anything!



An integer b is divisible by an integer a 6 = 0, if ∃ x ∈ Z such that b = ax, and we write this as a|b. In case b is not divisible by a, we write this as a 6 |b. Z = set of integers = {..., − 3 , − 2 , − 1 , 0 , 1 , 2 , 3 , ...}. If a|b and 0 < a < b,then a is called a proper divisor of b. ∀a ∈ Z − { 0 }, a| 0 ak||b ⇐⇒ ak|b, ak+1^6 |b,
Give any integers a and b, with a > 0, there exist unique integers q and r such that b = qa + r, 0 ≤ r < a. If a 6 |b, then r satisfies the stronger
inequalities 0 < r < a. Proof: Let Za,b = {b − qa|q ∈ Z} = {..., b − 2 a, b − a, b, b + a, b + 2a, ...}. Let r be the least non-negative element of Za,b. We should have 0 ≤ r < a, otherwise some other r′^ < r will be the least non negative element of Za,b. Let r = b − qa =⇒ b = q′a + r′^ with 0 ≤ r′^ < r < a. =⇒ qa + r = q′a + r′^ =⇒ (r − r′) = (q′^ − q)a > 0 =⇒ r − r′^ ≥ a =⇒ r ≥ a + r′^ ≥ a, a contradiction. This proves the uniqueness of r and q. r′^ = r =⇒ q′^ = q. a 6 |b and r = 0 =⇒ b = qa =⇒ a|b. Therefore, 0 < r < a.
Greatest Common Divisor (GCD)
An integer a is called a common divisor of b and c if a|b and a|c. Since there is only a finite number of divisors of any non zero integer, there is only a finite number of common divisors of b and c, except in the case when b = c = 0. If at least one of b and c is not 0, the greatest among their common divisors is called the greatest common divisor (GCD) of b and c, and is denoted by (b, c). Similarly, we denote the greatest common divisor g of the integers b 1 , b 2 , ..., bn, not all zero, by (b 1 , b 2 , ..., bn). (b, c) is defined for every pair of integers b, c except for b = c = 0, and we note that (b, c) ≥ 1.
∃x 0 , y 0 ∈ Z such that (b, c) = bx 0 + cy 0
Proof is similar to the proof of the division algorithm. Let Zb,c = {bx + cy | x ∈ Z, y ∈ Z}. Let g be the smallest positive element of Zb,c : g = bx 0 + cy 0. claim: g = (b, c) Proof: Applying the division algorithm (dividing b by g): b = gq + r =⇒ r = b − ga = b − (bx 0 + cy 0 )q = b(1 − qx 0 ) + c(1 − yq 0 ) ∈ Zb,c. 0 ≤ r < g =⇒ r = 0. =⇒ g|b. Similarly, applying the division algorithm (dividing c by g), we get the result that g|c. =⇒ g is a common divisor of b and c. If g is not the gcd, then let g′^ > g be the gcd of b and c. We have : g′|b and g′|c =⇒ g′|(bx 0 + cy 0 ) =⇒ g′|g =⇒ g′^ ≥ g a contradiction. =⇒ g = (b, c).
a 1 , a 2 , ..., an are relatively prime in pairs in case (ai, bj ) = 1 for all i = 1 , 2 , ..., n and j = 1, 2 , ..., n with i 6 = j. The fact that (a, b) = 1 is some- times expressed by saying that a and b are coprime, or by saying that a is prime to b.
∀x ∈ Z, (a, b) = (b, a) = (a, −b) = (a, b + ax)
Proof: (a, b) = minx′,y′∈Z{|ax′^ + by′|} = minx′,y′∈Z{|by′^ + ax′|} = (b, a) (a, b) = minx′,y′∈Z{|ax′^ + by′|} = minx′,y′∈Z{|ax′^ + (−b)(−y′)|} = minx′,y′′∈Z{|ax′^ + (−b)y′′|} = (a, −b) (a, b + ax) = minx′,y′∈Z{|ax′^ + (b + ax)y′|} = minx′,y′∈Z{|a(x′^ + xy′) + by′|} =⇒ (a, b + ax) ≥ (a, b) (a, b) = minx′,y′∈Z{|ax′^ + by′|} = minx′,y′∈Z{|a(x′^ − xy′) + (b + ax)y′|} =⇒ (a, b) ≥ (a, b + ax) =⇒ (a, b) = (a, b + ax)
c|ab, (b, c) = 1 , =⇒ c|a
Proof: bx + cy = 1 =⇒ a = abx + cy c|ab, c|ac =⇒ c|(abx + acy) =⇒ c|a