GraphTheory
ReverseGraph
construct reverse graph
Calling Sequence
Parameters
Description
Examples
Compatibility
ReverseGraph( G )
G
-
graph
The ReverseGraph( G ) command constructs the reverse graph of the graph G. The reverse graph is a graph with the same vertices as G but with the directions of all edges reversed.
This operation defined on all graphs but only gives meaningful results for directed graphs.
This operation is also known as the transpose graph or converse graph. The adjacency matrix of ReverseGraph(G) is the transpose of the adjacency matrix of G.
Compute the reverse graph a simple directed graph.
with⁡GraphTheory:
G≔Graph⁡6,1,2,2,3,2,4,4,5
G≔Graph 1: a directed graph with 6 vertices and 4 arc(s)
DrawGraph⁡G
H≔ReverseGraph⁡G
H≔Graph 2: a directed graph with 6 vertices and 4 arc(s)
DrawGraph⁡H
useLinearAlgebrainEqual⁡AdjacencyMatrix⁡H,Transpose⁡AdjacencyMatrix⁡Gend use
true
The GraphTheory[ReverseGraph] command was introduced in Maple 2016.
For more information on Maple 2016 changes, see Updates in Maple 2016.
See Also
GraphTheory[AdjacencyMatrix]
GraphTheory[DrawGraph]
GraphTheory[Graph]
GraphTheory[TransitiveClosure]
LinearAlgebra[Equal]
LinearAlgebra[Transpose]
Download Help Document