GraphTheory - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Mathematics : Discrete Mathematics : Graph Theory : GraphTheory Package : GraphTheory/GraphIntersection

GraphTheory

  

GraphIntersection

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

GraphIntersection(G1,...,Gs)

Parameters

G1,...,Gs

-

graphs

Description

• 

The GraphIntersection function returns a graph G which is the intersection of the graphs G1,...,Gs, such that

VerticesG=VerticesG1VerticesGs

EdgesG=EdgesG1EdgesGs

• 

Note that the graphs G1,...,Gs must all be directed or all undirected, and the resulting graph is directed or undirected, respectively. Likewise, the graphs G1,...,Gs must all be weighted or all unweighted, and the resulting graph is then weighted or unweighted, respectively.

• 

Moreover, if G1,...,Gs are weighted graphs, the resulting graph is a weighted graph where the weight of any edge is the minimum of the weights of that edge in G1,...,Gs.

Examples

withGraphTheory:

G1Graph5,1,2,1,3,1,4,1,5

G1Graph 1: an undirected unweighted graph with 5 vertices and 4 edge(s)

(1)

G2Graph5,1,2,1,3,1,4,1,5,2,3,2,5,3,4,4,5

G2Graph 2: an undirected unweighted graph with 5 vertices and 8 edge(s)

(2)

DrawGraphG1

DrawGraphG2

DrawGraphGraphIntersectionG1,G2

Compatibility

• 

The GraphTheory[GraphIntersection] command was introduced in Maple 2018.

• 

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

See Also

DisjointUnion

GraphUnion