Finding an irreducible polynomial in Z [x] but reducible in F2 [x]

asked 2021-11-17 16:59:01 +0100

Escolopendra gravatar image

updated 2021-11-17 16:59:50 +0100

Hi everyone, I've been trying to find an irreducible polynomial in Z [x] but reducible in F2 [x].

I tried using this code:

i = 1
a = 0
while a == 0:
  R = GF(2) ['x']
  for p in R(x)polynomial(i)
    i = i + 1
    if not p.is_irreducible():
       R.change_ring(ZZ)
       if p.is_irreducible():
         print p
         a = 1

As I couldn't think of a way of finding an irreducible in Z and after that changing it to F2 I decided to do it backwards.

I'm in your graceful hands and sorry for my broken English.

edit retag flag offensive close merge delete

Comments

Homework ?

Emmanuel Charpentier gravatar imageEmmanuel Charpentier ( 2021-11-17 18:23:19 +0100 )edit
1

I am not going to lie to you. Yeah it is.

Escolopendra gravatar imageEscolopendra ( 2021-11-17 23:02:15 +0100 )edit
1

Hint : you are looking for a polynomial that you can factor in $\mathbb{F}_2$ but not in $\mathbb{Z}$. This might give you ideas :

sage: Pz.<z>=ZZ[]
sage: P2.<t>=GF(2)[]
sage: (z+1)^2
z^2 + 2*z + 1
sage: (t+1)^2
t^2 + 1
Emmanuel Charpentier gravatar imageEmmanuel Charpentier ( 2021-11-18 17:43:32 +0100 )edit

Thank you, it helped a lot.

Escolopendra gravatar imageEscolopendra ( 2021-11-28 14:10:36 +0100 )edit