• So binary search, the phonebook example, binary search on the pieces of paper on the white board, why is that?

    二分查找,例如电话簿的例子,对其中的某一页进行二分查找,为什么呢?

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

  • And the basic idea was that we had some sort of a line and we knew the answer was somewhere between this point and this point.

    去学习的二分搜索是有联系的,这种方法的基础思想,是我们有一个线性的序集,我们也明白答案在其中的某一段区间。

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

  • If I pick an angle of 60 degrees, these are some numbers like half and root 3 over 2.

    要是我选择一个 60°的角,上面的系数就会是二分之一和二分之根号三

    耶鲁公开课 - 基础物理课程节选

  • Then minus 1/2 of 2, because we only have one bond or 2 electrons in a bond.

    然后减去二的二分之一,因为我们只有一个键,一个键就是两个电子。

    麻省理工公开课 - 化学原理课程节选

  • Two will mean it's good but you could have done a little better, and one would mean you need to shape it up.

    二分意味着你做的不错但是还可以更好些,一分则代表你需要对它做些改进

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

  • What you'll do is every day for the next 30 days give me one cent, next day two, four, eight and so on.

    你们要做的是在未来30天给我一分钱,第二天二分,然后是四分,八分,以此类推。

    哈佛公开课 - 幸福课课程节选

  • Fifty, 55% of you or so are likely to end up with some kind of a B.

    二分之一左右的人以80分结课。

    耶鲁公开课 - 死亡课程节选

  • OK. Binary search is perhaps the simplest of the divide and conquer algorithms, and what does that mean? It says, in order to solve a problem, cut it down to a smaller problem and try and solve that one.

    好了,二分搜索也许是,最简单的分治算法,这意味着什么?,也就是说,为了解决一个问题,把它切割成小的问题,然后再来一个个解决。

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

  • All right? I don't care what's in there, but just assume that's my list. And just to remind you, on your handout, and there it is on the screen, I'm going to bring it back up, there's the little binary search algorithm.

    好,我不管列表里是什么,就假定那是一个列表,要提醒你们的是,在你们的讲义上和屏幕上,有一个简单的二分查找算法。

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

  • OK. At the end of the lecture last time, I also showed you an example of binary search.

    好的,在上次课程的最后,我也给你们看了一个二分查找的例子。

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

  • Let's search to see though now if a million is in this list, or 10 million, whichever way I did this it must be a million, right?

    不管我选哪个,数都挺大的对不对?,用嘴基本的方法,噢,花的时间有点长,好,而用二分法呢?

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

  • OK. So, what do I want you to take away from this? This idea of binary search is going to be a really powerful tool. And it has this property again, of chopping things into pieces.

    从这里学到些什么?二分查找的思想,是一个非常有用的工具,我重复一遍,把问题拆成几部分来解决,那事实上,这里的增长率是多少?

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

  • Let's pull together what this algorithm actually does. If I generalize binary search, here's what I'm going to stake that this thing does.

    总结下二分查找法,下面列举几点它的操作,首先,找中点。

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

  • Again. Basic premise of binary search, or at least we set it up was, imagine I have a sorted list of elements. We get, in a second, to how we're going to get them sorted, and I want to know, is a particular element in that list..

    好,二分查找的基本前提,或者是我们建立二分查找的基础,我们已经有了一个排好序的元素列表,我们就需要知道如何来快速的排序,如何从列表中找到特定的元素。

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

  • Now, one of the questions we could still ask is, right, we've got binary search, which has got this nice log behavior.

    目前,还有一个问题我们仍然要问的是,对,我们已经学了二分查找,有着非常好的log级别的行为。

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

  • I'm narrowing it down. It's getting a little silly but you know I'm going to really be persistent and just follow the rules here of binary search, rather than jumping to conclusions.

    按照二分法的规则来做的,而不是直接得出某种结论,很明显这儿我的目的是什么?,显示这两个相同的东西。

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

  • Now, as I do this, I'm going to use binary search.

    现在当我做这项工作的时候,我会用到二分搜索法。

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

  • Remember, I said when we do a bisection method, we're assuming the answer lies somewhere between Well, what is the square root of a quarter? It is a half.

    记住,我提过当我们用二分法的时候,我们假设答案处于,上边界和下边界之间,0。25的平方根是多少?,是0。5。

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

  • OK. That's the basic idea of binary search.

    好了,这就是二分查找的基本思想。

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

  • But since in drawing Lewis structures actually, in some cases you do, you can draw a dotted line that means a 1 and 1/2 bond, but most in most cases, we just draw out both resonance structures, and the way that we say it's a resonance structure is that we put it in the brackets and we put an arrow between it.

    但是由于在画路易斯结构时,其实,在某些情况下是可以的,你可以画一条虚线来表示一又二分之一键,但是在多数情况下,我们就把两个结构都画出来,而我们说这是一个共振结构的表示的方法是,把它们放在括号里,并在中间放一个双箭头。

    麻省理工公开课 - 化学原理课程节选

  • And the third thing I need to decide is how do I combine? You know, point out to you in the binary search case, combination was trivial. The answer to the final search was just the answer all the way up.

    第三个问题是我需要决定如何进行合并?,就你们所知的,在二分查找中所打印出来的,合并的过程是非常简单的,最后查询的结果,就是一路上来所以的结果。

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

  • I'm going to call it down here with search, which is simply going to call it, and then print an answer out.

    然后返回答案,在二分法搜索中,其实有个挺美妙的名称。

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

  • Done. All right? The basic, that primary search, because it looks at the first element, says it's smaller than everything else, I'm done.

    以及其他的元素,检索完成,让我试试二分法呢?,可能会用更长的时间,请注意这里的输出。

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

  • This was using something called a bisection method, which is related to something called binary search, which we'll see lots more of later, to find square roots.

    你应该想起来,我们是以一个,叫做二分法求平方根的问题结束的,它运用了二分法去求一个数的平方根,二分法和我们将要花很多时间。

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

  • In binary search-- ah, there's that wonderful phrase, this is called a version of binary search just like you saw bin-- or bi-section methods, - when we were doing numerical things- in binary search, I need to keep track of the starting point and the ending point of the list I'm looking at.

    就是当我们处理数字的时候,所称的二分检索,在二分法搜索中,我需要记录区间的开始点和尾点,初始化的时候就是-,问题输入的开始点和尾点,当我开始做测试的时候,我想要做的就是去取中值点。

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

  • OK. So if I look at this code, first of all I'm calling search, it just has one call, so looks like search is constant, except I don't know what happens inside of b search. So I've got to look at b search.

    首先调用一下搜索,就一步调用,看起来搜索是固定的,除非我不知道二分搜索的原理,那我们来看看二分搜索吧,所以让我们看看,第一行打印出来的内容。

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

  • We're going to call search, which just calls binary search.

    我要把它回忆一下,之后我们说的查找算法就是二分查找算法。

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

  • And it's called divide and conquer for the obvious reason. I'm going to divide it up into sub-problems with the hope that those sub-problems get easier. It's going to be easier to conquer if you like, and then I'm going to merge them back. Now, in the binary search case, in some sense, this is a little bit trivial.

    因此被称为分治的原因就这么简单,将一个问题分解成一些子问题,并希望这些子问题解决起来比较方便,正如你希望的,求解的过程也会变得简单,下面就是把结果合并起来,现在,在二分搜索的例子里,从某些方面来说,这有点微不足道。

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

  • All right. Any questions about bisection search?

    好,还有没有关于二分搜索的问题?

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

  • Notice here that it's different than the binary search case. We're certainly dividing down, but the combination now actually takes some work. I'll have to actually figure out how to put them back together. And that's a general thing you want to keep in mind when you're thinking about designing a divide and conquer kind of algorithm.

    一个分治的例子,注这里,与二分查找所不同的地方,我们肯定是分解了,但是合并的过程还是需要一些工作量的,我会详细说明怎样把它们合并在一起的,当你在考虑设计一个分治算法时,这是你要必须记住的最基本的东西。

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

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

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

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