Generating isospectral but not isomorphic quantum graphs

Mats-Erik Pistol Solid State Physics and NanoLund Box 118, Lund University, S-221 00 Lund SWEDEN

[email protected] September 21, 2021

Abstract Quantum graphs are defined by having a Laplacian defined on the edges a metric graph with boundary conditions on each vertex such that the resulting operator, L, is self-adjoint. We use Neumann boundary con- ditions. The spectrum of L does not determine the graph uniquely, that is, there exist non-isomorphic graphs with the same spectra. There are few known examples of pairs of non-isomorphic but isospectral quantum graphs. We have found all pairs of isospectral but non-isomorphic equilateral connected quantum graphs with at most seven vertices. We find three isospectral triplets including one involving a loop. We also present a com- binatorial method to generate arbitrarily large sets of isospectral graphs and give an example of an isospectral set of four. This has been done this using computer algebra. We discuss the possibilities that our program is incorrect, present our tests and open source it for inspection at this url. Keywords: quantum graphs, non-isomorphic, isospectral

1 Introduction

The theory of isospectral manifolds is rich and has a long history [1, 2, 3, 4, 5] where most often the Laplace operator is the relevant operator combined with Dirichlet or Neumann boundary conditions. There are many manifolds which have the same spectrum but are not isometric, which also include subsets of 2 arXiv:2104.12885v3 [math.SP] 19 Sep 2021 R [5]. For quantum graphs it has been shown that if the lengths of the edges are rationally independent, then two graphs having the same spectra must be identical, but if the lengths of the edges are rationally dependent then there exist examples of isospectral, but not isomorphic, quantum graphs [6, 7, 8]. We will call such pairs isospectral pairs. Band et al. found a method to construct isospectral pairs of quantum graphs [9]. However their examples involved either not purely Neumann boundary conditions or involved disjoint graphs. We have here searched for isospectral pairs, or more generally isospectral sets, using computer algebra. In order to do so we limited our investigations to

1 connected equilateral graphs, where all edges have the same length. We used only Neumann boundary conditions. We have found six isospectral pairs of graphs among all equilateral graphs with at most seven vertices. In addition we have found three isospectral pairs among all tree graphs having at most ten vertices. Some of the isospectral graphs we found are unusually simple, including an isospectral triplet where one member is the loop graph. We also present a method to generate isospectral graphs by attaching certain graphs to any compact graph which can generate arbitrarily large sets of isospectral graphs. Our results show that there are many interesting isospectral sets.

2 Laplacians on graphs and their spectra

We consider only finite compact metric graphs, Γ, formed by joining together N edges En at M vertices Vm. Each edge, En, has a certain length and can be seen as the interval [x2n−1, x2n] on the real line. The graphs we consider most d2 often have length one. On each edge we define the Laplace operator L = − dx2 which has solutions given by a linear combination of eikx and e−ikx. We impose standard boundary conditions, also called Neumann boundary conditions:  f(xi) = f(xj), xi, xj ∈ Vm,  X (1) ∂nf(xi) = 0.  xi∈Vm at each vertex Vm where the xi’s are the endpoints of the edges that meet at the vertex. In words, the eigenfunctions are required to be continuous at the vertex and the sum of their (outward) normal derivatives, ∂nf(xi), at the vertex is zero. With these boundary conditions the Laplace operator is self-adjoint [10, 11] and has a spectrum which is discrete and formed by a sequence of eigenvalues tending to +∞. We note that λ0 = 0 is an eigenvalue with the eigenfunction ψ0(x) = 1. This eigenfunction is unique, apart from normalisation, provided Γ is connected. Imposing the boundary conditions on the eigenfunctions gives a certain determinant D(k) that has to be zero in order for k to be a root (which we will often call an eigenfrequency), such that λ = k2 where λ is an eigenvalue. How to obtain D(k), which is not unique, has been described many times before [6, 7, 10, 12] and we will not repeat it here.

3 Computing the eigenvalues

