Fact. A polynomial f∈Fq[x] of degree n≥1 is irreducible if and only if
1) xqn≡xmodf and
2) gcd(xqn/t−x,f)=1 for all prime divisors t of n.
From this fact one can get the Rabin's irreducibility test:
Irreducibility test (Rabin)
Input and Output On input we have f∈Fq[x] of degree n. On output test gives an answer "reducible" or "irreducible".
Step 1. Compute a=xqnremf. If a≠x return "reducible".
Step 2. Find prime divisors of n.
Step 3. For all prime divisors t of n compute b=xqn/tremf. If gcd(b−x,f)≠1 return "reducible".
Step 4. Return "irreducible".
Another possibility is to use distinct-degree factorisation to test irreducibility.
Irreducubility test (ddf)
Step 1. Check if f is squarefree (by computing it's derivative). If not, return "reducible".
Step 2. Build ddf f[1],...,f[n] for f.
Step 3. If degf[n]=n return "irreducible", else return "reducible".
Since fmpz_mod_poly doesn't have fast gcd computation and fast modular composition implemented, the ddf-based algorithm turns out to be faster for it.
1) xqn≡xmodf and
2) gcd(xqn/t−x,f)=1 for all prime divisors t of n.
From this fact one can get the Rabin's irreducibility test:
Irreducibility test (Rabin)
Input and Output On input we have f∈Fq[x] of degree n. On output test gives an answer "reducible" or "irreducible".
Step 1. Compute a=xqnremf. If a≠x return "reducible".
Step 2. Find prime divisors of n.
Step 3. For all prime divisors t of n compute b=xqn/tremf. If gcd(b−x,f)≠1 return "reducible".
Step 4. Return "irreducible".
Another possibility is to use distinct-degree factorisation to test irreducibility.
Irreducubility test (ddf)
Step 1. Check if f is squarefree (by computing it's derivative). If not, return "reducible".
Step 2. Build ddf f[1],...,f[n] for f.
Step 3. If degf[n]=n return "irreducible", else return "reducible".
Since fmpz_mod_poly doesn't have fast gcd computation and fast modular composition implemented, the ddf-based algorithm turns out to be faster for it.
No comments:
Post a Comment