GraphTheory - Maple Programming Help

Online Help

All Products    Maple    MapleSim


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

GraphTheory

  

IsTriangleFree

  

test if graph is triangle-free

 

Calling Sequence

Parameters

Options

Description

Definition

Examples

Compatibility

Calling Sequence

IsTriangleFree(G,opts)

Parameters

G

-

graph

opts

-

(optional) equation of the form usecached=true or usecached=false

Options

• 

usecached : keyword option of the form usecached=true or usecached=false. This specifies whether a previously stored clique number should be used, if available. The default is true.

Description

• 

The IsTriangleFree(G) command returns true if G is a triangle-free graph and false otherwise.

Definition

• 

An undirected graph G is triangle-free if it does not contain any cycle of length 3. This is equivalent to stating the clique number of G is less than 3.

Examples

withGraphTheory:

withSpecialGraphs:

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

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

(1)

IsTriangleFreeG

false

(2)

PPetersenGraph

PGraph 2: an undirected unweighted graph with 10 vertices and 15 edge(s)

(3)

IsTriangleFreeP

true

(4)

DrawGraphP

CClebschGraph

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

(5)

IsTriangleFreeC

true

(6)

DrawGraphC

Compatibility

• 

The GraphTheory[IsTriangleFree] command was introduced in Maple 2019.

• 

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

See Also

CliqueNumber

CycleBasis