In order to find the eigenvalues of a graph we have made a computer program that constructs a D(k) as a function of the graph. It then solves the equation D(k) = 0. It is also possible to inspect D(k) and this will give the multiplic- ity of the roots k. Our program does not yet give the multiplicities directly. But it does give all eigenfrequencies and it gives them in an ”exact” form. It is sometimes necessary to solve a high-degree polynomial equation to get the eigenfrequencies and such equations need to be solved numerically if the degree is high. The coefficients of the polynomials are known exactly though. Our program gives the eigenfrequencies if the graph has rationally dependent edge

2 lengths, that is the ratio of any two edge lengths is a rational number. If the graph has a pair of rationally independent edges then we seldom get any so- lutions at all but we do get D(k). Our program is written in Mathematica [13].

4 Testing

Since our results are highly dependent on our program being correct we have performed a set of tests against known results. Specifically:

• The program gives the correct eigenvalues with the correct multiplicities for the path graph, the loop graph, the lasso graph for different lengths of the pendant edge, and the star graph with n leaves of equal length [12, 14, 15, 16].

• The program gives the correct eigenvalues with the correct multiplicities for the star graph having three leaves with different lengths [14].

• The program gives the correct eigenvalues with the correct multiplicities for the flower graph with two petals with different lengths [14, 17].

• The program gives the correct second eigenvalue (i. e. the spectral gap) for the complete graph with n vertices as well as for the pumpkin graph with n edges of equal length [15].

• The program correctly gives the same eigenvalues for the two isospectral but not isomorphic graphs given by Gutkin and Smilanzky [6].

• The program changes the eigenvalues correctly when scaling the length of the graphs [15].

• Consider a graph having a set of vertices with valence two. Let us create a second graph by removing some of these vertices. These two graphs have the same spectrum and this is confirmed by our program in all tested cases.

• For a few isospectral graphs found by the program we have been able to verify the isospectrality by hand. Details are provided below.

Despite this it is certainly possible that the program is still not correct in all cases and we are not competent to formally prove that it is correct. We thus open source our program [18] including our test examples, such that independent minds can inspect it and do more tests. We here follow a trend in modern to use computers to either prove or make results highly likely [19, 20, 21].

5 Testing graphs for isospectrality

We downloaded the one graph with two vertices, the two graphs with three vertices, the six graphs with four vertices, the 21 graphs with five vertices, the 112 graphs with six vertices and the 853 graphs with seven vertices. The

3 a) b) c)

d) e) f)

Figure 1: All isospectral pairs with at most seven vertices. The edgelength is one for all graphs. a) An isospectral pair with five vertices when the two vertices with valence two in the left graph have been removed. The length of the graphs have to be normalised to the same value in order to be isospectral. b) An isospectral pair with six vertices. c) - f) Isospectral pairs with seven vertices. The pairs in e) have one extra edge compared with those in d). In all cases one member of the pair has a pendant edge and the other not. downloaded graphs are all connected equilateral graphs. The length of each graph was then normalised to be one, since two graphs with different lengths cannot be isospectral. We then computed the spectra for all these graphs and checked for possible isospectral pairs. Since our program does not give the multiplicities of the eigenvalues explicitly we checked the relevant determinant, D(k), by hand in order to finally isolate all isospectral pairs. Fig. 1 shows the result. We find one isospectral pair having five vertices which has an isospectral partner with seven vertices, and five isospectral pairs having seven vertices. Note that in all cases one graph in the pair has a pendant edge and the other graph does not have a pendant edge. We also studied tree graphs, hereafter called trees, and generated all trees with at most ten vertices. Checking for isospectral pairs we found three exam- ples, shown in Fig. 2. The first isospectral pair has nine vertices and there are two having ten vertices. The isospectral pair from ref. 6, where the trees have eight vertices, was not detected as an isospectral pair by our program since the edge lengths are not equal. Our results agree with those of Chernyshenko and Pivovarchik who did not find isospectral pairs for equilateral graphs having at most five vertices and equilateral trees having at most eight vertices [22]. Encouraged by these examples of isospectral pairs we then generated graphs consisting of a loop with four vertices which we decorated with pen- dant edges or pendant trees such that the total number of vertices was at most ten, which was limited by computer power. We found 22 isospectral pairs and one isospectral triplet. Some of these isospectral sets are very simple, in par- ticular the isospectral triplet in Fig. 3. This triplet involves a loop which is

4 a) b) c)

