GraphTheory - Maple Programming Help

Online Help

All Products    Maple    MapleSim


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

GraphTheory

  

Subgraph

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

Subgraph(G, E)

Parameters

G

-

graph

E

-

set or list of edges

Description

• 

The Subgraph command returns the subgraph formed by a specified set (or list) of edges.

• 

To induce a subgraph using a set of vertices, use the InducedSubgraph command.

Examples

withGraphTheory:

K5CompleteGraph5

K5Graph 1: an undirected unweighted graph with 5 vertices and 10 edge(s)

(1)

E1,2,2,3,3,4,4,1

E1,2,1,4,2,3,3,4

(2)

HSubgraphK5,E

HGraph 2: an undirected unweighted graph with 4 vertices and 4 edge(s)

(3)

evalbEdgesH=E

true

(4)

HighlightSubgraphK5,H

DrawGraphK5

See Also

DeleteEdge

HighlightSubgraph

InducedSubgraph