graph cycle resolved