1 views

Uploaded by Umang Shukla

Asymptotic notation tut

- syllbus
- Assi 2 MOSFET Diiff Amp.
- Jason Brownlee - Clever Algorithms
- Assi 1 BJT Diff Amp.
- Tone of the Passage
- Markup Languages
- All Words
- GRE_cut-off
- 555 Timer & Adc-dac
- M3L3
- t09
- Class ATM System
- HW-week8
- impooadqa
- t7
- Python for Programmers- A Project-Based Tutorial
- The Subtle Art of Not Giving a F*ck: A Counterintuitive Approach to Living a Good Life
- Sapiens: A Brief History of Humankind
- The Unwinding: An Inner History of the New America
- Hidden Figures: The American Dream and the Untold Story of the Black Women Mathematicians Who Helped Win the Space Race

You are on page 1of 2

In each case below, either show that the statement is true for all positive functions f (n) and g (n), or give a counterexample. 1. f (n) + g (n) 2 (min(f (n); g (n)): F. f (n) = 1; g (n) = n: 2. f (n) + g (n) 2 (max(f (n); g (n)) T. Use the inequality max(f (n); g (n)) f (n) + g (n) 2 max(f (n); g (n)): (nb ):

b

= 1;

4. If f (n) 2 O(g (n)); then g (n) 2 ! (f (n)): F. Let f (n) = g (n) = n: Then it is easy to see that not for any constanct c > 0 and for n large enough, 0 cf (n) g (n): (take for instance c = 2). 5. If f (n) 2 o(g (n)) then g (n) 2 (f (n)): T. 6. If f (n) 2 o(g (n)) and g (n) 2 o(h(n)) then f (n) 2 o(h(n)): T. We have, according to the denition, 8c1 > 0; 9n1 such that, for any n 8c2 > 0; 9n2 such that, for any n n1 ; 0 n2 ; 0 f (n) g (n) c1 g (n) c2 h(n)

Then, for any n max(n1 ; n2 ), 0 f (n) c1 c2 h(n): Taking c1 = 1 we obtain that, for any c2 > 0; 9n0 = max(n1 ; n2 ); such that, for any n n0 , 0 f (n) c2 h(n); i.e f (n) 2 o(h(n)): 7. If f (n) 2 (g (n)) then g (n) 2 F. f (n) = n; g (n) = 1: 8. If f (n) 2 O(g (n)) and f (n) 62 F. Let g (n) = n and f (n) = (f (n)): (g (n)), then f (n) 2 o(g (n)): n; if n is even : 1; if n is odd 1

Then f (n) g (n) for any n, so f (n) 2 O(g (n)) and it is clear that f (n) 62 (g (n)): Suppose that f (n) 2 o(g (n)): Then, for any c > 0, there is a n0 > 0 such that, for any n > n0 ; 0 f (n) cg (n): Taking c = 1=2 is clear that the previous inequality does not hold. 9. There exist functions f (n) and g (n) such that f (n) 2 O(g (n)) and f (n) 2 ! (g (n)): F. If both assertions are true, then the rst one shows that there exists a constant c > 0 and an n0 such that, for any n > n0 ; f (n) cg (n): The second assertion shows that, for every constant c1 > 0, there exists an n1 such that, if n > n1 ; f (n) c1 g (n): Taking c1 = 2c, these two conditions show that, for any n > max(n0 ; n1 ), f (n) cg (n) and f (n) 2cg (n), contradiction. 2. 1. Show that, if f (n) g (n) 2 O(1);

Solution. 1. f (n) g (n) 2 O(1) means that 9C > 0, 9n0 such that, for any n > n0 ; 0 f (n) g (n) C: Then f (n) g (n) f (n) = +1 g (n) g (n) Since g (n) f (n) g (n) 2. f (n) = 2n; g (n) = n: 1 for any n, C + 1: g (n) f (n) 2 O(1): g (n)

- syllbusUploaded byUmang Shukla
- Assi 2 MOSFET Diiff Amp.Uploaded bydivyangkapadia
- Jason Brownlee - Clever AlgorithmsUploaded byCosmin Parvulescu
- Assi 1 BJT Diff Amp.Uploaded bydivyangkapadia
- Tone of the PassageUploaded byUmang Shukla
- Markup LanguagesUploaded byUmang Shukla
- All WordsUploaded byEzhilmalar Jayabalan
- GRE_cut-offUploaded byfiringblaze420
- 555 Timer & Adc-dacUploaded byAagam Shah
- M3L3Uploaded byUmang Shukla
- t09Uploaded byUmang Shukla
- Class ATM SystemUploaded byUmang Shukla
- HW-week8Uploaded byUmang Shukla
- impooadqaUploaded bybiradarvaishu
- t7Uploaded byUmang Shukla
- Python for Programmers- A Project-Based TutorialUploaded byJD