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$=$2*3^2*19$ and $2240=2^6*5*7$ and found the $gcd$, $g$ was $2$.



Another way was the Euclidean algorithm:



$2240=342*6+188$



$342=188*1+154$



$188=154*1+34$




$154=34*4+18$



$34=18*1+16$



$18=16*1+2$



$16=2*8+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=18-1*16$



$=18-1(34-1*18)$



$=2*18-1*34$




$=2(154*-4*34)-1*34$



$=2*154-9*34$



$=2*154-9(188-1*154)$



$=11*154-9*188$



$=11(342-1*188)-9*188$




$=11*342-20*188



$=11*342-20(2240-6*342)$



$=131*342-20*2240$



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+x_0$ and $y+y_0$ is a new solution of your original equation, where $x_0, y_0$ is the solution of non-homogeneous equation $342x+2240y=g$


No comments:

Post a Comment

real analysis - How to find $lim_{hrightarrow 0}frac{sin(ha)}{h}$

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