  Random pairwise encounters often occur in large populations, or groups of
mobile agents, and various types of local interactions that happen at
encounters account for emergent global phenomena. In particular, in the fields
of swarm robotics, sociobiology, and social dynamics, several types of local
pairwise interactions were proposed and analysed leading to spatial gathering
or clustering and agreement in teams of robotic agents coordinated motion, in
animal herds, or in human societies. We here propose a very simple stochastic
interaction at encounters that leads to agreement or geometric alignment in
swarms of simple agents, and analyse the process of converging to consensus.
Consider a group of agents whose "states" evolve in time by pairwise
interactions: the state of an agent is either a real value (a randomly
initialised position within an interval) or a vector that is either
unconstrained (e.g. the location of the agent in the plane) or constrained to
have unit length (e.g. the direction of the agent's motion). The interactions
are doubly stochastic, in the sense that, at discrete time steps, pairs of
agents are randomly selected and their new states are independently and
uniformly set at random in (local) domains or intervals defined by the states
of the interacting pair. We show that such processes lead, in finite expected
time (measured by the number of interactions that occurred) to agreement in
case of unconstrained states and alignment when the states are unit vectors.
