RandomOrientation - Maple Help

GraphTheory[RandomGraphs]

 RandomOrientation
 generate random orientation of graph

 Calling Sequence RandomOrientation(G,opts)

Parameters

 G - undirected graph opts - (optional) one or more options as specified below

Options

 • seed = integer or none
 Seed for the random number generator. Equivalent to calling randomize(seed) immediately before invoking this function.
 • strong = truefalse
 Specifies that the resulting directed graph must be strongly connected. The default is false.

Description

 • RandomOrientation(G,opts) creates a random orientation of the undirected graph G. This is a directed graph with a particular random assignment of directions to the edges of G.
 • The random number generator used can be seeded using the randomize function or the seed option.

Examples

 > $\mathrm{with}\left(\mathrm{GraphTheory}\right):$
 > $G≔\mathrm{GraphTheory}:-\mathrm{CompleteGraph}\left(5\right)$
 ${G}{≔}{\mathrm{Graph 1: an undirected graph with 5 vertices and 10 edge\left(s\right)}}$ (1)
 > $\mathrm{with}\left(\mathrm{RandomGraphs}\right):$
 > $\mathrm{G1}≔\mathrm{RandomOrientation}\left(G\right)$
 ${\mathrm{G1}}{≔}{\mathrm{Graph 2: a directed graph with 5 vertices and 10 arc\left(s\right)}}$ (2)

Compatibility

 • The GraphTheory[RandomGraphs][RandomOrientation] command was introduced in Maple 2023.