PROFESSOR: Great question. So the question is, how do you choose an algorithm, why would I choose to use a pseudo-polynomial algorithm when I don't know how big the solution is likely to be, I think that's one way to think about it.
教授:问得好,所以问题是,你怎样选择算法,为什么当我,不知道解决方案会有多大的时候,我要选伪多项式算法呢,我想这是一种思考问题的方式。
We saw some quadratic algorithms, typically those are things with multiple nested loops, or iterative or recursive calls, where you're doing, say, a linear amount of time but you're doing it a linear number of times and so it becomes quadratic, and you'll see other polynomial kinds of algorithms.
我们看过一些平方算法,他们一般进行了多次嵌套循环,或者递归迭代调用,对一个线性操作调用线性次,这样就变成平方次了,以后你们能看到,一些多项式算法。
PROFESSOR: The pseudo-polynomial?
教授:伪多项式?
Typically up till now, we've looked at things that can be done in sublinear time. Or, at worst, polynomial time. We'll now look at a problem that does not fall into that. And we'll start with what's called the continuous knapsack problem.
至今为止我们已经处理过,亚线性问题,最多也就是多项式问题,我们现在要看的问题则是不能用这些解决的,我们将要开始讲连续背包问题。
应用推荐