edit-dis, knapsack