Collapse networks that are not connected.