Figure 2: All isospectral pairs of trees with at most ten vertices. a) An isospectral pair with nine vertices. b), c) The two isospectral pairs having ten vertices. very well known. The other two members is a loop decorated with two pendant edges and a loop decorated with four pendant edges. The graph in Fig. 3c) was not found during the search but using the combinatorial method to be described below. We decided to compute the eigenfrequencies of the graphs in Fig. 3a) and 3b) by hand in order to give our program an extra check as well as to convince us that the two graphs really are isospectral. We followed the method explained in detail by Berkolaiko in Ref. [12], which involves a bond scattering matrix, Sv, and an edge scattering matrix, Se(k). These matrices are as follows for the graph in Fig. 3b):

 1 1 1 1  0 − 2 2 2 0 2  1 0 0 0 0 0   1 1 1 1   0 2 2 − 2 0 2  Sv =  1 1 1 1  (2)  0 2 − 2 2 0 2   1 1 1 1   0 2 2 2 0 − 2  0 0 0 0 1 0

 eikL1 0 0 0 0 0   0 eikL1 0 0 0 0     0 0 eikL2 0 0 0  Se(k) =   . (3)  0 0 0 eikL2 0 0     0 0 0 0 eikL3 0  0 0 0 0 0 eikL3 The edges were ordered - one pendant edge, the loop, and the other pen- dant edge. Each edge labels two rows and two columns, since directed edges are used in the construction of Sv. The eigenfrequencies are found by solving Σ(k) = Det(I − SvSe(k)) = 0. Σ(k) is called a secular determinant. If we set ik 2 L1 = L3 = 1/4 and L2 = 1/2 we get Σ(k) = e − 1 = 0 which has solutions k = 2πn with multiplicity two and where n is a positive integer. These are precisely the non-zero eigenfrequencies with the correct multiplicities for a loop with length one. The last graph in Fig. 3 was also checked by hand and was confirmed to have the same secular determinant as a loop with length eight. The details are given in Ref. [18]. We found some isospectral pairs involving fairly simple graphs, and three examples are given in Fig. 4. For the pair in Figs. 4c) and 4d) we checked the eigenfrequencies once again by hand and found

5 a) b) 8

L2=4 L3=2

L1=2

c) 1 2 1

2 1 1

Figure 3: Three very simple isospectral graphs. a) A loop graph having length eight. b) The first isospectral partner of the loop graph when L1 = L3 = 2 and L2 = 4 such that the total length of the graph is 8. c) The second isospectral partner of the loop. that the graphs have the same secular determinant. The calculation is given in the Appendix. We also found two other sets of isospectral triplets and these sets are given in Fig. 5 and Fig. 6. In the Appendix we give a larger set of isospectral pairs including up to twelve vertices. Most of the graphs in Figs. 2-6 were created from corresponding graphs in Figs. A1-A3 where vertices with valence (or degree) two were removed.

6 Generating isospectral graphs

By doing experiments on the quantum graphs we found a combinatorial method to easily generate large numbers of isospectral pairs and, more generally, isospec- tral sets of graphs containing many members. We do this by attaching any compact graph to specific vertices on graphs belonging to some particular isospectral set. Fig. 7 illustrates the method. This isospectral pair is the same as in Figs. 3a) and b) but we set their length to four for graphic simplicity. We add a vertex of valence 2 at the indicated positions. If we now attach any compact graph at these positions we find that the resulting graphs will form an isospectral pair. The attachment is done by identifying one vertex of Γ with the indicated vertex, creating a pendant graph, as exemplified in Fig. 7. The attachment must be done identically to each member of the pair. We have tested more than 50 different attached graphs and all generated pairs were isospectral. The testing was done mostly by attaching

6 a) b) 1 2 1 2 1 1

1 1

c) 4 d) 1 1 1 1

1 1

2 e) f) 2 1 2 3 1 1 1 2 3 3 3

