Optimization of Discrete Time Systems: The Upper Boundary Ap