MHB How can I determine a polynomial is irreducible in C?

  • Thread starter Thread starter Nonad
  • Start date Start date
  • Tags Tags
    Polynomial
Click For Summary
Eisenstein's irreducibility criterion is challenging to apply when dealing with large integer coefficients, particularly those around 1e9. While using int64_t can handle large numbers, verifying the primality of such integers may require optimizations. Shifting variables with x+a or reversing coefficients can help, but these methods do not guarantee conclusive results. A systematic approach to selecting values for a, such as trying every integer from 1 to the highest coefficient, may yield better outcomes. Ultimately, the Factorization theorem for real coefficient polynomials was implemented to address the limitations encountered.
Nonad
Messages
2
Reaction score
0
Hello!(Blush)

I learned about Eisenstein's irreducibility criterion. But it's still hard for me to implement it when the integer coefficients may be as larger as 1e9.
What's more, how can I (or my computer?) know when to change x into x+a?

It really puzzles me(O_o)??
 
Technology news on Phys.org
Nonad said:
Hello!

I learned about Eisenstein's irreducibility criterion. But it's still hard for me to implement it when the integer coefficients may be as larger as 1e9.

Welcome to MHB Nonad! (Wave)

What is the problem with such large coefficients?
If we use a [m]int64_t[/m] we support up to [m]9e18[/m].
It may become more problematic to verify primality of integers within a reasonable time, but there are some optimizations that can be done there.

Nonad said:
What's more, how can I (or my computer?) know when to change x into x+a?

It really puzzles me(O_o)??

If the criterion is satisfied, we are done.
If it is not, then the result is inconclusive.
Shifting with $x+a$, or reversing coefficients will not necessarily lead to a conclusive result.
It is just something to try so that we get conclusive results in more cases.
I'm not aware yet of a heuristic how to pick $a$.
We might simply try every $a$ from $1$ up to the highest coefficient or some such.
 
Klaas van Aarsen said:
It is just something to try so that we get conclusive results in more cases.
I'm not aware yet of a heuristic how to pick $a$.
We might simply try every $a$ from $1$ up to the highest coefficient or some such.

Thank you very much(Blush)
Yes, you are right. I have to enumerate using Eisenstein's irreducibility criterion.
It's not acceptable for my task which includes large data and, as a sufficient condition, it may provide wrong answers.
Finally, we implemented Factorization theorem of real coefficient polynomials to solve the problem.

Thanks again(Smile)
 

Similar threads

Replies
48
Views
4K
  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 16 ·
Replies
16
Views
4K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
0
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 27 ·
Replies
27
Views
6K