SUNY Geneseo Department of Computer Science


Asymptotic Notation

{Date}

CSci 141, Spring 2005
Prof. Doug Baldwin

Return to List of Lectures

Previous Lecture


Misc

Hand out Lab 7

First hour exam is this Friday (Mar. 4)

Questions?

Asymptotic Notation

Section 9.2

Some differences betweenn algorithms matter more than others

Fastest-growing term is most important -- e.g., n2 vs n vs constant

Asymptotic notation indicates rough proportionality

Initialization and ranking algorithms?

    for each index into A
        A[index] = value

[Ranks Associated with Each Element of an Array]

    for each index i in A
        countOfSmallerElements = 0
        for each index s in A
            if A[s] <= A[i]
                countOfSmallerElements = countOfSmallerElements + 1

What about looking for values and proving asymptotic equivalence?

[Graph and Point where 2n^2 Exceeds n^2+3n]

Next

Data structure and lists

Read Sections 11.1 and 11.2


Next Lecture