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

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

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

  • We started off talking about binary search, and I suggested that this was a log algorithm which it is, which is really kind of nice.

    我告诉了你们这是一个对,数级的算法,这是很棒的,我们来一起看看这个算法到底做了什么。

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

  • So don't get too caught up in understanding the methods or statistics in a particular study or anything like that.

    所以没必要过于纠结,非要去理解,某项研究的分析和算法

    耶鲁公开课 - 关于食物的心理学、生物学和政治学课程节选

  • You might remember vaguely logarithms from high school math and such but what this suggests for us , the computer scientists, is that this is certainly a smarter, a faster algorithm.

    你可能还会依稀记得,高中数学里的对数,这就给了我们这些计算机科学家们,一些启示,即,这种算法更智能,更迅速。

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

  • It couldn't have been a very complicated algorithm because it basically paired people up randomly on the campus.

    这个算法不是很复杂,基本上是给校园里的人随机配对。

    耶鲁公开课 - 心理学导论课程节选

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

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

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

  • And then the things I have to ask is how much of a division do I want to do?

    如果可以这么做,那么分治算法是个好的选择,接下的问题就是我需要把问题分成多少份?

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

  • Obviously the algorithm is likely to depend on the size of the input, so this is not a great idea.

    很明显这个算法是与我的,输入的大小相关的,因此这不是个好方法。

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

  • And that's because that is a version of a divide and conquer algorithm.

    这个想法非常重要,因为这就是分而治之算法的一个版本。

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

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

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

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

  • Where those pieces, I would do the same thing with, I would divide them up into smaller chunks, and sort those. Is that going to give me a more efficient algorithm?

    合并起来,而那些小列表,我又会把他们拆成更小的列表,再排序,这会给我,一个更高效的算法么?

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

  • So this is a nice little search-- sorry, a nice little sort algorithm . And in fact, it's relying on something that we're going to come back to, called the loop invariant.

    恩,这是一个很棒的小搜索,抱歉,和很棒的小排序算法,事实上,它依赖于一些我们要回顾的东西,被称作循环不变量。

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

  • Just contrast this for a brief moment to something like Selection Sort which from the get go had a ridiculous amount of redundancy comparing the same damn numbers again and again, and again.

    这就与其他的排序算法形成了鲜明的对比,比如选择排序,它会一次又一次地做,多余的比较。

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

  • And then we're going to turn to the question of efficiency. How do we measure efficiency of algorithms? Which is going to be a really important thing that we want to deal with, and we'll start it today, it's undoubtedly going to take us a couple more lectures to finish it off.

    然后我们会回头继续讨论效率问题,我们如何计算算法的效率?,我们处理这些问题的时候,最重要的事情是什么?,我们今天要去讨论这个问题,毫无疑问我们要用,挺多节课来学习这个。

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

  • All right, having said that, let's do some examples. I'm going to show you a sequence of algorithms, they're mostly simple algorithms, that's OK.

    好,让我们开始看例子吧,我将会给大家讲,一系列的算法,这些都是挺简单的算法

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

  • What you're much better at doing is saying how do I take the problem I've got and map it into a class of algorithms about which I know and use the efficiencies of those to try and figure out how to make it work.

    当你碰到问题的时候,更好的方法是把遇到的问题映射,到已经设计好的算法中去,并用这些算法来提高效率,来保证问题得到解决。

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

  • They are computationally challenged, meaning, at the time they were invented, they were perfectly good sorting algorithms, there are better ones, we're going to see a much better one next time around, but this is a good way to just start thinking about how to do the algorithm, or how to do the sort.

    他们是相当棒的排序算法,是有更好的算法,我们下一次,就会看一个更好的,但是开始想想,如何完成算法,或者说是如何排序,是一个好的学习方法,恩,再试试吧,如何来排序呢?

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

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

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

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

  • Well, we saw the teaser in terms of that animation that suggests this merge sort algorithm when implemented by a computer is absolutely faster.

    我们从前面的动画中可以看到,这个归并排序算法在计算机上实现之后,绝对比其他算法更快。

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

  • swap I'm going to keep track of a little variable called swap, it's initially true, and as long as it's true, I'm going to keep going, but inside of the loop I'm going to set it to false, and only if I do a swap will I set it to true.

    我打算跟踪一个小的变量称为,初始值为真,只要它是真的,算法就会继续,但是在循环里,我打算把他设为假,除非交换发生,就把它设为真。

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

  • Selection sort too really reduces to a total number of comparisons because I'm again comparing the current smallest to the next thing I see, the next thing, so really a lot of these sorting algorithms boil down to comparisons and the numbers that you actually have to make.

    选择排序也可归纳为总数的比较,因为要将当前最小者与下一个进行比较,接着再下一个,可见,很多排序算法都可归结为比较,以及需要比较的次数。

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

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

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

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

  • It's an example of a very common tool that's going to be really useful to us, not just for doing search, but for doing a whole range of problems. That is, in essence, the template the describes a log style algorithm.

    不仅仅是做搜索,还可以解决一整类问题,本质上,这个模板就描述了,对数形的算法,我们一会再回来。

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

  • This is a very important concept, and we'll see a lot of algorithms essentially implement decision trees.

    这是一个很重要的概念,我们可以看到很多,基于决策树的算法

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

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

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

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

  • Where have we implemented a greedy algorithm, or have been asked to do a greedy algorithm? Well, there are not that many things you guys have been working on this semester.

    现在你已经实施了一个贪婪算法,我们在哪里实施了贪婪算法,或者我们那里被要求实施贪婪算法呢?,们这学期不需要用什么功对吧?

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

  • What is the class of algorithm that's- that probably applies to this, and how do I pull something out of that, if you like, a briefcase of possible algorithms to solve?

    以及哪种算法-,可能可以应用到这类问题上,问题本身又能提取出什么东西来,以及可能解决问题的一系列方法的简介?

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

  • And we want to help you learn how to map a problem into a class of algorithms of some efficiency That's our goal.

    学会如何将一个问题,映射到一类,提升效率的算法中去,这就是我们的目标。

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

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

    这么描述很不准确,我之前在,线性算法中也说了常数,它是每次减少固定的量。

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

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

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

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