generate random orientation of graph
(optional) one or more options as specified below
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.
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.
G ≔ GraphTheory:-CompleteGraph⁡5
G≔Graph 1: an undirected graph with 5 vertices and 10 edge(s)
G1 ≔ RandomOrientation⁡G
G1≔Graph 2: a directed graph with 5 vertices and 10 arc(s)
The GraphTheory[RandomGraphs][RandomOrientation] command was introduced in Maple 2023.
For more information on Maple 2023 changes, see Updates in Maple 2023.
Download Help Document