問題詳情

54. Among the following items, when n ≤ 2, T(n) is a constant. When using the mastertheory to solve the following items, which item is WRONG?
(A) T(n) = 2T(n / 2) + n4= Θ(n4)
(B) T(n) = 16T(n / 4) + n2= Θ(n2)
(C) T(n) = T(7n / 10) + n = Θ(n)
(D) T(n) = 7T(n / 3) + n2= Θ(n2)

參考答案

答案:B
難度:計算中-1
書單:沒有書單,新增

用户評論

ametachu】評論

Practice Problems For each of the following recurrences, give an expression for the runtime T (n) if the recurrence can be solved with the Master Theorem. Otherwise, indicate that the Master Theorem does not apply. 1. T (n) = 3T (n/2) + n 22. T (n) = 4T (n/2) + n 2 3. T (n) = T (n/2) + 2n 4. T (n) = 2nT (n/2) + n n5. T (n) = 16T (n/4) + n 6. T (n) = 2T (n/2) + n log n參考資料: https://www.csd.uwo.ca/~mmorenom/CS433-CS9624/Resources/master.pdf