       Re: finding the (v,w) weighted degree of a polynomial

• To: mathgroup at smc.vnet.net
• Subject: [mg71310] Re: [mg71266] finding the (v,w) weighted degree of a polynomial
• From: danl at wolfram.com
• Date: Tue, 14 Nov 2006 05:06:32 -0500 (EST)
• References: <200611121148.GAA18658@smc.vnet.net>

```>
> Let P(x,y) be a bivariate polynomial in x,y.
>
> for example:
> P(x,y) = y^4 + x^5 + x^3 y^2
>
> For any monomial M(x,y) = x^i y^j, the (v,w) weighted degree of M(x,y)
> is defined as vi + wj.
> And we consider that the (v,w)-degree of P will be the (v,w)-degree of
> its highest monomial.
>
> in the example above:
> (4,5)-deg (P) = 4*3 + 2*5 = 22
>
> ...the question is: how to formulate this in mathematica?!
> The aim is to write a function like:
> WDeg[P_, v_, w_] := ....
>
> thanks for help!

For this to be workable in any reasonable way you will need to specify the
variables; as Mathematica stubbornly refuses to do mind reading, you
cannot expect that internal ordering of variables will correspond to the
one you may have in mind.

One way to do this is to use replace each variable by a common variable
raised to the weight corresponding to that variable. Then find the
exponent of the resulting polynomial in that new variable.

weightedDegree[poly_, vars_, wts_] := Module[{t},
Exponent[poly /. Thread[vars -> t^wts], t]]

In:=weightedDegree[y^4+x^5+x^3*y^2,{x,y},{4,5}]

Out=22

Daniel Lichtblau
Wolfram Research

```

• Prev by Date: List difference using patterns and substitutions.
• Next by Date: Re: Question about Reduce
• Previous by thread: finding the (v,w) weighted degree of a polynomial
• Next by thread: Re: Re: finding the (v,w) weighted degree of a polynomial