Now this is not the kind of stuff that computer scientists spend all their time doing, but it will germane.
现在,这并不是计算机科学家,要花费全部时间的地方,不过与此密切相关。
So it's this interesting scenario where it's probably hit or miss, certainly early on and as one of the clips they are indicated, these are the kinds of things where computers ideally have to learn overtime.
因此,这是一个有意思的事情,因为它有可能是投其所好或者不对其胃口,当然继续,正如其中一个短片所示,这些东西需要计算机,花一些时间去学习。
OK, in a few minutes we're going to start talking then about what is computation, how are we going to start building those tools, but that's what you should take away, that's what you're going to gain out of this course by the time you're done.
好啦,我们会花一点儿时间,谈谈什么是计算,我们如何去建造这些工具,但是这些是你应该,在离开这个课堂时,应该学会的事儿。
Just take the derivatives and that's the velocity vector.
直接计算对时间的导数就是速度矢量
The algorithm doesn't know that it's going to take this long to compute, it's just busy crunching away, trying to see if it can make it happen.
这很可能会发生,但是你知道的,算法本身并不知道,计算这个问题需要多长的时间,它就一直忙碌的算啊算。
As I said, what we want to do is, we want to count the number of basic steps it takes to compute a computation as a function of input size.
我刚才提到了,我们要建立,一个根据输入大小的方法来计算,一个计算过程需要的时间,建立这个方法需要几步呢?
For a couple of reasons. In some ways, this would be nicer, do expected cases, it's going to tell you on average how much you expect to take, but it tends to be hard to compute, because to compute that, you have to know a distribution on input.
关注最快的情况,在某种意义上来说,因为一些原因这样想挺不错的,当我们处理一个给定的问题,计算平均时间的时候,是很难计算的,因为你并不知道输入的分布情况,这些输入会是怎么样的呢?
How does this thing grow as I make the problem size big?
也就是说当问题规模变大的时候,算法计算的时间会怎样增长?
That is the whole triumph of calculus is to know that by looking at the position now, the position slightly later and taking the ratio and bringing later as close as possible to right now, we define a quantity that we can say is the velocity at this instant.
这就得靠微积分了,通过了解它现在的位置,和一小段时间以后的位置,计算它们的比,再让时间间隔尽可能缩短,我们就定义了一个,被我们称之为瞬时速度的物理量
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.
因此如果我们假设在恒定的时间内,我们可以取得任何一块数据,任何一种数据结构的话,我们要做的第二个假设就是,基本的原始操作计算花费的时间是恒定的,这个假设也不是完全正确的,但这个模型其实挺不错的,因此算法操作,比较,这一类的事情,我们在这个特定的模型中都假设是基本的,操作,花费的时间是恒定相同的。
应用推荐