Generate RG with flexible degree

Taking input parameters as degree and no. of nodes.