Convergence of adaptive algorithms