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

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

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

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

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

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

  • Merge sort takes this idea of divide and conquer, and it does the following: it says let's divide the list in half.

    归并排序以如下的步骤使用了分治思想:,把列表分成两半:,下面就是分治

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

  • So things that are good candidates for divide And conquer are problems where it's easy to figure out how to divide down, and the combination is of little complexity.

    因为适合用分治算法解决的问题,最好是能够简单的将问题进行分解,并且合并的过程不是非常的复杂,只要比线性方案要小。

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

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

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

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

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

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

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