Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I have values such as 2,4, 7, 10 , that is not sequential but are stored in array w. Can I use the summation $$ {\sum_{i = 1}^{n} w[i]} $$

or there is another way to write it down ?

share|improve this question
3  
That is OK. Perhaps mathematicians would often prefer $$\sum_{i=1}^n w_i$$ instead of the brackets. –  GEdgar Aug 7 '12 at 11:57
1  
As long as you define the notation $w[i]$, you should be fine. –  J. M. Aug 7 '12 at 11:57

2 Answers 2

up vote 1 down vote accepted

in programming if we have array $w={1,2,3,4....}$,then we write $w[i]$,in mathematics you can simple write $w_i$

share|improve this answer

This notation is not considered unusual in computer science. While I don't have an example for the sum over an array handy, the bracket notation occurs, e.g., in Bradley and Manna's "The Calculus of Computation".

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.