GraphTheory - Maple Help

Online Help

All Products    Maple    MapleSim


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

GraphTheory

  

CycleGraph

  

PathGraph

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

CycleGraph(n)

CycleGraph(V)

PathGraph(n)

PathGraph(V)

Parameters

n

-

positive integer

V

-

list of vertices

Description

• 

CycleGraph(n) outputs a graph which is a cycle on n vertices labeled 1, 2, ..., n.

• 

PathGraph(n) outputs a graph which is a path on n vertices labeled 1, 2, ..., n.

• 

In both cases you can input the labels for the vertices as a list of integers, strings, or symbols.

Examples

withGraphTheory:

CCycleGraph4

C:=Graph 1: an undirected unweighted graph with 4 vertices and 4 edge(s)

(1)

EdgesC

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

(2)

DrawGraphC

PPathGrapha,b,c,d

P:=Graph 2: an undirected unweighted graph with 4 vertices and 3 edge(s)

(3)

EdgesP

a,b,b,c,c,d

(4)

DrawGraphP

See Also

DrawGraph

Edges

Graph

PathGraph

 


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam