knapsack text justification and pseudopolynomial time 6215177