• Therefore, for simple branching programs, the length of time, the complexity the code, is what we would call constant.

    因此,对于简单的分支程序,运行的时间长度,算法复杂度,也就是我们说的常数。

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

  • A log algorithm typically is one where you cut the size of the problem down by some multiplicative factor.

    对数级复杂度算法就是指,通过一系列常量级步数的操作,可以将问题的规模。

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

  • I ask you for the running time of this algorithm and you give me the running time in terms of the running time, right.

    我需要得到此算法的时间复杂度,那就明确地给出其,运行时间。

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

  • It's a problem, as you'll see, designed to give you some practice at dealing with some of the, dare I say, more theoretical concepts we've covered in class.

    这种问题会让你在处理我们,课堂上并没有讲到的更多,理论概念这方面上有更多实践,这种问题就像算法复杂度一样。

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

  • So in fact, over the next thirty or forty minutes we're going to show you a set of examples of sort of canonical algorithms, and the different classes of complexity.

    在接下来的三四十分钟里面,我们将要讲一系列的,权威算法,以及不同种类的复杂度问题。

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

  • Linear algorithms tend to be things where, at one pass-through, you reduce the problem by a constant amount by one. If you reduce it by two, 1 it's going to be the same thing.

    有问题么?,线性复杂度算法,当进行了一个,常量级步数的操作的时候,将问题的规模缩小了一个。

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

  • Now you might say, wait a minute. Thing's ordered, if I stop part way through and I throw away half the list, doesn't that help me? And the answer is yes, but it doesn't change the complexity.

    如果我在半路上停下来,然后不去遍历剩下的数组了,这会有帮助么?答案是有帮助,但这没法改变算法复杂度,因为我们之前怎么说来着?

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

  • I want you to recognize classes of algorithms and match what you see in the performance of the algorithm to the complexity of that algorithm. All right?

    让我再试一次这么说,我期望大家能通过,算法复杂度,来看到算法的性能?

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

  • The message I'm trying to get to here, because I'm running you right up against time, is I have to be careful about what's a primitive step.

    我想说的事情是,因为我正在跟大家讲算法时间复杂度,我们需要注意一个基本步骤的定义,如果我可以假设。

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

  • It's a good sign that this is logarithmic, and I'm going to come back in a second to why logs are a great thing.

    为什么对数级复杂度是个好事情,让我们再来看一个算法,噢,抱歉是让我们再来看两个算法

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

  • I make the problem ten times bigger, it takes one more step to do it.

    而在线性复杂度算法里,我把规模扩大十倍。

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

  • Right? You can see that this ought to be linear, because what am I doing?

    这个算法应该是线性复杂度的,因为这个算法是怎么执行的呢?

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

  • What's the complexity of this algorithm?

    这个算法复杂度又是多少呢?

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

  • Yeah. Is the last one there?

    对数级复杂度算法的优势对不对?

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

  • It is certainly possible, for example, that a quadratic algorithm could run faster than a linear algorithm. It depends on what the input is, it depends on, you know, what the particular cases are. So it is not the case that, on every input, a linear algorithm is always going to be better than a quadratic algorithm.

    一个二次平方级复杂度算法,当然也是可能跑的比线性复杂度算法快的,这取决于,你知道的,输入以及特定的案例,因此并不是对于每个输入,线性复杂度就一定会,比二次平方级复杂度算法的表现要好,只是通常来说是这样的。

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

  • And as a consequence, it is log.

    因此这是对数级复杂度算法

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

  • N log N is not nearly as good as log N. As a sanity check, what algorithm have we seen that runs in log N time?

    而N,log,N和log,N并不一样,我们之前探讨过的哪个算法其时间复杂度是log,N呢?

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

  • I've got to count my way down, which means that the access would be linear in the length of the list to find the i'th element of the list, and that's going to increase the complexity.

    的位置并去访问,然后继续下去,也就意味着,找到数组中的第i个元素的方法,是关于数组的长度呈线性复杂度的,这回增加算法复杂度

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

  • With this, if I can assume that accessing the i'th element of a list is constant, then you can't see that the rest of that analysis looks just like the log analysis I did before, and each step, no matter which branch I'm taking, I'm cutting the problem down in half.

    读取数组中的第i个元素,是个常量时间的操作的话,我也就能像以前那样得到,这个算法是对数级复杂度的分析,并且每一步不管我选择哪个区间,我都可以把问题的规模缩小一半。

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

  • 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
- 来自原声例句
小调查
请问您想要如何调整此模块?

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

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