The method generateGraphs can generate all graphs with a given property. For example, we can verify the number of graphs on a given number of vertices. Compare these results to the Online Encyclopedia of Integer Sequences (http://oeis.org/), where the sequence name is also its OEIS identifier.
|
|
Further, we can use filterGraphs to refine the set of generate graphs for deeper properties.
Here we filter for forests, then for trees only,
|
|
|
|
Moreover, we can generate random graphs using the generateRandomGraphs method. Here we verify a result of Erdos and R\'enyi (see http://www.ams.org/mathscinet-getitem?mr=120167), which says that a random graph on $n$ vertices with edge probability $(1+\epsilon)$log$(n)/n$ is almost always connected while a graph with edge probability $(1-\epsilon)$log$(n)/n$ is almost never connected, at least as $n$ tends to infinity.
|
|
|
|