Ticket #6258 (closed defect: fixed)

Opened 9 months ago

Last modified 8 months ago

[with patch, positive review] Improve accuracy of graph eigenvalues

Reported by: rbeezer Owned by: rbeezer
Priority: critical Milestone: sage-4.1
Component: graph theory Keywords:
Cc: jason Author(s): Rob Beezer
Report Upstream: Reviewer(s): Franco Saliola
Merged in: sage-4.1.rc0 Work issues:

Description

Eigenspaces and eigenvalues of graphs are computed by converting the adjacency matrix to have RDF as the base ring, but there are now better routines in place for eigenvalues of integer matrices, so the eigenspaces() and eigenvalues() methods should be using those.

At present, the approximate values of the eigenvalues lead to eigenspaces "splitting" into pieces (i.e. several eigenspaces that should all be one), so in that regard current results are inaccurate.

Attachments

trac_6258_graph_eigenvalues.patch Download (14.8 KB) - added by rbeezer 8 months ago.

Change History

Changed 9 months ago by jason

  • cc jason added

Changed 8 months ago by rbeezer

Changed 8 months ago by rbeezer

  • priority changed from minor to critical
  • summary changed from Improve accuracy of graph eigenvalues to [with patch, needs review] Improve accuracy of graph eigenvalues

The patch generally improves graph eigenvalues by not altering the adjacency matrix and therefore allowing new routines to take advantage of the adjacency matrix being a matrix of integers. It also corrects a serious bug for eigenvalues of digraphs. More specifically

1. The adjacency matrix is no longer converted to a matrix of reals or complexes.

2. Eigenspaces are now more abstract (but are exact). More numerical results come from the new eigenvectors() method.

3. Any complex part of an eigenvalue was previously being stripped, as if a graph could never be a digraph. This has been corrected and a simple doctest added.

4. While in the neighborhood, the characteristic_polynomial() got some cosmetic changes in its docstring.

5. Long-term, the spectrum() command should return some sort of object, like a Factorization object, as discussed on sage-devel. Then the current spectrum() could be renamed as eigenvalues().

Changed 8 months ago by saliola

  • reviewer set to Franco Saliola

Looks good. And great job with the documentation!

Patch applies cleanly to 4.1.alpha2; testing in progress on sage-math. I'll report back soon.

Changed 8 months ago by saliola

  • summary changed from [with patch, needs review] Improve accuracy of graph eigenvalues to [with patch, positive review] Improve accuracy of graph eigenvalues

No new doctest failures are introduced by this patch on 4.1.alpha2.

Positive review.

Changed 8 months ago by rbeezer

  • author set to Rob Beezer

Changed 8 months ago by rlm

  • status changed from new to closed
  • resolution set to fixed
  • merged set to sage-4.1.rc0
Note: See TracTickets for help on using tickets.