Polynomial Factoring(Self - made)
Posted: Tue Dec 10, 2013 4:20 pm
Is it possible to fully factor any polynomial with arbitrary non-negative degree and integer coefficients to polynomials with integer coefficients?
Input : Degree of the polynomial; then respective coefficients.
Output: If the polynomial is irreducible, we'll get the message of irreducibility. Else we'll get the list of all polynomials which appear when the given polynomial is fully factored; with the numbers of times these appear. A polynomial is listed means mentioning the respective coefficients.
Respective coefficients indicates starting from the zero degree coefficient.
Example:
1) Input:
3.
0.
1.
2.
1.
Output:
0,1. 1 times.
1,2,1. 2 times.
2)Input:
1.
1.
1.
Output:
This is irreducible.
Note: In the first example, x^3 + 2x^2 + x = x((x+1)^2). In the second, x+1 is mentioned.
Input : Degree of the polynomial; then respective coefficients.
Output: If the polynomial is irreducible, we'll get the message of irreducibility. Else we'll get the list of all polynomials which appear when the given polynomial is fully factored; with the numbers of times these appear. A polynomial is listed means mentioning the respective coefficients.
Respective coefficients indicates starting from the zero degree coefficient.
Example:
1) Input:
3.
0.
1.
2.
1.
Output:
0,1. 1 times.
1,2,1. 2 times.
2)Input:
1.
1.
1.
Output:
This is irreducible.
Note: In the first example, x^3 + 2x^2 + x = x((x+1)^2). In the second, x+1 is mentioned.