# Computer Science Department Ateneo de Naga University

Growth of Functions
Rey Vidallo

Computer Science Department Ateneo de Naga University

Background

Running time of algorithms is described by functions

Running time increases relative to the size of the input Asymptotic efficiency of algorithms

Asymptotically more efficient algorithms is best choice for all but very small input
http://science.slc.edu/~jmarshall/courses/2002/spring/cs50/BigO/index.html

Rey Vidallo

Computer Science Department Ateneo de Naga University

Asymptotic Notation

O(g(n)) = {f(n): there exist positive constants c and n0 such that 0 ≤ f(n) ≤ cg(n) for all n ≥ n0}.

Rey Vidallo

Computer Science Department Ateneo de Naga University

Asymptotic Notation

Ω(g(n)) = {f(n): there exist positive constants c and n0 such that 0 ≤ cg(n) ≤ f(n) for all n ≥ n0}.

Rey Vidallo

Computer Science Department Ateneo de Naga University

Asymptotic Notation

Θ(g(n)) = {f(n) : there exist positive constants c1, c2, and n0 such that 0 ≤ c1g(n) ≤ f(n) ≤ c2g(n) for all n ≥ n0}.

Rey Vidallo

Computer Science Department Ateneo de Naga University

Asymptotic Notation

o(g(n)) = {f(n) : for any positive constant c > 0, there exists a constant n0 > 0 such that 0 ≤ f(n) < cg(n) for all n ≥ n0}. ω(g(n)) = {f(n): for any positive constant c > 0, there exists a constant n0 > 0 such that 0 ≤ cg(n) < f(n) for all n ≥ n0}.

Rey Vidallo