Therefore, for simple branching programs, the length of time, the complexity the code, is what we would call constant.
因此,对于简单的分支程序,运行的时间长度,算法的复杂度,也就是我们说的常数。
Wow, OK, maybe not so wow, but this is now constant. This is constant time access. So I can do searching in constant time which is great.
喔,当然,可能没那么,但是现在是常数级了,这是常数时间的访问。
So, for example, if we're to hold the time constant, this makes it a lot simpler of an equation, because what we can end up doing is actually crossing out this whole term here.
比如说,如果我们把时间,定为常数,这使得方程,大大简化,因为我们可以把,这一项划掉。
And the mathematics of that equation involved a double derivative in time of x 0 plus some constant times x equals zero with some constraints on it.
那个数学方程式,包括了x对时间的二阶导数,加上常数乘以x等于,还有一些限制条件。
I have constant time access which is great, but I paid a price, which is I had to use up some space.
我的访问时间现在是常数级别,这个非常的棒,但是我也付出了代价,不得不使用更多的空间,在整数的例子中。
That is another way of saying that looking up this thing here is constant.
都是常数级的复杂度,另一种说法就是在这里查找时间是固定的。
Why? Because that's a constant access, right?
常数时间的访问,对么?要在内存中定位?
Where's the penalty? What did I trade off here?
所以我可以在常数时间内做查找,太棒了?
O So this is constant time, order one.
所以就是常数时间。
应用推荐