Consider the following function, select all the function and apply which one is f= 0(g), f= omega g & f = theta g. Explain it each and every step.
f = n! g = 2^n
f=(log n)^3 g = n
f= 5^n/2 g =2^n
f=logn! g= nlog n
f=3^(n+1) g= 5^n
f=n! g= 2^n
f=2^n g= 2^n/2
f=2n+logn g = n+(logn)^2
f=nsqrt(n) g= 5^(log_2 (n))
1
f = n! g = 2^n
for n > 2
f(n) > g(n)
so f = Omega(g)
2.
f=(log n)^3 g = n
for n >=1
f(n) < g(n)
So f = O(g)
3.
f= 5^n/2 g =2^n
for n >=1
f(n) > g(n)
So f = Omega(g)
4.
f=logn! g= nlog n
n! is similar to nn, so f = log nn, = nlogn
So f = theta(g)
5
f=3^(n+1) g= 5^n
similar to 3
for n >= 3
g(n) > f(n)
so f(n) = O(g)
6
f=n! g= 2n
as said earlier n! ssimilar to nn. We are quite aware of that nn > 2n
so f = theta(g)
7
f=2^n g= 2^n/2
anytime
f(n) > g(n)
so f = theta(g)
8
f=2n+logn g = n+(logn)^2
f = 2n+logn = n + n + log n
g = n + (logn)2 = n + log n * log n
clearly n + logn > log n * log n
9
f=nsqrt(n) g= 5^(log_2 (n))
exponential series is always > quadratic series
so
f(n) < g(n)
f = O(g)
Consider the following function, select all the function and apply which one is f= 0(g), f=...
Compare the following pairs of functions f, g. In each case, say whether f- o(g) f-w(g), or f = Θ(g), and prove your claim. 157. f(n) -100n+logn, gn) (logn)2. 158,介f(n) = logn, g(n) = log log(n2). 159. . f(n)-n2/log n, g(n) = n(log n)2. 160·介介f(n)-(log n)106.9(n)-n10-6 . 161. (n)logn, g(n) (log nlog n 162. f(n) n2, gn) 3.
Compare the following pairs of functions f, g. In each case, say whether f- o(g) f-w(g), or f = Θ(g), and prove...
For each of the following g(n), which are legitimate Big-O, Big-Theta, or Big-Omega for f(n) = n^2 + 2n. List all that apply. a) n^2 b) n^3 c) n d) 2^n e) lg n
Which of these sequences are convergent? (Select all that apply) (A) An= _cos (2n) 5" g" (B) (n = 78 + 4 2n + (-1)"5 8n - (-1)"4 (D) «= (-2)" 2" + m3 (E) (n = 3 + 4" (F) (n = cos SAMSUNG
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...
For each pair of functions determine if f(n) ? ?(g(n)) or f(n) ? ?(g(n)) or f(n) ? O(g(n)) and provide a proof as specified. For each of the following, give a proof using the definitions. 1. f(n) = log(n), g(n) = log(n + 1) 2. f(n) = n3 + nlog(n) ? n, g(n) = n4 + n 3. f(n) = log(n!), g(n) = nlog(n) 4. f(n) = log3(n), g(n) = log2(n) 5. f(n) = log(n), g(n) = log(log(n))
Consider the following nine functions for the questions that follow: 1. (n^2)/2 + 3 2. 3n^3 3. 2^n 4. 5n 5. 12n 6. 4^n 7. log_2(n) 8. log_3(n) 9. log_2(2n) (a) Make a table in which each function is in a column dictated by its big-Θ growth rate. Functions with the same asymptotic growth rate should be in the same column. If functions in one column are little-o (o(n) = O(n) - Θ(n)) of another column, put the slower growing...
2. Which of the following recursive functions, written in a fictitious language, are tail recursive? Select all that are A. function f(n) ifn<2 else f(n-1) + f(n-2) end If m=0 else B. function g(m,n) g(m-1,m'n) C. function h(n) if n 100 else 3 h(n+5) end D. function j(m.n) IT m=n 100 j(m-n,n) 10 j(n,n-m) elseif mn else
2. Which of the following recursive functions, written in a fictitious language, are tail recursive? Select all that are A. function f(n) ifn
. 18. Indicate all values of x at which f"(x) > 0. (Select all that apply; there may be none, or perhaps more than one.) X = -1 x = 0 x = 1 X = 2
1 question) Arrange the following in the order of their growth rates, from least to greatest: (5 pts) n3 n2 nn lg n n! n lg n 2n n 2 question)Show that 3n3 + n2 is big-Oh of n3. You can use either the definition of big-Oh (formal) or the limit approach. Show your work! (5 pts.) 3 question)Show that 6n2 + 20n is big-Oh of n3, but not big-Omega of n3. You can use either the definition of big-Omega...
Which of the following foods are omega-3 sources? (select all that apply) Every incorrect answer is -0.5 salmon sardines cranberries ground flaxseed avocados olives