简体   繁体   English

解决递归问题T(n)= 4T(n / 4)+ 3log n

[英]Problems Solving Recurrence T(n) = 4T(n/4) + 3log n

I'm really getting frustrated about solving the Recurrence above. 我对于解决上述重复问题真的感到沮丧。 I was trying to solve it by using the Master Method, but I just didn't get it done... 我试图通过使用主方法来解决它,但是我只是没有完成它...

I'm having a recursive algorithm that takes 3log n times (three binary searches) to identify four sub-problems, each with with a size of n/4, and then solves them individually until n is smaller than some constant given by input. 我有一个递归算法,它需要3log n次(三个二进制搜索)来识别四个子问题,每个子问题的大小为n / 4,然后分别求解它们,直到n小于输入给出的某个常数。 So I got this recurrence as a result: 因此,我得到了这种复发:

T(n) = 4*T(n/4) + 3*log(n)

Base-Case if n < c (c = some constant given by program input):

T(n) = 1

I'm trying to find the asymptotic running time of my recursive program, and wanted to solve it by using the master theorem. 我试图找到递归程序的渐近运行时间,并想通过使用主定理来解决它。 Can anybody tell me if it's possible to use the master theorem with this recurrence, and if yes, which case of the master theorem is it? 有人可以告诉我是否可以在这种情况下使用主定理;如果可以,请问是哪种情况?

All help is appreciated, thanks. 感谢所有帮助,谢谢。

T(n) = O(n) , because a logarithm of 4 base 4 is 1 and 3 * log(n) is O(n ^ 0.5) (0.5 < 1). T(n) = O(n) ,因为4以4为底的对数为1并且3 * log(n)为O(n ^ 0.5) (0.5 <1)。 It corresponds to the first case of the Master theorem as described here . 它对应于此处所述的Master定理的第一种情况。

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

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