🖨️ Printing Instructions: Press Ctrl/Cmd + P and select "Save as PDF".
1

Asymptotic Notations

Big-O, Omega, Theta

2

Learning Goals

3

Introduction & Motivation

4

How do we measure algorithm speed?

5

Counting Operations

6

Example: Linear Search

7

Input Size (n)

8

Big-O Notation ($O$)

9

The Intuition of Big-O

10

Formal Definition of Big-O

11

Visualizing Big-O

12

Interactive: Big-O Definition

13

Example 1: Linear Function

14

Example 2: Another Proof

15

Big-O Checklist

16

Why do we drop constants?

17

Common Misunderstanding

18

Big-Omega Notation ($\Omega$)

19

The Intuition of Big-Omega

20

Formal Definition of Big-Omega

21

Example: Big-Omega

22

Another Example

23

Big-Theta Notation ($\Theta$)

24

The Intuition of Big-Theta

25

Formal Definition of Big-Theta

26

Example: Quadratic

27

The Limit Method

28

Using Calculus Limits

29

Example: Limits

30

Example: Polynomials

31

L'Hopital's Rule

32

Common Dominance Hierarchy

33

The Hierarchy (Memorize This)

34

Interactive: Growth Rates

35

Exponential Growth

36

Properties of Asymptotic Notation

37

Transitivity

38

Additivity

39

Multiplication by Constant

40

Practice Problems

41

Problem 1

42

Problem 2

43

Stirling's Approximation

44

Problem 3

45

Problem 4

46

Little-o and Little-omega

47

Strict Bounds

48

Analogy with Real Numbers

49

Practical Importance

50

Space Complexity

51

Analyzing Code Structures

52

Nested Loops

53

Dependent Inner Loop

54

Consecutive Loops

55

Logarithmic Loops

56

Common Pitfalls & Anti-Patterns

57

Watch Out For...

58

Interactive Practice

59

Activity 1: Basic Polynomial

60

Solution 1

61

Activity 2: Big-Omega

62

Solution 2

63

Activity 3: Limits

64

Solution 3

65

Activity 4: Little-o

66

Solution 4

67

Activity 5: Exponential

68

Solution 5

69

Activity 6: Factorial

70

Solution 6

71

Supplementary Resources