Elementary Invariants of a Graph

Order(G) : Grph -> RngIntElt
NumberOfVertices(G) : Grph -> RngIntElt
The number of vertices of the graph G.
Size(G) : Grph -> RngIntElt
NumberOfEdges(G) : Grph -> RngIntElt
The number of edges of the graph G.
CharacteristicPolynomial(G) : GrphUnd -> RngUPolElt
The characteristic polynomial (over the integers) of the graph G; i.e. the characteristic polynomial of the adjacency matrix of G.
Spectrum(G) : GrphUnd -> SetEnum
The spectrum of the graph G; i.e. the roots of the characteristic polynomial of G. The roots are returned as a set of tuples, each containing a root and its multiplicity.
V2.28, 13 July 2023