Even the optimal algorithm doesn't guarantee a perfect outcome.