Ch3: Growth of Functions Flashcards

1
Q

Asymptotic efficiency of an algorithm

A

How the running time of the algorithm increases as the size of the input increases without bound

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

Asymptotic notation actually applies to…

A

mathematical functions (e.g. f(n) = an^2 + bn + c)

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

Asymptotic notation usually applies to…

A

functions that characterize the running times of algorithms

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

Asymptotic notation can also be applied to…

A

functions that characterize the space used by an algorithm (or any other function having nothing to do with algorithms!)

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

A function f(n) belongs to Big-Theta(g(n)) if…

A

…there exist positive constants c1 and c2 such that it can be sandwiched between c1*g(n) and c2*g(n) for sufficiently large n

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

This means…?

A

f(n) is equal to g(n) within a constant factor

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

If f(n) = Big-Theta(g(n)), g(n) is a…

A

asymptotically tight bound for f(n)

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

If f(n) = Big-O(g(n)), g(n) is a…

A

asymptotic upper bound for f(n)

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

This means…?

A

g(n) is an upper bound on f(n) to within a constant factor

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

Big-Theta implies

A

Big-O and Big-Omega

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

When we use Big-O on the worst-case running time, we have…

A

a bound on the running time of the algorithm on every input

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

If f(n) = Big-Omega(g(n)), g(n) is a…

A

asymptotic lower bound for f(n)

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

When we say the running time of an algorithm is Big-Omega(g(n)), we are…

A

giving a lower bound on the best-case running time of an algorithm

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

When asymptotic notation appears in a formula, in general we interpret it as…

A

standing for some anonymous function we don’t care to name (e.g. 2n^2 + O(n))

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

Asymptotically tight (definition)

A

Big-Theta is the definition of an asymptotically tight bound

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

Asymptotically tight (intuition)

A

Asymptotically tight is analogous to saying “is equal to”. Or like =, >=, and <= versus a strict > or

17
Q

Which bounds are asymptotically tight?

A

Big-O, Big-Omega, Big-Theta. Only Big-Theta is purely asymptotically tight, while the others can be asymptotically tight upper and lower bounds.

18
Q

Big-O and Big-Omega can be asymptotically tight because…

A

they are bounds that can be equal to f(n) within a constant factor

19
Q

Little-o and Little-omega are not asymptotically tight because…

A

They cannot be equal to f(n) within a constant factor (like > and

20
Q

Little-o means…

A

The o() function grows much faster as n increases to infinity (Little-o is an > upper bound)

21
Q

Little-omega means…

A

The omega() function becomes insignificant as n increases to infinity (Little-omega is a < lower bound)

22
Q

f(n) = o(g(n)) implies

A

lim f/g = 0 (as n increases to infinity)

23
Q

f(n) = omega(g(n)) implies

A

lim f/g = infinity (as n increases to infinity)

24
Q

Are all functions asymptotically comparable?

A

No, some functions have a limit that is undefined (vertical asymptotes, oscillation, etc.)

25
Q

lg(f) = o(lg(g)) implies what about f and g?

A

f = o(g)

26
Q

f = o(g) implies what about lg() of both?

A

Nothing!

27
Q

Definition of Big-Theta(g(n))

A
28
Q

Definition of Big-O(g(n))

A
29
Q

Definition of Big-Omega(g(n))

A
30
Q

Definition of Little-o(g(n))

A
31
Q

Definition of Little-omega(g(n))

A