Thursday, 19 May 2016

discrete mathematics - How do I properly do back substitution and put equations into the form of Bezout's theorem after using the Euclidean Algorithm?



For some problems, even longer ones, I've been able to see the pattern and properly do back substitution to bring a series of equations I've derived using the Euclidean algorithm to the form of Bezout's theorem:




sa+tm



Where s and t are parameters.



But, on some problems I get stuck and have no idea how to move forward.



For example, starting from finding the gcd(3454,4666):



Using the Euclidean Algorithm I find:




4666=34541+1212 ------------- 1212=466634541



3454=12122+1030 ---------------- 1030=345412122



1212=10301+182 ----------------- 182=121210301



1030=1825+120 ------------------ 120=10301825



182=1201+62 --------------------- 62=1821201




120=621+58 ---------------------- 58=120621



62=581+4 ------------------------ 4=62581



58=414+2 ------------------------ 2=58414



For my first step I substitute for the 4 :



2=58(6258)14




Where do I go from here? What are some general strategies to solve problems of this form? I'm having an inordinately hard time with some of these problems, but find others trivial--what is going on? What should I look out for when approaching problems of this type?



If you would like me to clarify content, please ask me such and I will edit accordingly. Thank you for taking the time to read this!


Answer



It is usually simpler and far less error prone to compute the Bezout identity in the forward direction by using this version of the Extended Euclidean algorithm, which keeps track of each remainder's expression as a linear combination of the gcd arguments. Below is the computation in your example - so simple that it can be done purely mentally in a few minutes. Here we use least magnitude remainders to speed it up, e.g. mod1212: 34541030182.



[[0]]4666 =   14666+ 03454[[1]]3454 =   04666+ 13454[[0]]  [[1]][[2]]1212 =   14666 13454[[1]]3[[2]][[3]]   182 =34666+43454[[2]]+7[[3]][[4]]     62 =204666+273454[[3]]3[[4]][[5]]  4 =  574666773454[[4]]+15[[5]][[6]]  2 =  835466611283454



Negating the final equation yields the Bezout equation for the gcd =2.



As an optimization we can omit one of the RHS columns, it being computable from the other, e.g. 1128=((8354666)+2)/3454. Then the equations may be viewed in fractional form. But it is best to master the above explicit equational form before proceeding to the optimizations.


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}...