Polynomials and Calculating via mod7

  • Thread starter Thread starter silvermane
  • Start date Start date
  • Tags Tags
    Polynomials
Click For Summary

Homework Help Overview

The original poster is working with polynomials in the context of modular arithmetic, specifically in the polynomial ring (Z/7Z)[x]. They are tasked with computing the greatest common divisor (gcd) of the polynomials (X^2 - 3X + 2) and (X + 6).

Discussion Character

  • Exploratory, Mathematical reasoning, Assumption checking

Approaches and Questions Raised

  • Participants discuss the application of the Euclidean algorithm to find the gcd of the given polynomials. Some express confusion regarding the implications of working in Z/7Z and how it affects polynomial arithmetic. Others provide examples of the Euclidean algorithm using both numbers and polynomials to illustrate the process.

Discussion Status

There is an ongoing exploration of the Euclidean algorithm's application to the problem. Some participants have provided examples and clarifications, while others have noted the importance of ensuring the gcd is expressed in a monic form. Multiple interpretations of the results are being discussed, particularly concerning the modular arithmetic aspect.

Contextual Notes

Participants mention the challenges posed by the original poster's classroom environment and the need for clearer explanations regarding the arithmetic in Z/7Z. There is also a reference to the original poster's previous misunderstanding related to the gcd calculation, which has led to confusion in their attempts.

silvermane
Gold Member
Messages
113
Reaction score
0

Homework Statement


Working in (Z/7Z)[x], compute the greatest common divisor of the polynomials (X^2 - 3X + 2) and (X+6).

The Attempt at a Solution


I need help understanding how to compute this. It would be greatly appreciated if someone gave me an example with different modulus and polynomials if at all possible.

Background: I'm in a class with a teacher who, well, talks to the board when he teaches. It's getting pretty bad (not to rant) and nothing he does gets through to the students. I'm thinking this is a fairly simple process too, so if anyone can help me with this, you're my hero! :)
 
Physics news on Phys.org
You use the Euclidean algorithm.

Would it help you if I calculate the gcd of two numbers? The principle is thesame, just replace numbers with polynomials

Take 12 and 18. Perform long division on 18 and 12 to obtain that

18=1.(12)+6

So the remainder is 6. Now perform long division on 12 and 6 to obtain

12=2.6+0

The remainder is 0, so the algorithm stopts. The last non-zero remainder is the gcd: 6 in this case.




Let's do some polynomials in [tex]\mathbb{R}[x][/tex] this time: take x³+3x and x²+x (they always have to be monic, otherwise gcd is not unique). First perform long division to obtain

x³+3x=x(x²+x)+(-x²+3x)

The first remainder is -x²+3x. Now we perform long division on x²+x and -x²+3x to obtain

x²+x=(-1)(-x²+3x)+4x

The second remainder is 4x. Now we perform long division on 4x to obtain

x²+x=(x/4)(4x)+x

The third remainder is x. Now we perform long division on 4x and x to obtain

4x=4x+0

The fourth remainder is 0, so the algorithm stops. The last non-zero remainder was x and is the gcd.
 
I'm okay with doing the Euclidean algorithm, (though what you showed me was a wonderful refresher!) but I'm having trouble with the Z/7Z aspect of it. Where would that come into play?
 
So, using the Euclidean Algorithm, I obtained 56 as the gcd of (x^2 - 3x + 2) and (x+6).
56 is congruent to 0mod7, so would 0mod7 just be my answer?
 
No, 56=0 is already to late. You'll need the first non-zero polynomial to be the gcd.

Correct me if I'm wrong:

x²-3x+2=x(x+6)+(-2x+2)

This remainder is nonzero, so we continue (note that 1/2 = 4)

x+6= (-4)(-2x+2)+0

This remainder is zero, so the last non-zero remainder is the gcd.

Thus gcd(x²-3x+2,x+6)=-2x+2.

If you want the gcd to be monic (this is usual), then you will want to divide by -1 and obtain:

gcd(x²-3x+2,x+6)=x-1.
 
This seems to be right. Observe that x-1 = x+6 (mod 7).
 
silvermane said:
I'm having trouble with the Z/7Z aspect of it. Where would that come into play?
It doesn't come into play in the Euclidean algorithm. It doesn't care what arithmetic is, just that it satisfies the property of a Euclidean domain.

The fact you're working in the polynomial ring over Z/7Z is only relevant to actually computing the results of arithmetic operations like division with remainder, subtraction, or testing for equality.
 
micromass said:
No, 56=0 is already to late. You'll need the first non-zero polynomial to be the gcd.

Correct me if I'm wrong:

x²-3x+2=x(x+6)+(-2x+2)

This remainder is nonzero, so we continue (note that 1/2 = 4)

x+6= (-4)(-2x+2)+0

This remainder is zero, so the last non-zero remainder is the gcd.

Thus gcd(x²-3x+2,x+6)=-2x+2.

If you want the gcd to be monic (this is usual), then you will want to divide by -1 and obtain:

gcd(x²-3x+2,x+6)=x-1.

Yeah that's correct! I did my Euclidean Algorithm via matrices, and row reduced incorrectly, thus the 56! Thanks everyone for your extensive help! :)
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 24 ·
Replies
24
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 0 ·
Replies
0
Views
3K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 12 ·
Replies
12
Views
3K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 17 ·
Replies
17
Views
2K