update random graphs