Divide-and-Conquer algorithms Flashcards
1
Q
Each node in Recursion tree
A
Each node is labeled with the size of the problem being solved.
2
Q
Each level is labeled in Recursion tree
A
Each level is labeled with the number of steps (excluding recursive calls).
3
Q
Total running time of the algorithm in Recursion tree
A
Total running time of the algorithm is the sum of all the steps in each level.
4
Q
Master Theorem if a = b^c
A
T(n) = O(n^clogn)
5
Q
Master Theorem if a < b^c
A
T(n) = O(n^c)
6
Q
Master Theorem if a > b^c
A
T(n) = O(n^logba)
7
Q
Divide and Conquer Technique
A
○ Break input into roughly equal halves (Divide).
○ Solve the problem in each of the halves (Conquer).
○ Put together solution to the whole problem (Combine).
8
Q
A