GraphTheory - Maple Programming Help

Online Help

All Products    Maple    MapleSim


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

GraphTheory

  

GreedyColor

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

GreedyColor(G, perm)

Parameters

G

-

undirected unweighted graph

perm

-

(optional) list of vertex labels

Description

• 

The GreedyColor command colors the vertices of the graph in the order given by perm, one at a time, assigning to each vertex the smallest available color. If the permutation perm is not specified, the identity permutation is used.

Examples

withGraphTheory:

C6CycleGraph6

C6Graph 1: an undirected unweighted graph with 6 vertices and 6 edge(s)

(1)

GreedyColorC6

2,0,1,0,1,0,1

(2)

GPermuteVerticesC6,1,4,2,5,3,6

GGraph 2: an undirected unweighted graph with 6 vertices and 6 edge(s)

(3)

GreedyColorG

3,0,0,1,1,2,2

(4)

See Also

ChromaticNumber

IsVertexColorable