All right, and initially, well, maybe initially, momentum just to be simple I'm going to start false momentum equal to false.
好了,首先,为了简单起见,我会让,先等于。
Great question. It was easy and fun in the beginning,
好问题。一开始很简单,有意思,
It's a simple problem, but I just want to do it so you get used to working with vectors.
这是个简单的问题,但我还是想做一下好让你们习惯矢量运算
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.
好,我不管列表里是什么,就假定那是一个列表,要提醒你们的是,在你们的讲义上和屏幕上,有一个简单的二分查找算法。
You've got to decide, all right? This is, you can talk to your neighbors, you know do a little bit of thinking. And I'm going to give you ten seconds to figure this out, what your vote is for that.
你们不能弃权,你们必须选择,好吗?,你可以和你附近的同学讨论,简单思考一下,我给你们十秒钟想想,你选择什么。
, all right so you have two partners potentially, 4 of you, this should be easy then.
,好,应该还有两个人,你们四个,接下来就简单了。
And if on the other side of complexity we can read simplicity and common sense, that's great.
而如果与复杂性相反,我们能看出简单性和常识,那就很好。
In terms of the contents of your life, being crude but you see the point, in terms of the contents of your life-- equally good.
在你的生活内容方面,图表是很简单,但是你能看明白,在你的生活内容方面-,都是一样好。
Okay. The reading response for next week is a simple one.
好了,下周的作业是一篇简单的读后感。
Section for On the Road will probably be next week unless your TF wants to bring up some brief questions about it, but that's all for today.
在路上这个作品的讨论课可能是在下周,除非你们的TF想让你们提出一些简单的问题,好吧今天就到这里。
Okay.So that's an example of a classical composer, admittedly in a pretty straightforward situation, using the same three-chord chord progressions we find in the Beach Boys.
好,以上我们举了一个古典作曲家的例子,诚然这个选段的结构比较简单,直接了当,它所用的包含三个和弦的和弦进程与我们在Beach,Boys音乐中分析的相同。
All right, so that's really all there is to thinking about valence bond theory in terms of the most simple explanation here.
好了,这就是,价电子轨道理论的,最简单的解释。
Okay, now we have 17 people it's a bit easier.
好,现在我们有17个人,更简单了
All right, having said that, let's do some examples. I'm going to show you a sequence of algorithms, they're mostly simple algorithms, that's OK.
好,让我们开始看例子吧,我将会给大家讲,一系列的算法,这些都是挺简单的算法。
Should be a pretty simple fix in fact we should be able to do it on the fly, here. What should I change?
这应该有一个很简单的补救措施,实际上我们匆匆忙忙的改好它,这儿,我该怎么改呢?
> David: Good question and short answer: no.
>,大卫:好问题,简单回答:不行。
Well that's pretty easy to do.
好吧,这很简单吧。
Well, let's do a small example first.
好了,让我们先做一个简单的例子。
OK. So let's do some simple examples.
好,让我们做一些简单的例子吧。
So this first little piece of code right here says, ok you give me 2 points, I'll create another 1 of these lists and I'll simply take the x, sorry I shouldn't say x, I'm going to assume it's the x, the x-values are the two points, add them together, just right there, the y-values, add them together and return that list.
好,为了来认识到这一点,让我们来看一个简单的小例子,在你们的课堂手册上,你可以看到我写了一个小程序,它假设我得到了,这些点中的一些,我想对它们做一些操作,例如我想把它们加到一起,那么这里的第一小片,代码的意思是,好给我两个点,我会再创建一个数组。
And my purpose will be not to say something as a postulate, but to show you where everything comes from, and it's best for you if you try to follow the logic.
我的目的不是,简单地告诉你们一个假说,而是给你们讲清楚这个理论的来龙去脉,如果你们能理解推导过程那就再好不过
And that then let's me get to, basically, base this code. Having done that, height I simply call base with get float, I call height with get float, and do the rest of the work.
现在让我们看看这段代码,其实已经写好了,我简单的调用下,用来得到一个浮点数,再调用下,来得到另外一个浮点数,然后做剩下的工作就可以了。
So, moral feelings we could view as feelings of condemnation, shame, emotions like that-- shame, condemnation, pride, righteous anger, but also simple affection, caring for other people, wanting to do well by them, being upset if an injustice is to be done by them.
我们眼中的道德情感包括谴责,和羞耻这样的情绪-,羞耻,谴责,骄傲,义愤,但简单的喜爱之情,对他人的关心,想对别人好,如果别人受到冤屈,你会感到气愤。
shell What I have here is a Python shell, and I'm going to just show you some simple examples of how we start building expressions.
好,这是一个Python的,我会给大家看一些,关于写表达式的简单的例子。
So I'm going to go over here, and I'm going to type test search-- I can type and if you look at your handout, it's just a sequence of tests that I'm going to do OK. So initially, I'm going to set up the list to be the first million integers.
大家可以看看你们的课堂材料,那儿有一些我要做的实验,好,一开始我先去建立个,含有一百万个integer的数组,对,这有点儿简单,但是这给我提供了这样一个有序的数组。
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.
好了,二分搜索也许是,最简单的分治算法,这意味着什么?,也就是说,为了解决一个问题,把它切割成小的问题,然后再来一个个解决。
Or maybe, what would be even simpler than that? Maybe I should just do that.
或者还可以简单点?,可能我只要这么做就好了。
Let me generalize this. In this case, my incrementer was just adding 1 to an integer, it's a pretty straightforward thing to do.
当我完成后,我不会再显示任何信息了,好,好,那么你们已经看过两个简单的例子了,让我来讲讲概念,在这个例子中。
So, we'll start with the easy one.
好,让我们从简单的开始。
The answer is I can't. OK, in the simple case of integers I can, but in the case of something more complex like faces or fingerprints or passwords for that matter, it's hard to design a hash function that has completely even distribution, meaning that it takes any input into exactly one output spot.
答案是我不能,好吧,在简单的整数的例子中,我可以做到,但是在一些更复杂的场景中,比如面部,指纹,密码相关的问题中,很难设计一个哈希函数具备完全平均的分配,也就是说,做到对任一输入,可以准确地得到相应的唯一输出,因此在一个哈希问题中。
应用推荐