MoralGraph - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


GraphTheory

  

MoralGraph

  

construct moral graph

 

Calling Sequence

Parameters

Description

Definition

Examples

Compatibility

Calling Sequence

MoralGraph( G )

Parameters

G

-

graph

Description

• 

The MoralGraph( G ) command constructs the moral graph of the directed graph G.

Definition

• 

The moral graph is a graph with the same vertices as G but with all directed edges made undirected and with the property that all pairs in G which share a child are connected.

Examples

Compute the moral graph of an acyclic directed graph.

withGraphTheory:

GGraph7,1,3,2,3,2,4,3,5,3,6,3,7,4,7

GGraph 1: a directed graph with 7 vertices and 7 arc(s)

(1)

NumberOfEdgesG

7

(2)

DrawGraphG

MMoralGraphG

MGraph 2: an undirected graph with 7 vertices and 9 edge(s)

(3)

NumberOfEdgesM

9

(4)

DrawGraphM

Compatibility

• 

The GraphTheory[MoralGraph] command was introduced in Maple 2024.

• 

For more information on Maple 2024 changes, see Updates in Maple 2024.

See Also

GraphTheory

GraphTheory[DrawGraph]

GraphTheory[Graph]

GraphTheory[ReverseGraph]

GraphTheory[UnderlyingGraph]