 Some values falling outside the bounds have been colored to show that the approximation is not always exact.A related problem is the partition problem, a variant of the knapsack problem from operations research.Some weights are put on a balance scale; each weight is an integer number of grams randomly chosen between one gram and one million grams (one tonne).