Discuss Computer Science and Programming related problems

Moderators: bristy1588, Labib

Fm Jakaria
Posts: 79
Joined: Thu Feb 28, 2013 11:49 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.
You cannot say if I fail to recite-
the umpteenth digit of PI,
Whether I'll live - or
whether I may, drown in tub and die.

*Mahi*
Posts: 1175
Joined: Wed Dec 29, 2010 12:46 pm
Location: 23.786228,90.354974
Contact:

### Re: Polynomial Factoring(Self - made)

For degree less than or equal to 5, yes.
For degree more than 5, no. As there is no general formula for generating the solutions of a polynomial of degree more than five(and there can't be) the only solution is searching, which is not possible in normal computing time.

Use \$L^AT_EX\$, It makes our work a lot easier!