A new spectral invariant for quantum graphs

The Euler characteristic i.e., the difference between the number of vertices |V| and edges |E| is the most important topological characteristic of a graph. However, to describe spectral properties of differential equations with mixed Dirichlet and Neumann vertex conditions it is necessary to introduce a new spectral invariant, the generalized Euler characteristic \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\chi _G:= |V|-|V_D|-|E|$$\end{document}χG:=|V|-|VD|-|E|, with \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$|V_D|$$\end{document}|VD| denoting the number of Dirichlet vertices. We demonstrate theoretically and experimentally that the generalized Euler characteristic \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\chi _G$$\end{document}χG of quantum graphs and microwave networks can be determined from small sets of lowest eigenfrequencies. If the topology of the graph is known, the generalized Euler characteristic \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\chi _G$$\end{document}χG can be used to determine the number of Dirichlet vertices. That makes the generalized Euler characteristic \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\chi _G$$\end{document}χG a new powerful tool for studying of physical systems modeled by differential equations on metric graphs including isoscattering and neural networks where both Neumann and Dirichlet boundary conditions occur.

The problem of seven bridges of Königsberg considered by Leonhard Euler in 1736 1 laid the foundation of classical, combinatorial graph theory and topology. Two hundred years later Linus Pauling 2 applied the concept of graphs to describe the motion of a quantum particle in a physical network. This approach, now known as the quantum graph model, is widely used in the study of physical systems, e.g., quantum wires 3 , mesoscopic quantum system 4,5 , spectra of graphene and carbon nanotubes 6 , Bose-Einstein condensates 7,8 , Anderson localization 9 and optical wave guides 10 . In 1948, Feynman 11 introduced diagrams (graphs) as pictorial representation of the mathematical expressions describing the behavior and interaction of subatomic particles.
The theory of quantum graphs has been a subject of intense research [12][13][14][15][16][17] . The metric graph Ŵ = (V , E) consists of edges e ∈ E being intervals of the length l e on the real line R connected at the vertices v ∈ V , which are defined as the unions of edges endpoints. Such a graph uniquely determines the Laplace operator L(Ŵ) = − d 2 dx 2 acting in the Hilbert space of square integrable functions. L(Ŵ) is self-adjoint, its spectrum is discrete and nonnegative 15 . When a graph has only vertices V N with Neumann (called also standard, natural) vertex boundary conditions: functions are continuous at vertices and the sums of their oriented derivatives at vertices are equal zero, then the Laplacian has a simple zero eigenvalue with the eigenfunction being a constant. Introducing even one vertex V D with the Dirichlet boundary condition (a functions is zero at the vertex) into the graph causes that spectral multiplicity of the eigenvalue 0 to become zero instead of one.
In this article we generalize the notion of the Euler characteristic 18 to graphs possessing vertices with both Neumann and Dirichlet boundary conditions. We show that for such graphs it is possible to determine the generalized Euler characteristic χ G from small sets of their lowest eigenvalues 1 , . . . , N .