Figure 4: Three simple isospectral pairs where a) is isospectral with b), c) is isospectral with d) and e) is isospectral with f). The length of the edges connecting any two vertices are indicated. equilateral graphs, but we also attached graphs that had some edge lengths set to symbolic parameters, Li, and this was also done for the tests described below. We conjecture that attaching any compact graph in this way will always generate an isospectral pair. The two shown graphs are thus the members of a generating set that can generate an infinite family of isospectral pairs. We will call the indicated vertex a hot vertex and by attachment we always mean that one vertex of Γ is identified with a hot vertex. The vertex of Γ can have any valence. The graph in Fig. 3c) does not seem to have a hot vertex. One may also look at this differently, that is any compact graph can be dec- orated at different vertices by attaching one of the generators at these vertices. This can be done in many different ways since each vertex can be decorated by any member of the generating set. We find that graphs generated in this way are isospectral. We illustrate this method by decorating a star graph having three leaves. The resulting graphs are shown in Fig. 8. We denote that two graphs Γi and Γj are isospectral by: Γi 'is Γj. The graphs in Fig. 8 are all isospectral, which was verified by computer. Even if the leaves of the star have different lengths the graphs are isospectral. It is clear that arbitrarily large sets of isospectral graphs can be generated in this way. We remark that any graph containing a loop attached to a single vertex has an isospectral partner since the loop can be replaced with the isospectral

7 a) b) 4 3 2

3 1 1 2 1 1

c) 4 2 2 1

1 2

Figure 5: A set of three isospectral graphs. All the loops have a total length of 4 and the two vertices on the loop for the graph in a) are separated by length 1.

a) b) 5 1 2 2 2 1 1 1 1 1 2 3 1 1 c) 2 2 1 2 2 2 1

Figure 6: A set of three isospectral graphs. The loops all have total length 6. partner of the loop shown in Fig 7b). Whether the set of graphs without any isospectral partner is infinite is an interesting question. The interval does not have an isospectral partner so this set is not empty [23], (see [24] for an ab- stract treatment). We here note that although two non-isomorphic graphs with rationally independent edgelengths must have different spectra, they can have isospectral partners which do not have rationally independent edgelengths. We also investigated the possibility to attach graphs to the isospectral pair in Figs. 4a) and b). Fig. 9 shows the vertices where we can attach a graph such that the resulting pair is isospectral. Quite remarkably we find that the graph in Fig. 9b) has two hot vertices that can be chosen as the attachment vertex. What we find even more remarkable is that the remaining vertex with valence three for the graph in Fig. 9a) is not a hot vertex. Also for this isospectral pair we have tested to attach more than 50 graphs to all three hot vertices and all generated triplets were isospectral. If a graph has two or more hot vertices it may form a generating set on its own if it does not have an isospectral partner

8 with a hot vertex. Exceptions will occur if attaching the same graph to either of the two hot vertices generates isomorphic graphs.

7 Generating sets

So far we have discussed two generating sets, shown in Fig. 7 and in Fig. 9 where the members are isospectral. We have by experimenting found a very flexible generating set where the members are not all isospectral to each other. Fig. 10 shows this set, which contains a loop, an interval and a tadpool graph. Each of these graphs have one attachment vertex associated with them. We will call the members ΓL,ΓI and ΓT and we call the set itself P .ΓL,ΓI and ΓT have length one and ΓL 'is ΓT but ΓL 6'is ΓI . It is possible to use a different length of the graphs but we chose the length to be one, unless otherwise stated, for simplicity. The generating set in Fig. 7 is a subset of P . Choose an n-tuple (Γ1, ..., Γn) where Γi ∈ P and choose m vertices, (a1, ..., am) of a compact graph, Γc, where m ≤ n. Decorate Γc with the n-tuple attaching Γ1 to a1,Γ2 to a2 and so on. We are free to attach several members of (Γ1, ..., Γn) to the same vertex. We find that the resulting graph will be isospectral to Γc decorated with a different permutation of (Γ1, ..., Γn) attached to the same vertices. We are free to replace any subgraph ΓL with ΓT (and vice versa, as long as the attachment point of ΓT is in the correct position) in the decorated graphs and the spectrum will not change. We conjecture that the statements in this paragraph are true for any compact graph Γc. We have tested our conjecture with several thousand combinations of dif- ferent Γc and sets of two to four Γi ∈ P in different permutations and in every case isospectral graphs were generated. The tests also included Γc having one symbolic edge length. The amount of testing is limited by computing resources. Deecorating graphs with members of P gives a very powerful way to gen- erate isospectral graphs and we will illustrate some results. In Fig. 11 we show some examples of a graph which has been decorated with members of P . In Fig. 12 we show that the graph in Fig. 9b) is in fact an interval, Γ1, which has been decorated with ΓL and ΓI . We can decorate any graph containing Γ1 as a subgraph, in two different ways by ΓL and ΓI , illustrated in Fig. 12, and get isospectral graphs. This explains why the graph in Fig. 9b) has two hot vertices. If the interval, Γ1, has length 1/2, then the graph in Fig. 12 has the isospectral partner shown in Fig. 9. We have not yet found an isospectral partner if the length of Γ1 is not 1/2 except if it is zero and then the loop is an isospectral partner. We do not know if there are graphs with more than one hot vertex that cannot be obtained by decorating a graph with members of P or members of the generating set in Fig. 9.

