寻找递归关系

发布于 2025-01-08 14:30:25 字数 350 浏览 1 评论 0原文

在我的课堂上,我们讨论了遵循斐波那契数列的兔子生活模型。兔子从一对婴儿开始,经过一年多的时间才成熟。成熟的兔子会生出一对新的小兔子。这导致兔子的总对数等于斐波那契数列。

我也在查看这个网站,它可能比我更好地解释这一点: 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

风蛊 2025-01-15 14:30:25

我将尝试给你一个提示,但不给你答案。

现在,您已经有了正常的斐波那契关系 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.

时光病人 2025-01-15 14:30:25

以下是活了 10 年的兔子的数据(注意第 11 年,即婴儿死亡的第一年):

Year    New     Mature  Dead    Total
1       1       0       0       1
2       0       1       0       1
3       1       1       0       2
4       1       2       0       3
5       2       3       0       5
6       3       5       0       8
7       5       8       0       13
8       8       13      0       21
9       13      21      0       34
10      21      34      0       55
11      34      55      1       88
12      55      89      1       143
13      89      144     2       231
14      144     233     3       374
15      233     377     5       605
16      377     610     8       979
17      610     987     13      1584
18      987     1597    21      2563
19      1597    2584    34      4147
20      2584    4181    55      6710
21      4181    6765    89      10857

如您所见,死亡兔子的数量遵循斐波那契数列,偏移 10 年。当n <>时,总数仍然是Fn = Fn-1 + Fn-2。 11(或 n <> k+1),唯一不是 Fn = Fn-1 + Fn-2 的时间是在第 11 年 (k+1),此时它是 F11 = Fn-1 + Fn-2 - Fn-k。我不知道如何将其形式化为一个方程。

Here's data for rabbits living 10 years (note year 11 the first year infants die):

Year    New     Mature  Dead    Total
1       1       0       0       1
2       0       1       0       1
3       1       1       0       2
4       1       2       0       3
5       2       3       0       5
6       3       5       0       8
7       5       8       0       13
8       8       13      0       21
9       13      21      0       34
10      21      34      0       55
11      34      55      1       88
12      55      89      1       143
13      89      144     2       231
14      144     233     3       374
15      233     377     5       605
16      377     610     8       979
17      610     987     13      1584
18      987     1597    21      2563
19      1597    2584    34      4147
20      2584    4181    55      6710
21      4181    6765    89      10857

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 when n <> 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 is F11 = Fn-1 + Fn-2 - Fn-k. I don't know how to formalize that into a single equation.

凶凌 2025-01-15 14:30:25

我已经为此闲逛了几个星期,并针对兔子生活的任意年数 k 得出了以下结论:

F(n) = F(n - 1) + F(n - 2) - F(n - (k + 1))

我只能达到 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:

F(n) = F(n - 1) + F(n - 2) - F(n - (k + 1))

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).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文