Suppose f(n) = O(s(n)), and g(n) = O(r(n)). All four functions are positive-valued and monotonically increasing. Prove (using the formal definitions of asymptotic notations) or disprove (by counterexample) each of the following claims:
(a) f(n) − g(n) = O(s(n) − r(n))
(b) if s(n) = O(g(n)), then f(n) = O(r(n))
(c) if r(n) = O(s(n)), then g(n) = O(f(n))
(d) if s(n) + g(n) = O(f(n)), then f(n) = Θ(s(n))
Required defintion -
a(n) = O(b(n)) if there exists a positive integer n0 and a positive constant c, such that a(n)≤c.b(n) ∀ n≥n0
=> for f(n) = O(s(n)), f(n) <= c1.s(n) , n >= n10 - eqn 1
and for g(n) = O(r(n)), g(n) <= c2.r(n) , n >= n20 - eqn 1
Also, to setlle on common n0 value, take n0 = max(n10, n20) and for c, c = max(c1, c2)
(a) f(n) − g(n) = O(s(n) − r(n))
Subtracting eqn 2 from eqn 1,
f(n) - g(n) <= c(s(n) - r(n)), n >= n0
=> this can be written as - f(n) − g(n) = O(s(n) − r(n))
Hence proved.
(b) if s(n) = O(g(n)), then f(n) = O(r(n))
s(n) = O(g(n))
=> s(n) <= c3.g(n) , n >= n0
From eqn 1 and 2,
f(n) <= c1.s(n) <= c1.c3.g(n) <= c1.c3.c2.r(n)
=> f(n) <= c1.c3.c2.r(n)
=> f(n) <= c.r(n) for c = c1.c3.c2
=> f(n) = O(r(n))
Hence proved.
(c) if r(n) = O(s(n)), then g(n) = O(f(n))
r(n) = O(s(n))
=> r(n) <= c3.s(n) , n >= n0
g(n) <= c2.r(n) <= c2.c3.s(n)
The function f(n) does not fit in the equation => Disprove the statement.
Example -
Let f(n) = 1
s(n) =
g(n) = n
r(n) =
Thus, all the conditions fit, that is, f(n) = O(s(n)), g(n) = O(r(n)) and r(n) = O(s(n))
But g(n)
O(f(n)), instead f(n) = O(g(n))
=> g(n) = O(f(n)) is not always true.
(d) if s(n) + g(n) = O(f(n)), then f(n) = Θ(s(n))
s(n) + g(n) = O(f(n))
=> s(n) + g(n) <= c3.f(n)
And we know that, f(n) <= c1.s(n)
Adding the function g(n), we only increase (or remain constant) the growth of the function s(n).
=> s(n) + g(n) = O(f(n)) may not be true.
But if f(n) = Θ(s(n)), s(n) <= c4.f(n)
Then this can be true.
Hence proved.
Suppose f(n) = O(s(n)), and g(n) = O(r(n)). All four functions are positive-valued and monotonically increasing....
Let f(n) and g(n) be asymptotically positive functions. Prove or disprove each of the following conjectures. f(n) = O(g(n)) implies g(n) = Ω(f(n)) . f(n) = O(g(n)) implies g(n) = O(f(n)). f(n) + g(n) = Θ(min(f(n),g(n))).
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...
Prove or find a counterexample for the following. Assume that f (n) and g (n) are monotonically increasing functions that are always larger than 1. f (n) = o (g (n)) rightarrow log (f (n)) = o (log (g (n))) f (n) = O (g (n)) rightarrow log (f (n)) = O (log (g (n))) f (n) = o (g (n)) rightarrow 2^f (n) = o (2^g (n)) f (n) = O (g (n)) rightarrow 2^f (n) = O (2^g...
1
Prove the following using the definitions of the notations, or disprove with a specific counterexample: Theta(g(n)) = O(g(n)) Ohm(g(n)) Theta(alpha g(n) = Theta(g(n)), alpha > 0 If f(n) O(g(n)), then g(n) Ohm(f(n)). For any two non-negative functions f(n) and g(n), either f(n) Ohm(g(n)), or f(n) < O(g(n))
Let F be the set of all real-valued functions having as domain the set R of all real numbers. Example 2.7 defined the binary operations +- and oon F. In Exercises 29 through 35, either prove the given statement or give a counterexample. 29. Function addition + on F is associative. 30. Function subtraction - on is commutative
Let f1 and f2 be asymptotically positive non-decreasing functions. Prove or disprove each of the following conjectures. To disprove, give a counterexample. a.If f1(n) = Theta(g(n)) and f2(n) = Theta(g(n)) then f1(n) + f2(n) = Theta(g(n)) b.If f1(n) = O(g(n)) and f2(n) = O(g(n))then f1(n) = O(f2(n))
Let f1 and f2 be asymptotically positive non-decreasing functions. Prove or disprove each of the following conjectures. To disprove give a counter example. If f1(n) = O(g(n)) and f2(n) = O(g(n)) then f1(n)= Θ (f2(n) ).
Please be more easy to understand,thanks!
14. Let 1gn) be a sequence of non-negative real-valued continuous functions defined on a closed interval [a, b]. Suppose that for each a E [a, b g monotonically, i.e., gn(x)0 and gn(x) 2 gn+1x)2... for all n E N (1) Prove that for each n E N there exists zn E a, b] such that n m)Mngn(): E [a,b) (3 Marks) (2) By contradiction, show limn-**o M ( n 0. (10 Marks) (3) Does...
Define where S is the collection of all real valued sequences i.e. S = {x : N → R} and we denote xi for the ith element a the sequence x E S. Take for any x EL (i) Show that lic 12 (where recall 1-(x є s i Izel < oo)) (ii) Is l? Prove this or find a counterexample to show that these two sets do not coinside (iii) ls e c loc where recall looー(x є sl...
Suppose f, g are two functions mapping positive real numbers to positive real numbers and f = O(g). Prove why each statement is true or false. (a) log2 f = O(log2 g) (b) √f = O(f) (c) fk + 100fk−1 = O(gk), for k ≥ 1