Is there a repository of cospectral non-isomorphic graphs available somewhere?
I am looking for list of $0/1$ adjacency matrix pairs that can be input data in tools such as MATLAB.
Is there a repository of cospectral non-isomorphic graphs available somewhere?
I am looking for list of $0/1$ adjacency matrix pairs that can be input data in tools such as MATLAB.
The simplest source of cospectral graphs is lists of strongly regular graphs, lots of which are easily available from Ted Spence's web page at http://www.maths.gla.ac.uk/~es/srgraphs.php.
Otherwise you can use Sage to generate small graphs (up to 10 or so vertices) and then filter out cospectral pairs or groups. I expect the built in Sage function for cospectral pairs just wraps this up.
I don't know what you are doing with them, but I'd probably recommend choosing the computational tool based on what you need, rather than specifying Matlab in advance. If you're working with 64 vertex graphs you'll need full symbolic computation with arbitrary length integers and you'll want to avoid, or be very very careful, in finding eigenvalues numerically.
You can do this in sage for small order and then export the adjacency matrices to say text file friendly to Matlab and then parse in Matlab.
Tony Huynh suggests one approach. Another approach is to enumerate with McKay's nauty in sage in keep track of cospectral.
Such database will be large:
A082104 Number of distinct characteristic polynomials among all simple undirected graphs on n nodes. 1, 2, 4, 11, 33, 151, 988, 11453, 247357, 10608128, 901029366, 148187993520
Check the references in OIES.
From Brouwer's reference:
https://www.win.tue.nl/~aeb/graphs/cospectral/cospectralA.html Numbers of characteristic polynomials and cospectral graphs
Consider contacting Brouwer, though the full database will take a lot of space AFAICT.