4.1 Algorithms and programs