On the convergence of genetic algorithms – a variational approach