GraphTheory
IsIntegerGraph
Calling Sequence
Parameters
Description
Examples
IsIntegerGraph(G)
G
-
a graph
IsIntegerGraph returns true if its argument G is an integer graph, namely if the spectrum of G consists of only integer numbers, and false otherwise.
with⁡GraphTheory:
with⁡SpecialGraphs:
K3≔CompleteGraph⁡3
K3≔Graph 1: an undirected graph with 3 vertices and 3 edge(s)
IsIntegerGraph⁡K3
true
factor⁡CharacteristicPolynomial⁡K3,x
x−2⁢x+12
P3≔PathGraph⁡3
P3≔Graph 2: an undirected graph with 3 vertices and 2 edge(s)
IsIntegerGraph⁡P3
false
factor⁡CharacteristicPolynomial⁡P3,x
x⁢x2−2
H≔LeviGraph⁡
H≔Graph 3: an undirected graph with 30 vertices and 45 edge(s)
IsIntegerGraph⁡H
factor⁡CharacteristicPolynomial⁡H,x
x10⁢x−3⁢x+3⁢x−29⁢x+29
See Also
CharacteristicPolynomial
GraphSpectrum
Download Help Document