Currently, eigenspaces of graphs are computed by constructing the
adjacency matrix, then converting to a matrix over RDF, and finally
computing the eigenspaces of this matrix.  When the graph has integer
eigenvalues of high multiplicity, numerical inaccuracy is leading to
many one-dimensional eigenspaces for what should be the same
eigenvalue.

If you request the adjacency matrix of a graph, it is returned as a
matrix over the integers and the eigenspaces of this matrix appear to
behave better numerically.  At least it works well on a graph with 50
vertices having just three distinct eigenvalues.

Compare the output of:

graphs.CompleteGraph(3).eigenspaces()
(three eigenspaces, wrong)

with

graphs.CompleteGraph(3).am().eigenspaces()
(two eigenspaces, correct)

1.  I'm guessing the conversion to RDF is historical.  I'll make a
ticket and improve the situation unless there is an explanation I'm
missing.

2.  Similarly the spectrum() method for graphs returns RDF, while
integer eigenvalues of the adjacency matrix come back as rationals,
and non-rational eigenvalues are algebraic numbers.

3.  For an undirected graph, the adjacency matrix is symmetric, so the
distinction between left and right eigenspaces doesn't matter.  For
directed graphs, would left and right eigenspace methods be useful, or
just clutter?  One could always build the adjacency matrix and call
the specialized versions already in place for matrices.

Thoughts?

Rob
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to