Week 4: Complexity of Recursive Methods Flashcards

1
Q

Exponentials

A

a0 = 1
a1 = a
a-1 = 1/a
(am)n = amn
aman = am+n

for all n, a ≥ 1 the function an is monotonically increasing in n (always increasing or constant)

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

Logarithms

A

a = blogba

logc(ab) = logca + logcb

logba = logca/logcb

logb(1/a) = -logba

logba = 1/logab

alogbc = clogba

where log base ≠ 1

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

Factorials

A

n! = 1 x 2 x 3 …. n

weak upper bound n! ≤ nn

1 x 2 x 3 … n < n x n x n …

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

Stirling’s Approximation

A

n! = √2π (n/e)n(1 + Θ(1/n))

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

Sums

A

​a1 + a2 + … + an k=1 ∑nak

if n = 0, sum is 0​

lim n→∞ ​k=1 ∑nak

If the limit exists, the series converges, else it diverges​

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