Multi-robot systems implementing complex behaviors under time-varying topologies