once tried to put students in a TA Q when I I was my discussion into groups there'll be 2 students left I group students into 3 If there'll be 3 students left I group students into 5 If there'll be 2 students left I group students into 7 If how many students attended my discussion Guess
1 Exponentiation we use an to denote Notation For a n C IN a a un n of a's Question How to efficiently common mod m ak ak then an idea n 2k If a ak ak a 2kt then an WE If n After computing ak m the rest is easy Algorithm Ak 2 Yom ah mod m z a fatale z 2 Cmo dm an Z Z m m k ak ak a an mod m z z a an z Z a Yom m compute 1020 7 EI 10 mod 7 3 100 mod 7 3 30 1020 320 7 7 mod7 mm mm
3 mod 7 3 32 20 mod 7 322 34 4 mod 7 38 E 16 E 2 mod 7 316 4 mod 7 b 34 E 4 4 16 4 20 320 3 2 mod7 1020 Hence 320 mod 7 2 7 7 1020 2 2 Linear Congruences b Lm od m Goat want to solve linearcongruencese ax me 21 1 where a b EI X is a variable an inverse of a modulo m Recalls If ax L mod m then is x modulo M denoted a I fgcd a mj An inverse of a modulo m exists and can be found nUm botha mon I k are n 734 12 Imo dm using extended Euclidean algorithm because I can find Sitek I as 1Mt sit I mod m as S is an inverse of a modulo M
mod m and CEZ then AC b If a be mod m Can't divide bothsides by an integer 2 11 e g 4 2 mod 2 mods hm.TL Let a b c c 2 and MEET I If bc modem and a GELLI L then gcd Gm Since gcd PI there exists.fi L m m.ac bcCmodm mod m beef a A b mod m lf s x mod 7 Find all solutions of 3 a H EI 451 K 17N 2 Step Check god 3,7 using Euclideanalgorithm L 2 22 tl I 13,7 L god 3 1 3 to a 3 Step Find using extended Euclidean algo modulo 7 I 2x I x3lmodT H modulo 7 1 a 3 is 3x Step 4 mod 7 3 3X 43574 nod7 mod 7 2.4 X E 2,8 solutions are Conclude 8t7nfornEZ_
2 The Chinese Remainder Theorem Goat want to solve systemoflinearcongruences.E.g.sc 23 is a solution mod 3 e.g 2 asolutionmeans a integer that satisfies 3 mod5 x All three mod 7 2 x congranences Rene For a generalsystem of linear congruences the existence of solution is not guaranteed For example the system l mod 2 X is odd x mod 4 x is even x o has no solution IDefI The integers a b are relativelypring if god la b L LThmI The ChineseRemainder Theorem Mn c Zt be pairwiserelatively prime Let la mi M Let Then the system Ai az an EZ ai cand MD x A L m od m X E X mod Ma an X iai mod mill X E As mod m3 a inimii d a i i i has a solution
Let M PI mix im Mi's are pairwise relatively prime god Mi mi L Mit modulo mi exists Fyfe mod mi L Miyu AIM y t angst Now Mayor is a solution to An a L the system mi a dii Check Hi modmi X x ai modmi Red In today's discussion you will see thatthioninthe theorem above is unique modulo M Mi Mr Mn _OE Find the smallest positiveintegersolutto the system mod 3 X E 2 mod5 x mod 7 2 x 3 5 7 105 X M m M 35 I M M 21 I M 15 MT
Step2i compute an inverse of Mi modulo mi M 35 mod 3 2 let y mod 3 1 2 2 2 let ya Mz 21 1 mods L mod 7 let Yz L Mz 15 1 Steps Find a solution AIMy t ALMLY x t A3MsY3 2 35.21 3 21 It 215 I 233 Conclude Any solution is congruent to 232 modulo 105 the smallest positive integersolution is 23 233 105 105 23 uptime p a 0lmodp for tmr integer a sit prep O l f go.b.n.pt Then p l AX mod p 7 x 1 is a bijection notice that f is well defined Pf First Meinen integers fad for OE Xi EEP Now suppose f Xi l AX mod p 9 2 mod p ax aXz mod p placate so P1 Xl Hz Sime p is prime and pya
so Xi Xz 0 EX Xz EP I Since Thus f is an injection Notice domain and codomain are of the same cardinality f is a bijection By Pigeonhole YU n n Mg he domains domains to Find f Y f is an injection and E X S't but f is not a surjection HH'll INN
Recommend
More recommend