121 Week 13 - Sigma Notation Flashcards

1
Q

What is sigma notation used for

A

It is a mathematical shorthand used for expressing sums where each
term is of the same form. It has the symbol: Σ

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How is sigma notation used

A

Below sigma, the index is declared and set to its starting value e..g, i=1
Above sigma, the upper limit for the index is stated.
Next to sigma is the expression to be evaluated.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Example

A

5
Σ (i) = 1+2+3+4+5
i=1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Double summations

A

Multiple sigma’s can be used at once. In this case the inner sigma is evaluated first then the outer sigma is evaluated.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Summation formulas

A

(N)(i=1) Σ (i) = N(N+1) / 2
(N)(i=1) Σ (1) = N
(b)(i=a) Σ (1) = b-a+1
(b)(i=a) Σ (M) = M( (b)(i=a) Σ (1) )
(b)(i=a) Σ (Ai) = A ( (b)(i=a) Σ (i) )
(b)(i=a) Σ (A
i+B) = (b)(i=a) Σ (A*i) + (b)(i=a) Σ (B)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

For loop general rule

A

Only if a for loop is in the format:
for (i = a; i <= b; i++)
and a and b are positive integers and a<b,
The number of instructions in the loop can be found by the summation:
(b)(i=a) Σ (1)
which is equal to (b-a+1)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly