generate graph with degree bounds