A few weeks later, Paul's boss,Mr.Denny, gave Paul a large amount of money to take to the bank.
VOA: special.2009.04.11
These things run for variable amounts of time because they take input, a list of size of some amount.
而这一段的执行时间是可变的,因为它们需要输入一个包含一些元素的列表。
We transition to actually real world applications later on like a compression-- how do you take a huge amount of data ; and actually whittle it down into something more manageable; something that uses less of your disk space.
然后我们会讲生活中的应用程序,比方说压缩文件——,把大量的数据分解使其更易管理;,并占用尽量少的磁盘空间。
Constant. Ooh, constant says, no matter what the length of the list is, I'm going to take the same amount of time.
这个算法用的时间是相同的,我不这么认为,如果我们创建一个十倍于以前大小的数组。
Specifically, we have to take in this exact amount of energy in order to bump the electron up to higher energy level.
特别的,我们严格需要,这么多,来把电子,提升到更高的能级。
If you took a 15 inch artillery shell moving at the velocity it typically goes at, and take that amount of kinetic energy versus the resistive capacity of a sheet of tissue paper, that's the scale that we're looking at here.
如果你有1个15英寸的炮弹,按照经典的速度移动,会消耗大量的动能,抵抗来自于一张薄纸的阻力,这就是我们在这儿看到的尺度。
5% of adults and half of all children do not take the recommended amount of exercise."
5%的成人,和一半的儿童都达不到推荐的锻炼量"
You had to be very confident because it was going to take a long time, a fantastic amount of labor, a tremendous amount of money to do that.
你不得不相信,建造一座蜂巢墓要花费很长时间,大量的劳动力,以及庞大的金钱支持
it was reversible, so you can give people money and take it away, and you could actually scale the amount of money, so it makes a very handy experimental tool.
这个过程是可逆的,这样你可以给人钱,然后拿走,而且你还可以积攒钱,这就让钱成为了一种非常有用的试验工具。
But we might then wonder, for every person who gets less than the average amount of life-- suppose we take the median, take the amount of life that's exactly, 50 percent of the people get more, 50 percent of the people get less.
但是接着我们可能会想,对于所有活得比平均寿命要短的人-,假设我们取中间数,相对于平均寿命,刚好五成的人活得更长,五成的人活得更短。
It's just how much heat is involved when we change the temperature. Now, the products have some heat capacity associated with them right, it takes a certain amount of heat if we make their temperature change, to either put it in or take it away, depending on which direction the temperature is changing.
问题就是当我们改变温度时,有多少热量发生了转移,生成物具有一定的热容,如果我们改变,它们的温度,就要输入或,提取一定的热量,这取决于温度改变的方向。
Which may take up some arbitrary amount of memory. In that case, I'm back to this problem.
然后将接下来的每一个内存块设置为,指向数组对应元素值的指针。
So, would it take, for example, the same amount of time as the frequency?
它需要,比如说,和频率一样的时间吗?
Just take it as a constant amount of operations But.
那让我们看看下一步呢?
So, for example: in this case, my list is a bunch of integers. And one of the things I could take advantage of, is I'm only going to need a finite amount of space to represent an integer.
列表是一系列整数,要注意的这里的优势能够,用有限的空间来表示整数,例如,如果我想要操作。
So we're to assume we can get to any piece of data, any instruction in constant time, and the second assumption we're going to make is that the basic primitive steps take constant time, same amount of time to compute. Again, not completely true, but it's a good model, so arithmetic operations, comparisons, things of that sort, we're all going to assume are basically in that in that particular model.
因此如果我们假设在恒定的时间内,我们可以取得任何一块数据,任何一种数据结构的话,我们要做的第二个假设就是,基本的原始操作计算花费的时间是恒定的,这个假设也不是完全正确的,但这个模型其实挺不错的,因此算法操作,比较,这一类的事情,我们在这个特定的模型中都假设是基本的,操作,花费的时间是恒定相同的。
Now, it's also the case that this is fundamentally what class this algorithm falls into, it is going to take exponential amount of time.
哪个种类的一个实例,这个问题的时间复杂度是指数级的,也就是当n上升的时候。
应用推荐