Basics

Asymptotic Notation

Suppose we have two functions ff and ggwhich map positive integers to positive integers.

Name

Notation

Definition

"Big-O"

Less than or equal to

"Little-O"

Less than

"Big-Omega"

"Little-Omega"

Theta

Master Theorem

A general formula to solve recurrence relation.`Suppose we have a recurrence relation that resembles the following.

T(n)=aT(nb)+cndT(n) = aT\left(\frac{n}{b}\right) + cn^d

Then, we have Θ(nd)\Theta(n^d) if a<bda < b^d, θ(ndlog(n))\theta(n^d\log(n)) if a=bda = b^d, and Θ(nlogba)\Theta(n^{\log_ba}) for the final case.

Last updated

Was this helpful?