Variational method for estimating the rate of convergence of Markov-chain Monte Carlo algorithms.