Nested summation with varying limits

42 Views Asked by At

I have a function: $$\rho(i,j)\ \ \ \ \textrm{for}\ i=1,\ldots,n\ \textrm{and}\ j=1,\ldots, m$$ I can write a summation $\rho(i,j)$ for all values of $i$ and $j$: $$ \sum_{i=1}^n \sum_{j=1}^m \rho(i,j) $$ How can I write this summation if m is not the same for each value of i? E.g. for $i=1$, $m=a$, but for $i=2$, $m=b$.

1

There are 1 best solutions below

0
On BEST ANSWER

I would write it as: $$ \sum_{i=1}^n \sum_{j=1}^{m_i} \rho(i, j) $$