# Recent questions tagged asymptotic-notations 1
I didn't understand Big-O notation: This is CORMEN exercise problem - 3.1-2 Solution link: https://www.csee.umbc.edu/~nam1/TA/HWSols/hw1sol.pdf
2
Solve by using master's theorem
1 vote
3
which of the following estimates are true? Explain with valid reasons. a) (2n)! is theta (n)! b) log((2n)!) is theta (log(n)!)
1 vote
4
What is the time complexity of the below code? for($k=n^{10};k \geq 5;k=k^{\frac{1}{7}},k=k^2$) { $k=k^5;$ $k=k-10$ } My answer comes to be $O(log_{\frac{7}{10}}log_5(n^{10}))$ Please verify.
5
for(int i=0; i < n; i++) { for(int j=0; j < (2*i); j+=(i/2)) { cout<<"Hello Geeks"; } } is it o(nlogn)??
6
For the below code : foo() { for(i=1;i<=n;i++) { for(j=0;j<i;j++) { for(k=0;k<j;k++) c++; } } } Here k is executing j-1 times and j is executing i times and i is executing n^2 times , so first I am doing summation from k=0 to k=j-1 over k ... 1 to n^2 , I am getting order of n^8 .But this is getting too large , I checked with an example , it is not matching ,So please correct where I went wrong .
1 vote
7
Consider the following functions
8
n2 + O(n2) = Theta(n2) I am not getting how can we say that tightest bound is in terms of theta , because theta(n2 ) implicitly implies Big-Omega(n2 ) and Big O(n2 ) , Now If we say the function f(n) is Big-Omega(n2 ) , then f(n) can be any of the ... but on LHS , we will never get a function greater than n2 so how can we say the tightest bound to be Big-Omega(n2 ) ? Please explain briefly .
9
$T\left ( n,c \right )=\Theta \left ( n \right )$ for $c\leq 2$ $T\left ( c,n \right )=\Theta \left ( n \right )$ for $c\leq 2$ $T\left ( n,n \right )=\Theta \left ( n \right )+T\left ( n,\frac{n}{2} \right )$ How to find complexity for this recurrence relation?
1 vote
10
What will be the time complexity of the following algorithm ? A(n){ if(n<=1) return 1; for(i=1;i<n;i++){ for(j=0;j<3;j++){ A(n-1) } } }
11
Can Extended Masters theorem be applied to the following recursive equation ? $T(n)=n^{1/2}T(n^{1/2})+n$ I solved this using back substitution and the time complexity came out to be $O(n*(loglogn))$ I was wondering if this equation could be solved using masters theorem, like the way Tauhin Gangwar has solved here - https://gateoverflow.in/60532/find-tc-t-n-2t-n-1-2-1
12
Indicate for pair of expressions (A,B) whether A is O, o, Ω, ω or of B? A = lg(n!) B = lg(n^n)
1 vote
13
T(n)=T(n-1)+2n where T(1)=1 Solve recurrence relation
14
#DAA Prove that if: f(n) = amnm + am-1nm-1 + am-2nm-2 + am-3nm-3 + .........+ a1n + a0 then f(n) = O(nm) .
1 vote
15
Which of the following statements is/are valid? 1. Time Complexity of QuickSort is Θ(n^2) 2. Time Complexity of QuickSort is O(n^2) 3. For any two functions f(n) and g(n), we have f(n) = Θ(g(n)) if and only if f(n) = O(g(n)) and f(n) = Ω(g(n)). 4. Time complexity of all computer algorithms can be written as Ω(1)
16
17
Use a recursion tree to give an asymptotically tight solution to the recurrence T(n) =T(an)+T((1-a)n)+cn, where a is constant in the range 0<a<1 and c>0 is also a constant.
18
Big Omega question : 5n+3>=C2n for which value of c and n condition satisfies?
19
Compute: T(n) = 2^nT(n/2) +n^n 1)theta(n^n) 2)theta(nlogn) 3)theta(n^nlogn) 4)none of these.
20
21
What is the time complexity of this code?
22
When T(n) = a T(n/b) + f(n) If on solving we get g(n) as upper bound solution for the recurrence. Is f(n) = O( g(n) ) always correct?
1 vote
23
Find the solution of recurrence $T(n) = 4T(\frac{n}{2}) + n^{2}$ by substitution method.
24
Use the recursion tree to determine a good asymptotic upper bound on the recurrence T(n)=T(n-1)+T($\frac{n}{2}$)+n. Use substitution method to verify the answer.
1 vote
25
For a given constant c $\in \mathbb{R}$, we define the iterated function $f_{c}^{*}$ by $f_{c}^{*}$(n)=min{${i\geq 0: f^{(i)}(n)<c}$} For each of the following function f(n) and constants c, give as tight a bound as possible on $f_{c}^{*}$ f(n) c $f_{c}^{*}$(n) $\sqrt{n}$ 2 $\sqrt{n}$ 1 n/lg n 2
1 vote
26
Find theta bound for f(n)=$n^2/2 -n/2$
27
Given f(n) = ω(n2). Which of the following can never hold? a. f(n) = O (n3) b. f(n) = Ω (n2) c. f(n) = θ (n2) d. f(n) = ω (n)