- #1
FrankDrebon
- 9
- 0
Hi all,
I have a term in an equation that grows in an intuitive manner each time I increase the number of variables.
Basically, for an input vector of size n, this term is a sum of n terms, each of which is a product of n-1 components in the vector. Put simply, it is the sum of each unique way that the components of the vector can be multiplied together as a product of n-1 components.
I've probably explained that badly, so the first few terms can be found in the image below:
http://img52.imageshack.us/img52/1779/cvalues.jpg
It is fairly easy to compute the next term myself. However, I'd like to be able to find an algorithm for generating the nth term for inclusion in a MATLAB script.
Essentially the problem boils down to "how do I generate the nth term algorithmically?" I've run out of ideas, but can't help but think there would be some (relatively) simple matrix operation that could generate this. Maybe the pattern-hunters amongst you will notice something I haven't.
Any thoughts or suggestions welcome!
I have a term in an equation that grows in an intuitive manner each time I increase the number of variables.
Basically, for an input vector of size n, this term is a sum of n terms, each of which is a product of n-1 components in the vector. Put simply, it is the sum of each unique way that the components of the vector can be multiplied together as a product of n-1 components.
I've probably explained that badly, so the first few terms can be found in the image below:
http://img52.imageshack.us/img52/1779/cvalues.jpg
It is fairly easy to compute the next term myself. However, I'd like to be able to find an algorithm for generating the nth term for inclusion in a MATLAB script.
Essentially the problem boils down to "how do I generate the nth term algorithmically?" I've run out of ideas, but can't help but think there would be some (relatively) simple matrix operation that could generate this. Maybe the pattern-hunters amongst you will notice something I haven't.
Any thoughts or suggestions welcome!
Last edited by a moderator: