Recent questions tagged recurrence-relation

0 0 votes
0 0 answers
87
87 views
Q.${Solve}$ ${Recurrence}$.$T(n) = T\left(\frac{n}{15}\right) + T\left(\frac{n}{10}\right) + 2T\left(\frac{n}{6}\right) + \sqrt{n}$ 
3 3 votes
1 1 answer
301
301 views
Which of the following is correct solution of the given recurrence relation? $T(n)=3 T(n / 4)+n \log n$$\theta(n \log n)$$\theta\left(n^{2} \log n\right)$$\theta\left(n(\...
4 4 votes
2 2 answers
1.1k
1.1k views
Consider that the quick sort algorithm is used to sort an array of $n$ distinct randomly ordered elements. In every call, the pivot is chosen as the first element of the ...
15 15 votes
6 6 answers
2.4k
2.4k views
Which of the following can be recurrence relation(s) corresponding to an algorithm with time complexity $\Theta(n)$?$T(n)=T(n-1)+1, \quad T(1)=1$$T(n)=2 T\left(\frac{n}{2...
5 5 votes
2 2 answers
564
564 views
Consider the following:For all $n>1$$$\begin{aligned}& T_1(n)=4 T_1(n / 2)+T_2(n) \\\\& T_2(n)=5 T_2(n / 4)+\theta\left(\log _2 n\right)\end{aligned}$$Assume that for all...
4 4 votes
3 3 answers
464
464 views
0 0 votes
1 1 answer
349
349 views
A recurrence arises in the problem: Number of ways to tile a 3×n rectangle with 2×1 dominoes (dominoes can be placed vertically or horizontally). Let T(n)​ be this number...
5 5 votes
4 4 answers
1.2k
1.2k views
Consider the following recurrence relation describing the running time of an algorithm: $$T(n) = 2T\left(\frac{n}{2}\right) + \frac{n}{\log n}$$$$(Base\ condition: T(1) =...
0 0 votes
1 1 answer
357
357 views
What will be the time complexity of T(n)= 3T(n-1) +n a)Theta (3^n) or b)Theta (n*3^n)
0 0 votes
1 1 answer
317
317 views
How to check if f(n) is polynomially greater than g(n)?
1 1 vote
1 1 answer
501
501 views
The tight asymptotic bound for the recurrence $T(n)=2 T(n / 4)+\sqrt{n}$ is$\Theta(\sqrt{n})$$\Theta(n \log n)$$\Theta(\sqrt{n} \log n)$$\Theta(n \log \sqrt{n})$
1 1 vote
2 2 answers
413
413 views
Which of the following is the solution of the following recurrence relation $\mathrm{T}( \mathrm{n})=\mathrm{T}(2 \mathrm{n} / 3)+1$?$\theta\left(n^{2}\right)$$\theta\lef...
0 0 votes
1 1 answer
389
389 views
Consider the function in $C$ code:Cal(a,b) { if (b!=1) { if (a!=1) { printf("*"); Cal(a/2, b); } else { b=b-1; Cal(10,b); } }}How many times $*$ is going to be printed, i...
1 1 vote
1 1 answer
413
413 views
Arrange the following recurrence relations in increasing order of their time capacity.$\mathrm{T}(\mathrm{n})=\mathrm{T}(\mathrm{n} / 2)+1$$\mathrm{T}(\mathrm{n})=2 \math...
0 0 votes
1 1 answer
407
407 views
Match List - I with List - II.$\begin{array}{llll} & \textbf{List - I} & & \textbf{List-II} \\ & \textbf{(Recurrence Relations)} && \textbf{(Complexity)} \\ \text{(A)}& \...
1 1 vote
2 2 answers
327
327 views
Let $S = \sum_{n\geq1} \dfrac{1}{n^2}$ and $A = \sum_{n\geq1}(-1)^{n+1}\dfrac{1}{n^2}$. Then which of the following statements is true?$S$ converges but $A$ does not conv...
3 3 votes
2 2 answers
352
352 views
Consider the following recurrence: $A_n$ is the sum of $A_{n-1}$ and a number chosen uniformly at random from {$1,...,n$}, starting from $A_0 :=1$. What is the expected v...
1 1 vote
1 1 answer
241
241 views
Starting with $x_0 = 0$, suppose you do the following:, at the $n^{th}$ stepyou flip a fair coin: if it is heads then $x_n := x_{n-1} + 1$ and if it is tails then $x_n :=...
3 3 votes
1 1 answer
323
323 views
Consider the rational number $a_n$ defined recursively as $a_n$ = $\dfrac{1}{1 + a_{n-1}}$, where $a_0 := 0$. Let $F_n$ denote the $n^{th}$ fibonacci number, where $F_0 :...
42 42 votes
15 15 answers
18.2k
18.2k views
Consider the following recurrence relation:$$ T(n)=2 T(n-1)+n 2^{n} \text { for } n>0, \quad T(0)=1$$Which ONE of the following options is CORRECT?$T(n)=\Theta\left(n^{2}...
3 3 votes
1 answers 1 answer
964
964 views
$T(n)= 2T(n-1)+n*2^n$ ; $T(0)=1$