Lecture 3 - Summations

advertisement
MCA 202: Discrete Mathematics
Instructor
Neelima Gupta
ngupta@cs.du.ac.in
Summation Series
under construction
Thanks: Imam Hussain (12), Joseph
Vanlalchanchinmawia (14) MCA 2012
Summation Series
n

 ak =
k 1
lim
n→∞
 ak
k 1
Linearity of Summation
n
n
n
k 1
k 1
k 1
 (cak +bk) = c  ak +  bk
Thanks: Imam Hussain (12), Joseph Vanlalchanchinmawia (14) ,
Naveen Kumar(51) MCA 2012
Arithmetic Series
ak+1 – ak = d ; where d is a constant
n 1
 ak = a0 + a1 + a2 +. . . . +an-1
k 0
n 1
n (2a + (n-1)d)
a
=

k
0
2
k 0
Thanks: Imam Hussain (12), Joseph Vanlalchanchinmawia (14) ,
Naveen Kumar(51) MCA 2012
n
Prove :  ak = (2a0 + (n-1)d)
2
n 1
k 0
Proof: By mathematical induction,
For n=1, LHS = ak = a0
RHS = ½(2a0)=a0
Assume that it is true for n,we will prove it for
n+1.
For n+1, n
n 1
 ak = ak + an
0
k 0
k 0
k 0
= n [2a0+(n-1)d]+(a0+nd)
2
Thanks: Imam Hussain (12), Joseph Vanlalchanchinmawia (14) ,
Naveen Kumar(51) MCA 2012
Contd…
n
=(n+1)a0 + (n-1+2)d
2
=(n+1)a0 + n (n+1)d
2
=
[2a0 + nd]
(n 1)
2
Hence proved.
Thanks: Imam Hussain (12), Joseph Vanlalchanchinmawia (14) ,
Naveen Kumar(51) MCA 2012
Excercise:
n
n(n
1)
Prove that  k =
by induction
2
k 1
Thanks: Imam Hussain (12), Joseph Vanlalchanchinmawia (14) ,
Naveen Kumar(51) MCA 2012
Alternate Method
Sn= 1 + 2 + 3 + . . . . + n
Sn= n + (n-1) + (n-2) + . . . . + 1
Adding (i) and (ii), we have,
2Sn = (n+1)+(n+1)+(n+1)+ . .+(n+1)
Sn = n(n 1)
2
Thanks: Imam Hussain (12), Joseph Vanlalchanchinmawia (14) ,
Naveen Kumar(51) MCA 2012
-(i)
-(ii)
Geometric Series
a
a
k1
k
=r
r≠1 {finite terms}
n
a1(1 - r )

k 1
Sum =  ak= 1 - r
|r|<1 {infinite terms}
a1

i
21+x
n x = k 1+x+x
1
- r 3+……+xn
Sum =
n
ak=

i 0
xi = 1
|x|<1

1-x
Differentiating
(i) w.r.t x, we get,
kxk= x
|x|<1

2

i 0

i 0
(1Thanks:
- x)Imam Hussain (12), Joseph Vanlalchanchinmawia (14) ,
Naveen Kumar(51) MCA 2012
…(i)
Harmonic Series
Hn = 1 + 1 + 1 + 1 + 1 + . . . . . + 1
2
3 4 5
n
n
= 1
k 1 k
Exercise:
Prove that, Hn= ln(n) + O(1)
Thanks: Imam Hussain (12), Joseph Vanlalchanchinmawia (14) ,
Naveen Kumar(51) MCA 2012
Telescoping Series
n
 (ak-ak-1) = an - a0
 (ak-ak+1) = a0 - an
Example:
k 1
n 1
k 1
1

k 1 k(k  1)
1
1
=
k
k(k  1)
n 1
1
– (k  1)
Therefore,
n 1

k 1
n 1
1
1
1
1

=k 1 k – (k  1) = 1 n
k(k  1)
Thanks: Imam Hussain (12), Joseph Vanlalchanchinmawia (14) ,
Naveen Kumar(51) MCA 2012
Bounding Summations
Example
Proven :
 3k ≤ c.3n for all n≥no
k 0
Proof:
By using mathematical induction, we have,
Base case: Putting n=0,
LHS:
30 = 1
RHS:
c.30 =c
So, it holds for all c≥1
Thanks: Gunjan Sawhney Roll no. 11 (MCA 2012)
Now, Suppose itn holds for all n, i.e.
3k ≤ c.3n

k 0
Then,
n
n 1
k + 3n+1
3k = 
3

k 0
k 0
≤ c.3n + 3n+1
= 3n+1 (c/3 + 1)
≤ c.3n+1
whenever, c/3+1 ≤ c
=> 1 ≤ 2c/3
=> c ≥ 3/2
n
k ≤ c.3n is true for all c=3/2 and n≥0
Thus, 
3
k 0
Thanks: Gunjan Sawhney Roll no. 11 (MCA 2012)
Wrong Application Of Induction
Example
Prove:
n
 k = O(n)
