For matrix multiplication with a simple divide-and-conquer algorithm: A. the running time is T(n) = Θ(n³) B. the running time is T(n) = Θ(n² log n) C. the recurrence is T(n) = 8T(n/2) + Θ(n²) D. the recurrence is T(n) = 8T(2n) + Θ(n² log n) E. one of the cases of the master theorem applies
Pick an option to check yourself, or open the answer below.
Show answer & explanation
Correct answer: A. A, C, E only
Explanation
Splitting into n/2 blocks needs 8 recursive multiplications plus Θ(n²) additions: T(n) = 8T(n/2) + Θ(n²). Since n^(log₂8) = n³ dominates n², master theorem case 1 gives Θ(n³).
More Data Structures and Algorithms questions
- Match List I with List II
- Match List I with List II
- What is the maximum value of items you can carry if maximum weight allowed is 25 with a fractional knapsack?
- If new item is added to the list, total items is 8 and capacity is 25 , then the best-case time of fractional knapsack for this case is ___…
- Which of the following statements is correct for a knapsack?
- How many different binary trees are possible with ' n ' nodes?