(...) She says limiting the size of containers will not solve the problem, it will have the opposite effect.
VOA: standard.2009.10.15
Let me cluster them because really what I have, sorry, separate them out. I've gone from one problem size eight down to eight problems of size one.
让我把它们聚集起来,因为已经得到我想要的,抱歉,把它们分开来,现在我从一个长度为8的问题,得到了八个长度为1的问题。
How does this thing grow as I make the problem size big?
也就是说当问题规模变大的时候,算法计算的时间会怎样增长?
"Illegal logging is such a big problem simply because of the size of it.
VOA: standard.2010.07.28
Taking the problem, recognizing that you know what, 8 even though this is a pretty big problem size 8 in this case and last time it was size 8 or in the case of the papers in size of a thousand roughly with the phonebook, I assume these are in a perfectly straight line they won't quite fit.
以这个问题为例,你们要认识到,在这种情况下,这是个比较大的问题,其大小是,上次它的大小也是8,但在纸片那个问题中,电话簿的规模大概是上千的,现在假设这些,杯子完全在同一条直线上,虽然并不十分符合这个条件。
Okay, so you can see the size of the errors and you can see the problem with dietary assessment, and you can see the problem with how many calories get packed in processed foods.
你们看见了,误差的幅度很大,你们也明白了膳食评估的困难,你们也发现了,加工食品含有大量卡路里的问题
the abuse is, you know, it's not quite right, it depends upon whether it's all ready, but you can see in either case, after 12 steps, 2 runs through this and down to a problem size b over 2.
在12步以后,两轮过后,这个问题的范围b被缩小了一倍,这为什么很不错呢?,这意味着再来12步。
I first had a list of size 8, then 4, then 2, but then I had another problem of size 2.
首先是一个有8个元素的序列,接着变成了4个元素,接着2个元素,然后我就碰到了有2个元素的另一个问题。
Well, that then says after another 12 steps, 12+12+t we're down to a problem with size t of b over 4.
更进一步,也就是。
In fact, better than that, this guy is already sorted as well because I whittled that problem down to size 1.
事实上,更好的结果是这个杯子也是有序的了,因为我已将这个问题的规模削减到只有1个元素。
A log algorithm typically is one where you cut the size of the problem down by some multiplicative factor.
对数级复杂度的算法就是指,通过一系列常量级步数的操作,可以将问题的规模。
It implies that this algorithm is calling itself again and again, and again, and on each time the size of the problem I'm trying to sort is being divided by what?
这就说明此算法会一次又一次地调用自己,每次我要排序的问题规模大小,会除以多少呢?
OK. And then the exponentials, as you saw is when typically I reduce the problem of one size into two or more sub-problems of a smaller size.
好,然后说到指数级,正如你所见,典型的例子是,我讲一个问题分解成为,两个更小规模的子问题。
I have sorted with the smaller problem 1 because that smaller problem right now is of size 1 and so it's sort of obviously the case that this cup is now sorted.
对这个较小的问题我已经排好序了,因为在这个小问题中只有1个元素1,那么很明显,这个杯子已经是有序的了。
and we like log algorithms, because they're really fast. A typical characteristic of a log algorithm is a pro-- or sorry, an algorithm where it reduces the size of the problem by a constant factor.
并且我们也很喜欢对数算法,因为它很快,对数算法的典型特性是高速,哦,抱歉,是他能以常数因子的速度,降低问题的大小,很明显。
Here's the left half, so now I have a problem of size 4.
这边是左半部分,所以现在问题的大小是。
I'm going to let t of b be the number of steps it takes to solve the problem of size b.
我会设立一个t作为,计算指数为b的时候解决问题需要的步骤数。
How do I reduce this to a smaller-size problem in the same instant?
我怎么能把这个问题,缩小成更小规模的问题呢?
We took the problem of size a thousand, we divided it in half.
当我们遇到一个规模为一千左右的问题时,会将其分为两部分。
This case, I reduced the size of the problem in half.
这很好的表明了这是,对数级复杂度的问题,我马上就要解释。
What we really want to worry about is, as the size of the problem gets larger, how does this thing grow? How does the cost go up?
随着问题规模的变大,解决问题花费的代价是怎么增长的,因此我们将会主要地讲讲?
Now. You might look at that and say, well that's just a lot like what we had over here Right? We had some additive constant plus a simpler version of the same problem reduced in size by 1.
现在你可能会看着这个说,这很像我们以前做过的,对不对?我们用一些附加的常量,加上问题的另外一个规模缩小了1的,简化版本来代替这个问题本身。
So one of the things I didn't say, it's sort of implicit here, is what is the thing I measuring the size of the problem in?
我有一点没有提及,这有点含蓄,这一点就是我怎么,来度量输入问题的大小呢?,一个数组的大小怎么来定义呢?
The second question I want to ask is what's the base case? When do I get down to a problem that's small enough that it's basically trivial to solve? Here it was lists of size one. I could have stopped at lists of size two right. That's an easy comparison.
第二个问题是什么是基础条件?,我要将问题分解到何时才使得问题,小到可以解决的基本问题?,这里是当列表的长度为1有时候,我也可以在长度为2的时候停止分解,那是一个非常简单的对比。
Typical characterization, not all the time, but typical characterization, is an algorithm that reduces the size of a problem by one, or by some constant amount each time, is typically an example of a linear algorithm.
我们学习过了线性算法,它的典型特征,不是通用的,但是比较典型的特征是,它是逐一减小问题的大小的,或者说是每次减小常数的大小。
So the running time of the problem where the input is T of size N as expressed here formulaically, T of N, the running time of an algorithm, given an input of size N. You know what?
因此一个输入为N的问题的运行时间,在这儿的公式表示为,如果输入为N,那么此算法的运行时间,是多少呢?
If I'm running at nanosecond speed, 1000 n, the size of the problem, whatever it is, is 1000, and I've got a log algorithm, it takes 10 nanoseconds to complete.
如果这个问题的规模,也就是n,是,如果这个问题是对数级的,这将会占据10纳秒的时间,你一眨眼的时间。
I've got one test, I've got a subtraction, I've got a multiplication, that's three steps, plus whatever number of steps it takes to solve a problem of size b minus 1.
我进行了一次比较,一次减法,一次乘法,一共是三个步骤,再加上t的步骤数。
Where you go from problem of size n to a problem of size n minus 1.
或者缩减了2,这都一样的,也就是把问题的规模从n变成了n-1。
And now I have a problem of size N minus 1.
现在是一个N-1大小的问题。
应用推荐