GraphTheory - Maple Programming Help

Online Help

All Products    Maple    MapleSim


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

GraphTheory

  

IsTree

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

IsTree(G)

Parameters

G

-

an undirected graph

Description

• 

An undirected graph G on n vertices is a tree if it is connected and has exactly n1 edges.

• 

The IsTree command returns true if the input graph is a tree, and false otherwise.

Examples

withGraphTheory:

TGraph1,2,1,3

TGraph 1: an undirected unweighted graph with 3 vertices and 2 edge(s)

(1)

IsTreeT

true

(2)

CGraph1,2,1,3,2,3

CGraph 2: an undirected unweighted graph with 3 vertices and 3 edge(s)

(3)

IsTreeC

false

(4)

See Also

IsAcyclic

IsConnected

IsForest

NumberOfEdges

NumberOfVertices

RandomGraphs[RandomTree]

SpanningTree

SpecialGraphs[CompleteBinaryTree]

TreeHeight