1. Find the theta notation of the following: a. 6n ³+ 12n ² + 1, for nà ¢ ¥1 b. 3n ²+ 2n log2 n, for nà ¢ ¥1 2. Find the theta notation for the number of times the statement x:=x + 1 is executed. a. for i:=1 to 2n do x=x+1 b. for i;=1 to 2n do for i;=1 to n do X:=x +1
The Answer to the Question
is below this banner.
Can't find a solution anywhere?
NEED A FAST ANSWER TO ANY QUESTION OR ASSIGNMENT?
Get the Answers Now!You will get a detailed answer to your question or assignment in the shortest time possible.
Here's the Solution to this Question
1.
Big-Theta(Θ) notation gives bound for a function f(n) to within a constant factor.
We write f(n) = Θ(g(n)), If there are positive constants n0 and c1 and c2 such that, to the right of n0 the f(n) always lies between c1g(n) and c2g(n) inclusive.
Θ(g(n)) = {f(n) : There exist positive constant c1, c2 and n0 such that 0 ≤ c1 g(n) ≤ f(n) ≤ c2 g(n), for all n ≥ n0
a.
6n ³+ 12n ² + 1
b.
3n ²+ 2n log2 n
2.
a.
b.