Unformatted text preview: g(n)= 0 if n is even n if n is odd Clearly, f(n) O(g(n)) and g(n) O(f(n)). 3.[2] For any two functions f(n) and g(n), if f(n)=O(g(n)) then g(n)= Ω (f(n)). Yes. Let f(n)=O(g(n)), there exist c and n such that, when n>n , f(n) ≤ c*g(n). Clearly, g(n) ≥ (1/c)*f(n), when n>n . Thus, there exist c’=(1/c) and n such that g(n) ≥ c’*f(n) for infinite number of n>n , hence, g(n)= Ω (f(n)). 4.[2] For any two functions f(n) and g(n), if f(n)= Ω (g(n)) then g(n)=O(f(n)). No. f(n)= n if n is even 0 if n is odd g(n)= 0 if n is even n if n is odd Let c=1 and n =0. Clearly, f(n) ≥ c*g(n)=0 for infinite number of even numbers. So, f(n)= Ω (g(n)). g(n) ≠ O(f(n)), since for all c and n , if n be an even number greater than n , f(n) c*g(n)=0...
View
Full
Document
This note was uploaded on 12/10/2009 for the course CAS 2c03 taught by Professor Janicki during the Spring '03 term at McMaster University.
 Spring '03
 janicki

Click to edit the document details