Dynamic programming algorithms for the knapsack problem

The knapsack problem is one of the "classical" problems in Operations Research. In this paper we present a number of APL codes based on the dynamic programming approach to such problems. Although these codes can be used effectively to solve small knapsack problems, they were developed primarily as teaching aids.