Controlling connectivity of dynamic graphs