Tuesday, 27 January 2015

discrete mathematics - How to compute 8xequiv33pmod35?



How to compute 8x33(mod35)?



I followed this video to solve this problem. Is there a better way?



My solution steps:



Divide both sides by 8:




x3381(mod35)



35=3388+2



338=2168+18



2=188+1



Now put 1 by itself:




1=2188



Now put 2 by itself from (1):



2=353388



Now put 18 by itself from (2):



18=3382168




Now substitute 18 with (5) in (3) and simplify:



1=2(3382168)8



1=23388216



Now substitute 2 with (4) in (6) and simplify:



1=3533883388(353388)16




1=17(35)338(88816)



The solution is usually between 0 to 35. However, we get (88816), which is it too small..



Can anyone tell me where I went wrong?


Answer



We wish to find x such that 8x33(mod35).



Since 8 and 35 are relatively prime, we can use the extended Euclidean algorithm to express their greatest common divisor 1 as a linear combination of 8 and 35. We first use the Euclidean algorithm to solve for the greatest common divisor of 8 and 35.




35=48+38=23+23=12+12=21



We now work backwards to solve for 1 in terms of 8 and 35.



1=312=31(823)=3318=3(3548)18=335138
Since 335138=1, 1381(mod35) If we multiply both sides of the congruence by 33, we obtain
3313833(mod35)429833(mod35)(1335+26)833(mod35)26833(mod35)
Hence, x26(mod35).



Check: If x26(mod35), then 8x826208535+3333(mod35).



Note that this is a modification of Thomas Andrews' excellent answer and an elaboration on Bernard's answer. The theorem that states that we can express the greatest common divisor of two integers as a linear combination of those integers is known as Bezout's identity.


No comments:

Post a Comment

real analysis - How to find limhrightarrow0fracsin(ha)h

How to find lim without lhopital rule? I know when I use lhopital I easy get $$ \lim_{h\rightarrow 0}...