mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   Programming (https://www.mersenneforum.org/forumdisplay.php?f=29)
-   -   Calculator that can factor and find exact roots of polynomials (https://www.mersenneforum.org/showthread.php?t=24932)

R. Gerbicz 2020-10-01 20:46

Thanks. More examples:
polynom: x^5 - 1615*x^4 + 861790*x^3 - 174419170*x^2 + 14998420705*x - 465948627343

Irreducible polynomial factors
The 4 factors are:
x − 653
(x − 103)2
x2 − 756⁢x + 67259
Roots
The 5 roots are:
x1 = 653
x2 = x3 = 103
x4 = 103
x5 = 653

What is wrong x2-756+67259 is reducible. The correct answer should be as the roots are displayed:
(x-653)^2*(x-103)^3 . But you haven't grouped even correctly the roots in that section.


For evaluation part:

polynom: (x+1)/x*(x+1)
Your polynomial
x + 1

This is wrong.


polynom: x/2*2
your answer: Polynomial division is not integer

This could be still ok, if you require that all subresults should be in Z[x].

alpertron 2020-10-02 01:18

[QUOTE=R. Gerbicz;558540]Thanks. More examples:
polynom: x^5 - 1615*x^4 + 861790*x^3 - 174419170*x^2 + 14998420705*x - 465948627343

Irreducible polynomial factors
The 4 factors are:
x − 653
(x − 103)2
x2 − 756⁢x + 67259
Roots
The 5 roots are:
x1 = 653
x2 = x3 = 103
x4 = 103
x5 = 653

What is wrong x2-756+67259 is reducible. The correct answer should be as the roots are displayed:
(x-653)^2*(x-103)^3 . But you haven't grouped even correctly the roots in that section.
[/QUOTE]
I fixed this error. Please refresh the page and retry.

[QUOTE]For evaluation part:

polynom: (x+1)/x*(x+1)
Your polynomial
x + 1

This is wrong.

[/QUOTE]
Since the application works with integer polynomials, the slash operator performs the division disregarding the remainder.

This means that when you enter (x+1)/x*(x+1), parsing left to right, the program calculates (x+1)/x = 1 (the remainder 1 of the polynomial division is discarded) and then the program multiplies the previous result 1 by x+1, so the result is x+1.

[QUOTE]polynom: x/2*2
your answer: Polynomial division is not integer

This could be still ok, if you require that all subresults should be in Z[x].[/QUOTE]
Again, the expression is parsed from left to right, and x/2 is not an integer polynomial, so it shows the error.

R. Gerbicz 2020-10-02 16:23

OK, more inputs:

(3*x^2)/(2*x+1)
Your polynomial
3x2

Clearly wrong. Following your way it would mean that 3*x^2=(2*x+1)*3*x^2+R(x) and in this case the remainder would be 3rd degree? Meaningless.


x^5 - 4161938199135571*x^4 + 6750425908270471236962285227630*x^3 - 5309242550166291213723686988859597734543042314*x^2 + 2016699400841707878060752590276325131391118358776183137438993*x - 295975920745818133920126480489914719398004640082403818556796416884133107491

Irreducible polynomial factors
The polynomial is irreducible

Roots
The 5 roots are:
The quintic equation cannot be expressed with radicands.

Wrong, because p(x)=(x-505340926559057)^2*(x-1050418782005819)^3

Other such polynoms where you find the roots but display the wrong factors and grouping problems:
x^5 - 569676319*x^4 + 105098371422759466*x^3 - 7011576352652045449773950*x^2 + 195375348220798308339573946630661*x - 1952243687462206905824707435700917386803

and

x^5 - 2876590967309*x^4 + 3229067054667107663190970*x^3 - 1768676572192568691887072530348224746*x^2 + 473795689206607977454622626698064450356613773013*x - 49793205560537089066888851381785438595315265096906181547929

alpertron 2020-10-02 19:42

All these examples are working now. Thanks for finding the errors.

Please refresh the page to get the current version.

alpertron 2020-10-04 21:20

When the irreducible polynomial has degree >= 5, now my code performs the factorization of this polynomials with prime modulus up to 100.

If the conditions of Keith Conrad's paper that you can read at [url]https://kconrad.math.uconn.edu/blurbs/galoistheory/galoisSnAn.pdf[/url] are true, the Galois group is A[sub]n[/sub] or S[sub]n[/sub], so my application indicates that the roots of the polynomial cannot be expressed as radical expressions along with the conditions found.

Example of new output from [url]https://www.alpertron.com.ar/POLFACT.HTM[/url]

Your polynomial
x[SUP]12[/SUP] + 45⁢x[SUP]7[/SUP] − 23

Irreducible polynomial factors
The polynomial is irreducible

Roots
The 12 roots are:
x1 to x12 : The roots of the polynomial cannot be expressed by radicals. The degrees of the factors of polynomial modulo 7 are 1, 2 and 9 (the Galois group contains a cycle of length 2) and the degrees of the factors of polynomial modulo 17 are 1 and 11 (the Galois group contains a cycle of prime length greater than half the degree of polynomial)

alpertron 2020-11-28 23:13

I fixed the LLL routine and optimized the Hensel Lifting. Now the factorization of polynomials of degree less than 1000 with small coefficients can be done in seconds.


All times are UTC. The time now is 23:28.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.