Answer the following questions related to ?(·), Ω(·) and Θ(·).
– (i). [8 marks] Prove the correctness of the product property of ? (·). Specifically, prove: if ?1(?) = ?(?1(?)) and ?2(?) = ?(?2(?)), then ?1(?) · ?2(?) = ?(?1(?) · ?2(?)). (Hint. Using the definition. If ?? (?) = ?(?? (?)), then there exists constants ?? and?? suchthat??(?)≤?? ·??(?)for?≥??.
– (ii). [5 marks] What is the asymptotic (Big-Oh) complexity of the function ?(?) = (?2 + √?) · (? + log ?)?
– (iii). [5 marks] What is the asymptotic (Big-Theta) complexity of the function ?(?) = (?3 + 3?2 + 5) · (?2 + ?4)? – (iv). [8 marks] Let ? (?) and ?(?) be asymptotically nonnegative functions. Using the basic definition of Θ-notation, prove that max(? (?),?(?)) = Θ(? (?) +?(?)).
Answer the following questions related to ?(·), Ω(·) and Θ(·). – (i). [8 marks] Prove the...
Question 3: Given the following two
code fragments [2 Marks]
(i)Find T(n), the time complexity (as
operations count) in the worst case?
(ii)Express the growth rate of the
function in asymptotic notation in the closest bound possible.
(iii)Prove that T(n) is Big O (g(n)) by
the definition of Big O
(iv)Prove that T(n) is (g(n)) by using
limits
2. Asymptotic Notation (8 points) Show the following using the definitions of O, Ω, and Θ. (1) (2 points) 2n 3 + n 2 + 4 ∈ Θ(n 3 ) (2) (2 points) 3n 4 − 9n 2 + 4n ∈ Θ(n 4 ) (Hint: careful with the negative number) (3) (4 points) Suppose f(n) ∈ O(g1(n)) and f(n) ∈ O(g2(n)). Which of the following are true? Justify your answers using the definition of O. Give a counter example if...
Need help with 1,2,3 thank you.
1. Order of growth (20 points) Order the following functions according to their order of growth from the lowest to the highest. If you think that two functions are of the same order (Le f(n) E Θ(g(n))), put then in the same group. log(n!), n., log log n, logn, n log(n), n2 V, (1)!, 2", n!, 3", 21 2. Asymptotic Notation (20 points) For each pair of functions in the table below, deternme whether...
1. a) Let f(n) = 6n2 - 100n + 44 and g(n) =
0.5n3 . Prove that f(n) = O(g(n)) using the definition
of Big-O notation. (You need to find constants c and n0).
b) Let f(n) = 3n2 + n and g(n) = 2n2 . Use
the definition of big-O notation to prove that
f(n) = O(g(n)) (you need to find constants c and n0) and
g(n) = O(f(n)) (you need to find constants c and n0).
Conclude that...
1. [5 marks Show the following hold using the definition of Big Oh: a) 2 mark 1729 is O(1) b) 3 marks 2n2-4n -3 is O(n2) 2. [3 marks] Using the definition of Big-Oh, prove that 2n2(n 1) is not O(n2) 3. 6 marks Let f(n),g(n), h(n) be complexity functions. Using the definition of Big-Oh, prove the following two claims a) 3 marks Let k be a positive real constant and f(n) is O(g(n)), then k f(n) is O(g(n)) b)...
Formal Definitions of Big-Oh, Big-Theta and Big-Omega:
1. Use the formal definition of Big-Oh to prove that if f(n) is a decreasing function, then f(n) = 0(1). A decreasing function is one in which f(x1) f(r2) if and only if xi 5 r2. You may assume that f(n) is positive evervwhere Hint: drawing a picture might make the proof for this problem more obvious 2. Use the formal definition of Big-Oh to prove that if f(n) = 0(g(n)) and g(n)...
Please show work and solve in Asymptotic complexity using big
O notation.
(8 pts) Assume n is a power of 2. Determine the time complexity function of the loop for (i=1; i<=n; i=2* i) for (j=1; j<=i; j++) {
1) Consider the assertions below. Prove or disprove the
assertion using limits, possibly with L’Hoˆpital’s rule. Also, if
the assertion is true, show that it is true directly from the
definition of the asymptotic notation and derive values for the
relevant constants.
(a) 3n^2 + 5n + 7 ∈ O(n^2)
(b) 5(n − 2)! ∈ Θ(n!)
(c)
∈ Θ(n)
2) Give the recurrence relation where indicated or solve the
given recurrence relation by algebraically unrolling
it.
(a) Give a recurrence...
Suppose the following is a divide-and-conquer algorithm for some problem. "Make the input of size n into 3 subproblems of sizes n/2 , n/4 , n/8 , respectively with O(n) time; Recursively call on these subproblems; and then combine the results in O(n) time. The recursive call returns when the problems become of size 1 and the time in this case is constant." (a) Let T(n) denote the worst-case running time of this approach on the problem of size n....
Prove each of the following using the definition of Big-Oh. a)(?+1)5is O(?5) b)2?+1is O(2?) c)If ?(?)is a polynomial in ?, then ????(?)is ?(log?)