For matrix multiplication using the 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 Master theorem cases is applicable
Choose the most appropriate answer from the options given below:
Pick an option to check yourself, or open the answer below.
Show answer & explanation
Correct answer: A. A, C, E only
Explanation
Splitting into 8 half-size products plus Θ(n²) additions gives T(n) = 8T(n/2) + Θ(n²). Master theorem case 1 then gives Θ(n^log₂8) = Θ(n³).More Data Structures and Algorithms questions
- Match List I with List IIList I List II A. Linear Program I. Prim's Algorithm B. Predicate Logic II. In order C. Tree Traversal III. Simple…
- Match List I with List IIList I List II A. 8-Queens problem I. Divide and conquer B. Closest pair of points II. Dynamic Programming C. Stri…
- Arrange the following search and sort algorithms in ascending order of their worst-case complexities: A. Merge sort B. Linear search C. Bub…
- Find the optimal solution of the fractional knapsack problem when the maximum capacity is 15.
- What is the maximum value of the items you can carry if the maximum weight allowed is 25 (fractional knapsack)?
- If a new item (P = 5, W = 2) is added, giving 8 items, and the capacity is 25, then the time of fractional knapsack in this case is ______