The generalized Euler characteristic for quantum graphs with Dirichlet boundary conditions
One of the most important characteristic of a metric graph is the Euler characteristic where |V| and |E| denote the number of vertices and edges, respectively. The Euler characteristic χ determines another important quantity characterizing the graph, the number of independent cycles β in it This number, known also as the first Betti number, tells us how many edges have to be removed from the connected graph in order to turn it into a tree graph.
In this article we will demonstrate that vertices with Dirichlet boundary conditions (Dirichlet vertices) play an important role in graph spectral characteristics, leading to a new spectral invariant, called generalized Euler characteristic where |V D | is the number of Dirichlet vertices.
Our goal is to relate the generalized Euler characteristic χ G to the spectrum of the Laplace operator L = − d 2 dx 2 on the metric graph Ŵ . One usually assumes standard vertex conditions: continuity of functions and Neumann conditions on the sum of the first derivatives. This case was comprehensively treated in Ref. 18 . Here, we will generalize the results obtained in Ref. 18 to the case of mixed standard (Neumann) and Dirichlet vertex conditions. We assume that Dirichlet conditions are imposed only at degree one vertices of pendent edges since higher degree Dirichlet vertices should be treated as separate degree one Dirichlet vertices. Standard vertex conditions at degree one vertices are equivalent to Neumann conditions since the continuity condition is redundant. In what follows, the degree one vertices in Ŵ are divided into two classes: Neumann and Dirichlet vertices, respectively. We shall always assume standard conditions at the vertices with the degree larger than 1.
The Laplace operator is self-adjoint and is uniquely determined by Ŵ and the set V D of Dirichlet vertices. The spectrum is discrete bounded from below 0 < 1 < 2 ≤ 3 < . . . and satisfies Weyl's law where L is the total length of the graph and O(n) is a function which divided by n in the limit n → ∞ is bounded by a constant. Note that 1 = 0 provided Ŵ is connected and |V D | > 0 holds.
For graphs with standard vertex conditions at all vertices the following formula for the Euler characteristic was proven 18 : where �(L st (Ŵ)) denotes the spectrum of the Laplacian L st (Ŵ) with standard vertex conditions, taken in the square root scale, i.e., the numbers k n are the square roots of the eigenenergies n and t 0 = 1 2l min , where l min is the length of the shortest edge of the graph. If the summation sequence in Eq. (5) contains an infinite number of terms, t ≥ t 0 is an arbitrary free parameter. However, we will show that in the case of limited number of eigenvalues k n the value of t should be limited from above by some t max .
Formula (5) was obtained using the trace formula connecting the spectrum of the Laplacian to the set of periodic orbits on the metric graph 52-55 applying it to a carefully chosen test function 18,[56][57][58] . Our objective is to generalize this formula by including Dirichlet vertices. This is important because for example both Dirichlet and Neumann conditions appear in the isoscattering and neural networks, where for the latter ones they appear naturally as a result of learning procedures 59 .
Let Ŵ be a finite connected metric graph with |V D | Dirichlet vertices v 1 , v 2 , . . . , v |V D | . We assume standard vertex conditions at all other vertices. The corresponding Laplace operator will be denoted by L st,D (Ŵ) . Let us double the graph by adding to Ŵ another copy of the same graph and gluing them by joining pairwise the vertices v j , j = 1, 2, . . . , |V D |. Let us denote the metric graph obtained in this way by Ŵ 2 . This graph is symmetric with respect to the exchange of the respective points on the two copies of Ŵ . Hence all eigenfunctions and the spectrum can be divided into two classes: • symmetric eigenfunctions satisfying Neumann conditions at v j , j = 1, 2, . . . , |V D | , the spectrum coincides with the spectrum of the standard Laplacian L st (Ŵ); • antisymmetric eigenfunctions satisfying Dirichlet conditions at v j , j = 1, 2, . . . , |V D | , the spectrum coincides with the spectrum of L st,D (Ŵ) for which k n = 0.
Let χ be the Euler characteristic of Ŵ , then Ŵ 2 has −2χ + |V D | − 1 independent cycles and its Euler characteristic is 2χ − |V D | . Applying the formula (5) to standard Laplacians on Ŵ and Ŵ 2 we get www.nature.com/scientificreports/ where �(·) denote the spectra of different Laplacians on Ŵ 2 and Ŵ , again considered in the square root scale. Then the formula (5) implies that Hence the Euler characteristic χ alone is not a proper spectral invariant in the case of Laplacians with Dirichlet vertices, we have to replace it by the invariant χ G introduced above. It generalizes naturally the Euler characteristic and has the following important property: any two isospectral graphs with mixed standard and Dirichlet conditions necessarily have the same χ G . This property of χ G will be checked experimentally in this article using two isoscattering and therefore isospectral microwave networks 21,60 .
It is important to point out that the generalized Euler characteristic χ G is an integer. Therefore, to determine its value precisely it is enough to calculate it with an accuracy better than 1/2. It means that infinite series on the right-hand of the Eq. (7) can be substituted with a finite sum. This is essential because in the real world of physical measurements it is not possible to determine the entire spectrum of the tested system. In microwave experiments internal absorption and openness of systems limit from the top the frequency range in which eigenfrequencies (resonances) can be determined.
To determine how many terms (resonances) in the formula (7) are required to get the value of χ G with the accuracy ǫ better than 1/2 the following relations will be considered assuming t ≥ t 0 : It is necessary to choose K sufficiently large to guarantee ǫ < 1/2 . Such an estimate for t = t 0 = 1 2l min has been carried out in Appendix of Ref. 18 in the case of standard boundary conditions. The existence of Dirichlet vertices does not change the estimate for the minimum number of resonances: where |V| is the total number of graph vertices. The smallest number of resonances K = K min is obtained by substituting the smallest allowed value of t, that is t = t 0 . In the calculation of K min we will also assume that ǫ = 1/4. Equation (9) demonstrates that in the evaluation of X G K (t = t 0 ) (Eq. (8)) it is enough to use only a limited number of terms K = K min . In such a case, as mentioned above, in the behavior of X G K min (t) for t > t 0 one expects to observe a plateau which will be destroyed for t ≃ t max . We are interested in getting a rough estimate for the maximum allowed value of t. For this purpose for Lt ≫ 1 we will approximate (9) with a formula Assuming that ǫ = 1/4 and t = t 0 , for which K = K min , Eq.(10) can be used to define the maximum allowed value of t max for which K = K min is preserved but ǫ was increased to ǫ max = 1 . This yields a simple relationship between an approximated t max and t 0 How to hear the boundary conditions of quantum graphs? To determine the number of Dirichlet vertices one may use • the generalized Euler characteristic χ G = χ − |V D | determined by the Laplacian spectrum via explicit formula (7); .
Having determined these numbers, the number of Dirichlet vertices is given by This formula reminds that the generalized Euler characteristic is an integer that cannot exceed the topological Euler characteristic χ.
From the experimental point of view the situation is more complicated because identification whether = 0 is an eigenvalue of an investigated system maybe impossible. In such a case, the number of Dirichlet vertices can be evaluated in the following way.
Taking into account the properties of the formula (5) one can find out that if the generalized Euler characteristic χ G evaluated from the spectral formula (7) (right-hand side of Eq. (7)) fulfills the condition one deals with a graph which possesses Dirichlet vertices and their number is given by the formula (12).
In the case when one deals with a graph which possesses either 0 or 2 Dirichlet vertices and an additional information is required to find their actual number. The latter case can be illustrated using a single interval graph ( |V | = 2 , |E| = 1 , χ = 1 ) of length π . The spectrum of the standard Laplacian is 0, 1, 2, . . . , while the spectrum of the Dirichlet Laplacian, with two Dirichlet vertices, |V D | = 2 , is 1, 2, 3 . . . . Summing the series (5) and (7) over non-zero spectra of the respective Laplacians one obtains χ − 2 = −1 and χ G = −1 . The same outcome of the calculations shows that we cannot determine whether we deal with the standard Laplacian, where we lost = 0 eigenvalue, or with the Dirichlet Laplacian, where such an eigenvalue does not exist.
However, if the experiment yields that = 0 is not an eigenvalue of the system, the number of Dirichlet vertices is directly given by the formula (12).

