GraphTheory - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Mathematics : Discrete Mathematics : Graph Theory : GraphTheory Package : GraphTheory/GraphSpectrum

GraphTheory

  

GraphSpectrum

 

Calling Sequence

Parameters

Options

Description

Examples

Calling Sequence

GraphSpectrum(G, opt)

Parameters

G

-

graph

opt

-

(optional) the symbol exact or an equation of the form exact=true or false

Options

• 

exact=true or false

  

If exact or exact=true is specified, the eigenvalues are returned as exact expressions. If exact=false, the eigenvalues are returned as floating-point expressions. The default is false.

Description

• 

The GraphSpectrum command returns the spectrum of the eigenvalues of a specified graph. The output is a list L. Each element of L is a list of size 2, where the first element is an eigenvalue and the second element is its multiplicity.

• 

If argument exact or exact=true is provided, the eigenvalues are returned as exact expressions. Otherwise the eigenvalues are returned as floating-point expressions.

Examples

withGraphTheory:

C5CycleGraph5

C5Graph 1: an undirected unweighted graph with 5 vertices and 5 edge(s)

(1)

GraphSpectrumC5

−1.618033990,2,0.6180339900,2,2.000000000,1

(2)

GraphSpectrumC5,exact

5212,2,5212,2,2,1

(3)

fCharacteristicPolynomialC5,x

fx55x3+5x2

(4)

factorf

x2x2+x12

(5)

See Also

AdjacencyMatrix

CharacteristicPolynomial

IsIntegerGraph

SeidelSpectrum