Let's test it in all possible combinations of x and y and see if we get the right answer.
来测试并看看,返回的结果正确不正确。
And that's the kind of instinct I'd like you to get into thinking about. So the answer here is no.
所以答案是否定的,好的,那我们能在线性时间内排序么?
In the extreme case, where we disregard taxes and we have to disregard some other problems, we get the same answer.
在极限情况下,忽略税的因素,再忽略一些其他因素,就得出了同样的答案
I think I've heard bits and pieces of the answer everywhere, so I don't want to wait until we get it word-perfect.
我想我可以听到各种各样的答案,所以我不想等这大家想出完美的答案
Compare after 30 or 60 seconds with the person next to you and see if before I reveal the answer we can't get everyone on to the exact same page.
和你身边的人比较30到60秒钟,看看是否在我揭露答案之前,我们不能使每个人,得到一个完全相同的页面。
And blind here is a technical term meaning she had no idea what the baby saw, and the point about this is to avoid either intentional or unintentional sort of trying to get the answer you want.
这里的盲性是个术语,意味着主试完全不知道婴儿看到了什么,这样做的目的在于,避免主试因想要得到自己所想要的结果,而进行的有意或无意的尝试
By the way, after class, I'm more than happy to stay as long as needed to answer any questions you guys have or to talk about whatever issues you'd like to bring up, but probably what makes sense is for me to power down the computer and pack up and then we can stand out in the hallway and I can answer questions out there, that way the next class can get in and the instructor can work unimpeded.
顺便说一下,课后,我很乐意多待一会,来回答你们的问题,或者讨论一些你们提出的问题,但我最好是,把电脑关掉,收拾好东西,然后在走廊里来回答你们的问题,这样下节课才能照常进行,老师也能正常授课
Instead of taking that one vase, the thief could take two radios. And get more value. So the greedy thief, in some sense, gets the wrong answer. But maybe isn't so dumb.
这个贼可以带走两个收音机,这样总价值更大,因此这个贪婪的贼,在某种意义上没有得到正确的答案,但是可能它也不笨。
But in fact, it is not. And so, something I find myself repeating over and over again to myself, to my graduate students, is when you get an answer from the computer, always ask yourself, why do I believe it?
但是实际上,它并不是,因此,我一直一遍又一遍的重复的,给我自己和你们这些学生的就是,当计算机给出一个答案后,一定要问问自己为什么要相信这个答案?
I know this is the right answer, because if I now find the acceleration, I find it's mg divided by m and I get -g as the answer for all bodies.
我知道这个等式是正确的,因为现在如果我要求物体的加速度,用 mg 除以 m,我就得到 -g,这个结果对所有物体都成立
More fundamentally, I want to get back to what I think of as the main theme of 6.00, which is taking a problem and finding some way to formulate the problem so that we can use computing to help us get an answer.
花一些时间来讲,更重要的是我想,回到我认为的6。00的重点,即处理问题并公式化问题,从而使我们能够靠电脑得出答案。
And obviously, when I get to something whose square is equal to x, I've got the answer I want, and I kick it out.
大于x的时候,我已经经过了,想要的答案了,很明显,当我得到一个数的平方等于x的时候。
All right, we're-- well actually, I should say that better, we first check to see, is x 0 greater than or equal to zero, if it's not, then we come down here and we print something out, otherwise we run through a little loop to get the answer, and then we check it and we spit something out.
然后我们运行一个小循环,好了,我们现在来看看,如果x≥0或者x<,我们看这儿,我们会输出一些内容,或者我们运行一个小循环来获取答案,然后我们检验一下,然后得到结果。
应用推荐