scripts for simple graph algorithms