a) f(n) = O(g(n)) means there are positive constants c and n0, such that 0 ≤ f(n) ≤ cg(n) for all n ≥ n0 nlog(n) = O(n^2) => nlog(n) <= c(n^2) Let's assume c = 1 => nlog(n) <= c(n^2) => nlog(n) <= 1(n^2) => nlog(n) <= n^2 => log(n) <= n it's true for all n >= 1 so, nlog(n) = O(n^2) given c = 1 and n0 = 1, using the definition of Big-O b) f(n) = O(g(n)) means there are positive constants c and n0, such that 0 ≤ f(n) ≤ cg(n) for all n ≥ n0 √n log(n) = O(n^2) => √n log(n) <= c(n^2) Let's assume c = 1 => √n log(n) <= c(n^2) => √n log(n) <= 1(n^2) => log(n) <= n√n it's true for all n >= 1 so, √n log(n) = O(n^2) given c = 1 and n0 = 1, using the definition of Big-O
2. [6 marks] Are the following functions O(n)? Justify your answer. a) n log n b)...
[6 marks] Arrange the functions (1.5)n , n100, log n, n!, and n99 + n98 in a list so that each is a big-O of the next. Ans: log n, (n99+n98), n100, (1.5)n , n!
1. Answer the following questions. Justify your answers. (a) (3 marks) For what values of x does the series 1 + 22x 2 + 24x 4 + 26x 6 · · · + 22nx 2n + · · · converge? (b) (9 marks) Is the following series absolutely convergent, conditionally convergent or divergent? i. X∞ n=1 2 √ n − 2 √ n + 1 ii. X∞ n=1 arctan(n) n2 + 1 iii. X∞ k=1 (−1)k k 1. Answer the...
if possible solve part d in detail. a) fi(n) n2+ 45 n log n b) f:(n)-1o+ n3 +856 c) f3(n) 16 vn log n 2. Use the functions in part 1 a) Isfi(n) in O(f(n)), Ω(fg(n)), or Θ((6(n))? b) Isfi(n) in O(f(n)), Ω(f,(n)), or Θ((fs(n))? c) Ísf3(n) in O(f(n)), Ω(f(n)), or Θ(f(n))? d) Under what condition, if any, would the "less efficient" algorithm execute more quickly than the "more efficient" algorithm in question c? Explain Give explanations for your answers...
Question 2 (12 marks) (a) Consider the sequence with terms 2n35"5 log n n 1,2,3,.. 13 n8n (i) Determine whether ah diverges. If the sequence converges, find its converges or limit. o0 (ii) Determine whether r diverges. Justify your ansv swer an Converges o n-1 (b) Consider the series (2n)! 2 (n!) and determine whether it converges or diverges. Justify your answer IM8 8 Question 2 (12 marks) (a) Consider the sequence with terms 2n35"5 log n n 1,2,3,.. 13...
n)2" log log(n)O(n)? I don't How does =n. VIn) T n understand how VITn) 2" log 7 -)? I know we can take out the T, because 1) Vn) T* n it's in our natural logarithm. It's a constant factor. but how does (n) show up in the denominator after it used to be in the numerator? I need to know how the expression (1) right on the left is equal to the expression (1) on the n)2" log log(n)O(n)?...
Arrange the following functions in ascending order of asymptotic growth rate; that is if function g(n) immediately follows function f(n) in your list, then it should be the case that f(n) is O(g(n)): 2 Squareroot log n, 2^n, n^4/3, n(log n)^3, n log n, 2 2^n, 2^n^2. Justify your answer.
For each pair of functions f(n) and g(n), indicate whether f(n) = O(g(n)), f(n) = Ω(g(n)), and/or f(n) = Θ(g(n)), and provide a brief explanation of your reasoning. (Your explanation can be the same for all three; for example, “the two functions differ by only a multiplicative constant” could justify why f(n) = n, g(n) = 2n are related by big-O, big-Omega, and big-Theta.) i. f(n) = n^2 log n, g(n) = 100n^2 ii. f(n) = 100, g(n) = log(log(log...
Question 2 (12 marks) (a) Consider the sequence with terms 2n3 5"5 log n , n = 1,2,3,.... an 13 n8n (i) Determine whether {an} converges or diverges. If the sequence converges, find its lmit (ii) Determine whether diverges. Justify your answer an COnverges or n-1 (b) Consider the series (2n)! 2" (n!)? n=1 and determine whether it converges or diverges. Justify your answer Question 2 (12 marks) (a) Consider the sequence with terms 2n3 5"5 log n , n...
O(log(log(N))) < O(log(N)) a. True b. False O(N ) < O(log(N)) a. True b. False O( N5) < O(N2 - 3N + 2) a. True b. False O(2N) < O(N2) a. True b. False
1. For each of the following pairs of functions, prove that f(n)-O(g(n)), and / or that g(n) O(f(n)), or explain why one or the other is not true. (a) 2"+1 vs 2 (b) 22n vs 2" VS (c) 4" vs 22n (d) 2" vs 4" (e) loga n vs log, n - where a and b are constants greater than 1. Show that you understand why this restriction on a and b was given. f) log(0(1) n) vs log n....