63.60 VertexColouring

VertexColouring( gamma )

This function returns a proper vertex-colouring C for the graph gamma, which must be simple.

This proper vertex-colouring C is a list of natural numbers, indexed by the vertices of gamma, and has the property that C[i]not=C[j] whenever [i,j] is an edge of gamma. At present a greedy algorithm is used.

    gap> VertexColouring( JohnsonGraph(4,2) );
    [ 1, 2, 3, 3, 2, 1 ] 

Previous Up Top Next
Index

GAP 3.4.4
April 1997