Based on Chapter 1, Weiss - PowerPoint PPT Presentation

1 / 15
About This Presentation
Title:

Based on Chapter 1, Weiss

Description:

Lecture 2. Based on Chapter 1, Weiss. Mathematical Foundation. Series ... Fi = Fi-1 Fi-2 , F2 = 2, F3 = 3, F4 = 5, F5 = 8. Will prove that Fn 1 (5/3)n 1 , ... – PowerPoint PPT presentation

Number of Views:25
Avg rating:3.0/5.0
Slides: 16
Provided by: saswati5
Category:

less

Transcript and Presenter's Notes

Title: Based on Chapter 1, Weiss


1
Lecture 2
  • Based on Chapter 1, Weiss

2
Mathematical Foundation
Series and summation 1 2 3 . N
N(N1)/2 (arithmetic series)
1 r r2 r3 rN-1 (1- rN)/(1-r),
(geometric series)
? 1/(1-r) , r lt 1, large N
Sum of squares 1 22 32 N2 N(N
1)(2N 1)/6
3
Properties of a log Function
logxa b if xb a
(we will use base 2 mostly, but may use other
bases occasionally)
Will encounter log functions again and again! log
n bits needed to encode n messages.
log (ab ) log a log b log (a/b ) log a -
log b log ab b log a
logba logca/ logcb
alog n nlog a
4
amn (am )n (an)m
amn am an
(2?n)0.5 (n/e)n ? n? ? (2?n)0.5 (n/e)n
(1/12n)
5
Proof By Induction
Prove that a property holds for input size 1
(base case)
Assume that the property holds for input size
1,n. Show that the property holds for input size
n1.
Then, the property holds for all input sizes, n.
6
Prove that the sum of 12..n n(n1)/2
1(11)/2 1 Thus the property holds for n 1
(base case)
Assume that the property holds for n1,,m, Thus
1 2 ..m m(m1)/2
We will show that the property holds for n m
1, that is 1 2 .. m m 1 (m1)(m2)/2
This means that the property holds for n2 since
we have shown it for n1 Again this means that
the property holds for n3 and then for n4 and
so on.
7
Now we show that the property holds for n m
1, that is 1 2 .. m m 1
(m1)(m2)/2 assuming that 1 2 ..m
m(m1)/2
1 2 ..m (m1) m(m1)/2 (m1)
(m1)(m/2 1)
(m1)(m2)/2
8
Sum of Squares
Now we show that 1 22 32 n2 n(n
1)(2n 1)/6
1(11)(21)/6 1 Thus the property holds for n
1 (base case)
Assume that the property holds for n1,..m,
Thus 1 22 32 m2 m(m 1)(2m
1)/6 and show the property for m 1, that is
show that 1 22 32 m2 (m1)2
(m1)(m 2)(2m 3)/6
9
1 22 32 m2 (m1)2 m(m 1)(2m
1)/6 (m1)2
(m1)m(2m1)/6 m1
(m1)2m2 m 6m 6/6
(m1)(m 2)(2m 3)/6
10
Fibonacci Numbers
Sequence of numbers, F0 F1 , F2 , F3 ,.
F0 1, F1 1,
Fi Fi-1 Fi-2 ,
F2 2, F3 3, F4 5, F5 8
11
Will prove that Fn1 lt (5/3)n1 ,
F2 lt (5/3 )2
Let the property hold for 1,k Thus Fk1 lt
(5/3)k1, Fk lt (5/3)k
Fk2 Fk Fk1 ,
lt (5/3)k (5/3)k1
(5/3)k (5/3 1)
lt (5/3)k (5/3)2
12
Proof By Counter Example
Want to prove something is not true!
Give an example to show that it does not hold!
Is FN ? N2 ?
No, F11 144
However, if you were to show that FN ? N2
then you need to show for all N, and not just one
number.
13
Proof By Contradiction
Suppose, you want to prove something.
Assume that what you want to prove does not hold.
Then show that you arrive at an impossibility.
Example The number of prime numbers is not
finite!
14
Suppose the number of primes is finite, k.
The primes are P1, P2.. Pk
The largest prime is Pk
Consider the number N 1 P1, P2.. Pk
N is larger than Pk Thus N is not prime. So N
must be product of some primes.
However, none of the primes P1, P2.. Pk divide
N exactly. So N is not a product of primes.
(contradiction)
15
Reading Assignment
Chapter 1, Weiss, Sections 1.1, 1.2
Proof for Fibonacci numbers somewhat easier in
class notes.
Write a Comment
User Comments (0)
About PowerShow.com