MATH 302 Lecture 2

From Notes
Jump to navigation Jump to search

« previous | Wednesday, August 31, 2011 | next »


Binary insertion sort

Insertion sort using linear search requires comparisons (worst case)

Since the list is already sorted, we can use binary search to find where the element to be inserted should go. The function now becomes

Asymptotic Analysis


Domination (Big-O)

is "asymptotically similar to"

A function is dominated by another function if there exists positive constants such that every integer we have

The constants are called "witnesses" to the dominating function

We can say that is not dominated by if


General Theorem

A polynomial is dominated by its highest-degree term.

Given

Then


Example

Show

for ,

Reversed Point of View (Big-Ω)

There are positive constants so that for

Asymptotic Equivalence (Big-Θ)

" and are of the same order"


Example: Factorials