A vertex labelling of a graph G is a partial map f from the vertex-set V of G into a set L. The set L is known as the vertex label set. An edge labelling of a graph G is a partial map f from the edge-set E of G into a set L. The set L is known as the edge label set. A labelled graph is built by assigning labels successively to vertices or edges after the (unlabelled) graph has been constructed.
For the following operations, T may be interpreted as either the vertex-set or edge-set of some graph. The variable t may be interpreted as either a vertex or an edge.
Assigns the label l to the edge or vertex t
Assign the label l to the ith vertex of G.
Assign the label l to the edge between the ith and jth vertices of G.
Assigns the labels in L to the corresponding edges or vertices in the sequence or indexed set S. If for some edge or vertex t the corresponding entry in L is not defined then any existing label of t is removed.
Assign the labels in L to the vertices of G whose indices are the corresponding elements in S. If for some vertex v whose index is in S the corresponding label in L is not defined then any existing label of v is removed.
Assign the labels in L to the edges of G specified in S. The elements of S must be sets or sequences of two integers, depending on whether G is undirected or directed respectively. Each element of S will correspond to the edge between the ith and jth vertices of G, where i and j are the two integers in the element.
Assigns the labels in L to the corresponding edges or vertices in T If for some edge or vertex t the corresponding entry in L is not defined then any existing label of t is removed.
The label of the edge or vertex t. It is an error if t does not have a label defined.
The label of the ith vertex of G. It is an error if the vertex does not have a label defined.
The label of the edge between the ith and jth vertices of G. It is an error if the edge does not have a label defined.
The sequence L of labels of the edges or vertices in S. If an element of S has no label, then the corresponding entry in L is undefined.
The sequence L of labels of the edges or vertices in T. If an element of T has no label, then the corresponding entry in L is undefined.
The sequence L of labels of the vertices of G whose indices are in S. If a vertex whose index is in S has no label, then the corresponding entry in L is undefined.
The sequence L of labels of the vertices of G. If a vertex of G has no label, then the corresponding entry in L is undefined.
The sequence L of labels of the edges of G specified in S. The elements of S must be sets or sequences of two integers, depending on whether G is undirected or directed respectively. Each element of S will correspond to the edge between the ith and jth vertices of G, where i and j are the two integers in the element. If the edge has no label, then the corresponding element of L is undefined.
The sequence L of labels of the edges of G. If an edge of G has no label, then the corresponding entry in L is undefined.
True if and only if the edge or vertex t has a label.
True if and only if the i-th vertex of G has a label.
True if and only if the edge between the ith and jth vertices of G has a label.
Removes the label of the edge or vertex t.
Removes the label of the ith vertex of G.
Remove the label of the edge between the ith and jth vertices of G.
Remove the labels of the edges or vertices in S.
Remove the labels of the vertices of G whose indices are in S.
Remove the labels of the edges of G specified in S. The elements of S must be sets or sequences of two integers, depending on whether G is undirected or directed respectively. Each element of S will correspond to the edge between the ith and jth vertices of G, where i and j are the two integers in the element.
Remove the labels of the edges or vertices in T.
> K34, V, E := BipartiteGraph(3, 4); > L := [ IsEven(Distance(V!1, v)) select "red" else "blue" : > v in Vertices(K34) ]; > AssignLabels(Vertices(K34), L); > VertexLabels(K34); [ red, red, red, blue, blue, blue, blue ]
> G<a,b> := FPGroup(Sym(4)); > I,m := Transversal(G, sub<G | 1>); > S := Setseq(Generators(G)); > N := [{m(a*b) : b in S} : a in I]; > graph := StandardGraph(Digraph<I | N>); > AssignLabels(VertexSet(graph), IndexedSetToSequence(I)); > for i in [1..#I] do > AddEdges( graph, [[i, Index(I, m(I[i]*s))] : s in S], S); > end for;In this graph, [1,2,5,4] is a cycle. So the corresponding edge labels should multiply to the identity.
> &*EdgeLabels(graph, [[1,2],[2,5],[5,4],[4,1]]); a^4 > G; Finitely presented group G on 2 generators Relations b^2 = Id(G) a^4 = Id(G) (a^-1 * b)^3 = Id(G)