GraphTheory/IsOriented - Maple Help

GraphTheory

 IsOriented
 test if graph is oriented

 Calling Sequence IsOriented(G)

Parameters

 G - directed graph

Description

 • IsOriented(G) returns true if G is a directed graph containing no symmtric pair of arcs. That is, for every pair of vertices u and v in G, at most one of the arcs [u,v] and [v,u] is in G.
 • Since a pair of symmetric arcs forms a directed cycle, every acyclic directed graph is oriented.

Examples

 > $\mathrm{with}\left(\mathrm{GraphTheory}\right):$
 > $\mathrm{G1}≔\mathrm{Digraph}\left(5,\left\{\left[1,2\right],\left[2,3\right],\left[2,4\right],\left[3,5\right]\right\}\right)$
 ${\mathrm{G1}}{≔}{\mathrm{Graph 1: a directed graph with 5 vertices and 4 arc\left(s\right)}}$ (1)
 > $\mathrm{IsOriented}\left(\mathrm{G1}\right)$
 ${\mathrm{true}}$ (2)
 > $\mathrm{G2}≔\mathrm{Digraph}\left(5,\left\{\left[1,2\right],\left[2,3\right],\left[2,4\right],\left[3,5\right],\left[4,2\right]\right\}\right)$
 ${\mathrm{G2}}{≔}{\mathrm{Graph 2: a directed graph with 5 vertices and 5 arc\left(s\right)}}$ (3)
 > $\mathrm{IsOriented}\left(\mathrm{G2}\right)$
 ${\mathrm{false}}$ (4)
 > $\mathrm{G3}≔\mathrm{RandomGraphs}:-\mathrm{RandomArborescence}\left(100\right)$
 ${\mathrm{G3}}{≔}{\mathrm{Graph 3: a directed graph with 100 vertices and 99 arc\left(s\right)}}$ (5)
 > $\mathrm{IsOriented}\left(\mathrm{G3}\right)$
 ${\mathrm{true}}$ (6)

Compatibility

 • The GraphTheory[IsOriented] command was introduced in Maple 2022.