Dynamic Programming with Ant Colony Optimization Metaheuristic for Optimization of