Sunday, 5 October 2014

elementary number theory - GCD (342,2240) such that 342x +2240y=g



I was given the following question to answer. But I am currently stuck on the last part.




The question is as follows: a) Find gcd(342,2240) call it g



b) find integers x,y such that 342x+2240y=g



c) Find another pair of integers, call the a and b, such that 342a+2240b=g



For part A:



2 ways I solved. First I used prime factorization of each number




342=23219 and 2240=2657 and found the gcd, g was 2.



Another way was the Euclidean algorithm:



2240=3426+188



342=1881+154



188=1541+34




154=344+18



34=181+16



18=161+2



16=28+0 leaving me with the gcd, g was 2



Part B:

Working from the algorithm backwards I can find it or do division and work backwards.



So:



2=18116



=181(34118)



=218134




=2(154434)134



=2154934



=21549(1881154)



=111549188



=11(3421188)9188




$=11*342-20*188



=1134220(22406342)



=131342202240



Which leaves me with 342(131)+2240(20)=g were g=2
Did I leave this statement correctly?



And how exactly do I find 2 additional number a,b if you can assist with this problem, direct me to one or do a smaller but similar question with it I would appreciate it.



Answer



Just solve the homogeneous equation 342x+2240y=0. For example x=2240, y=342 would be a solution. Then x+x0 and y+y0 is a new solution of your original equation, where x0,y0 is the solution of non-homogeneous equation 342x+2240y=g


No comments:

Post a Comment

real analysis - How to find limhrightarrow0fracsin(ha)h

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