In my Algorithms class we're learning about recurrences, but I'm completely lost and have no idea what to do. I found this pdf from Bowdoin Solving Recurrences with the Iteration/Recursion-tree and it explains it a bit better but the examples provided don't include Big Oh. Two of the problems I have to solve are listed below. I would appreciate it if someone would be able to explain what to do in the case of Big Oh involving recurrences. Thank you
$$T(n) = 8T(n/4) + O(n)$$ $$T(n)=T(n−4)+O(n^2)$$
We can apply the following trick. Put $f(n)=T(n)-T(n/4)$. Then we have $f(n)=O(n)$ and (provided $n/4$ stands for $\lfloor n/4\rfloor$ or $\lceil n/4\rceil$, and $f$ is asymtotically positive) we can apply master method.
We have $a=8$, $b=4$, $\log_b a=3/2$, $f(n)=O(n^{3/2-\varepsilon})$ for $\varepsilon=1/2$. Thus $T\in \Theta(n^{3/2})$.
Slides were taken from a lecture “Solving Recurrences” of block course “Algorithms and Data Structures” (winter term 2014/15) By Prof. Dr. Alexander Wolff.
We have $T(n)-T(n-4)=O(n^2)$, thus there exists $c>0$ such that $T(n)\le cn^2$ for each $n\ge 1$. Pick $d\ge \tfrac 5{12}c$ such that $T(n)\le dn^3$ for all $n\le 4$ and prove by induction that $T(n)\le dn^3$ for all $n\ge 5$. For this it suffices to remark that $dn^3\ge d(n-4)^3+cn^2$.