  We consider a consensus algorithm in which every node in a sequence of
undirected, B-connected graphs assigns equal weight to each of its neighbors.
Under the assumption that the degree of each node is fixed (except for times
when the node has no connections to other nodes), we show that consensus is
achieved within a given accuracy $\epsilon$ on n nodes in time $B+4n^3 B
\ln(2n/\epsilon)$. Because there is a direct relation between consensus
algorithms in time-varying environments and inhomogeneous random walks, our
result also translates into a general statement on such random walks. Moreover,
we give a simple proof of a result of Cao, Spielman, and Morse that the worst
case convergence time becomes exponentially large in the number of nodes $n$
under slight relaxation of the degree constancy assumption.
