Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2006
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2006

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

Search the Archive

Grouping similar indices together in an expression

  • To: mathgroup at smc.vnet.net
  • Subject: [mg65242] Grouping similar indices together in an expression
  • From: "David Sanders" <dpsanders at gmail.com>
  • Date: Tue, 21 Mar 2006 07:46:03 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

I am a newbie in Mathematica, and am trying to do the following.

I have terms which look like
a[i] a[j] b[i] b[j]

I need to apply a function F, for which I need to group the different
indices (by which I mean i, j) together as follows:

F(a[i] a[j] b[i] b[j]) = F(a[i] b[i]) F(a[j] b[j])

I do not in general know how many different indices there might be in a
term.  E.g. I might have
a[i] a[j] a[k] b[j]

Could somebody please give me a hint as to how to do this?

Thanks,
David.


  • Prev by Date: Re: 64 Bit Job
  • Next by Date: Re: Unevaluated values of a[[i]]+b[[j]]
  • Previous by thread: Re: How to get the value of a counter
  • Next by thread: Re: Grouping similar indices together in an expression