We present a genetic algorithm for solving the traveling salesman problem by genetic algorithms to optimality for traveling salesman problems with up to 442 cities. Muhlenbein et al. [MGK 88], [MK 89] have proposed a genetic algorithm for the traveling salesman problem, which generates very good but not optimal solutions for traveling salesman problems with 442 and 531 cities. We have improved this approach by improving all basic components of that genetic algorithm. For our experimental investigations we used the traveling salesman problems TSP (i) with i cities for i = 137, 202, 229, 318, 431, 442, 666 which were solved to optimality in [CP 80], [GH 89]. We could solve medium sized traveling salesman problems with up to 229 cities in < 3 minutes average runtime on a SUN workstation. Furthermore we could solve traveling salesman problems with up to 442 cities optimally in an acceptable time limit (e.g. the average runtime on a SUN workstation for the TSP (431) is about 30 minutes). The greatest examined problem with 666 cities could be approximately solved by constructing a tour with length 0,04% over the optimum.