MathGroup Archive 2010

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

Search the Archive

Re: Generation of polynomials

  • To: mathgroup at smc.vnet.net
  • Subject: [mg113001] Re: Generation of polynomials
  • From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
  • Date: Sun, 10 Oct 2010 06:42:50 -0400 (EDT)

As usual with Mathematica there are a number of different ways. The first one that came to my mind is:

poly[m_] :==
 FromCoefficientRules[
  Thread[Flatten[Table[{i, n - i}, {n, 0, m}, {i, 0, n}], 1] ->
    1], {x, y}]


Then:


Column[Table[poly[i], {i, 0, 4}]]
 1
x+y+1
x^2+x y+x+y^2+y+1
x^3+x^2 y+x^2+x y^2+x y+x+y^3+y^2+y+1
x^4+x^3 y+x^3+x^2 y^2+x^2 y+x^2+x y^3+x y^2+x y+x+y^4+y^3+y^2+y+1


Andrzej Kozlowski




On 9 Oct 2010, at 12:34, pier.mail at gmail.com wrote:

> Hi!
> This is probably trivial, but I am a total novice with Mathematica...
> is it possible to generate all complete polynomials in x,y up to a
> certain degree, i.e
>
> 1
> 1+x+y
> 1+x+y+x^2+y^2+xy
> 1+x+y+x^2+y^2+xy+x^3+y^3+x^2y+y^2x
> 1+x+y+x^2+y^2+xy+x^3+y^3+x^2y+y^2x+x^4+y^4+x^3y+y^3x+x^2y^2
> ...
>
> Thanks,
> Pier
>
>
>
>


  • Prev by Date: What is the ESC sequence for the "Matching Double Brakets"? From
  • Next by Date: Re: A list based table join?
  • Previous by thread: Generation of polynomials
  • Next by thread: Re: Generation of polynomials