and on the error between the final value and the average of the initial values of the agents. Finally, we give our concluding remarks in Section \[conclusions\].

A Class of Averaging Algorithms {#agreementalg}
===============================

We consider a set $N=\{1,2,\ldots,n \}$ of agents, which will henceforth be referred to as “nodes.” Each node $i$ starts with a scalar value $x_i(0)$. At each nonnegative integer time $k$, node $i$ receives from some of the other nodes $j$ a message with the value of $x_j(k)$, and updates its value according to: $$x_i(k+1) = \sum_{j=1}^n a_{ij}(k) x_j(k), \label{noquant}$$ where the $a_{ij}(k)$ are nonnegative weights with the property that $a_{ij}(k)>0$ only if node $i$ receives information from node $j$ at time $k$. We use the notation $A(k)$ to denote the [*weight matrix*]{} $[a_{ij}(k)]_{i,j=1,\ldots,n}$, Given a matrix $A$, we use $\E(A)$ to denote the set of directed edges $(j,i)$, including self-edges $(i,i)$, such that $a_{ij}>0$. At each time $k$, the nodes’ connectivity can be represented by the directed graph $G(k)=(N,\E(A(k)))$.

Our goal is to study the convergence of the iterates $x_i(k)$ to the average of the initial values, $(1/n)\sum_{i=1}^n
x_i(0)$, as $k$ approaches infinity. In order to establish such convergence, we impose some assumptions on the 