The resource-constrained elementary shortest path problem arises as a pricing subproblem in branch-and-price algorithms for vehicle routing problems with additional constraints. We address the optimization of the resource-constrained elementary shortest path problem and we present and compare three methods. The first method is a well-known exact dynamic programming algorithm improved by new ideas, such as bi-directional search with resource-based bounding. The second method consists of a branch-and-bound algorithm, where lower bounds are computed by dynamic programming with state space relaxation; we show how bounded bi-directional search can be combined with state space relaxation and we present different branching strategies and their hybridization. The third method, called decremental state space relaxation, is a new one; exact dynamic programming and state space relaxation are two special cases of this new method. The experimental comparison of the three methods is definitely favo...