Your company here — click to reach over 10,000 unique daily visitors

nauty-ransubg - Man Page

extract random graph/digraph from a file of graphs


ransubg [-lq] [-P#|-P#/#] [-z] [-o] [-m#] [-S#] [infile [outfile]]


Extract random graph/digraphs of a file of graphs.

The output file has a header if and only if the input file does. The output format is defined by the header or first graph,

but is always digraph6 if -z is used.


Treat the input as a directed graph


Treat the input as a directed graph and output an oriented graph

-P# or -P#/#

Specify a probability p. -P# is the same as -P1/#


Make this many outputs for each input (default 1)


Canonically label outputs.


Set seed for random numbers (default nondeterministic)

Usually each edge is kept with probability p. In the case of -o, each edge in one direction only is kept

with probability p. For edges in both directions, with probability p keep one direction randomly chosen and with probability 1-p delete both directions.  Thus -oP1 will make a random orientation of an undirected graph.


Suppress auxiliary information.


April 2024 nauty 2.8.8 Nauty Manual