generate graphs that have no cycles