8 Outlook and Conclusion

We have generated all isospectral pairs within a restricted set of quantum graphs, where the length of the edges are all equal and where the number of vertices is limited. We have found several isospectral pairs with different character, such as having different Euler characteristics, having different num- ber of vertices and isospectral pairs that are quite simple. For future work we

9 a) b) 4 1 1

G G

1 1

c) d)

Figure 7: Two isospectral graphs from Fig. 3a) and b) with a vertex of valence two added. If any compact graph Γ is attached to the valence two vertex (as indicated by the arrows) the resulting graphs will form an isospectral pair, according to our calculations. These two graphs form a generating set for an infinite number of isospectral pairs. c) and d) shows how attachment of two graphs is done. The two highlighted vertices are identified with each other. Note that if Γ is an interval of length, say π, and thus graph a) has rationally independent edges, it still has an isospectral partner b) which has rationally dependent edges.

a) b) c) d)

≃is ≃is ≃is

Figure 8: Four isospectral graphs obtained by decorating a star graph with members of the generating set shown in Fig. 7 in different combinations.

10 a) b) 1 2 1 2 1 1 x1 x2 x3

1 1

Figure 9: Two isospectral graphs. If we attach one compact graph at vertex x1 and the same graph at either vertex x2 or vertex x3 we will get isospectral graphs. It is thus easy to generate isospectral triplets.

a) b) c)

GL GI GT

Figure 10: A generating set, P , containing three graphs, ΓL,ΓI and ΓT with attachment vertices indicated. The attachment vertices are not hot, since attaching the same graph to ΓL and ΓI at the attachment vertices will not result in isospectral graphs.

11 a) b)

≃is ≃is ≃is

Ga

c) d)

≃is ≃is ≃is

Figure 11: Attaching members of the generating set P in Fig. 10 to a graph in different ways will generate isospectral graphs. There is freedom to exchange ΓL with ΓT as shown in c). It is possible to attach two members of P to the same vertex in different permutations and still get isospectral graphs as illustrated in d).

a) b)

x2 x3

GL GI

c) d) e)

x3 x2 x2 x3 x2 x3 ≃is ≃is

Figure 12: a) - b) Attaching ΓL and ΓI ∈ P to an interval will generate the graph in Fig. 9b) for a suitable length of the decorated interval. c) - e) Attaching ΓL and ΓI in two ways to the graph in red and reflecting one of the graphs shows that vertices x2 and x3 are hot vertices.

12 would like to graphically illustrate the eigenfunctions which might illuminate the relationship between nodal points and isospectrality [8]. For small graphs there are an unexpectedly large number of isospectral pairs where one member of the pair has a lone pendant edge and the other member has no pendant edge. We suspect that there might be a pattern hidden in these pairs that may allow a simple construction of larger isospectral pairs. Concerning the generation of isospectral graphs there is a host of problems to be attacked. How does one identify hot vertices? Is there an infinite number of compact graphs having unique spectra? Is there a constructive way to find generating sets? Can P be enlarged with more members? It is clear to us that the graphs in the generating sets form a very interesting set of graphs. We hope that this study will inspire work to classify quantum graphs with respect to having hot vertices or not as well as to prove or disprove our conjectures. We also hope that our programs will be subject to strong tests by the community, such that potential errors are found. If there are severe errors in the software, then many results in this paper are incorrect. Nevertheless, our program has allowed us to find interesting isospectral graphs which we could verify by hand.

