Asymptotic Growth of Functions



Similar documents
Infinite Sequences and Series

In nite Sequences. Dr. Philippe B. Laval Kennesaw State University. October 9, 2008

Properties of MLE: consistency, asymptotic normality. Fisher information.

Soving Recurrence Relations

SAMPLE QUESTIONS FOR FINAL EXAM. (1) (2) (3) (4) Find the following using the definition of the Riemann integral: (2x + 1)dx

Lecture 4: Cauchy sequences, Bolzano-Weierstrass, and the Squeeze theorem

Running Time ( 3.1) Analysis of Algorithms. Experimental Studies ( 3.1.1) Limitations of Experiments. Pseudocode ( 3.1.2) Theoretical Analysis

Convexity, Inequalities, and Norms

I. Chi-squared Distributions

FIBONACCI NUMBERS: AN APPLICATION OF LINEAR ALGEBRA. 1. Powers of a matrix

Class Meeting # 16: The Fourier Transform on R n

THE ABRACADABRA PROBLEM

Factors of sums of powers of binomial coefficients

Chapter 6: Variance, the law of large numbers and the Monte-Carlo method

A probabilistic proof of a binomial identity

Our aim is to show that under reasonable assumptions a given 2π-periodic function f can be represented as convergent series

Chapter 7 Methods of Finding Estimators

3 Basic Definitions of Probability Theory

Chapter 5: Inner Product Spaces

SECTION 1.5 : SUMMATION NOTATION + WORK WITH SEQUENCES

Lecture 5: Span, linear independence, bases, and dimension

5 Boolean Decision Trees (February 11)

Section 11.3: The Integral Test

Output Analysis (2, Chapters 10 &11 Law)

INFINITE SERIES KEITH CONRAD

Example 2 Find the square root of 0. The only square root of 0 is 0 (since 0 is not positive or negative, so those choices don t exist here).

Sequences and Series

Annuities Under Random Rates of Interest II By Abraham Zaks. Technion I.I.T. Haifa ISRAEL and Haifa University Haifa ISRAEL.

Department of Computer Science, University of Otago

4.3. The Integral and Comparison Tests

Basic Elements of Arithmetic Sequences and Series

UC Berkeley Department of Electrical Engineering and Computer Science. EE 126: Probablity and Random Processes. Solutions 9 Spring 2006

MARTINGALES AND A BASIC APPLICATION

Chapter 14 Nonparametric Statistics

Incremental calculation of weighted mean and variance

NATIONAL SENIOR CERTIFICATE GRADE 12

Chapter 7 - Sampling Distributions. 1 Introduction. What is statistics? It consist of three major areas:

A Note on Sums of Greatest (Least) Prime Factors

3. Greatest Common Divisor - Least Common Multiple

The following example will help us understand The Sampling Distribution of the Mean. C1 C2 C3 C4 C5 50 miles 84 miles 38 miles 120 miles 48 miles

Trigonometric Form of a Complex Number. The Complex Plane. axis. ( 2, 1) or 2 i FIGURE The absolute value of the complex number z a bi is

A Faster Clause-Shortening Algorithm for SAT with No Restriction on Clause Length

SEQUENCES AND SERIES

A Recursive Formula for Moments of a Binomial Distribution

PROCEEDINGS OF THE YEREVAN STATE UNIVERSITY AN ALTERNATIVE MODEL FOR BONUS-MALUS SYSTEM

Overview of some probability distributions.

Taking DCOP to the Real World: Efficient Complete Solutions for Distributed Multi-Event Scheduling

1. MATHEMATICAL INDUCTION

Ekkehart Schlicht: Economic Surplus and Derived Demand

THE ARITHMETIC OF INTEGERS. - multiplication, exponentiation, division, addition, and subtraction

THE HEIGHT OF q-binary SEARCH TREES

CS103X: Discrete Structures Homework 4 Solutions


Notes on exponential generating functions and structures.

Theorems About Power Series

1 Computing the Standard Deviation of Sample Means

Integer Factorization Algorithms

