MathGroup Archive 1999

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

Search the Archive

summation optimization

  • To: mathgroup at smc.vnet.net
  • Subject: [mg15326] summation optimization
  • From: "Arturas Acus" <acus at itpa.lt>
  • Date: Fri, 8 Jan 1999 04:15:16 -0500
  • Sender: owner-wri-mathgroup at wolfram.com

Hello,

Suppose I wish to do multiple sums explicitly. Which one method is
preferable and how much time it can save?  What about memory usage?

Method 1:

Sum[a[i,j],{i,?,?},{j,?,?}]+
Sum[b[i,k,m],{i,?,?},{k,!,!},{m,*,*}]

Method 2:

Sum[Sum[a[i,j],{j,?,?}]+Sum[b[i,k,m],{k,!,!},{m,*,*}],{i,?,?}]

Generally, how much grouping of similar indices  can be effective? 
                                      Arturas Acus
Institute of Theoretical
Physics and Astronomy
Gostauto 12, 2600,Vilnius
Lithuania 


E-mail: acus at itpa.lt
   Fax: 370-2-225361
   Tel: 370-2-612906


  • Prev by Date: Re: Why is this so?
  • Next by Date: assumption, supposition?
  • Previous by thread: Re: Why is this so?
  • Next by thread: assumption, supposition?