Download presentation

Presentation is loading. Please wait.

Published byRenee Trull Modified over 4 years ago

1
Design & Analysis of Algorithms COMP 482 / ELEC 420 John Greiner

2
Math Background: Review & Beyond 1.Asymptotic notation 2.Math used in asymptotics 3.Recurrences 4.Probabilistic analysis 2 To do: [CLRS] A, B, 3.2 #1

3
Comparisons Some useful algebra:a<b, c<d implies… -b < -a 1/b < 1/a– Unless a,b have different signs! a+c < b+c ac 0 a+c b-d ! a n 0 3

4
Floor & Ceilings 4 a>0 integer a integer a>0, b 1

5
Logarithm Notation lg n = log 2 nln n = log e n lg k n = (lg n) k lg lg n = lg (lg n) lg n + k = (lg n) + k lg (0) n = nlg (i+1) n = lg lg (i) n lg* n = min {i 0 | lg (i) n 1} How many times can you take the logarithm before its 1? 5

6
Exponentials & Logarithms 6 a>0 O(log a x) = O(log b x) = O(log x) x=a c=b

7
Summations 7 Arithmetic ? Harmonic ? if |x| < 1 ? Geometric if x 1 ? Telescoping ? Solve as telescoping sum: ?

8
Summations – Combining with Calculus 8 if |x| < 1 Have: Differentiate:if |x| < 1Algebra:if |x| < 1

9
Bounding Summations: Upper Bound 9 ?

10
Bounding Summations: Lower Bound 10 ?

11
Logarithms 11

12
Bounding Summations by Integrals 12 0 1 0123 … 4 Recall: ln 1 = 0

13
Factorials n! = ω(2 n ) n! = o(n n ) log n! = Θ(n log n) 13

14
Permutations & Combinations 14 # of k-combinations of an n-set = # of permutations of an n-set = n!

Similar presentations

Presentation is loading. Please wait....

OK

6.4 Logarithmic Functions

6.4 Logarithmic Functions

© 2018 SlidePlayer.com Inc.

All rights reserved.

To make this website work, we log user data and share it with processors. To use this website, you must agree to our Privacy Policy, including cookie policy.

Ads by Google