简体   繁体   English

如何求解 T(n) = 2 * T(n/3) + 3/2 * T(n/4) + 5 * T(n/2) + Theta(n^2), p = 2 的递归,574359

[英]How to solve the recurrence of T(n) = 2 * T(n/3) + 3/2 * T(n/4) + 5 * T(n/2) + Theta(n^2), p = 2,574359

How to solve the recurrence of T(n) = 2 * T(n/3) + 3/2 * T(n/4) + 5 * T(n/2) + Theta(n^2), p = 2,574359 I don't understand how to solve so complex reccurrence.如何求解 T(n) = 2 * T(n/3) + 3/2 * T(n/4) + 5 * T(n/2) + Theta(n^2), p = 2 的递归,574359 我不明白如何解决如此复杂的复发。

You can find an upper-bound like the following:您可以找到如下所示的上限:

T(n) <= (2 + 3/2 + 5) * T(n/2) + Theta(n^2) = 8.5 T(n/2) + Theta(n^2)

And using master theorem, you can say T(n) = O(n^{log(8.5)) ~ O(n^{3.09}) .使用主定理,您可以说T(n) = O(n^{log(8.5)) ~ O(n^{3.09})

Also, you can use akra-bazzi theorem to find a tighter bound.此外,您可以使用akra-bazzi 定理找到更紧密的界限。 First, we need to solve the following equation首先,我们需要求解以下方程

2 * (1/3)^p + 3/2 (1/4)^p + 5 * (1/2)^p = 1

After solving, we know that p ~ 2.57 .求解后,我们知道p ~ 2.57 Hence, by the theorem we find that:因此,根据定理,我们发现:

T(n) = Theta(n^{2.57} (1 + int(x^2/x^{3.57} dx, 1, n) ) ) = 
       Theta(n^{2.57} (1 + int(1/x^{1.57} dx, 1, n) ) )

As int(1/x^{1.57} dx, 1, n) < 3 , we can say T(n) = Theta(n^{2.57}) .作为int(1/x^{1.57} dx, 1, n) < 3 ,我们可以说T(n) = Theta(n^{2.57})

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM