starting graph algorithms