Exam Questions Flashcards

1
Q

What is the logarithm change of base trick?

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

What is the logarithm change of exponential base trick?

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

What is the Geometric series?

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

What are the steps the recursion tree method?

A
  1. Draw the tree
  2. Calculate the work per level, continue until level k
  3. Find the number of levels: Find for which k you only have one element left (thus just n/(b^k) = 1)
  4. Sum work: So just sum from 0 until what you found in step 3
  5. Bound this sum
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How do you find the number of levels in the recursion tree method?

A

You have a formula by which n decreases per layer. I.e.
n/(b^k). Equate this to one, and solve.

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

What is the Master theorem if a = b^d?

A

O(n^d log_2 n)

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

What is the Master theorem if a < b^d?

A

O(n^d)

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

What is the Master theorem if a > b^d?

A

O(n^(log_b a))

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

How to use the substitution method if T(n) = [..]T(n-a)[..]?

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

What are the inductive steps when proving a looping/recurring algorithm?

A
  1. Loop/Recurring invariant
  2. Initialization
  3. Maintenance
  4. Termination
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How to prove the correctness of an algorithm?

A

By induction, but they do not really ask for high quality proofs.

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