• It will probably quit at some point because of space issues, unless I'm writing an algorithm that is using no additional space.

    其中一个的时候,它会一直运行下去,它可能在某一处因为空间问题退出,除非我写了一个。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • and we like log algorithms, because they're really fast. A typical characteristic of a log algorithm is a pro-- or sorry, an algorithm where it reduces the size of the problem by a constant factor.

    并且我们也很喜欢对数算法,因为它很快,对数算法的典型特性是高速,哦,抱歉,是他能以常数因子的速度,降低问题的大小,很明显。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • And so one of the things we'll look at today is how can we leverage an algorithm, how can we implement an algorithm that at least at first glance the second time we've now seen it feels so obviously better.

    因此,今天我们要学习的一点就是,我们怎样才能影响一个算法,怎样实现一个算法,使你在第二次看它时会觉得,至少比你第一次看到它时更好。

    哈佛公开课 - 计算机科学课程节选

  • And we can just extrapolate in a straight line We before saw some examples where I had an algorithm to generate points, and we fit a curve to it, used the curve to predict future points and discovered it was nowhere close.

    我们可以干脆用一条直线来描述它,我们之前看到在一些例子中,我用一个算法去生成一些点,然后用一条曲线对它进行拟合,然后用这条曲线来预测未来的点,最后却发现结果完全不对。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • PROFESSOR: Great question. So the question is, how do you choose an algorithm, why would I choose to use a pseudo-polynomial algorithm when I don't know how big the solution is likely to be, I think that's one way to think about it.

    教授:问得好,所以问题是,你怎样选择算法,为什么当我,不知道解决方案会有多大的时候,我要选伪多项式算法呢,我想这是一种思考问题的方式。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • So he's packing and unpacking, packing and unpacking, trying all possible combinations of objects that will obey the constraint. And then choosing the winner. Well, this is like an algorithm we've seen before. It's not greedy.

    因此它不断装包和清包,尝试了所有满足约束条件的物品组合,最后选择最优者,这很像我们以前看过的一个算法,这不是贪婪算法。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • And so ease of implementation is actually a very compelling -- metric against which to measure-- -- do you mind toning my voice down a bit-- is a very reasonable measure against which to measure the quality of an algorithm, right.

    如此简单的实现实际上是一个很牵强的,度量,与之相对的衡量是-,如果你们不介意,我降低点音量-,是一种用来度量算法质量的,合理的方法。

    哈佛公开课 - 计算机科学课程节选

  • Well, you need an algorithm for sorting.

    你需要一种排序算法。

    哈佛公开课 - 计算机科学课程节选

  • 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.

    我们学习过了线性算法,它的典型特征,不是通用的,但是比较典型的特征是,它是逐一减小问题的大小的,或者说是每次减小常数的大小。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • So the running time of the problem where the input is T of size N as expressed here formulaically, T of N, the running time of an algorithm, given an input of size N. You know what?

    因此一个输入为N的问题的运行时间,在这儿的公式表示为,如果输入为N,那么此算法的运行时间,是多少呢?

    哈佛公开课 - 计算机科学课程节选

  • So I'm going to solve this by enumerate and check, which is an example of what's called a brute-force algorithm.

    你懂的,所以我得靠列举和检验来解决这个问题,这就是我们说的穷举算法。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • A really nice algorithm. As I said, an example of divide and conquer.

    真的很好的一个算法,就如我说的。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • And finally, we saw an example of an exponential algorithm, those Towers of Hanoi.

    最后,我们来看一个,指数算法的例子,汉诺依塔的例子。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • And if I'm running an exponential algorithm, any guesses?

    杂度是指数级的呢?,有人猜猜么?

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • Perhaps more importantly, how to recognize a kind of algorithm based on its properties and know what class it belongs to. This is a hint. If you like, leaning towards the next quiz, that you oughta be able to say that looks like a logarithmic algorithm because it's got a particular property. That looks like an n log n algorithm because it has a particular property.

    也许更重要的是,如何根据一个算法的特点将其辨别出来,并且知道它属于哪一类算法,这是一个提示,就对于接下来的测验来说,如果你喜欢你可以说它看起来像一个对数算法,因为它有一个特定的性质,那个看起来像一个n,log,n的算法,因为它有一个特定的性质。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • And that's just a way of reminding you that we want to think carefully, but what are the things we're trying to measure when we talk about complexity here? It's both the size of the thing and how often are we going to use it? And there are some trade offs, but I still haven't said how I'm going to get an n log n sorting algorithm, and that's what I want to do today.

    这只是在提醒你们我们要仔细的思考问题,但是当我们在讨论复杂性的时候,我们到底要衡量哪些东西?,是列表的大小和对其进行查找的频率吗?,这里面临一些取舍,但是我还没有说明,怎样得到一个n,log,n复杂度的排序算法,并且这是我今天想要讲的内容。

    麻省理工公开课 - 计算机科学及编程导论课程节选

$firstVoiceSent
- 来自原声例句
小调查
请问您想要如何调整此模块?

感谢您的反馈,我们会尽快进行适当修改!
进来说说原因吧 确定
小调查
请问您想要如何调整此模块?

感谢您的反馈,我们会尽快进行适当修改!
进来说说原因吧 确定