Experimental setup and methodology of measurements
To test the formula (7) for the generalized Euler characteristic χ G we identified experimentally the required by Eq. (9) numbers of resonances of microwave networks simulating quantum graphs without loops with Dirichlet boundary conditions. The experimental setup (see Fig. 1a), standard for such measurements, consists of the Agilent E8364B vector network analyzer (VNA) and the HP 85133-616 high class flexible microwave cable that connects the VNA with the measured network. Such a cable is equivalent to attaching an infinite lead to a quantum graph 18,25 . To eliminate the influence of the external to the network elements on measurement results the VNA was calibrated with an Agilent 4691-60004 electronic calibration module.
Quantum graphs are simulated by microwave networks containing coaxial cables and junctions that correspond to the edges and vertices of the graphs. The cables are composed of an inner conductor of a radius r 1 = 0.05 cm surrounded by the dielectric material (Teflon) and an outer concentric conductor with an inner radius r 2 = 0.15 cm. The dielectric constant of Teflon measured by us equals ε = 2.06 . So the cut-off frequency of the TE 11 below which only the fundamental TEM can propagate in the cable 61,62 is υ cut = c π(r 1 +r 2 ) √ ε = 33 GHz. The physical lengths l ph of the cables determine the optical lengths of the graph edges through relationship l opt = √ εl ph . In order to identify the resonances of the networks in a required frequency range, starting from the lowest one ν 1 , we carried out the measurements of their one-port scattering matrix S 11 (ν) . To verify the completeness of the sets of resonances the fluctuating part of the integrated spectral counting function N fl (ν i ) = N(ν i ) − N av (ν i ) , that is the difference of the number of eigenfrequencies N(ν i ) = i for ordered frequencies ν 1 ≤ ν 2 ≤ · · · and the average number of eigenfrequencies N av (ν i ) calculated for the tested frequency range, was analyzed. The resonance frequencies give directly the real part of the wave vectors Re k n = 2π c ν n . In the case of isoscattering networks the two-port scattering matrix Ŝ (ν) was measured and the resonances were identified from the amplitude of the determinant of the scattering matrix Ŝ (ν) . The details of this experimental procedure are given in details in Refs. 21,60 .

