We present a one-parameter family of consensus algorithms over a time-varying network of agents. The proposed family of algorithms contains the average and minimum consensus algorithms as two special cases. Furthermore, we investigate a closely related family of distributed algorithms which can be considered as a consensus scheme with fixed boundary conditions and constant inputs. The proposed algorithms recover both the Bellman-Ford iteration for finding shortest paths as well as the algorithm for calculating the mean hitting time of a random walk on a graph. Finally, we demonstrate the potential utility of these algorithms for routing in adhoc networks.