A dynamic programming approach for economic optimization of inspection strategies in a multi-stage manufacturing system