Euclidean algoritm to get two polynomials

48 Views Asked by At

Determine two polynomials in $\mathbb{Z}_5$ so that $$p(x)(x^3+2x^2+3x)+q(x)(x^2+3x+2)=1$$

I know the answer, but not where it comes from. $$p(x)=3x\\ q(x)=2x^2+3x+3$$

With Euclidean algoritm I've got that $$(x^3+2x^2+3x)=(x^2+3x+2)(x+4)+(4x+2)\\ (x^2+3x+2)=(4x+2)(4x)+(2)\\ (4x+2)=(2)(2x+1)+(0)$$

What am I missing?

1

There are 1 best solutions below

3
On BEST ANSWER

Substituting the equations you got from bottom to top, we find an expression of the gcd in terms of the two original polynomials: \begin{align*} 2 &= (x^2+3x+2) - (4x+2)(4x) \\ &= (x^2+3x+2) - \left[ (x^3+2x^2+3x) - (x^2+3x+2)(x+4)\right](4x) \\ &= (x^2+3x+2) - (x^3+2x^2+3x)(4x) + (x^2+3x+2)(x+4)(4x) \\ &= (x^2+3x+2)\cdot(1+(x+4)(4x)) + (x^3+2x^2+3x)\cdot (-4x) \\ &= (x^2+3x+2)\cdot\underbrace{(4x^2+x+1)}_{2\,q(x)} + (x^3+2x^2+3x)\cdot \underbrace{x}_{2\,p(x)}. \end{align*} This can also be achieved by more efficient book keeping using the Extended Euclidean Algorithm.