1: \begin{abstract}
2: %%%%%
3: We consider a linear consensus system with~$n$ agents
4: that can switch between~$r$ different connectivity
5: patterns.
6: A natural question is which switching law yields the best (or worst)
7: possible speed of convergence to consensus?
8: We formulate this question in a rigorous manner by relaxing
9: the switched system into a bilinear consensus control system,
10: with the control playing the role of the switching law.
11: A best (or worst) possible switching law then corresponds to
12: an optimal control.
13: We derive a necessary condition for optimality,
14: stated in the form of a maximum principle~(MP).
15: Our approach, combined with suitable algorithms for numerically
16: solving optimal control problems, may be used to obtain explicit
17: lower and upper bounds on the achievable rate of convergence to consensus.
18: We also show that the system will converge to consensus for any switching law
19: if and only if a certain~$(n-1)$ dimensional linear switched system converges to the origin
20: for any switching law. For the case~$n=3$ and~$r=2$, this yields
21: a necessary and sufficient condition for convergence to consensus that
22: admits a simple graph-theoretic interpretation.
23: %%%%%
24: \end{abstract}