MathGroup Archive 2009

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

Search the Archive

Re: help in constructing a binomial consequence

  • To: mathgroup at smc.vnet.net
  • Subject: [mg98276] Re: help in constructing a binomial consequence
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Fri, 3 Apr 2009 20:13:33 -0500 (EST)
  • Organization: Uni Leipzig
  • References: <gr4jm9$ac5$1@smc.vnet.net>
  • Reply-to: kuska at informatik.uni-leipzig.de

Hi,

if it must be that order and you cant give us the rule for that order
you have to type it by hand otherwise

With[{n = 3},
  lst = Flatten[
    Outer[Times, Table[x^i, {i, 0, n}], Table[y^j, {j, 0, n}]], 1]
  ]

exponentSum[expr_] := Block[{ex, ey},
   ex = Exponent[expr, x];
   ey = Exponent[expr, y];
   ex + ey
   ]

and

Sort[lst, exponentSum[#1] < exponentSum[#2] ||  OrderedQ[{#1, #2}] &]

will do something that is very close to your ordering.

Regards
   Jens

Galina wrote:
> Hello all,
> I need  to find an eigenvalues of the matrix M [N*N] where elements
> are of the type F[i]*F[j]. I need help to construct the elements F[i]
> which must be in the following order: F[1]=1, F[2]=x, F[3]=y, F[4]
> =x^2, F[5]=x*y, F[6]=y^2, F[7]=y*x^2, F[8]=x*y^2, F[9]=x^3 and etc....
> Could someone help, please?
> 
> Thanks a lot,
> Galina
> 


  • Prev by Date: Re: help in constructing a binomial consequence
  • Next by Date: Re: release memory
  • Previous by thread: Re: help in constructing a binomial consequence
  • Next by thread: Re: help in constructing a binomial consequence