看板 Grad-ProbAsk 關於我們 聯絡資訊
Suppose we have 4 algorithms designed to solve the same problem if the running time of the 4 algorithms are expressed by divide-and-conquar recurrence relations as given below ,then which algorithm would be asymptotically the best ? a) f(n) = 10f(n/3) + 10n b) f(n) = 5f(n/2) + 6n c) f(n) = 9f(n/3) + 2n^2 d) f(n) = 20f(n/5) +5n^2 10 a為θ(n^log3 ) 5 b為θ(n^log2 ) 我算d應該最好吧,解答為b!? c為θ(n^2*logn) 有人跟我看法一樣嗎...? d為θ(n^2 ) -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 122.124.202.33 ※ 編輯: gn00618777 來自: 122.124.202.33 (03/02 18:26)
jwcs:小黃解答是d,之前我也看到一份寫b的搞半天 03/02 18:31
gn00618777:一份解答可以幾乎都錯真不簡單... 03/02 18:45
luckysky1:log2 5不是2.多 還是我看錯了?? 03/02 19:57
luckysky1:我錯了~想成找大的 03/02 20:20