The reason this is so complicated is because of a mathematical principle called Factorials.
它之所以如此复,为阶乘这一数原理。
Instead of factorial time, it takes linear time.
它不阶乘时间, 而线性时间。
So the n minus k will become b minus a factorial.
所以 n 减去 k 将变成 b 减去一个阶乘。
If this was 7 over 7 minus 2 factorial we would have 7 times 6.
如果这 7 除 7 减 2 阶乘,们将有 7 乘以 6。
For those who remember from math class, that is seven factorial.
对于那些记得数课上的人来说,这七个阶乘。
So times lambda to the k k over k factorial.
所以乘以 lambda 到 k k 阶乘。
So you end up with 1 times lambda k over k factorial.
所以你最终得到 lambda k 的 1 倍于 k 的阶乘。
Divided by 2 factorial times e to the minus 9 power.
除以 2 阶乘 e 的负 9 次方。
And as you'll see it's actually 2 factorial ways that it can happen.
正如您将看到的,它实际上可以通过两种阶乘方式发生。
You may have heard that there is a function generalizing the factorial to real and even complex inputs, the gamma function.
您可能听说过有一个函数将阶乘推广到实数甚至复数输入,即伽马函数。
This video by Michael DiFranco about extending the factorial offers another great example of a lesson with good motivation along the way.
Michael DiFranco 制作的这段关于扩展阶乘的视频提供了另一个很好的例子,说明了一路上具有良好动机的课程。
If this had 3 we would do 3 factorial, and I'll show you how that can happen.
如果它有 3,们会做 3 个阶乘,会告诉你这如何发生的。
5 factorial is 5 times 4 times 3 times 2 times 1.
5阶乘5乘以4乘以3乘以2乘以1。
Once again, you'll have to know that 0 factorial is equal to 1.
再一次,你必须知道 0 的阶乘等于 1。
So k factorial could be written as k times k minus 1 factorial.
所以 k 阶乘可以写成 k 乘以 k 减 1 阶乘。
And here we can make a little bit of a simplification because what's k divided by k factorial?
在这里们可以稍微简化一下,为 k 除以 k 的阶乘多少?
And we just showed that this is equal to lambda to the kth power over k factorial times e to the minus lambda.
们刚刚证明这等于 lambda 的 k 次方乘以 e 的 k 阶乘乘以负 lambda。
So this could be rewritten as k times k minus 1 factorial.
所以这可以改写为 k 乘 k 减 1 阶乘。
So we could rewrite n factorial using the same trick up here.
所以们可以在这里使用相同的技巧重写 n 阶乘。
To account for that, you divide out by the extent to which you've overcounted, the number of permutations of four items which looks like four factorial.
为了解释这一点, 您可以除以多算的程度,即四个项目的排列数量, 看起来像四个阶乘。
关注我们的微信
下载手机客户端
划词翻译
详细解释