Question: > - Q1) A. Prove or disprove 1. If f(n) is O(g(n)). Is then 2f(n) = O(2 g(n))? 2. f(n)O(g(n)), then g(n) = O(f(n)).

> - Q1) A. Prove or disprove 1. If f(n) is O(g(n)). Is then 2f(n) = O(2 g(n))? 2. f(n)O(g(n)), then g(n) = O(f(n)). 3. nk = 0 (2n) 4. log(n!) (nlogn) B) In each of the following situations, indicate whether f = O(g), or f = 2(g), or both f(g). 1. f(n) 100n+ log n and g(n) = n + (log n). 2. f(n) n1.01 and g(n) = n log n. 3. f(n) n1/2 and g(n) = 4 log n 4. f(n) 2n and g(n) = 2n+1. Q2. (2 Pts.) (2 Pts.) A. Find the time recurrence equation and the complexity (2 pts.) 1. int Fun1(int n) { } 2. if (n
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
