MathGroup Archive 2006

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

Search the Archive

Re: Product over an arbitrary index.

  • To: mathgroup at
  • Subject: [mg68692] Re: [mg68683] Product over an arbitrary index.
  • From: Sseziwa Mukasa <mukasa at>
  • Date: Thu, 17 Aug 2006 04:17:51 -0400 (EDT)
  • References: <>
  • Sender: owner-wri-mathgroup at

On Aug 16, 2006, at 3:36 AM, quantieny at wrote:

> I have a function f(x,y)   that I would like to compute the product
> over indices i,j
> where i goes from an arbitrary list {1,4,3}  and j goes 1 to m.

This statement is a little unclear, are you taking the product f[i,j]  
where i is the sequence {1,4,3}, j is 1..m?

The way to do this in Mathematica is to store the sequence for i in a  
list and use the index of the iterator in product to get the  
appropriate sequence element.  If your sequence is very long but you  
have a generating function, just pass the index to the generating  

> Is this possible in mathematica the function Product itself seems to
> only work over a continous sequence and it is not clear how I can use
> two set of indices.

You can specify as many indices as you want for example


> Additionally can I specify the product over an intersection or
> complement of a list?.

Using the technique above you can do pretty much anything you want,  
all you need is a function that maps an index to a sequence value.



  • Prev by Date: RE: position lists
  • Next by Date: Re: Product over an arbitrary index.
  • Previous by thread: Product over an arbitrary index.
  • Next by thread: RE: Product over an arbitrary index.