# randomGraph -- returns a random graph

## Synopsis

• Usage:
G = randomGraph(R,d)
• Inputs:
• R, , which gives the vertex set of G
• d, an integer, the number of edges in G
• Outputs:
• G, , a graph with d edges on vertex set determined by R

## Description

This function allows one to create a graph on an underlying vertex set with a given number of randomly chosen edges.

 i1 : R = QQ[x_1..x_9]; i2 : randomGraph(R,4) o2 = Graph{edges => {{x , x }, {x , x }, {x , x }, {x , x }}} 3 4 1 4 6 7 1 9 ring => R vertices => {x , x , x , x , x , x , x , x , x } 1 2 3 4 5 6 7 8 9 o2 : Graph i3 : randomGraph(R,4) o3 = Graph{edges => {{x , x }, {x , x }, {x , x }, {x , x }}} 4 9 5 6 5 7 4 5 ring => R vertices => {x , x , x , x , x , x , x , x , x } 1 2 3 4 5 6 7 8 9 o3 : Graph