Ok, this is more of a follow-up question: http://stackoverflow.com/questions/874982/how-to-compute-optimal-paths-for-traveling-salesman-bitonic-tour
First of all, for the bitonic tour of the traveling salesman problem I have the following recurrence relation:
(a) When i = 1 and j = 2, l(i; j) = dist(pi; pj )
(b) When i < j - 1; l(i; j)...
Consider this example :
T(n) = T(7n/8) + 2n
I assumed T(1) = 0
and tried to solve it in the following way
T(n) = T(7n/8) + 2n
= T(49n/64) + 2.(7n/8) + 2n
= T(343n/512) + 2.(7n/8).(7n/8)+ 2.(7n/8) + 2n
= T(1) + 2n ( (7n/8)^i + ..... + 1)
but I could not come to any conclusion about this. I am confu...
I need to derive the Big-O complexity of this expression:
c^n + n*(log(n))^2 + (10*n)^c
where c is a constant and n is a variable.
I'm pretty sure I understand how to derive the Big-O complexity of each term individually, I just don't know how the Big-O complexity changes when the terms are combined like this.
Ideas?
Any help wo...
I am currently enrolled in a programming class and we are covering recurrence relations. I was just wondering if, ever these actually get used on the job. If so, I'd love to hear some examples of when it is useful.
...
I have a sequence.
a1 = 1 - cos(x);
ai = a1 + (-1)^(i-1) * x^(2*i-2) / (2*i-2)!
I need to write this with and without recursion. But it has a different results.
Here is my code: http://codepaste.net/q213q6
...
Hello,
I'm solving some recurrence relation problems for Big O and so far up till this point have only encountered recurrence relations that involved this form:
T(n) = a*T(n/b) + f(n)
For the above, it's quite easy for me to find the Big O notation. But I was recently thrown a curve ball with the following equation:
T(n) = T(n-1) + ...
Hello,
I'm trying to find Big O of this recurrence relation:
T(n) = T(n-1) + n^c // where c is >=1
So I decided to solve this by using a recursion tree, which I have broken down as follows:
n^c -> (n-1)^c -> (n-2)^c -> ... -> (n-i)^c
I then formed the following sum:
from 0 to n-1:
(n-i)^c
Reducing this sum gives:
(n-(n-1))^c...
How to solve the recurrence relation:
T(n) = T(n - 1) + T(n / 2)+ n
by recursion tree to get an asymptotic upper bound?
The height is n, but how to generalize the sum at each levels?
...
T(n) = 2T(n/2) + 0(1)
T(n) = T(sqrt(n)) + 0(1)
first one I use substitution method for n, logn, etc, all gave me wrong answers.
Recurrence trees: I dont know if I can apply as the root will be a constant
Can some one help?
T
...