---
name: "nauty-ransubg"
section: "1"
platform: "linux"
package: "nauty"
version: "2.8.9+ds-1+b1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/nauty-ransubg"
---

# nauty-ransubg(1)

extract random graph/digraphs of a file of graphs

## NAME

nauty-ransubg - extract random graph/digraphs of a file of graphs

## SYNOPSIS

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

## DESCRIPTION

-

  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.

- **-z**

  Treat the input as a directed graph

- **-o**

  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**/#

- **-m**#

  Make this many outputs for each input (default 1)

- **-l**

  Canonically label outputs.

- **-S**#

  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.

- **-q**

  Suppress auxiliary information.
