MathGroup Archive 2004

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

Search the Archive

Re: Sum question and general comment

  • To: mathgroup at smc.vnet.net
  • Subject: [mg50659] Re: Sum question and general comment
  • From: Paul Abbott <paul at physics.uwa.edu.au>
  • Date: Wed, 15 Sep 2004 07:54:32 -0400 (EDT)
  • Organization: The University of Western Australia
  • References: <ci8m99$bpg$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

In article <ci8m99$bpg$1 at smc.vnet.net>,
 Steve Gray <stevebg at adelphia.net> wrote:

> I don't want to overload the group with my questions, so I only post after
> not being able to find the answer in the Help or at the site. Part of the
> problem of course is that it isn't clear how to state the question so that
> I can look it up*. Anyway, the current question has to do with Sum and
> similar "indexed" operations:
> 
> I find no way to do, for example, 
> "Sum over i=1 to 100 except i!= 23 and 36", etc., 

There is a way to do this (posted to MathGroup in February this year): 
use the Notation package to define your own input notation that accepts 
a lower limit of the form, say i != 1 = p. See

   http://physics.uwa.edu.au/pub/Mathematica/MathGroup/TestSumIterator.nb

> or Sum over values belonging to a list, such as 
> "Sum over i (belonging to) {1,2,3,5,7,8,21}", etc., 

In this case, the most natural operation is to use Map. It is not too 
hard to implement your own notation for this using Element.

> "Sum ( i=1 to 10) Sum (0ver j=1 to 10 but j !=i)", etc. (this can be 
> awkwardly done with j=1 to i-1 and j=i+1 to 10)
> In some cases there can be workarounds using things like
> (1- KroneckerDelta[i,j]), etc., but these can get complicated and obscure. 

No matter what notation you define, internally the computation will 
likely have to use constructs such as this. The point is that you would 
like Mathematica to form these constructs automatically and, most 
likely, hide them from view.

> * Someone who makes major progress on the problem of letting users 
> communicate with a computer in ordinary, appropriate technical "people" 
> language will have big success. 

Personally, I think the Notation package is a tremendous step in this 
direction.

> Part of the answer would be a greatly expanded index, compiled knowing what 
> terms people are likely to use for their questions.

Uniform notation (or notation conversion is required) also.

Cheers,
Paul

-- 
Paul Abbott                                   Phone: +61 8 9380 2734
School of Physics, M013                         Fax: +61 8 9380 1014
The University of Western Australia      (CRICOS Provider No 00126G)         
35 Stirling Highway
Crawley WA 6009                      mailto:paul at physics.uwa.edu.au 
AUSTRALIA                            http://physics.uwa.edu.au/~paul


  • Prev by Date: Re: Sum question and general comment
  • Next by Date: Re: Package and options, subroutines Mathematica programming 3GL function procedure
  • Previous by thread: Re: Sum question and general comment
  • Next by thread: Re: Sum question and general comment