Let f(n) = 5n^2. Prove that f(n) = O(n^3).
Let f(n) = 7n^2. Prove that f(n) = Ω(n).
Let f(n) = 3n. Prove that f(n) =ꙍ (√n).
Let f(n) = 3n+2. Prove that f(n) = Θ (n).
Let k > 0 and c > 0 be any positive constants. Prove that (n + k)c = O(nc).
Prove that lg(n!) = O(n lg n).
Let g(n) = log10(n). Prove that g(n) = Θ(lg n). (hint: ???? ? = ???? ?)???? ?
Use the mathematical induction to show that ∑? 2i = 2?+1 − 1.i=0
Use the mathematical induction to show that the solution for T (n) = T (⌊?⌋) + n2 is O(n2), note2
that T(0) = 0.
Use the master method to give a tight asymptotic bound for T (n) = 2T (n/4) + n.
let lg n denote log2 n.
1) f(n) = 5n^2
required to prove that f(n) = O(n^3)
let k(n) = a * n^3.
a can be any positive constant.
k = 10 *n^3.
let n be equal to 1
f(1) = 5 k(1) = 10
f(2) = 20 k(1) = 80
....
in any case the value of f(n)<=k(n).
so f(n) = O(n^3).
2)
Given f(n) = 7n^2.
Required f(n) = (n).
to prove we need to have
n <= c*f(n), here c is a positive constant
n <= c*7n^2
for n=0
0= 0.
for n=1
1 <= c*7
c >= 1/7
so by this we can say that for any value of c above 1/7 can make the statement f(n) = (n) true any one value of c is sufficient to prove the statement.
3)
Given f(n) = 3n.
required to prove f(n) = ()
we know that for every k <=
equality case comes only for k=1. So for a positive constant say c.
c.k <
here c >1.
so lets take it as 3
3.k <
3.n <
by this we can say that
f(n) = ().
4)
Given f(n) = 3n+2
and require to prove that f(n) = .
we require that c1.n < 3n+2 < c2.n (c1> 0, c2>0, n0>0 for all n>n0)
here c1 and c2 can be any positive integers.
any one value of c1 and c2 is enough to prove f(n) =
if c1 = 1
n < 3n+2
for n= 0
0 < 2
for n = 1
1 < 5
....
for all values of n it is true.
so c1 =1 can be considered.
3n+2 < c2.n
here we should not consider the case n = 0,because n>n0 and n0>0 (which is assumption).
let n = 1.
3(1)+2 < c2.1
5<c2.
c2>5.
for any value c2>5 the case is true. So let us say c2 = 6.
for the pair of c1= 1 and c2 = 6 the case is true so, we can say f(n) = .
5)
(n+k)c = O(nc) for k>0 and c>0
lets assume it as true
so
(n+k)c <= t *(nc)
here t is a positive number.
let n=1, k= 1, c=1
(1+1)1 <= t *(1)
2<= t
so it true for all t>=2.
if it is true for one case then the statement (n+k)c = O(nc) k>0, c>0 is considered true.
6)
Given log2(n!) = O(nlog2(n)).
for it to be true
log2(n!) <= c. (nlog2(n)).
log2(n!) <= c.(log2(n^n)).
let say c=1.
log2(n!) <= log2(n^n)
by removing log2 on both sides, we can see that
n! < = n^n
which is always true so the statement log2(n!) = O(nlog2(n)) is true.
7)
Given g(n) = log10(n).
g(n) = Θ(lg n).
this is true because
c1.log10(n) < log2(n) < c2.log10(n)
c1>0, c2>0, n>0.
log10(n^c1) < log2(n) < log10(n^c2)
here we need to find c1 and c2 values to prove the statement, which can be done by taking some examples.
8)
the question ∑? 2i = 2?+1 − 1.i=0 is quite ambiguous
9)
as the part details of T (⌊?⌋) is not mentioned properly.
considering it as,
t(n) = t(n) + n2
n2=0.
and t(n) = 0.
this is clearly t(n) = O(n2).
the answer is same even if ⌊?⌋ is considered as step function.
10)
according to master theorm
T(n) = Θ(n^log4(1)).
T(n) = Θ(n^0).
T(n) = Θ(1).
Let f(n) = 5n^2. Prove that f(n) = O(n^3). Let f(n) = 7n^2. Prove that f(n)...
For each of the following functions, indicate the class Θ(g(n)) the function belongs to. ( Use the simplest g(n) possible in your answers). Prove your assertions. a. ( n2 + 1)10 b. 2n+1 + 3n-1 c. [ log2 n ] d. 2n lg(n+2)2 + ( n+2)2 lg n/2 e. ( 10n2 + 7n + 3)1/2
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...
7n Use Mathematical Induction to prove that Σ 2-2n+1-2, for all n e N
Use the definition of Θ in order to show the following: a. 5n^3 + 2n^2 + 3n = Θ (n^3) b. sqroot (7n^2 + 2n − 8) = Θ( ?)
Use mathematical induction to prove that the statement is true for every positive integer n. 5n(n + 1) 5 + 10 + 15 +...+5n = 2
8. Use mathematical induction to prove that n + + 7n 15 3 5 is an integer for all integers n > 0.
1. Solve the recurrence relation T(n) = 2T(n/2) + n, T(1) = 1 and prove your result is correct by induction. What is the order of growth? 2. I will give you a shortcut for solving recurrence relations like the previous problem called the Master Theorem. Suppose T(n) = aT(n/b) + f(n) where f(n) = Θ(n d ) with d≥0. Then T(n) is: • Θ(n d ) if a < bd • Θ(n d lg n) if a = b...
Let n be a non-negative integer. Letf() be such that f(x), f'(x).f"(x).,fn+exist, and are continuous, on an interval containing a. In this assignment, you will prove by induction on n that for any r in that interval f'(c) f"(c) fm (c) (t) (x -t)" dt. 7n n! 1. (a) Explain why the claim given above is true for n-0 (b) Use the fact that the claim is true for n-0 to explain why the claim is true for n =...
1. For each of the following, prove using the definition of O): (a) 7n + log(n) = O(n) (b) n2 + 4n + 7 =0(na) (c) n! = ((n") (d) 21 = 0(221)
a) Prove that running time T(n)=n3+30n+1 is O(n3) [1 mark] b) Prove that running time T(n)=(n+30)(n+5) is O(n2) [1 mark] c) Count the number of primitive operation of algorithm unique1 on page 174 of textbook, give a big-Oh of this algorithm and prove it. [2 mark] d) Order the following function by asymptotic growth rate [2 mark] a. 4nlogn+2n b. 210 c. 3n+100logn d. n2+10n e. n3 f. nlogn