Approximate algorithms with bounded absolute error for discrete extremal problems