Fix number of edges for sparse graph