[英]Calculating the Recurrence Relation T(n)=T(n / [(log n)^2]) + Θ(1)
I tried to solve this problem many hours and I think the solution is O(log n/[log (log n)^2]).我试图解决这个问题很多小时,我认为解决方案是 O(log n/[log (log n)^2])。 but I'm not sure.Is this solution correct?但我不确定。这个解决方案正确吗?
Expand the equation:展开方程:
T(n) = (T(n/(log^2(n)*log(n/log^2(n))^2) + Theta(1)) Theta(1) =
T(n/(log^4(n) + 4 (loglog(n))^2 - 4log(n)loglog(n)) + 2 * Theta(1)
We know n/(log^4(n) + 4 (log(log(n)))^2 - 4log(n)log(log(n))
is greater than n/log^4(n)
asymptotically. As you can see, each time n
is divided by log^2(n)
. Hence, we can say if we compute the height of dividing n
by log^2(n)
up to reaching to 1, it will be a lower bound for T(n)
.我们知道n/(log^4(n) + 4 (log(log(n)))^2 - 4log(n)log(log(n))
n/log^4(n)
渐近地大于n/log^4(n)
。如你可以看到,每次n
除以log^2(n)
。因此,我们可以说如果我们计算n
除以log^2(n)
直到达到 1 的高度,它将是T(n)
。
Hence, the height of the expansion tree will be k
such that因此,扩展树的高度将为k
使得
n = (log^2(n))^k = lof^2k(n) => (take a log)
log(n) = 2k log(log(n)) => k = log(n)/(2 * log(log(n)))
Therefore, T(n) = Omega(log(n)/log(log(n)))
.因此, T(n) = Omega(log(n)/log(log(n)))
。
For the upper bound, as we know that n/(i-th statement) < n/log^i(n)
(instead of applying log^2(n)
, we've applied log(n)
), we can say the height of division of n
by log(n)
will be an upper bound for T(n)
.对于上限,我们知道n/(i-th statement) < n/log^i(n)
(我们应用log(n)
而不是应用log^2(n)
log(n)
),我们可以说n
除以log(n)
的高度将是T(n)
的上限。 Hence, as:因此,作为:
n = log^k(n) => log(n) = k log(log(n)) => k = log(n) / log(log(n))
we can say T(n) = O(log(n) / log(log(n)))
.我们可以说T(n) = O(log(n) / log(log(n)))
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.