Analysis of the simple genetic algorithm on the single-peak and double-peak landscapes