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.
为了解释这一点, 您可以除以多算程度,即四个项目排列量, 看起来像四个阶乘。
关注我们的微信
下载手机客户端
划词翻译
详细解释