MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: finding the weighted degree of a polynomial

Arnaud Dagnelies wrote:
> Let p(x,y) be a polynomial in x,y expressed in its expanded form, i.e.
> as a sum of terms as follows:
>  p(x,y) = sum   c_ij x^i y^j
> I want to find the (a,b)-weighted degree of this polynomial defined as
> wdeg(p, {a,b}) = max (ai + bj)   with c_ij != 0
> (where a and b are given fixed values)
> help is welcome,
> thanks

First, we convert the polynomial into a list, then change the values of 
x and y by provided by the parameters, and finally apply the function 
*Max* to the resulting list of numeric values.

wdeg[poly_, {a_, b_}] := Max[List @@ poly /. {x -> a, y -> b}]

p = x^10 + 10*x^9*y + 120*x^7*y^3 + 210*x^6*y^4 + 252*x^5*y^5 +
        120*x^3*y^7 + 45*x^2*y^8 + 10*x*y^9 + y^10;

wdeg[p, {3, 5}]

Out[3]= 253125000


  • Prev by Date: Wolfram Notebook Indexer and Searching Notebooks
  • Next by Date: Re: Mathematica 6.0 math.exe question
  • Previous by thread: Re: finding the weighted degree of a polynomial
  • Next by thread: Other PDE heat equation