I have solved a recurrence relation that has a running time of Θ(2^n), exponential
time.
How do I find Ω, and O for the same recurrence relation.
I guess if it is Θ(2^n), it should also be O(2^n), am I right?
How do I find the Ω, the lower bound?
I tried solving the recurrence relation:
T(n) = 2T(n-1) + C.
If it’s homework, you could try to draw it as a recursion tree, where nodes represent the complexity of operations required by the function calls.
EDIT: About the lower bound, The Omega is defined as a lower bound. If you have Theta (the exact behavior), you have also Omicron and Omega… they are just less precise.
So
SPOILER
If I remember correctly, this is how you interpret it…
you have a tree, at its root you have only
C(the work to marge the solutions), and you have to spit in two branches (again withCas work), the nodes get branchedntimesComplete solution
because the tree has a depth of
n, at the bottom you have2^nnodes all with complexity ofC, then you haven-1levels with the complexityC, 2C, 4C....(2(n-1)*C), they should sum up to2^n*cSo the final complexity should be
2*(2^n)*Cwhich istheta(2^n)