9 Acknowledgement

This project was supported by NanoLund. We thank Prof. P. Kurasov who introduced us to quantum graphs and encouraged us to do some programming. We also thank Dr. Gabriela Malenov´awho helped us find quantum graphs with known eigenfrequencies as well as Prof. R. Band who encouraged us to find a constructive way to generate isospectral graphs as well as giving pointers to the literature.

13 References

[1] Robert Brooks. Constructing isospectral manifolds. The American Math- ematical Monthly, 95(9):823–839, 1988. [2] . Can one hear the shape of a drum? The American Mathematical Monthly, 73(4P2):1–23, 1966. [3] John Milnor. Eigenvalues of the Laplace operator on certain manifolds. Proceedings of the National Academy of Sciences of the United States of America, 51(4):542, 1964. [4] Toshikazu Sunada. Riemannian coverings and isospectral manifolds. Annals of Mathematics, 121(1):169–186, 1985. [5] Carolyn Gordon, David L Webb, and Scott Wolpert. One cannot hear the shape of a drum. Bulletin of the American Mathematical Society, 27(1):134– 138, 1992. [6] Boris Gutkin and Uzy Smilansky. Can one hear the shape of a graph? Journal of Physics A: Mathematical and General, 34(31):6061, 2001. [7] Pavel Kurasov and Marlena Nowaczyk. Inverse spectral problem for quan- tum graphs. Journal of Physics A: Mathematical and General, 38(22):4901, 2005. [8] Ram Band, Talia Shapira, and Uzy Smilansky. Nodal domains on isospec- tral quantum graphs: the resolution of isospectrality? Journal of Physics A: Mathematical and General, 39(45):13999, 2006. [9] Ram Band, Ori Parzanchevski, and Gilad Ben-Shach. The isospectral fruits of : quantum graphs and drums. Journal of Physics A: Mathematical and Theoretical, 42(17):175202, 2009. [10] Gregory Berkolaiko and Peter Kuchment. Introduction to quantum graphs. Number 186. American Mathematical Soc., 2013. [11] Vadim Kostrykin and Robert Schrader. Kirchhoff’s rule for quantum wires. Journal of Physics A: Mathematical and General, 32(4):595, 1999. [12] Gregory Berkolaiko. An elementary introduction to quantum graphs. Ge- ometric and computational spectral theory, 700:41–72, 2017. [13] Wolfram Research, Inc. Mathematica, Version 12.2. Champaign, IL, 2020. [14] Gregory Berkolaiko and Wen Liu. Simplicity of eigenvalues and non- vanishing of eigenfunctions of a quantum graph. Journal of Mathematical Analysis and Applications, 445(1):803–818, 2017. [15] James B Kennedy, Pavel Kurasov, Gabriela Malenov´a,and Delio Mugnolo. On the spectral gap of a quantum graph. In Annales Henri Poincar´e, pages 1–35. Springer, 2015. [16] Gabriela Malenov´a.https://bit.ly/3wi8kqa, 2013. [17] Daniel Blixt. http://kodu.ut.ee/∼blixt/kandarb.pdf, 2015.

14 [18] Mats-Erik Pistol. GraphRoots. https://github.com/meapistol/ Spectra-of-graphs, 2021. [19] Thomas Hales and Thomas Callister Hales. Dense sphere packings: a blueprint for formal proofs, volume 400. Cambridge University Press, 2012. [20] Daniel C Isaksen, Guozhen Wang, and Zhouli Xu. Stable homotopy groups of spheres. Proceedings of the National Academy of Sciences, 117(40):24757–24763, 2020.

[21] Kevin Buzzard, Johan Commelin, and Patrick Massot. Formalising per- fectoid spaces. In Proceedings of the 9th ACM SIGPLAN International Conference on Certified Programs and Proofs, pages 299–312, 2020. [22] A Chernyshenko and Vyacheslav Pivovarchik. Recovering the shape of a quantum graph. Integral Equations and Operator Theory, 92:1–17, 2020.

