An upper bound for the zero-one knapsack problem and a branch and bound algorithm