Experimental results
To simplify the description of the networks we introduce the following notation of graphs and networks Ŵ(|V |, |E|, |V D |) , where |V | = |V N | + |V D | . A network Ŵ(|V |, |E|, |V D |) contains |V| vertices, including |V N | and |V D | vertices with Neumann and Dirichlet boundary conditions and |E| edges.
The results obtained from the spectral formula (5) for the approximation function of the Euler characteristic X K (t) in Ref. 18 and from Eq. (8) for the approximation function of the generalized Euler characteristic X G K (t) as a function of t are shown in Fig. 2a. The approximation function X K (t) (blue full line) was calculated for the 6-vertex network Ŵ(6, 8, 0) with two tail-like edges with Neumann boundary conditions. The approximation functions X G K (t) were evaluated for the networks Ŵ(6, 8, 1) (red full line-Dirichlet vertex (DV) on edge l 2,5 , red dotted line-DV on edge l 4,6 ) and Ŵ(6, 8, 2) (black full line), respectively. The Euler characteristic χ and the generalized Euler characteristic χ G were obtained as the values of the plateaux observed in the approximation functions X K (t) and X G K (t) , respectively, for t ≥ t 0 , and K = K min . The experimental values of the Euler characteristic χ and the generalized Euler characteristic χ G are in agreement with the predicted theoretical ones shown in Table 1. Since the isoscattering networks are also isospectral if it concerns their spectra identified from the amplitudes of the determinants of the scattering matrices Ŝ O (ν) and Ŝ H (ν) , it is obvious from Eq. (7) that both networks should have the same generalized Euler characteristic χ G . The approximation function for the generalized Euler characteristic X G K (t) in a function of t is presented in Fig. 2b for the O-network ( K min = 32 , t 0 = 5.08 , and t max ≃ 8.1 ) and the H-network ( K min = 17 , t 0 = 2.71 , and t max ≃ 4.3 ) by red full and dotted lines, respectively. In both cases the approximation function X G K (t) gives the same value χ G = −1 what should be expected in the case of the isoscattering networks.
Moreover, from the formal definition of the generalized Euler characteristic χ G (see Eq. 3) we have in full agreement with the experimental results.

Star microwave networks.
A star graph is a special type of a tree graph which contains at most one vertex of degree greater than one. Any quantum graph looks locally near vertices like a star graph therefore these simplest non-trivial graphs play a very important role in the graph theory 15 . We examined the star graphs Ŵ(4, 3, 0) , Ŵ(4, 3, 1) , Ŵ(4, 3, 2) and Ŵ(4, 3, 3) , with three edges, often called claws. The graphs were simulated by a network (see Fig. 1c) consisting of one vertex of valency four and three edges terminated with the vertices of valency one. The optical lengths of the edge are l 1 = l min = 0.949 m, l 2 = 1.115 m and l 3 = 0.981 m giving the total network length L = 3.045 m. For ǫ = 1/4 , K min = 9 , and ν 9 ≃ 0.47 GHz. The values of the parameters: t 0 = 0.53 and t max ≃ 0.8.
The Euler characteristic χ 18 of the graph Ŵ(4, 3, 0) is χ = 4 − 3 = 1 , since we deal with the graph without Dirichlet boundary conditions. In Fig. 2c, the approximation function for the Euler characteristic X K (t) (full blue line), which is close to 1, is shown as a function of t for the network Ŵ(4, 3, 0) . It is important to mention that the Euler characteristic for tree graphs possessing only Neumann vertices is always χ tree = 1 and is independent on the size of a tree graph.
If in a tree graph at least one vertex with the Dirichlet boundary condition is present one should use Eq. (7) to evaluate the generalized Euler characteristic χ G . For the star networks Ŵ(4, 3, 1) , Ŵ(4, 3, 2) and Ŵ(4, 3, 3) the generalized Euler characteristic χ G is equal to 0, − 1, and − 2, respectively, which is clearly seen in the dependence of the approximation function for the generalized Euler characteristic X G K (t) on the parameter t in Fig. 2c. Using the star networks one can test in practice the procedure of identifying the number of Dirichlet boundary conditions in a quantum graph or microwave network. Microwave networks are so useful in simulation of quantum graphs because, additionally to the discussed earlier properties, their eigenvalue = 0 can be also easily found by measuring the electric conductance G . For microwave networks with standard boundary conditions, G = 0 , while for the networks with at least one Dirichlet boundary condition, G = +∞.
The direct measurements of the electric conductance yielded that the star networks Ŵ(4, 3, 1) , Ŵ(4, 3, 2) , and Ŵ(4, 3, 3) possess at least one Dirichlet vertex. Therefore, using Eq. (12) one can easily found that the number of Dirichlet vertices in the above networks is, 1, 2, and 3, respectively, in agreement with the experimental realizations of the star graphs.

Conclusions
We introduced a new spectral invariant: the generalized Euler characteristic χ G = |V | − |E| − |V D | of quantum graphs possessing standard (Neumann) and Dirichlet boundary conditions. We show theoretically and experimentally that the generalized Euler characteristic χ G can be determined from small sets of the lowest eigenvalues 1 , . . . , N of graphs and microwave networks. We demonstrate that the generalized Euler characteristic χ G together with the commonly known Euler characteristic χ = |V | − |E| can be applied to reveal (hear) the number of Dirichlet vertices in the investigated graphs and networks. The theoretical findings are illustrated and confirmed experimentally using microwave networks that showed that the generalized Euler characteristic χ G is a new powerful tool for studying of quantum graphs and microwave networks, and as a consequence, all systems modeled by the equivalent differential equations.

Data availability
The data that support results presented in this paper and other findings of this study are available from the corresponding authors upon reasonable request.