Fast distribution network reconfiguration with graph theory