06 Summations
description
Transcript of 06 Summations
1
Summations
2
Summation Notation
Given a series {Given a series {aann}, an integer }, an integer lower bound lower bound (or(or limitlimit) ) jj≥≥0, and an integer 0, and an integer upper bound upper bound kk≥≥jj, then the , then the summation of summation of {{aann} } from j to kfrom j to kis written and defined as follows:is written and defined as follows:
Here, Here, ii is called the is called the index of summationindex of summation.
kjj
k
jii aaaa +++≡ +
=∑ ...: 1
.
3
Generalized Summations
For an infinite series, we may write:For an infinite series, we may write:
To sum a function over all members of a set To sum a function over all members of a set XX={={xx11,, xx22, , ……}:}:Or, if Or, if XX={={xx||PP((xx)}, we may just write:)}, we may just write:
...)()(:)( 21 ++≡∑∈
xfxfxfXx
...)()(:)( 21)(
++≡∑ xfxfxfxP
...: 1 ++≡ +
∞
=∑ jj
jii aaa
4
Simple Summation Example
3217105
)116()19()14(
)14()13()12(1 2224
2
2
=++=
+++++=
+++++=+∑=i
i
5
More Summation Examples
An infinite series with a finite sum:An infinite series with a finite sum:
Using a predicate to define a set of elements Using a predicate to define a set of elements to sum over:to sum over:
874925947532 2222
10 prime) is (
2 =+++=+++=∑<
∧x
xx
2...1...222 41
2110
0=+++=++= −
∞
=
−∑i
i
6
Summation Manipulations
Some handy identities for summations:Some handy identities for summations:
∑∑
∑ ∑∑
∑∑
+
+==
−=
+⎟⎠
⎞⎜⎝
⎛=+
=
nk
nji
k
ji
x xx
xx
nifif
xgxfxgxf
xfcxcf
)()(
)()()()(
)()( (Distributive law.)
(Applicationof commut-
ativity.)
(Index shifting.)
7
More Summation Manipulations
Other identities that are sometimes useful:Other identities that are sometimes useful:
∑∑
∑∑
∑∑∑
==
−
==
+===
++=
−=
<≤+⎟⎟⎠
⎞⎜⎜⎝
⎛=
k
i
k
i
jk
i
k
ji
k
mi
m
ji
k
ji
ififif
ikfif
kmjififif
0
2
0
0
1
)12()2()(
)()(
if )()()(
(Grouping.)
(Order reversal.)
(Series splitting.)
8
Example: Impress Your Friends
Boast, Boast, ““II’’m so smart; give me any 2m so smart; give me any 2--digit digit numbernumber nn, and I, and I’’ll add all the numbers from ll add all the numbers from 1 to 1 to nn in my head in just a few seconds.in my head in just a few seconds.””I.e.I.e., Evaluate the summation:, Evaluate the summation:
There is a simple closedThere is a simple closed--form formula for form formula for the result, discovered by Euler at age 12! the result, discovered by Euler at age 12!
∑=
n
ii
1
LeonhardEuler
(1707-1783)
9
Euler’s Trick, Illustrated
Consider the sum:Consider the sum:1+2+1+2+……+(+(nn/2)+((/2)+((nn/2)+1)+/2)+1)+……+(+(nn--1)+1)+nn
nn/2 pairs of elements, each pair summing to /2 pairs of elements, each pair summing to nn+1, for a total of (+1, for a total of (nn/2)(n+1)./2)(n+1).
…
n+1n+1
n+1
10
Symbolic Derivation of Trick
... )1()1(
))1(()(
))1()))1(((
))1((
1111
11
)1(
01
)1(
01
)1(
0111
2
11
=−++⎟⎠
⎞⎜⎝
⎛=−++⎟
⎠
⎞⎜⎝
⎛=
−−+⎟⎠
⎞⎜⎝
⎛=−+⎟
⎠
⎞⎜⎝
⎛=
++−+−+⎟⎠
⎞⎜⎝
⎛=
+++⎟⎠
⎞⎜⎝
⎛=+⎟
⎠
⎞⎜⎝
⎛==
∑∑∑∑
∑∑∑∑
∑∑
∑∑∑∑∑∑
==
−
==
−
==
+−
==
+−
==
+−
==+====
k
i
k
i
kn
i
k
i
kn
i
k
i
kn
i
k
i
kn
i
k
i
kn
i
k
i
n
ki
k
i
k
i
n
i
iniini
iniini
kikni
kiiiiii
11
Concluding Euler’s Derivation
So, you only have to do 1 easy So, you only have to do 1 easy multiplication in your head, then cut in half.multiplication in your head, then cut in half.Also works for odd Also works for odd nn (prove this at home).(prove this at home).
2/)1(
)1()1()1(
)1( )1(
21
1111
+=
+=+=+=
−++=−++⎟⎠
⎞⎜⎝
⎛=
∑
∑∑∑∑
=
====
nn
nnkn
iniinii
nk
i
k
i
k
i
k
i
n
i
12
Example: Geometric Progression
A A geometric progression geometric progression is a series of the is a series of the form form aa, , arar, , arar22, , arar33, , ……, , ararkk, , where where a,ra,r∈∈RR..The sum of such a series is given by:The sum of such a series is given by:
We can reduce this to We can reduce this to closed formclosed form via via clever manipulation of summations... clever manipulation of summations...
∑=
=k
i
iarS0
13
Geometric Sum Derivation
HereHerewewego...go...
...1
1
1
11
1
1
1
1
)1(1
0
1
0
1
000
0
=+⎟⎠
⎞⎜⎝
⎛=+⎟
⎠
⎞⎜⎝
⎛=
===
====
=
+
=
+
+==
+
=
+
=
−+
=
+
====
=
∑∑∑
∑∑∑
∑∑∑∑
∑
nn
i
in
ni
in
i
i
n
i
in
i
in
i
i
n
i
in
i
in
i
in
i
i
n
i
i
arararar
ararar
rararrrararrrS
arS
14
Derivation example cont...
)1()1(
)(
11
0
1
1
0
0
01
1
0
1
1
001
1
−+=−+⎟⎠
⎞⎜⎝
⎛=
−+⎟⎠
⎞⎜⎝
⎛+⎟⎠
⎞⎜⎝
⎛=
−+⎟⎠
⎞⎜⎝
⎛+=
+⎟⎠
⎞⎜⎝
⎛+−=+⎟
⎠
⎞⎜⎝
⎛=
++
=
+
==
+
=
+
=
+
=
∑
∑∑
∑
∑∑
nnn
i
i
nn
i
i
i
i
nn
i
i
nn
i
inn
i
i
raSraar
aararar
arararar
ararararararrS
15
Concluding long derivation...
anaaarSr
rr
raS
rarSraSrS
raSrS
n
i
n
i
in
i
i
n
n
n
n
)1(11 ,1When
1en wh1
1
)1()1()1(
)1(
000
1
1
1
1
+=⋅====
≠⎟⎟⎠
⎞⎜⎜⎝
⎛−−
=
−=−
−=−
−+=
∑∑∑===
+
+
+
+
16
Nested Summations
These have the meaning youThese have the meaning you’’d expect.d expect.
Note issues of free vs. bound variables, just Note issues of free vs. bound variables, just like in quantified expressions, integrals, etc.like in quantified expressions, integrals, etc.
( )
60106
)4321(666
321
4
1
4
1
4
1
4
1
3
1
4
1
3
1
4
1
3
1
=⋅=
+++===
++=⎟⎟⎠
⎞⎜⎜⎝
⎛=⎟⎟
⎠
⎞⎜⎜⎝
⎛=
∑∑
∑∑ ∑∑ ∑∑∑
==
== == == =
ii
ii ji ji j
ii
ijiijij
17
Some Shortcut Expressions
4/)1(
6/)12)(1(
2/)1(
1),1/()1(
22
1
3
1
2
1
1
0
+=
++=
+=
≠−−=
∑
∑
∑
∑
=
=
=
+
=
nnk
nnnk
nnk
rrraar
n
k
n
k
n
k
nn
k
kGeometric series.
Euler’s trick.
Quadratic series.
Cubic series.
18
Using the Shortcuts
Example: Evaluate .Example: Evaluate .–– Use series splitting.Use series splitting.–– Solve for desiredSolve for desired
summation.summation.–– Apply quadraticApply quadratic
series rule.series rule.–– Evaluate.Evaluate.
∑=
100
50
2
kk
.925,297425,40350,338
6995049
6201101100
49
1
2100
1
2100
50
2
100
50
249
1
2100
1
2
=−=
⋅⋅−
⋅⋅=
−⎟⎠
⎞⎜⎝
⎛=
+⎟⎠
⎞⎜⎝
⎛=
∑∑∑
∑∑∑
===
===
kkk
kkk
kkk
kkk
19
Summations: Conclusion
You need to know:You need to know:–– How to read, write & evaluate summation How to read, write & evaluate summation
expressions like:expressions like:
–– Summation manipulation laws we covered.Summation manipulation laws we covered.–– Shortcut closedShortcut closed--form formulas, form formulas,
& how to use them.& how to use them.
∑∈Xx
xf )( ∑)(
)(xP
xf∑=
k
jiia ∑
∞
= jiia