寻找递归关系
在我的课堂上,我们讨论了遵循斐波那契数列的兔子生活模型。兔子从一对婴儿开始,经过一年多的时间才成熟。成熟的兔子会生出一对新的小兔子。这导致兔子的总对数等于斐波那契数列。
我也在查看这个网站,它可能比我更好地解释这一点: LINK
在我链接的网站上,他们修改了模型,使兔子在两年后死亡,并提出了一个新的递归关系。我想知道是否有可能为这个问题找到一个以 k 为单位的递归关系,即兔子成年后(分娩)的寿命?
关于如何解决这个问题有什么想法吗?
In my class we talked about a model for rabbit life that followed the Fibonacci sequence. The rabbits would start as a pair of infants and mature over a year. The mature rabbits would give birth to a new pair of infant rabbits. This led to the overall total pairs of rabbits that equaled the Fibonacci sequence.
I was also looking at this website that might explain this better than I am: LINK
On the website I linked to they modify the model so that the rabbits die after 2 years and come up with a new recursive relation. I was wondering if it would be possible to find a recursive relation for this problem that was in terms of k, the number of years the rabbits live as adults (giving birth)?
Any ideas on how to go about this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我将尝试给你一个提示,但不给你答案。
现在,您已经有了正常的斐波那契关系 f(n) = f(n-1)+f(n-2),
但是对于兔子死亡的情况,您还必须减去一些东西。你必须减去死亡的兔子数量。
I'm going to try to give you a hint without giving you the answer.
now, you have your normal Fibonacci relation f(n) = f(n-1)+f(n-2)
but for the case where the rabbits die, you have to subtract something too. you have to subtract the number of rabbits that died.
以下是活了 10 年的兔子的数据(注意第 11 年,即婴儿死亡的第一年):
如您所见,死亡兔子的数量遵循斐波那契数列,偏移 10 年。当
n <>时,总数仍然是
(或 n <> k+1),唯一不是 Fn = Fn-1 + Fn-2 的时间是在第 11 年 (k+1),此时它是Fn = Fn-1 + Fn-2
。 11F11 = Fn-1 + Fn-2 - Fn-k
。我不知道如何将其形式化为一个方程。Here's data for rabbits living 10 years (note year 11 the first year infants die):
As you can see the number of dead rabbits follows the Fibonacci sequence, offset by 10 years. The total is still
Fn = Fn-1 + Fn-2
whenn <> 11
(or n <> k+1), the only time it is not Fn = Fn-1 + Fn-2 is during year 11 (k+1), at which point it isF11 = Fn-1 + Fn-2 - Fn-k
. I don't know how to formalize that into a single equation.我已经为此闲逛了几个星期,并针对兔子生活的任意年数 k 得出了以下结论:
我只能达到 k = 6,但它似乎有效,除非n = k。在这种特殊情况下,如果 F(0) = 1,则似乎可以工作。 k,该公式似乎有效(尽管正如我所说,此时 k <= 6)。
I've been fooling around with this for a few weeks and have come up with the following for an arbitrary number of years, k, that the rabbits live:
I'm only up to k = 6, but it seems to work except when n = k. In that particular case it seems to work if F(0) = 1. Once n > k, the formula seems to work (although as I said, for k <= 6 at this point).