As you have discovered in recent problem set, it is possible to construct all subsets of a set.
正如你在最近的问题集中发现的,构建集合的所有子集是可行的。
And now we want to find the subset of a that has the maximum value, subject to the weight constraint.
会有一个值与其对应,现在我们想要找出满足,重量约束条件的a的最大值子集。
It's just like if you restrict me to only a subset of numbers, only the odd numbers, still there's an infinity of odd numbers.
这就像,如果你把我限制在数字的子集,只是奇数,但奇数的数量却仍然是无限多的
There's a subset.
它拥有一个子集
On the other hand, we've seen n that if the size of a is n, that's to say, we have n elements to choose from, then the number of possible subsets is 2 to the n.
另一方面,我们看到,如果a集合的大小是,也就是说我们有n个元素可供选择,而可能的子集的元素,个数就是2的n次方。
应用推荐