-1

哪种背包问题的算法具有 O(2^n*n) 复杂度?

我被要求为背包问题实施解决方案。

我熟悉编程,但不熟悉渐近符号。

谁能告诉我哪种算法的复杂度为 O(2^n*n)?

4

1 回答 1

3

O(n * 2^n) 是蛮力算法的性能(= 只是尝试所有组合),请参阅http://en.wikipedia.org/wiki/Knapsack_problem#Meet-in-the-Middle_Algorithm

于 2012-05-19T16:42:05.507 回答