IsIntegerGraph - Maple Help

GraphTheory

 IsIntegerGraph

 Calling Sequence IsIntegerGraph(G)

Parameters

 G - a graph

Description

 • 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.

Examples

 > $\mathrm{with}\left(\mathrm{GraphTheory}\right):$
 > $\mathrm{with}\left(\mathrm{SpecialGraphs}\right):$
 > $\mathrm{K3}≔\mathrm{CompleteGraph}\left(3\right)$
 ${\mathrm{K3}}{≔}{\mathrm{Graph 1: an undirected unweighted graph with 3 vertices and 3 edge\left(s\right)}}$ (1)
 > $\mathrm{IsIntegerGraph}\left(\mathrm{K3}\right)$
 ${\mathrm{true}}$ (2)
 > $\mathrm{factor}\left(\mathrm{CharacteristicPolynomial}\left(\mathrm{K3},x\right)\right)$
 $\left({x}{-}{2}\right){}{\left({x}{+}{1}\right)}^{{2}}$ (3)
 > $\mathrm{P3}≔\mathrm{PathGraph}\left(3\right)$
 ${\mathrm{P3}}{≔}{\mathrm{Graph 2: an undirected unweighted graph with 3 vertices and 2 edge\left(s\right)}}$ (4)
 > $\mathrm{IsIntegerGraph}\left(\mathrm{P3}\right)$
 ${\mathrm{false}}$ (5)
 > $\mathrm{factor}\left(\mathrm{CharacteristicPolynomial}\left(\mathrm{P3},x\right)\right)$
 ${x}{}\left({{x}}^{{2}}{-}{2}\right)$ (6)
 > $H≔\mathrm{LeviGraph}\left(\right)$
 ${H}{≔}{\mathrm{Graph 3: an undirected unweighted graph with 30 vertices and 45 edge\left(s\right)}}$ (7)
 > $\mathrm{IsIntegerGraph}\left(H\right)$
 ${\mathrm{true}}$ (8)
 > $\mathrm{factor}\left(\mathrm{CharacteristicPolynomial}\left(H,x\right)\right)$
 ${{x}}^{{10}}{}\left({x}{-}{3}\right){}\left({x}{+}{3}\right){}{\left({x}{-}{2}\right)}^{{9}}{}{\left({x}{+}{2}\right)}^{{9}}$ (9)