[23] Serge Nicaise. Spectre des r´eseauxtopologiques finis. Bull. Sci. Math, 2(111):4, 1987. [24] Edward Brian Davies. An inverse spectral theorem. Journal of Operator Theory, pages 195–208, 2013.

15 10 Appendix

Figs. A1 and A2 shows the isospectral pairs we found involving a loop decorated with pendant edges or trees. Fig. A3 shows all trees we found with att most 12 vertices. Some of these trees are quite simple. We calculated the vertex and edge scattering matrices for the graphs in Figs. 4c) and 4d) by inspection. For the graph in Fig. 4c) we get:

 1 2 2  0 − 3 3 3  1 0 0 0  Sv =  2 2 1   0 3 3 − 3  2 1 2 0 3 − 3 3 and

 eikL1 0 0 0   0 eikL1 0 0  Se =    0 0 eikL2 0  0 0 0 eikL2 where L1 = 1 and L2 = 4. The edges were ordered - the pendant edge, the loop. For the graph in Fig. 4d we get:

 1 2 2  0 − 3 3 0 3 0 0 0 0 0  1 0 0 0 0 0 0 0 0 0   1 1 1 1   0 0 0 − 2 0 2 2 0 2 0   2 1 2   0 3 − 3 0 3 0 0 0 0 0   1 1 1 1   0 0 0 2 0 − 2 2 0 2 0  Sv =  2 2 1   0 0 − 0 0 0 0 0   3 3 3   0 0 0 0 0 0 0 1 0 0   1 1 1 1   0 0 0 0 − 0 0   2 2 2 2   0 0 0 0 0 0 0 0 0 1  1 1 1 1 0 0 0 2 0 2 2 0 − 2 0 and

 eikL1 0 0 0 0 0 0 0 0 0   0 eikL1 0 0 0 0 0 0 0 0   ikL   0 0 e 1 0 0 0 0 0 0 0     0 0 0 eikL1 0 0 0 0 0 0     0 0 0 0 eikL1 0 0 0 0 0  Se =    0 0 0 0 0 eikL1 0 0 0 0     0 0 0 0 0 0 eikL1 0 0 0     0 0 0 0 0 0 0 eikL1 0 0     0 0 0 0 0 0 0 0 eikL1 0  0 0 0 0 0 0 0 0 0 eikL1

where L1 = 1. The edges were ordered - left pendant edge, one edge of the loop, the second edge of the loop, one pendant edge to the right, the other pendant edge to the right. We find that the secular determinant is the same in 1 2ik 2 2ik 4ik 6ik  both cases: Σ(k) = 3 e − 1 7e + 7e + 3e + 3 and we thus confirm that the graphs are isospectral.

16  , , , , , ,

 , , , , , ,

 , , , , , ,

 , , , , , ,

 , , , , , ,

 , , , , ,

 , , , , , ,

 , , , , , 

Figure A1: All 23 isospectral sets formed from a loop with four vertices, decorated with pendant edges or pendant trees where the full graph has at most ten vertices. All edges have the same length. Some of these isospectral pairs have been used in the figures in the main text, with vertices of valence two removed. Note that the graphs in each set have to be normalised to the same length in order to be isospectral.

17  , , , , ,

 , , , ,

 , . , , , ,

 , , , , , ,

 , , , , , ,

 , , , , , ,

 , , , , , ,

 , , , , , ,

 , , , , , ,

 , , , , , 

Figure A2: All 28 isospectral sets formed from a loop with six vertices, dec- orated with pendant edges or pendant trees where the full graph has at most twelve vertices. All edges have the same length. Some of these isospectral pairs have been used in the figures in the main text, with vertices of valence two removed. One more isospectral pair was found but which is isomorphic with the first pair in Fig. 7 after rescaling to the same length. Note that the graphs in each set have to be normalised to the same length in order to be isospectral.

18  , , , , , ,

 , , , , , ,

 , , , , , ,

 , , , , , ,

 , , , 

Figure A3: All isospectral pairs of trees with at most 12 vertices. All edges have the same length. The three first pairs have been used in figures in the main text. There is one isospectral pair with nine vertices, two isospectral pairs with 10 vertices, five isospectral pairs with 11 vertices and six isospectral pairs with 12 vertices.

19