Big-Theta means, that growth is both big-O and big-Omega.
So first case in your question is Θ(n^4)
, not Θ(n^3)
since 5n^4/100000 + n^3/100
belongs to O(n^4)
and not O(n^3)
.
Second case:
Thus, it's Θ(1)
- because result is O(1)
and Ω(1)
: all members, except 20
(constant) will limit to zero when n
is growing.