Generating graphs from degree sequence