简体   繁体   English

解决复发T(n)= T(6n / 5)+ 1

[英]Solve recurrence T(n) = T(6n/5) + 1

So I'm preparing for the Algorithms exam and I don't know how to solve this recurrence T(n) = T(6n/5) + 1 since b = 5/6 < 1 and Master theorem cannot be applied. 因此,我正在为算法考试做准备,而且我不知道如何解决该递归T(n) = T(6n/5) + 1因为b = 5/6 < 1并且无法应用Master定理。 I hope that someone can give me a hint on how to solve this. 我希望有人能给我一些解决方法的提示。 :) :)

Given just that recurrence relation (and no additional information like T(x) = 1 when x > 100 ), an algorithm with time complexity as described by the relation will never terminate, as the amount of work increases at each call. 仅考虑该递归关系(并且当x > 100时没有其他信息,如T(x) = 1 ),该关系所描述的具有时间复杂性的算法将永远不会终止,因为每次调用的工作量都会增加。

T(n) = T(6n/5) + 1
     = T(36n/25) + 2
     = T(216n/125) + 3
     = ...

You can see that the amount of work increases each call, and that it's not going to have a limit as to how much it increases by. 您可以看到每个呼叫的工作量增加了,并且增加的数量没有限制。 As a result, there is no bound on the time complexity of the function. 结果,函数的时间复杂度不受限制


We can even (informally) argue that such an algorithm cannot exist - increasing the size of the input by 1.2 times each call requires at least 0.2n work, which is clearly O(n) - but the actual cost at each step is claimed to be 1 , O(1) , so it's impossible for an algorithm described by this exact recurrence to exist (but fine for algorithms with recurrence eg. T(n) = T(6n/5) + n ). 我们甚至可以(非正式地)争辩说这样的算法不存在-将输入大小增加1.2倍,每次调用至少需要0.2n工作,这显然是O(n) -但每一步的实际成本据称为1O(1) ,因此不可能存在由这种精确的递归描述的算法(但是对于具有递归的算法(例如T(n) = T(6n/5) + n )来说是很好的)。

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

相关问题 求解 T(n) = 3T(n/5) + T(n/2) + 2^n 的递归 - Solve the recurrence of T(n) = 3T(n/5) + T(n/2) + 2^n 如何求解递归关系 T(n)=T(n/3)+T(n/6)+1 - How to solve the recurrence relation T(n)=T(n/3)+T(n/6)+1 如何解决此递归关系:T(n)= 4 * T(sqrt(n))+ n - How to solve this recurrence relation: T(n) = 4*T(sqrt(n)) + n 如何解决递归T(n)= T(n-1)+…T(1)+1? - How to solve the recurrence T(n)=T(n-1) + … T(1) +1? 如何求解 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 如何解决此递归关系:T(n)= 2T(n / 2)+1 - How to solve this recurrence relation: T(n) = 2T(n/2) + 1 如何求解递推方程T(n)= T(n / 2)+ T(n / 4)+ \\ Theta(n)? - How to solve the recurrence equation T(n)=T(n/2)+T(n/4)+\Theta(n)? 如何解决递归T(n)= T(n / 2)+ T(n / 4),T(1)= 0,T(2)= 1是T(n)=Θ(n lgφ),哪里是黄金分割率? - How to solve the recurrence T(n) = T(n/2) + T(n/4), T(1) = 0, T(2) = 1 is T(n) = Θ(n lg φ ), where φ is the golden ratio? 如何解决此递归关系:T(n)= T(n-1)* T(n-2) - How to solve this recurrence relation: T(n) = T(n-1) * T(n-2) T(n)= T(n / 2)+ T(n / 4)使用迭代方法解决此重复 - T(n) = T(n/2) + T(n/4) solve this recurrence using iterative method
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM