Irreducible polynomials / sum of products of linear factors



On Wednesday 05 August 2009, Richard Fateman wrote:
> andre maute wrote:
> > On Sunday 19 July 2009, andre maute wrote:
> > > Could Maxima do the following automatically?
>
> ....
> no, not with a single command.
>
> yes, you, or someone else, could write a program to exhaustively list
> all possible rearrangements of terms of this nature.
>
> Assume there are M terms in h,  fully expanded.  You supply k.
> For each distinct partition P of the terms of h into k sets, factor the
> members of P.
> If they all factor into linear factors you are done.

I have thought of something like this.

I found h2 by hand, which was the one which worked perfect for me.
But as you can see below your exhaustive search above,
would have not found my h2 below.

HINT:
h1 does not contain n^3, whereas h2 does.


> h1 : (n+r+1)*a*d + (n+r+1)^2*d - n*b*c
>        + (r+1)*a*c - (n^2-(r+1)^2)*c - n^2*b
>        + n*(n+2*r+2)*a + (2*r+2)*n*(n+r+1);
>
> h2 : (a+n+r+1)*(n+r+1)*(c+d+2*n) - (c+n)*n*(a+b+2*n+2*r+2);

If time permits,
I will code your exhaustive search
and see what kind of other representations there are.

Andre