After a series of publications of T.E. O’Neil et al. (e.g. in 2010), dynamic program-
ming seems to be the most promising way to solve knapsack problems. Some techniques are
known to make dynamic programming algorithms (DPA) faster. One of them is the graphical
method that deals with piecewise linear Bellman functions. For some problems, it was previ-
ously shown that the graphical algorithm has a smaller running time in comparison with the
classical DPA and also some other advantages. In this paper, an exact graphical algorithm
(GrA) and a fully polynomial-time approximation scheme based on it are presented for an in-
vestment optimization problem having the best known running time. The algorithms are based
on new Bellman functional equations and a new way of implementing the GrA.