Now, I wanted to compare it with another question that I--people have this simple idea that there's a best investment.
现在,让我们对比另一个问题,人们总是简单地认为存在一种最佳投资
Great question. It was easy and fun in the beginning,
好问题。一开始很简单,有意思,
And I think this is best illustrated by giving you a simple little piece of code.
我认为给你看一段简单的代码,可以很好的说明这个问题。
So before we leave coordination games, I want to look at another one, a little bit more complicated one perhaps, that we mentioned briefly last time.
在我们结束讲解协调博弈前,我们再来看一个,稍微复杂点的问题,上一讲我简单提到过的
That's certainly one way to do it, but for computers that's not necessarily the easiest way. So another way of solving it is to do something we already saw last time, which is basically, why not simply enumerate all possible examples and check them?
将一个等式代入另一个等式,这当然是一种办法,但是对电脑来说这绝对不是一件简单的事,所以解决这个问题的办法,正如我们上一次看过的,非常基本?
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.
因此被称为分治的原因就这么简单,将一个问题分解成一些子问题,并希望这些子问题解决起来比较方便,正如你希望的,求解的过程也会变得简单,下面就是把结果合并起来,现在,在二分搜索的例子里,从某些方面来说,这有点微不足道。
应用推荐