5.3. Generalized Permutations and Combinations

Lecture 4: Cheeger s Inequality

Virtile Reguli And Radiational Optaprints

2. Degree Sequences. 2.1 Degree Sequences

CS103A Handout 23 Winter 2002 February 22, 2002 Solving Recurrence Relations

A PROBABILISTIC VIEW ON THE ECONOMICS OF GAMBLING

Approximating Area under a curve with rectangles. To find the area under a curve we approximate the area using rectangles and then use limits to find

Permutations, the Parity Theorem, and Determinants

a 4 = = Which of the following sequences converge to zero? n 2 (a) n 2 (b) 2 n x 2 x = lim x n = lim x

Factoring x n 1: cyclotomic and Aurifeuillian polynomials Paul Garrett <garrett@math.umn.edu>

Lesson 15 ANOVA (analysis of variance)

Week 3 Conditional probabilities, Bayes formula, WEEK 3 page 1 Expected value of a random variable

Section 8.3 : De Moivre s Theorem and Applications

.04. This means $1000 is multiplied by 1.02 five times, once for each of the remaining sixmonth

ON AN INTEGRAL OPERATOR WHICH PRESERVE THE UNIVALENCE

Discrete Mathematics and Probability Theory Spring 2014 Anant Sahai Note 13

S. Tanny MAT 344 Spring be the minimum number of moves required.

Maximum Likelihood Estimators.

BINOMIAL EXPANSIONS In this section. Some Examples. Obtaining the Coefficients

Confidence Intervals for One Mean

An Efficient Polynomial Approximation of the Normal Distribution Function & Its Inverse Function

THIN SEQUENCES AND THE GRAM MATRIX PAMELA GORKIN, JOHN E. MCCARTHY, SANDRA POTT, AND BRETT D. WICK

Here are a couple of warnings to my students who may be here to get a copy of what happened on a day that you missed.

arxiv: v1 [stat.me] 10 Jun 2015

PART TWO. Measure, Integration, and Differentiation

Lecture 3. denote the orthogonal complement of S k. Then. 1 x S k. n. 2 x T Ax = ( ) λ x. with x = 1, we have. i = λ k x 2 = λ k.

Center, Spread, and Shape in Inference: Claims, Caveats, and Insights

How To Solve The Homewor Problem Beautifully

University of California, Los Angeles Department of Statistics. Distributions related to the normal distribution

Normal Distribution.

Statistical inference: example 1. Inferential Statistics

Exploratory Data Analysis

5: Introduction to Estimation

W. Sandmann, O. Bober University of Bamberg, Germany

CS85: You Can t Do That (Lower Bounds in Computer Science) Lecture Notes, Spring Amit Chakrabarti Dartmouth College

Plug-in martingales for testing exchangeability on-line

Transcription:

