Zero-based algorithm third edition