Re: poly question
- To: mathgroup at smc.vnet.net
- Subject: [mg58402] Re: [mg58393] poly question
- From: Andrzej Kozlowski <akozlowski at gmail.com>
- Date: Fri, 1 Jul 2005 02:01:55 -0400 (EDT)
- References: <200506300837.EAA15879@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
On 30 Jun 2005, at 17:37, János wrote: > I have a polynom called ftlmat > > (Dialog) In[187]:= > ftlmat > (Dialog) Out[187]= > 2*a^2*b^2*c + 2*a*b^2*c*d - > 2*b^2*c^2*d + b^2*c^2*d^2 + > 4*a^2*b*c*e - 2*a^2*c^2*e + > 2*a*b*c^2*e + 4*a*b*c*d*e - > 4*a*c^2*d*e - 2*b*c^2*d*e - > 2*c^2*d^2*e + 2*b*c^2*d^2* > e + 2*a^2*c*e^2 + > 2*a*c^2*e^2 + 2*a*c*d*e^2 + > c^2*d^2*e^2 + 2*a^2*b*c*f - > 2*a*b^2*d*f + 4*a*b*c*d*f - > 4*b^2*c*d*f - 2*b^2*d^2*f + > 2*b*c*d^2*f + 2*b^2*c*d^2* > f - 2*a^2*c*e*f + > 4*a*b*c*e*f - 4*a*b*d*e*f - > 4*a*c*d*e*f - 4*b*c*d*e*f - > 4*b*d^2*e*f - 2*c*d^2*e*f + > 4*b*c*d^2*e*f + 4*a*c*e^2* > f - 2*a*d*e^2*f - > 2*d^2*e^2*f + 2*c*d^2*e^2* > f + 2*a^2*b*f^2 + > 4*a*b*d*f^2 - 2*b^2*d*f^2 + > 2*b*d^2*f^2 + b^2*d^2*f^2 + > 2*a*b*e*f^2 - 2*b*d*e*f^2 + > 2*b*d^2*e*f^2 + > 2*a*e^2*f^2 + d^2*e^2*f^2 > > If I do a PolynomialReduce of it the following way, I get: > > In[170]:= > PolynomialReduce[ftlmat, > {a*b*c, a*b*f, a*c*e, > a*e*f, b*c*d, b*d*f, > c*d*e, d*e*f}, {a, b, c, > d, e, f}] > Out[170]= > {{2*a*b + 2*b*d + 4*a*e + > 2*c*e + 4*d*e + 2*a*f + > 4*d*f + 4*e*f, > -2*b*d - 4*d*e + 2*a*f + > 4*d*f + 2*e*f, > -2*a*c - 4*c*d + 2*a*e + > 2*c*e + 2*d*e - 2*a*f - > 4*d*f + 4*e*f, > -2*d*e + 2*e*f, > -2*b*c + b*c*d - 2*c*e + > 2*c*d*e - 4*b*f + 2*d*f + > 2*b*d*f - 4*e*f + > 4*d*e*f, -2*b*d - 4*d*e - > 2*b*f + 2*d*f + b*d*f - > 2*e*f + 2*d*e*f, > -2*c*d + c*d*e - 2*d*f + > 2*d*e*f, -2*d*e + d*e*f}, > 0} > > The result show that the first poly I got - related to a*b*c - has > all 6 variables, the next has 5 and the rest goes like 5,3,5,4,4,3. > If I total them it is 35. My question is what series of polynomials > should I use in PolymonialReduce to get results which contain the > least amount of variables each - that is the total of the number of > variables in each resulting polynom should be minimal, and on the > same time the number of selected polynoms should be also minimal and > their construction is "simple" - not necessary the same length as in > my case - and I should not get any reminder in the result of > PolynominalReduce. > > If I look PolynomialReduce as giving a "vectorization" of the polynom > regarding to the selected {poly1,poly2,...} base, then the components > of the result are the "polynomial projections" to the individual base > polynoms. I would like to select a base where the resulting > components have the minimum number of variables per component and I > want this base to be as simple as possible, that is they also should > have minimum number of variables in them. I am sure algebra has some > theory for it, but my brain is just not recalling it right now. > > > Any good tip, > > János > > I am not sure I really understand your question. You seem to want to reduce your polynomial with respect to a family of polynomials with reminder 0. That means you are reducing the polynomial with respect to an ideal that contains the polynomial. Obviously you will get "the simplest" representation in your sense (or at least in the sense in which I understand what you are saying) if you simply take the ideal generated by the polynomial, and as its basis the polynomial itself. PolynomialReduce[ftlmat,ftlmat] {{1},0} Nothing could be simpler than this but somehow I don't think that is quite what you wanted? Perhaps you may be better satisifed by reducing with respect to a GroebnerBasis of the ideal generated by the monomials of your polynomial ftlmat? That will certainly contain your polynomial so you will get remainder 0. The number of polynomials in the GroebnerBasis will not be normally be small but the "coefficients" can be made "simple" according to various criteria. For example here are a couple of examples: First[PolynomialReduce[ftlmat,GroebnerBasis[List@@ftlmat,Variables [ftlmat]]]] {2 c+f-2,4 b-2,2 b+e-2,2 d-2,b+2,-4,-4,2 b +2,-2,-2,-2,-4,d-2,2,-2,4,-4,2,2,-4, 2,4,-4,4,4,4,2,-2,2,-2,2,-2,2,2,4,2} v = First[PolynomialReduce[ftlmat, gr = GroebnerBasis[List @@ ftlmat, Reverse[Variables[ftlmat]], MonomialOrder -> EliminationOrder]]] {2, 4, 2, 2, -2, 2, -2, 2, -2, 2, 4, 4, 4, -4, 4, 2, -4, 2, 2, -4, 4, -2, 2, d - 2, 2*d - 4, f - 2, -2, 2*d - 2, 4*e + 2, -4, 2*f - 4, 2, -2, e - 2, 2*e - 2, f - 2} You could try different orderings of the variables and different monomial orders to see what gives you the "simplest" representation. Andrzej Kozlowski Chiba, Japan