# generateRandomGraphs -- generates random graphs on a given number of vertices

## Synopsis

• Usage:
G = generateRandomGraphs(n, num)
G = generateRandomGraphs(n, num, pq)
G = generateRandomGraphs(n, num, pz)
G = generateRandomGraphs(R, num)
G = generateRandomGraphs(R, num, pq)
G = generateRandomGraphs(R, num, pz)
• Inputs:
• R, , the ring in which the graphs will be created
• n, an integer, the number of vertices of the graphs
• num, an integer, the number of random graphs to generate
• pq, , the probability of a given edge being included (between 0 and 1)
• pz, an integer, the probability of a given edge being included (positive)
• Optional inputs:
• RandomSeed => an integer, default value 0, if nonzero, then the specified random seed is passed to nauty
• Outputs:
• G, a list, the randomly generated graphs

## Description

This method generates a specified number of random graphs with a given number of vertices. Note that some graphs may be isomorphic.

If a PolynomialRing R is supplied instead, then the number of vertices is the number of generators. Moreover, the Strings are automatically converted to graphs in R.

If the input pq is included, then the edges are chosen to be included with probability pq. If the input pz is included and is positive, then the edges are chose to be included with probability 1/pz.

 ```i1 : generateRandomGraphs(5, 5, RandomSeed => 314159) o1 = {DEK, DbO, D[O, DiO, DMg} o1 : List``` ```i2 : generateRandomGraphs(5, 5) o2 = {DO_, DJC, D[O, D\S, DNg} o2 : List``` ```i3 : generateRandomGraphs(5, 5, RandomSeed => 314159) o3 = {DEK, DbO, D[O, DiO, DMg} o3 : List```