And this puzzle piece here colored in blue because it's a Boolean expression is just something that--whose answer is either a yes or no, 0 true or false, one or zero.
这个拼图染成蓝色,因为它是布尔表达式,它的结果只可能是肯定或否定,对或错,1或者。
But let's look for a slight variant of it, where greedy is not so good. And that's what's called the zero-one knapsack problem.
但是让我们找一找它的一些变种,在这些变种中贪婪算法用处不大,这些问题也就是0/1背包问题。
Happiness is not a binary either-or, zero-one-- either I'm happy or I'm unhappy.
幸福不是二进制的非此即彼,0或-,要么幸福要么不幸福。
And a bit, B-I-T, just a shorthand for binary digit, 2 so a digit of zero over a one, bi means two, you only have two digits.
比特,B-I-T,是binary,digit的简写,从0到1的数字,而bi表示,所以你就只有两个数字。
In the language, if I can switch to the language of modern economics, one could say that for Thrasymachus politics is a zero-sum game.
换个领域的词汇,让我用现代经济学的话来说,这可能将,Thrasymachus,式的政治,喻成一场零和游戏。
So let's look at an example of a zero-one knapsack problem.
我们要像之前一样将其最优化,现在让我们来看一个0/1背包问题的例子。
应用推荐