PDA

Click to See Complete Forum and Search --> : Sigma notation help


dantheman1001
Jan 31st, 2007, 03:15 PM
I have a formula:

(H - R)(L - H - C)

What the formula means is not relevant.

I need to find the total when H and L are constant and

R = 1 and C = 1
R = 1 and C = 2
R = 1 and C = 3
R = 2 and C = 1
R = 2 and C = 2
R = 2 and C = 3
R = 3 and C = 1
R = 3 and C = 2
R = 3 and C = 3

Obviously there is an easy way of showing this apart from writing it out that many times. I know I probably need to use the Sigma notation.

If anyone could help I would be very greatful

I hope this makes sense!!

Dan

System_Error
Jan 31st, 2007, 03:23 PM
You could split it into three different summations.
The first R=1 to R=3 where c remains constant at 1
The second R=1 to R=3 where c remains constant at 2
The third R=1 to R=3 where c remains constant at 3


Not sure about any other way.

dantheman1001
Jan 31st, 2007, 03:32 PM
Thanks for the reply.

Sorry, I forgot to say that it has to work so that R and C can go up to anything. It has to be practical even if R and C = 100.

I did think of what you sugested but it wouldn't be very practical to have 100 formuli :bigyello:

I know there is a way it can be shortened into 1 or 2 formuli but I can't think how to do it.

Dan

Logophobic
Jan 31st, 2007, 07:25 PM
I believe what you want is a sum of sums:
http://i11.photobucket.com/albums/a190/DMathias/DoubleSum.jpg
Programmatically, this would be written as:
Sum = 0
For R = 1 to n
For C = 1 to n
Sum = Sum + (H - R) * (L - H - C)
Next C
Next R
The total is n2(H - (n+1)/2)(L - H - (n+1)/2)

System_Error
Jan 31st, 2007, 07:43 PM
I believe what you want is a sum of sums:
http://i11.photobucket.com/albums/a190/DMathias/DoubleSum.jpg
Programmatically, this would be written as:
Sum = 0
For R = 1 to n
For C = 1 to n
Sum = Sum + (H - R) * (L - H - C)
Next C
Next R
The total is n2(H - (n+1)/2)(L - H - (n+1)/2)

:thumb: Nice, double sums ;) Didn't think of it.