Finding GCD of two polynomials over a ring

1k Views Asked by At

I'm trying to find the GCD of the two polynomials below over the ring GF(2)[x] and I'm having some trouble. The steps I did are below:

p(x) = x12 + x9 + x8 + x6 + x4 + x + 1

q(x) = x11 + x10 + x6 + x5 + x4 + x3 + 1

So, when I do p(x) / q(x) I get: x - 1 with a remainder of x10 + x9 + x8 - x7 + x6 + x4 + x3 + 2

I then take q(x) and divide by that remainder which gives me: x with a remainder of -x9 + x8 - x7 + x6 + x3 - 2x + 1

Then, I do (-x9 + x8 - x7 + x6 + x3 - 2x + 1) / (x10 + x9 + x8 - x7 + x6 + x4 + x3 + 2) = -x - 2 with a remainder of 2x8 - 2x7 + 3x6 + 2x4 + 3x3 - 2x2 - 3x + 4

Now continuing this process gives me fractions which I know is not right, but I also know it isn't right that I have coefficients of 2 and greater when I divide by q(x) by the first remainder since it's over the ring GF(2). So what exactly am I doing wrong?

1

There are 1 best solutions below

2
On

Another point of view is that over $\mathbb{F}_2$ both polynomials are reducible, and the Berlekamp factorisation algorithm quickly gives that \begin{align*} p(x) & = (x^7 + x^3 + x^2 + x + 1)(x^5 + x^2 + 1)\\ q(x) & = (x^6 + x^5 + x^3 + x^2 + 1)(x^5 + x^2 + 1), \end{align*} so that $gcd(p,q)=x^5+x^2+1$.