Discrete Consensus in Networks: Theory and Applications,