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.
比如说,如果我们把时间,定为常数,这使得方程,大大简化,因为我们可以把,这一项划掉。
Therefore, for simple branching programs, the length of time, the complexity the code, is what we would call constant.
因此,对于简单的分支程序,运行的时间长度,算法的复杂度,也就是我们说的常数。
It's constant pressure. OK, so now, last time you looked at the Joule expansion to teach you how to relate derivatives like du/dV.
这是恒压的,好,上节课你们,学习了焦耳定律,以及怎样进行导数间的变换。
Okay, so 1 is a viable answer in some contacts that needs constant time, the same amount of time no matter what.
在需要常量时间的情况下,答案是1,不管怎样,总时间是,相同的。
And in something like a consumer internet company like Facebook, that constant real time interaction and experimentation is something that the very best entrepreneurs do.
像脸谱网这样的,用户导向型的互联网公司,即时交流,不断试验,是企业家最佳的生财之道。
So the meaning of the constant is where was the object at the initial time.
常数的含义是,物体的初位移
Just as last time, we're going to assume that costs are constant marginal costs.
就像上次一样,我们将假设成本是固定的边际成本
Your mortgage payment is constant through time but the fraction of it that goes to paying off principal versus interest changes through time and it just changes as dictated by this formula.
抵押贷款每月还款是固定的,但是其中本金和利息的比例关系,会随时间而改变,这是由这个公式所决定的
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等于,还有一些限制条件。
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.
喔,当然,可能没那么,但是现在是常数级了,这是常数时间的访问。
I have constant time access which is great, but I paid a price, which is I had to use up some space.
我的访问时间现在是常数级别,这个非常的棒,但是我也付出了代价,不得不使用更多的空间,在整数的例子中。
All right? It's now something that I can search in constant time. And that's what's going to allow me to keep this thing as being log.
在固定的时间内搜索,这样就可以让时间复杂度保持在对数级,好的,考虑过了这些。
Remember we said we design lists so that the access, no matter where it was on the list was of constant time.
记住我们说过我们创建了,一个列表它就是这么访问的,无论它在列表的哪个位置。
That one's not so obvious. So let's think about this for a second. To sort a list in linear time, would say, I have to look at each element in the list at most a constant number of times.
所以让我们来思考一会,要在线性时间能排序,列表里每个元素最多被使用常数次,不一定是一次,对吧。
You can actually say big O of 1, big O of 1 being constant time, the same number of steps.
其复杂度为O,表示时间是一个常量,所用的步数是相同的。
Obviously-- and that's a bad way of saying it, I said constant the previous time-- in the linear case, it's subtract by certain amount.
这么描述很不准确,我之前在,线性算法中也说了常数,它是每次减少固定的量。
Dictionaries are implemented using a magic technique called hashing, which we'll look at a little bit later in the term, which allows us to retrieve keys in constant time.
散列法的内容,此方法可以让我们在线性,时间内检索到键,因此字典的大小并不重要了。
Typical characterization, not all the time, but typical characterization, is an algorithm that reduces the size of a problem by one, or by some constant amount each time, is typically an example of a linear algorithm.
我们学习过了线性算法,它的典型特征,不是通用的,但是比较典型的特征是,它是逐一减小问题的大小的,或者说是每次减小常数的大小。
It looks like a tautology because you're never able to show me something that moves forever at a constant velocity, because every time you don't find such a thing, I give an excuse, namely, a force is acting.
这听上去像个死循环,因为你不可能,找到永远匀速运动下去的物体,因为每当你找不到这样的物体时,我就会给出一个理由,也就是,有力作用在上面
So we're to assume we can get to any piece of data, any instruction in constant time, and the second assumption we're going to make is that the basic primitive steps take constant time, same amount of time to compute. Again, not completely true, but it's a good model, so arithmetic operations, comparisons, things of that sort, we're all going to assume are basically in that in that particular model.
因此如果我们假设在恒定的时间内,我们可以取得任何一块数据,任何一种数据结构的话,我们要做的第二个假设就是,基本的原始操作计算花费的时间是恒定的,这个假设也不是完全正确的,但这个模型其实挺不错的,因此算法操作,比较,这一类的事情,我们在这个特定的模型中都假设是基本的,操作,花费的时间是恒定相同的。
So this line or these lines of code up here are arguably constant time steps to say if N is less than 2 in return, that it will always take maybe one step, maybe two steps, some number of fixed CPU cycles.
如果N小于2并返回,那么这些行所对应的代码,通常只需要执行一步,或者两步,具体数字与CPU周期有关。
We'll assume that constant marginal cost just as it was last time is equal to C.
我们假设固定边际成本,像上次一样等于C
Or another way of saying it is, we're going to use as the basic steps, those operations that run in constant time, so arithmetic operations.
我们用可以在恒定时间内完成的操作,算法,比较,内存读取。
And as a consequence, access time in the list is constant, which is what I want.
这会占用一些额外的空间,回到问题本身,这么做的话,读取数组的时间就变成常量了。
O So this is constant time, order one.
所以就是常数时间。
n So the velocity is given by this product of the quantum number n Planck constant 2 pi mass of the electron time the radius of the orbit, which itself is a function of n.
速度是量子数,普朗克常数2π乘以轨道半径的值,它自身也是n的函数。
To get any location in memory, to get to any value of the list, I simply have to say which element do I want to get, I know that these things are stored in a particular size multiply that index by 4, add it to start, and then it's in a constant amount of time I can go to that location and get out the cell.
取得列表中的任何一个值,简单说来,想要取得列表中的任何元素,我知道这些元素存在特定的大小中,把下标乘以4,加到start上,然后定位到内存单元,并取出值就是固定的时间了,好的,如果元素以固定大小存储。
应用推荐