Asymptotic notation

Ace your homework & exams now with Quizwiz!

Goal in designing programs

1. It returns the correct answer on all legal inputs. 2. It performs the computation effectively.

Input time depends on:

1. Speed of computer 2. Specifics of Python implementation 3. Value of input

What does 'asymptotic' means

The term asymptotic means approaching a value or curve arbitrarily closely (i.e., as some sort of limit is taken). A line or curve that is asymptotic to given curve is called the asymptote of .

Order of growth

Unit defining the most important factor in an operation. Usually using the big O notation.

Use of Big Omega (Ω) notation

We use big-O notation for asymptotic lower bounds.

Use of Big O notation

We use big-O notation for asymptotic upper bounds. Big O is taking the leading element in order of magnitude and abstracts the rest of the elements (low order terms) as being a constant factor as x is getting close to infinity (x → ∞). So if we have the complexity n^5+n^2+2. We'll have n^5 with an abstract constant c (c*n^5).

Use of Big Theta (Θ) notation

We use big-Thetais the tight bound . Theta requires both Big O and Omega, so that's why it's referred to as a tight bound (it must be both the upper and lower bound).

Rules for Big O

a) drop lower order terms b) drop constant multiplier

Order of growth

constant < logarithmic < linear < polynomial < exponential


Related study sets

Unit 5: Interest and Dividend Income

View Set

WordPress Multiple Choice Practice

View Set

SDSU BA370 CH 18 GAFFEN PRACTICE

View Set

AMERICAN POPULAR MUSIC FINAL - compilation of quizzes 1-4

View Set

Week 1 - Chapter 27: Safety, Security, and Emergency Preparedness

View Set

Chapter 19 Program Design and Technique for Speed and Agility Training

View Set