解决复发 [英] solving recurrence

查看:143
本文介绍了解决复发的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在给定T(1)=θ(1)的情况下,通过获得与T(N)绑定的θ来解决以下递归问题:
T(N)= N + T(N-3)

我已经解决了,我只是找不到模式.

步骤0)N + T(N-3)
步骤1)2N-3 + T(N-6)
step2)3N -9 + T(N-9)
step3)4N-18 + T(N-12)
step4)5N-30 + T(N-15)
步骤)6N-45 + T(N-18)....依此类推.我必须找到一个模式,该方程式适用于k的每个值.

解决方案

第二个数字1,3,9,18,30, 45是我找不到能满足要求的表达式的部分
首先是:
0、3、9、18、30、45 ...

现在,该系列是:差异正在增加3 ...

系列:0、3、9、18、30、45 ...
差异:3(3-0),6(9-3),9(18-9),12(30-18),15(45-30)....

我想,现在,这足以满足您获得这个系列方程式的需要. :)

更新:
在这里,您将找到解释我如何获得此信息的链接:我告诉过您的同一系列 [ ^ ]


olve the following recurrences by obtaining a θ bound for T(N) given that T(1) = θ(1):
T(N) = N + T(N-3)

I''ve done the solving i just can''t find the pattern.

step 0) N+ T(N-3)
step 1) 2N-3+T(N-6)
step2) 3N -9+T(N-9)
step3) 4N-18 +T(N-12)
step4) 5N-30 +T(N-15)
step) 6N-45+T(N-18) .... and so on. I have to find a pattern, an equation that works for every value for k.

解决方案

the second number 1,3,9,18,30,45 is the part where i can''t find an expression that satisfies it
First of all, it''s:
0, 3, 9, 18, 30, 45...

Now, the series is: Difference is increasing by amount 3...

Series: 0, 3, 9, 18, 30, 45...
Diff: 3(3-0), 6(9-3), 9(18-9), 12(30-18), 15(45-30)....

I guess, now, this should be enough for you, to get this series equation. :)

UPDATE:
Here you go, the link that will explain how I got that: same series that I told you[^]


这篇关于解决复发的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