k 0
Proof:
By using mathematical induction, we have,
Base case: Putting n=1,
LHS:
1=O(1)
RHS:
O(n)=O(1)
So , it holds for n=1
Thanks: Gunjan Sawhney Roll no. 11 (MCA 2012)
Now, Suppose itn holds for all n, i.e.
k = O(n)

k 0
Then,
n 1

k = O(n) + (n+1) = O(n)
k 0
which is incorrect.
Thus, By induction we couldn’t prove it
appropriately.
REASON: We ignored the constant whose value
can’t change.
Thanks: Gunjan Sawhney Roll no. 11 (MCA 2012)
Bounding each term of Series
 ak 1  r.ak , for r  1
 Few Examples :
n
 ( k )
k 1
we have , k  n, for all k, hence
n
n
k 1
k 1
2
(
k
)

(
n
)

n


n
n
k 1
k 1
 log(n!)   (logk )   (logn)  n log n
In general :
n
a
k 1
k
n
 n.amax , where amax  max{ai }
i 1
THANKS Sudhanshu Kumar Singh Roll No. 41 and Sukriti Sinha, Roll No. 42 (MCA 2012)
Bounding a series with Another Series
b
ak  bk , where k 1  r
bk
Example :
2
3
x
x
x
ex  1 

 ..........
1! 2!
3!


r 0
xr
r!
( Here, amax  1. So, using previous method will give us
1  .
Hence, for a tighter bound,we use another series to
bound the given series.)
THANKS Sudhanshu Kumar Singh Roll No. 41 and Sukriti Sinha, Roll No. 42 (MCA 2012)
Using
n! 2
n 1
to bound each term as follows :
x3 x3
 2,
3! 2
x4 x4
 3 ,.........
4! 2
k
k
x
x
In general ,
 k 1
k! 2
This gives ,
e  1  x  x  3 (sin ce, | x | 1, amax  1)
x
2
THANKS Sudhanshu Kumar Singh Roll No. 41 and Sukriti Sinha, Roll No. 42 (MCA 2012)
Tip :
For, e   x
r!

x
also have r 0
r
while bounding each term we
k
k
x
x

k! (k 1)!
Even though this is a tighter bound than our
xk xk
 k 1 , we don’t use it since it does
bound
k! 2
not lead us anywhere.
Hence, we must always try to bound the given
series with a series, whose sum is known.
THANKS Sudhanshu Kumar Singh Roll No. 41 and Sukriti Sinha, Roll No. 42 (MCA 2012)
Exercise:

k
k
Bound the series 
using
bounding
the
3
n0
individual terms by another series.
ak 1
 r , for some r<1 )
( HINT: show that
ak
Give some time to students
to think!!
THANKS Sudhanshu Kumar Singh Roll No. 41 and Sukriti Sinha, Roll No. 42 (MCA 2012)
Splitting Summation By Kamal Kishore
Thanks: Imam Hussain (12), Joseph
Vanlalchanchinmawia (14) MCA 2012
Solution:
ak 1
k 1 3
ak  k 1 
3
k
k

k 1

3k
1  k 1
 
3  k 
1
  2, for k1 k  2
3
i.e. 2k k 1
i.e. k 1
So, ak 1 ak  2/3r 
THANKS Sudhanshu Kumar Singh Roll No. 41 and Sukriti Sinha, Roll No. 42 (MCA 2012)
Now, ak 1 ak  r, where r < 1
So, ak 1  rak
k 1
And hence, we can say that ak 1  r a1
Thus, we have,
k
a

a
r
n1 k 1 n1


a1 1r  3a1 (since, r = 2/3)
= 1 (since, a1 = 1/3)
THANKS Sudhanshu Kumar Singh Roll No. 41 and Sukriti Sinha, Roll No. 42 (MCA 2012)
QUES:- Show that

2
k
O(1)


k
2
k 0
by Splitting the Summation.
SOLUTION:
ak 1 k  1 2k
 k 1 . 2
ak
2
k
2
1  k  1
 

2 k 
Thanks Kanika Choudhry Roll no.-17 (MCA
2012)
2
For k=1,
ak 1 = 2 > 1
ak
For k=2,
For k=3,
For k=4,
ak 1
9
=
>1
ak
8
8
ak 1
=
< 1
9
ak
ak 1
ak
25

1
32
ak 1 8

 k  3
ak
9
8
 ak   
9
Thanks Kanika Choudhry Roll no.-17 (MCA
2012)
k 3
a3,k  4
So, by Splitting the Summation

2

k2
k2
k2
 k  k

k
k 0 2
k 3 2
k 0 2
2


8
8
1 


   1  a3 1      ...
 9 9

2 



8
3
k

 a3  r where r =
9
2
k 0
3  9  93
   .9  
8
2 8 
 Hence proved.
 O1
Thanks Kanika Choudhry Roll no.-17 (MCA
2012)
Splitting the Summation contd..
• Bounding the sum of Harmonic Series (not
done in class 2013)
Thanks Kanika Choudhry Roll no.-17 (MCA
2012)
Monotonically Increasing Functions
• A function f is said to be
monotonically increasing,
if for all x and y such that
x ≤ y one has f(x) < f(y),
so f maintains the order.
Thanks Swati Mittal Roll no. 45 (MCA 2012)
Monotonically Non- Decreasing
Functions
• A function f is said to be
monotonically nondecreasing, if for all x and
y such that x ≤ y one has
f(x) ≤ f(y).
Thanks Swati Mittal Roll no. 45 (MCA 2012)
Approximating Summation By Integrals
Let f(k) be a monotonically increasing function, we can
approximate it by integrals as follows:

n
m1
n
f ( x)dx   f (k )  
k m
n1
m
f ( x)dx
Lets prove this first!
Thanks Swati Mittal Roll no. 45 (MCA 2012)
Y
n

k m
F(n)
F(n-1)
To Prove :
F(m+1)
F(m)
The integral is the region
under the curve and the
total (blue) rectangle area
represents the value of the
summation.
F(x)
n-2 n-1 n n+1
m-1 m m+1
f (k )  
n 1
m
f ( x)dx
m+2
Thanks Swati Mittal Roll no. 45 (MCA 2012)
X
Proof:
We can see from the figure that,
Area under the curve between “m” and “n +1 “
= sum of area of (blue)rectangles + something more(area of
small triangles).
 Sum of areas of rectangles.
Hence:
n
 f (k )  
k m
n 1
m
f ( x)dx
Hence Proved!
Thanks Swati Mittal Roll no. 45 (MCA 2012)
Y

n
m1
n
f ( x)dx   f (k )  
k m
n1
m
F(x)
f ( x)dx
F(n)
F(n-1)
This can be proved by shifting the
rectangles in figure one left.
F(m+1)
F(m)
Lets prove this now!
m-1 m m+1
n-2 n-1 n n+1
m+2
Sum of area of red rectangles
= area under the curve from m-1 to n + area of triangle above it
 area under the curve from m-1 to n
Hence:
n
n
 f ( x)d x   f (k )
m 1
k m
Hence Proved!
Thanks Swati Mittal Roll no. 45 (MCA 2012)
X
EXERCISE
Let f(k) be a monotonically decreasing function prove:

n 1
m
f ( x)dx 
n
 f (k )  
k m
n
m1
f ( x)dx
Thanks Swati Mittal Roll no. 45 (MCA 2012)
Monotonically Decreasing
Functions
• A function f is said to be
monotonically
decreasing, if for all x and
y such that x ≤ y one has
f(x) > f(y) , so f reverses
the order.
Thanks Swati Mittal Roll no. 45 (MCA 2012)
Monotonically Non- Increasing
Functions
• A function f is said to be
monotonically nonincreasing, if for all x and
y such that x ≤ y one has
f(x) ≥ f(y).
Thanks Swati Mittal Roll no. 45 (MCA 2012)
Approximating Summation Of
Monotonically Decreasing Functions
by Integrals
• When a summation can be expressed as,  f(x),
where f(x) is a monotonically decreasing Function,
we can approximate it by Integrals as follows:
n
xm
n 1

x m
n
n
f(x)   f(x) 
x m
 f(x)
x  m 1
Thanks to Swatantra Kumar Verma Roll no. 43 MCA 2012
PROOF
n 1

x m
n
n
f(x)   f(x) 
x m
x  m 1
Lets Prove this inequality first
Thanks to Swatantra Kumar Verma Roll no. 43 MCA 2012
 f(x)
F(m+1)
F(m)
F(n)
F(n-1)
m-1 m m+1
n-1 n n+1
Monotonically Decreasing Function
Thanks to Swatantra Kumar Verma Roll no. 43 MCA 2012
To Prove :
n
n
x m
x  m 1
 f(x)   f(x)
Proof : As we can see from the figure that:
n
n
x  m 1
x m
 f(x)   f(x) + Sum of the area of
Lower triangle from m to
n
Therefore :n
 f(x) 
x m
n
 f(x)
x  m 1
Thanks to Swatantra Kumar Verma Roll no. 43 MCA 2012
n 1

x m
n
f(x)   f(x) 
x m
Lets Prove this inequality Now
Thanks to Swatantra Kumar Verma Roll no. 43 MCA
2012
n
 f(x)
x  m 1
F(m+1)
F(m)
F(n)
F(n-1)
m-1 m m+1
n-1 n n+1
Monotonically Decreasing Function
Thanks to Swatantra Kumar Verma Roll no. 43 MCA 2012
To prove:
n 1

x m
n
f(x)   f(x)
x m
Proof : As we can see from the figure that:
n
n 1
x m
x m
 f(x)   f(x)+ Sum of the area of upper
triangle from m to n
Therefore :n 1
n
x m
x m
 f(x)   f(x)
Thanks to Swatantra Kumar Verma Roll no. 43 MCA 2012
Download