Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Recent questions tagged recurrence-relation
2
votes
2
answers
631
RECURRENCES 1
How to solve ? T(1) = 8, and for all n ≥ 2, T(n)=3T(n − 1) − 15. My Attempt: T(n)=3T(n − 1) - 15 (after one substitution) = 3(3T(n − 2) - 15) - 15 = 9T(n − 2) - 15 · 3 -15 (after two substitutions) = 9(3T(n − 3) - 15) - 15 · 3 - 15 = 27T(n − 3) - 15 · 9- 15 · 3 - 15 (after three substitutions). After this How to approach ?
How to solve ?T(1) = 8, and for all n ≥ 2, T(n)=3T(n − 1) − 15. My Attempt:T(n)=3T(n − 1) - 15 (after one substitution)= 3(3T(n − 2) - 15) - 15= 9T(n − 2) - 1...
Prasanna
1.8k
views
Prasanna
asked
Nov 25, 2015
Algorithms
recurrence-relation
algorithms
normal
+
–
1
votes
1
answer
632
Recurrence
How to build Recurrence relation for Time complexity double foo(int n) { int i; double sum; if(n == 0) { return 1.0; } else { sum = 0.0; for(i = 0; i < n; i++) { sum += foo(i); } return sum; } }
How to build Recurrence relation for Time complexity double foo(int n) { int i; double sum; if(n == 0) { return 1.0; } else { sum = 0.0; for(i = 0; i < n; i++) { sum += f...
tiger
564
views
tiger
asked
Nov 24, 2015
Algorithms
recurrence-relation
time-complexity
+
–
3
votes
1
answer
633
How to solve this recurrence relation?
Solve the equation: $a_n = 5a_{n/3} + 7, \;\; a_1 = 5$ Note: $a_0$ is not given.
Solve the equation: $$a_n = 5a_{n/3} + 7, \;\; a_1 = 5$$Note: $a_0$ is not given.
sampad
535
views
sampad
asked
Nov 23, 2015
Combinatory
recurrence-relation
+
–
1
votes
1
answer
634
Recurrence relation
Recurrence relation T(1)=1 T(n)=2T(n-1)+n n>=2 evaluates to .. Pls explain with detailed steps..
Recurrence relation T(1)=1 T(n)=2T(n-1)+n n>=2 evaluates to ..Pls explain with detailed steps..
Soumyashree
443
views
Soumyashree
asked
Nov 21, 2015
Algorithms
recurrence-relation
+
–
1
votes
1
answer
635
Recurrence relation
How to solve the Recurrence relation T(n)=T(n/4)+T(3n/4)+n
How to solve the Recurrence relation T(n)=T(n/4)+T(3n/4)+n
Soumyashree
455
views
Soumyashree
asked
Nov 21, 2015
Algorithms
algorithms
recurrence-relation
master-theorem
+
–
1
votes
1
answer
636
order of the algorithm
T(n) = T(n-1)+ 1/n if n>1 =1 otherwise The order of the algorithm is
T(n) = T(n-1)+ 1/n if n>1 =1 otherwiseThe order of the algorithm is
Soumyashree
469
views
Soumyashree
asked
Nov 21, 2015
Algorithms
recurrence-relation
+
–
1
votes
2
answers
637
Recurrence Relation
T(n) = T(n-1) + T(n-2) + c i want solve it using substitution method.. T(n) <= 2 T(n-1) + c is this a correct way ?? plz explain ... if its wrong then what is correct way
T(n) = T(n-1) + T(n-2) + c i want solve it using substitution method..T(n) <= 2 T(n-1) + c is this a correct way ??plz explain ...if its wrong then what is correct w...
tiger
905
views
tiger
asked
Nov 20, 2015
Algorithms
recurrence-relation
+
–
32
votes
4
answers
638
TIFR CSE 2014 | Part B | Question: 11
Consider the following recurrence relation: $T\left(n\right)= \begin{cases} T\left(\frac{n}{k}\right)+ T\left(\frac{3n}{4}\right)+ n & \text{if } n \geq 2 \\ 1& \text{if } n=1 \end{cases}$ Which of the following statements is FALSE? $T(n)$ is $O(n^{3/2})$ ... $k=4$. $T(n)$ is $O(n \log n)$ when $k=5$. $T(n)$ is $O(n)$ when $k=5$.
Consider the following recurrence relation:$T\left(n\right)=\begin{cases}T\left(\frac{n}{k}\right)+ T\left(\frac{3n}{4}\right)+ n & \text{if } n \geq 2 \\ 1& \text{if }...
makhdoom ghaya
5.6k
views
makhdoom ghaya
asked
Nov 20, 2015
Algorithms
tifr2014
algorithms
recurrence-relation
+
–
2
votes
0
answers
639
Find the recurrence
Payal Rastogi
352
views
Payal Rastogi
asked
Nov 15, 2015
Algorithms
recurrence-relation
algorithms
+
–
2
votes
2
answers
640
The Solution to the recurrence is :
Payal Rastogi
561
views
Payal Rastogi
asked
Nov 15, 2015
Algorithms
algorithms
recurrence-relation
test-series
+
–
17
votes
2
answers
641
TIFR CSE 2014 | Part A | Question: 3
The Fibonacci sequence is defined as follows: $F_{0} = 0, F_{1} = 1,$ and for all integers $n \geq 2, F_{n} = F_{n−1} + F_{n−2}$. Then which of the following statements is FALSE? $F_{n+2} = 1 + \sum ^{n}_{i=0} F_{i}$ ... $3$, for every integer $n \geq 0$. $F_{5n}$ is a multiple of $4$, for every integer $n \geq 0$.
The Fibonacci sequence is defined as follows: $F_{0} = 0, F_{1} = 1,$ and for all integers $n \geq 2, F_{n} = F_{n−1} + F_{n−2}$. Then which of the following statemen...
makhdoom ghaya
1.6k
views
makhdoom ghaya
asked
Nov 9, 2015
Combinatory
tifr2014
recurrence-relation
easy
+
–
2
votes
1
answer
642
Can these be solved by Master's theorem?
1) $T(n)=T(n/2)+2^n$ 2) $T(n)=2T(n/2)+n / \log n$ 3) $T(n)=16T(n/4)+n!$ 4) $T(n)= \sqrt 2T ( n/2 ) + \log n$
1) $T(n)=T(n/2)+2^n$2) $T(n)=2T(n/2)+n / \log n$3) $T(n)=16T(n/4)+n!$4) $T(n)= \sqrt 2T ( n/2 ) + \log n$
Himani Srivastava
3.8k
views
Himani Srivastava
asked
Nov 4, 2015
Algorithms
algorithms
recurrence-relation
master-theorem
+
–
7
votes
3
answers
643
T.C of T(n)=2T(n-1)+n,n >1 ,T(1)=1 ?
T.C of T(n)=2T(n-1)+n,n > 1 ,T(1)=1 ?
T.C of T(n)=2T(n-1)+n,n 1 ,T(1)=1 ?
admin
17.7k
views
admin
asked
Oct 8, 2015
Algorithms
recurrence-relation
+
–
4
votes
5
answers
644
The running time of an algorithm is given by T(n) = T(n-1) + T(n-2) - T(n-3) , if n>3
worst_engineer
18.3k
views
worst_engineer
asked
Oct 7, 2015
Algorithms
algorithms
time-complexity
recurrence-relation
test-series
+
–
3
votes
3
answers
645
What will be the time complexity of below code?
main(){ while(n>2) n=n/log(n); }
main(){ while(n>2) n=n/log(n); }
radha gogia
895
views
radha gogia
asked
Oct 6, 2015
Algorithms
recurrence-relation
time-complexity
+
–
3
votes
3
answers
646
How can one solve the following recurrence?
$T(n)\quad=\quad T(n-1)+T \left (\frac{n}{2} \right )+n$ $n \geq 1, \quad T(1)=1$
$$T(n)\quad=\quad T(n-1)+T \left (\frac{n}{2} \right )+n$$ $$n \geq 1, \quad T(1)=1$$
admin
927
views
admin
asked
Oct 6, 2015
Algorithms
recurrence-relation
time-complexity
+
–
1
votes
3
answers
647
What is the time complexity of the given recurrence relation ?
Consider the given recurrence relation , find the time complexity ? T(n)=2T(n-1)+T(n-2)+C, T(0)=T(1)=1
Consider the given recurrence relation , find the time complexity ?T(n)=2T(n-1)+T(n-2)+C, T(0)=T(1)=1
anonymous
1.4k
views
anonymous
asked
Sep 17, 2015
Algorithms
time-complexity
recurrence-relation
+
–
0
votes
3
answers
648
time complexity
Find time complexity int R(int n) { if(n<=1) return 1; else { int sum=0; for(int i=1;i<=n;i=i*2) for(j=1;j<=i;j=j*2){ sum=sum+i; sum=sum*R(n/2); } } return sum; }
Find time complexity int R(int n) { if(n<=1) return 1; else { int sum=0; for(int i=1;i<=n;i=i*2) for(j=1;j<=i;j=j*2){ sum=sum+i; sum=sum*R(n/2); } } return sum; }
Pooja Palod
2.3k
views
Pooja Palod
asked
Sep 12, 2015
Algorithms
time-complexity
recurrence-relation
+
–
1
votes
2
answers
649
T(n) = T(n/2) + n recurrence equation solution? T(1) = 1.
suppose you are given n bit integers asuming for common sense n as power of 2 .it is required to multiply them using divide and conquer method .what is the divide and conquer recurrence that would arise for the problem a) T(n)=4T(n/2)+c b) a) T(n)=2T(n/2)+n c) a) T(n)=4T(n/2)+n2 d) a) T(n)=4T(n)+n
suppose you are given n bit integers asuming for common sense n as power of 2 .it is required to multiply them using divide and conquer method .what is the divide and con...
अनुराग पाण्डेय
6.5k
views
अनुराग पाण्डेय
asked
Sep 7, 2015
Algorithms
algorithms
recurrence-relation
+
–
0
votes
2
answers
650
what is the divide and conquer recurrence that would arise for the problem
suppose you are given n bit integers asuming for common sense n as power of 2 .it is required to multiply them using divide and conquer method .what is the divide and conquer recurrence that would arise for the problem a) T(n)=4T(n/2)+c b) a) T(n)=2T(n/2)+n c) a) T(n)=4T(n/2)+n2 d) a) T(n)=4T(n)+n
suppose you are given n bit integers asuming for common sense n as power of 2 .it is required to multiply them using divide and conquer method .what is the divide and con...
ajit
825
views
ajit
asked
Sep 7, 2015
Algorithms
algorithms
divide-and-conquer
recurrence-relation
+
–
0
votes
1
answer
651
The number of leaf nodes in the recurrence tree of the recurence T(n) = T(n/4) + T(n/2) + n^2
The number of leaf nodes in the recurrence tree of the recurence T(n) = T(n/4) + T(n/2) + n^2
The number of leaf nodes in the recurrence tree of the recurenceT(n) = T(n/4) + T(n/2) + n^2
Saurav
1.0k
views
Saurav
asked
Aug 31, 2015
Algorithms
algorithms
recurrence-relation
+
–
2
votes
3
answers
652
Can masters theorem solve the recurrence 4T(n/2) + (n^2).logn ?
Can masters theorem solve the recurrence 4T(n/2) + n2.logn ? it is said that it falls between the case 2 & 3 and no solution possible with this method .can anyone explain it clearly ?
Can masters theorem solve the recurrence 4T(n/2) + n2.logn ? it is said that it falls between the case 2 & 3 and no solution possible with this method .can anyone explai...
RRajeev
21.5k
views
RRajeev
asked
Jul 29, 2015
Algorithms
algorithms
recurrence-relation
+
–
2
votes
2
answers
653
What does fun2() do in general in the below recursive code ?
int fun(int x, int y) { if (y == 0) return 0; return (x + fun(x, y-1)); } int fun2(int a, int b) { if (b == 0) return 1; return fun(a, fun2(a, b-1)); }
int fun(int x, int y) { if (y == 0) return 0; return (x + fun(x, y-1)); } int fun2(int a, int b) { if (b == 0) return 1; return fun(a, fun2(a, b-1)); }
radha gogia
4.9k
views
radha gogia
asked
Jul 24, 2015
Algorithms
algorithms
recurrence-relation
+
–
1
votes
1
answer
654
Solve the recurrence
T(n) = T(n - 1) + 1/n a) O(1) b) O(n) c) O(log n) d) O(log log n)
T(n) = T(n - 1) + 1/na) O(1)b) O(n)c) O(log n)d) O(log log n)
Saurabh Sharma
656
views
Saurabh Sharma
asked
Jul 20, 2015
Algorithms
algorithms
recurrence-relation
+
–
0
votes
2
answers
655
When do floors and ceilings matter while solving recurrences?
every time while finding recurence solution (in CLRS book , page 88) a statement "Floors and ceilings usually do not matter when solving recurrences" but my doubt is when they matter ?
every time while finding recurence solution (in CLRS book , page 88) a statement "Floors and ceilings usually do not matter when solving recurrences" but my doubt is whe...
rajsh3kar
864
views
rajsh3kar
asked
Jun 15, 2015
Algorithms
algorithms
recurrence-relation
+
–
14
votes
5
answers
656
How to find the complexity of T(n)=T(sqrt(n)) + 1 ?
Please tell me the complete steps how to solve this problem. $ T(n) = T ( \sqrt n )+ 1$
Please tell me the complete steps how to solve this problem.$ T(n) = T ( \sqrt n )+ 1$
Jonathan Decosta
47.2k
views
Jonathan Decosta
asked
Jun 10, 2015
Algorithms
algorithms
recurrence-relation
+
–
0
votes
1
answer
657
Time complexity
T(n+1)=T(n)+ceil[√(n+1)] , n>1 =1,n=1
T(n+1)=T(n)+ceil[√(n+1)] , n>1 =1,n=1
supraja
407
views
supraja
asked
Apr 20, 2015
Algorithms
recurrence-relation
+
–
0
votes
1
answer
658
Recurrence
T(n)=√nT(√n)+√n , n>2 =2 ,n=2
T(n)=√nT(√n)+√n , n>2 =2 ,n=2
supraja
318
views
supraja
asked
Apr 20, 2015
Algorithms
algorithms
recurrence-relation
+
–
1
votes
1
answer
659
common data Linked quetion :- 1) which of the following is correct recurrence formula of I(j) 2)how to evaluate this R.R
At the end of it's 5th Successful season,The siruseri Permier league is planning to give an award to most improved bowler over 5 years . For this an important Index will ...
kalpish
1.1k
views
kalpish
asked
Apr 8, 2015
Algorithms
algorithms
dynamic-programming
recurrence-relation
+
–
60
votes
5
answers
660
GATE CSE 2015 Set 3 | Question: 39
Consider the following recursive C function. void get(int n) { if (n<1) return; get (n-1); get (n-3); printf("%d", n); } If $get(6)$ function is being called in $main()$ then how many times will the $get()$ function be invoked before returning to the $main()$? $15$ $25$ $35$ $45$
Consider the following recursive C function.void get(int n) { if (n<1) return; get (n-1); get (n-3); printf("%d", n); }If $get(6)$ function is being called in $main()$ th...
go_editor
18.1k
views
go_editor
asked
Feb 15, 2015
Algorithms
gatecse-2015-set3
algorithms
recurrence-relation
normal
+
–
Page:
« prev
1
...
17
18
19
20
21
22
23
24
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register