Now, when we talked about optimization problems in dynamic programming, I said there were two things to look for.
现在,当我们讨论,动态编程中的最优化问题时,我想说有两件事需要注意。
And when you have an optimal substructure and the local solutions overlap, that's when you can bring dynamic programming to bear.
当你得到一个最优子结构,但局部解决方案有重跌时,你就可以引入动态编程,来解决这个问题了。
Well, it turns out you can write a program on most any computer.
问题是你如何在大多数电脑上编程?
That are not readily dealt with in a prograing problem. It also deals with issues of some of the subtleties of things like aliasing.
它还和一些很细微的问题,比如重名等有关系,因此这不关编程的事儿。
This is the sort of thing that people who do numerical programming worry about all the time. And there are a lot of a little tricks they use to deal with that, they'll perturb it a little bit, things like that.
这是一些做计算编程,要时刻注意的问题,当然有的时候我们还需要,应对一些假象,比如像这样被扰乱的。
So when you're trying to think about is this a problem that I can solve with dynamic programming, these are the two questions you ask.
所以当你想知道能否,用动态编程来解决这个问题时,你可以问自己两个问题。
Lisp The problem with that technique, while it's very general, is how long does it take me to find the i'th element of the list?
很多编程语言包括,都是用了这种技术,这个问题就是,当数组很大的时候?
This gets back to my main theme of Tuesday, which is be systematic.
我周二会把这个问题作为主题,也就是系统化编程。
Like algorithmic complexity.
是很难被归类到编程问题里面的。
Well, realize one of the themes in this course and really one of the themes in programming and solving any problem with a machine is going to be really to just take small bites one at a time out of these problems until the end result ultimately is that you've actually bitten off a fairly large fairly interesting problem and in the aggregate, you've actually implemented something pretty sophisticated.
好吧,让我们先想一下这件事带给我们的主题,编程和解决问题的思想,一台机器最开始只会一步一个脚印,沿着要解决的问题向前迈进,直到最终的结果出来,最后你会发现,你已经解决了一个相当大,相当有趣的问题,而这个问题在最初看起来确是相当复杂的。
That would let us tackle it with dynamic programming.
回答好这个问题我们,就能用动态编程法解决这个问题。
Because that's not a programming problem.
因为这并不是一个编程问题。
So to be clear, we expect most students to very comfortably pursue the standard edition of the P set, but for this particular P set, and we have about 150 or so of these out on the hallway, and we'll have them at office hours throughout the coming week--this is a little logic board ; with lots of sensors; the sound sensor, a light sensor, a little joystick and the like.
我希望我们大多数同学,研究问题集的标准版本,可编程版有个特殊的问题集,我们会在接下来的几周里,在办公时间为大家做解答,这是个小的逻辑板,上面有很多传感器;,包括声音传感器,光传感器,小操作杆等。
So with problems at zero, ; which will be posted in two forms; PDF PDF for standard and PDF for hacker on cs50.net tonight, you will have the choice of implementing pretty much any scratch projects you can think of, and which subject to very few constraints.
对于问题集,我们提供了;,标准PDF以及可编程,今晚它们都会被放在CS50,net上,你可以选择任何,你想到的项目,范围不限。
应用推荐