import DriveAsset from β../../../../components/DriveAsset.astroβ;
For functions f,g:NβR+:
- Big-O (Upper bound):
f(n)βO(g(n))βΊβc>0,n0ββN:βnβ₯n0β,f(n)β€cβ
g(n)
- Big-Ξ© (Lower bound):
f(n)βΞ©(g(n))βΊβc>0,n0ββN:βnβ₯n0β,f(n)β₯cβ
g(n)
- Big-Ξ (Tight bound):
f(n)βΞ(g(n))βΊf(n)βO(g(n))β§f(n)βΞ©(g(n))
For recurrences of the form T(n)=aT(n/b)+f(n) with aβ₯1,b>1:
Let ccritβ=logbβa.
- If f(n)=O(nc) where c<ccritβ, then:
T(n)=Ξ(nlogbβa)
- If f(n)=Ξ(nccritβlogkn) for kβ₯0, then:
T(n)=Ξ(nlogbβalogk+1n)
- If f(n)=Ξ©(nc) where c>ccritβ and regularity condition holds (af(n/b)β€kf(n) for k<1), then:
T(n)=Ξ(f(n))