CMPS Itroductio to Aalysis of Algorithms Fall 3 Asymptotic Growth of Fuctios We itroduce several types of asymptotic otatio which are used to compare the performace ad efficiecy of algorithms As we ll see, the asymptotic ru time of a algorithm gives a simple, ad machie idepedet, characterizatio of it s complexity Defiitio Let g ( be a fuctio The set O ( is defied as O = { f ( c >, >, : f ( c ) } ( I other words, f ( O( if ad oly if there exist positive costats c, ad, such that for all, the iequality f ( c is satisfied We say that f ( is Big O of g (, or that g ( is a asymptotic upper boud for f ( We ofte abuse otatio slightly by writig f ( to mea f ( O( Actually f ( O( is also a abuse of otatio We should really write f O(g) sice what we have defied is a set of fuctios, ot a set of umbers The otatioal covetio O ( is useful sice it allows us to refer to the set O ( 3 ) say, without havig to itroduce a fuctio symbol for the 3 polyomial Observe that if f ( the f ( is asymptotically o-egative, ie f ( is o-egative for all sufficietly large, ad liewise for g ( We mae the blaet assumptio from ow o that all fuctios uder discussio are asymptotically o-egative I practice we will be cocered with iteger valued fuctios of a (positive) iteger ( g : Z + Z + ) However, i what follows, it is useful to cosider to be a cotiuous real variable taig positive values ad g to be real valued fuctio ( g : R + R + ) Geometrically f ( says: cg ( f (

Example 4 + + + 3) Observe that 4 + + + 3 for all, as ca be easily verified Thus we may tae = ad c = i the defiitio + + 3 3 4 + Note that i this example, ay value of greater tha will also wor, ad liewise ay value of c greater tha wors I geeral if there exist positive costats ad c such that f ( c for all, the ifiitely may such costats also exist I order to prove that f ( it is ot ecessary to fid the smallest possible ad c maig the f ( c true It is oly ecessary to show that at least oe pair of such costats exist Geeralizig the last example, we will show that a + b c + d + e) for ay costats a-e, ad i fact p ( q( wheever p ( ad q ( are polyomials with de p) de q) Defiitio Let g ( be a fuctio ad defie the set Ω ( to be Ω = { f ( c >, >, : c f ( )} ( We say f ( is big Omega of g (, ad that g ( is a asymptotic lower boud for f ( As before we write f ( to mea f ( Ω( The geometric iterpretatio is: f ( cg (

Lemma f ( if ad oly if f ( Proof: If f ( the there exist positive umbers c, such that f ( c for all Let c = / c ad = The c f ( for all, provig f ( The coverse is similar ad we leave it to the reader /// Defiitio Let g ( be a fuctio ad defie the set Θ ( Ω( Equivaletly Θ( = { f ( c >, c >, >, : c f ( c } We write f ( ad say the g ( is a asymptotically tight boud for f (, or that f ( ad g ( are asymptotically equivalet We iterpret this geometrically as: c f ( c Exercise Prove that if c is a positive costat, the cf ( f ( Exercise Prove that f ( if ad oly if f ( Example Prove that ) + Proof: Accordig to the defiitio, we must fid positive umbers c, c,, such that the iequality c + c holds for all Pic c =, c =, ad = The if we have: ad ( ) ad ( ) ( c ) ad ( c ) + c ad + c, c + c, + c, c as required /// 3

The reader may fid our choice of values for the costats c, c, i this example somewhat mysterious Adequate values for these costats ca usually be obtaied by worig bacwards algebraically from the iequality to be proved Notice that i this example there are may valid choices For istace oe checs easily that c /, c 3/, ad wor equally well = Exercise Let a, b be real umbers with b > Prove directly from the defiitio (as above) that b b ( + a) ) (I what follows we lear a much easier way to prove this) Lemma If f ( h( for all sufficietly large, ad if h (, the f ( Proof: The above hypotheses say that there exist positive umbers c ad such that h( c for all Also there exists such that f ( h( for all (Recall f ( is assumed to be asymptotically o-egative) Defie = max(, ), so that if we have both ad Thus implies f ( c, ad therefore f ( /// Exercise Prove that if h ( f ( h ( for all sufficietly large, where h ( ad h ( )), the f ( + Example Let be a fixed iteger Prove that i ) + + Proof: Observe that i = = ), ad i i / / ( / ) = = + + + / ( / ) ( / )( / ) = (/ ) ) + By the result of the precedig exercise, we coclude i ) /// Whe asymptotic otatio appears i a formula such as T ( = T ( / ) + Θ( we iterpret Θ ( to 3 3 stad for some aoymous fuctio i the class Θ ( For example 3 + 4 + = 3 + Θ( ) Here Θ ( ) stads for 4 +, which belogs to the class Θ ( ) The expressio = Θ( i) ca be puzzlig O the surface it stads for Θ( ) + Θ() + Θ(3) + + Θ(, i which is meaigless sice Θ (costat) cosists of all fuctios which are bouded above by some costat We iterpret Θ (i) i this expressio to stad for a sigle fuctio f (i) i the class Θ (i), evaluated at i =,, 3,, Exercise Prove that = Θ( i) ) The left had side stads for a sigle fuctio f (i) summed i = ( i for i =,, 3,, By the previous exercise it is sufficiet to show that h f ( i) h ( ) for all sufficietly large, where h ( ) ad h ( ) 4

Defiitio o ( = { f ( c >, >, : f ( < c } We say that g ( is a strict Asymptotic upper boud for f ( ad write f ( as before f ( Lemma f ( if ad oly if lim = f ( Proof: Observe that f ( if ad oly if c >, >, : < c, which is the f ( very defiitio of the limit statemet lim = /// l Example l ) sice lim = (Apply l Hopitals rule) Example b ) for ay > ad b > sice lim = b other words, ay expoetial grows strictly faster tha ay polyomial (Apply l Hopitals rule times) I By comparig defiitios of o ( ad O( oe sees immediately that o( O( Also o fuctio ca belog to both o ( ad Ω (, as is easily verified (exercise) Thus o ( Ω( =, ad therefore o( O( Defiitio ω ( g ( = { f ( c >, >, : c < f ( } Here we say that g ( is a strict asymptotic lower boud for f ( ad write f ( = ω( f ( Exercise Prove that f ( = ω( if ad oly if lim = g ( ) Exercise Prove ω ( O( =, whece ω ( Ω( The followig picture emerges: O ( Ω ( o ( Θ ( ω ( 5

Lemma If f ( lim = L, where L <, the f ( Proof: The defiitio of the above limit is ε =, there exists a positive umber such that for all : f ( L < f ( < L < f ( < L + f ( < ( L + ) f ( ε >, >, : L < ε Thus if we let Now tae c = L + i the defiitio of O, so that f ( as claimed /// f ( Lemma If lim = L, where < L, the f ( Proof: The limit statemet implies lim = L, where L =/ L ad hece L < By the f ( previous lemma g ( f (, ad therefore f ( /// Exercise Prove that if f ( lim = L, where < L <, the f ( Although o (, ω (, ad a certai subset of Θ ( are characterized by limits, the full sets O (, Ω (, ad Θ ( have o such characterizatio as the followig examples show Example A Let g ( = ad f ( = ( + si( g ( f ( f ( Clearly f (, but = + si(, whose limit does ot exist This example shows that the cotaimet o( O( is i geeral strict sice f ( Ω( (exercise) Therefore f ( Θ(, so that f ( O( But f ( o( sice the limit does ot exist 6

Example B Let g ( = ad f ( = ( + si( 3g ( f ( g ( Sice ( + si( 3 for all, we have f (, but f ( = + si( whose limit does ot exist Exercise Fid fuctios f ( ad g ( such that f ( Ω(, but exist (eve i the sese of beig ifiite), so that f ( ω( f ( lim g ( ) does ot The precedig limit theorems ad couter-examples ca be summarized i the followig diagram f ( Here L deotes the limit L = lim, if it exists g ( ) O ( Ω ( Θ ( o ( ω ( L = < L < L = Ex A Ex B I spite of the above couter-examples, the precedig limit theorems are a very useful tool for establishig asymptotic comparisos betwee fuctios For istace recall the earlier exercise to b b show ( + a) ) for real umbers a, ad b with b > The result follows immediately from sice << b ( + a) lim = lim = = + a b, b 7 b

Exercise Use limits to prove the followig: a l ) (here l ) deotes the base logarithm of ) 5 b = ω( ) c If P ( is a polyomial of degree, the P( ) d f ( + o( f ( f ( (Oe ca always disregard lower order terms) ε e (log ) for ay > ad ε > (Polyomials grow faster tha logs) ε f b ) for ay ε > ad b > (Expoetials grow faster tha polyomials) There is a aalogy betwee the asymptotic compariso of fuctios f ( ad g (, ad the compariso of real umbers x ad y f ( ~ x y f ( ~ x = y f ( ~ x y f ( ~ x < y f ( = ω( ~ x > y Note however that this aalogy is ot exact sice there exist pairs of fuctios which are ot comparable, while ay two real umbers are comparable (See problem 3-c, p58) 8