Oh, Omega, Theta Flashcards

1
Q

When describing the asymptotic efficiency, what are we actually talking about?

A

The “growth of functions”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Why are we focusing on the asymptotic time?

A

To abstract away low-order terms and constant factors.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What does Oh, Omega and Theta asymptotically correspond to?

A
  • Oh - Less or equal
  • Omega - More or equal
  • Theta - Equal
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Give the bounding properties of Oh, Omega and Theta.

A
  • Oh - asymptotic upper bound
  • Omega - asymptotic lower bound
  • Theta - asymptotic tight bound
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the bounding property of Oh?

A

Upper bound

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is the bounding property of Omega?

A

Lower bound

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the bounding property of Theta?

A

Tight bound

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

With O(n^2), are these functions asymptotically upper bounded by n^2?

  1. 2n^2
  2. n^2 + n
  3. n^2.00001
  4. n^2 + 1000n
  5. n
  6. n^2 . lg(n)
  7. n/1000
  8. n^1.999999
  9. n^2 / lg(n)
A
  1. Yes
  2. Yes
  3. No
  4. Yes
  5. Yes
  6. No
  7. Yes
  8. Yes
  9. Yes
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

With Omega(n^2), are these functions asymptotically lower-bounded by n^2?

  1. n^1.99999
  2. 1/2 n^2
  3. n^2 / lg(n)
  4. n^2 + n
    5 n^2 - n
  5. n^3
  6. 2^2^n
  7. n^2 . lg(n)
A
  1. No
  2. Yes
  3. No
  4. Yes
  5. Yes
  6. Yes
  7. Yes
  8. Yes
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is the overall worst-case of Insertion Sort?

A

O(n^2) (also, Theta(n^2))

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Roughly, what are the four categories growth rates typically fall into?

A
  • Constant
  • Logarithmic
  • Polynomial
  • Exponential
How well did you know this?
1
Not at all
2
3
4
5
Perfectly