Some graph algorithms and tests