What's the complexity of this decision tree solution? Well, in the worst case, we're enumerating every possibility of in and out.
决策树解决方法的复杂度是多少?,在最糟的例子中得列举,所有可能的输入和输出。
And you decide that the way this is going to be resolved is to talk to your bosses.
于是你决定跟老板们谈谈,这是解决这个问题的方法。
OK, and you can see that this thing ought to unwrap, it's going to keep extending out those multiplications until gets down to the base case, going to collapse them all together.
好,你可以看到这种方法,是怎么解决的,他一层层的将乘法展开一直到最底层,然后将他们一起乘起来。
The way we use technology to overcome that is we have a lot of simulations and visualizations set up, built around in the virtual spaces.
我们用技术来解决这个问题的方法,是我们用很多模拟实验,以及直观化实验,放在模拟空间里。
These are setups of pieces on the chess board that have particular solutions. And they're very complex, and they have a kind of aesthetic form to them.
象棋有些设置是有专门的,解决方法的,很复杂,它们有一种美学在里面。
So his methods were to ask children to solve problems and to ask them questions.
他所用的研究方法是,要求儿童解决问题,并询问他们一些问题
What does this mean? Linearity of solutions, the elegant way of saying it is superposition holds.
这是什么意思,方程的线性关系,是解决问题的十分漂亮的方法。
The only way to avoid that is to lobotomize me, and that's not desirable.
唯一的解决方法是作额叶切除术,那不是我想要的。
So I guess an efficient, new way of solving those problems.
是一种高效新型的解决这些问题的方法。
So that would suggest that education is probably not going to get the job done, because that's not the main driving reason because most people know that they shouldn't eat so much junk food, but education is what we default to when we think about what to do.
所以你们可能认为,教育并不能解决这个问题,因为这不是主要原因,大部分人都知道不该吃那么多垃圾食品,教育是思考解决方法时被忽略了的
And that's a sign that it's linear.
这显示了解决方法是线性的。
That gets us to the smart thief. Why is this thief smart? Because she took 600. And she learned 600 that in fact there is a good way to solve this problem. And that's what we're going to talk about next. And that's something called dynamic programming.
现在我们要当聪明的贼,这个贼为什么聪明呢?,因为它选择了,它知道这事实上是解决这个问题的好方法,这就是我们接下来要讲的,也就是动态编程。
OK. Now I want to know what's the order of growth here?
那我想知道,这个解决方法的增长率是多少呢?
I'll let you chase it through, it does work. What I want to look at is, what's the order of growth here?
我会让你们去运行这个方法的,确实能得到正确答案,我想问的是,这个解决问题的方法的增长率是什么?
And the only solution that I can see, at least the best solution that I can see, is to accept the no branching rule.
且我看唯一的解决方法,至少是最合适的解决方法,就是接受无分支理论。
So you can actually say, how do I know which methods are associated with the class? For that, we can call dir. And what it does, is it gives me back a listing of all the things, dir all the methods, that are associated with it.
我们开始建立类了,我们得到了这些方法,因此实际上你可以说,我怎么知道,哪些方法是关联与这些类的?,为了解决这个问题,我们可以调用,这个方法的作用。
应用推荐