Generalized graph generator constructs optimized graphs for a fixed set of vertices with a given set of constraints