Fix Rudell's algorithm because of a bug regarding lazy logic evaluation.
Introduce an exact optimization algorithm without testing it.