1 Introduction

A signed graph \(\dot{G}=(G, \sigma )\) is comprised of an unsigned graph \(G=(V, E)\) (called the underlying graph) together with a signature function \(\sigma :E\longrightarrow \{1, -1\}\). The order of a signed graph, denoted by n, is the number of its vertices. The edge set of \(\dot{G}\) is composed of subsets of positive and negative edges. We interpret a graph as a signed graph with all the edges being positive, i.e. as a signed graph with the all positive signature.

The adjacency matrix \(A_{\dot{G}}\) of \(\dot{G}\) is obtained from the adjacency matrix of its underlying graph by reversing the sign of all 1s that correspond to negative edges. The characteristic polynomial of \(\dot{G}\) is identified to be the characteristic polynomial of \(A_{\dot{G}}\), that is,

$$\begin{aligned} \Phi _{\dot{G}}(x)=\det (xI-A_{\dot{G}})=x^n+a_{n-1}(\dot{G})x^{n-1}+\cdots +a_1(\dot{G})x+a_0(\dot{G}). \end{aligned}$$

The eigenvalues of \(\dot{G}\) are the roots of its characteristic polynomial, and they form the spectrum of \(\dot{G}\).

Many notions about unsigned graphs extend directly to signed graphs. For example, the degree of a vertex in a signed graph is simply its degree in the corresponding underlying graph. A vertex of degree 1 is called a pendant vertex. A signed graph is connected or regular if the same holds for its underlying graph. A cycle \(\dot{C}\) in a signed graph is positive if the product \(\sigma (\dot{C})\) of its edge signs is positive. A signed graph is balanced if every cycle in it (if any) is positive.

If v is a vertex of \(\dot{G}\), then we write \(\dot{G}-v\) to denote the corresponding vertex-deleted subgraph. Let

$$\begin{aligned} \mathcal {P}(\dot{G})=\big \{\Phi _{\dot{G}-v_1},\Phi _{\dot{G}-v_2}, \ldots , \Phi _{\dot{G}-v_n}\big \} \end{aligned}$$

be the collection of characteristic polynomials of vertex-deleted subgraphs of \(\dot{G}\). This collection is also called the polynomial deck of \(\dot{G}\).

The polynomial reconstruction problem for unsigned graphs was posed by Cvetković in 1973 (see [1]). It reads as follows:

Problem 1.1

Given two graphs G and \(G'\) with at least 3 vertices, is it true that

$$\begin{aligned} \mathcal {P}(G)=\mathcal {P}(G')\,\Longrightarrow \, \Phi _{G}=\Phi _{G'}? \end{aligned}$$

There are many positive particular results (see [1, 3, 4, 10,11,12, 15]), but this problem in general is still unsolved. So far, no counterexample is found in the literature. The analogous problem for signed graphs has been considered by Simić and the author of this paper, see [13, 14]. It has been discovered in [13] that if \(\dot{G}\) and \(\dot{G}'\) are signed cycles of the same order, one balanced the other unbalanced, then they share the same polynomial deck, but their characteristic polynomials are not equal. Since no other counterexamples are known, we can formulate the following problem.

Problem 1.2

Given two signed graphs \(\dot{G}\) and \(\dot{G}'\) with at least 3 vertices such that none of them is a signed cycle, is it true that

$$\begin{aligned} \mathcal {P}(\dot{G})=\mathcal {P}(\dot{G}')\,\Longrightarrow \, \Phi _{\dot{G}}=\Phi _{\dot{G}'}? \end{aligned}$$

It is known that if two signed graphs share the same polynomial deck, then their characteristic polynomials can eventually differ only in their constant terms. (See the next section.) In Sect. 3, we express \(a_0(\dot{G})\) in terms of the eigenvalues of a vertex-deleted subgraph \(G-v\) and projections of the characteristic vector of v onto the eigenspaces of \(G-v\). As an application, we establish some classes of signed graphs with pendant vertices for which the polynomial reconstruction is unique. In Sect. 4, we consider Problem 1.1 for bipartite graphs with pendant vertices and give a sufficient condition for the unique reconstruction. In Sects. 5 and 6, we turn on our attention to signed graphs without pendant vertices and resolve Problem 1.2 for signed bundles and bicyclic signed graphs without pendant vertices. Section 7 contains computational results which resolve the reconstruction problem for signed graphs with at most 8 vertices.

2 Preparatory

The signed graphs \(\dot{G}\) and \(\dot{H}\) are said to be switching isomorphic if there exists a \((0, 1, -1)\)-monomial matrix M such that \(A_{\dot{H}}=M^{-1}A_{\dot{G}}M\), where by definition a matrix is monomial if in each row and each column there is exactly one nonzero entry. We see that, for example, every signed tree switches to its underlying graph. Switching isomorphic signed graphs share the same spectrum and the same polynomial deck (the later is proved in [13]), and they are usually identified.

We know from [2, p. 60] that

$$\begin{aligned} \Phi '_{\dot{G}}(x)=\sum _{i=1}^n\Phi _{\dot{G}-v_i}(x), \end{aligned}$$

and so we can determine the characteristic polynomial of a signed graph from its polynomial deck except for the constant term \(a_0(\dot{G})\). Consequently, if we are able to deduce from the polynomial deck the value of \(\Phi '_{\dot{G}}\) in a single point (in particular, if we know an eigenvalue of \(\dot{G}\)), the polynomial reconstruction is unique. The following two theorems contain some known results related to polynomial reconstruction. Both have their analogues for unsigned graphs obtained in [1, 11].

Theorem 2.1

[13] The following invariants of \(\dot{G}\) can be determined from \(\mathcal {P}(\dot{G})\):

  1. (i)

    The order n.

  2. (ii)

    For \(n\ge 3\), the number of edges.

  3. (iii)

    For \(n\ge 3\), the collection of vertex degrees.

Theorem 2.2

[13] The polynomial reconstruction of a signed graph \(\dot{G}\) is unique in any of the following situations:

  1. (i)

    At least one vertex-deleted subgraph of \(\dot{G}\) has a repeated eigenvalue (i.e. an eigenvalue of multiplicity at least 2).

  2. (ii)

    \(\dot{G}\) is disconnected and has at least 3 components or has 2 components that differ in order.

We will use the following Schwenk-like formula tailored for signed graphs (see [13]):

$$\begin{aligned} \Phi _{\dot{G}}(x)=x\Phi _{\dot{G}-v}(x)-\sum _{w\sim v}\Phi _{\dot{G}-v-w}(x)-2\sum _{\dot{C}\in \mathcal {C}_v}\sigma (\dot{C})\Phi _{\dot{G}-\dot{C}}(x), \end{aligned}$$
(1)

where \(\sim \) designates that the corresponding vertices are joined by a positive or a negative edge, \(\mathcal {C}_v\) denotes the set of signed cycles containing v and \(\dot{G}-\dot{C}\) is the signed graph obtained by removing the cycle \(\dot{C}\) from \(\dot{G}\).

Let \(\dot{G}'\) be a signed graph (if any) which together with \(\dot{G}\) acts as a counterexample to Problem 1.2. Note that \(\Phi _{\dot{G}}(x)-\Phi _{\dot{G}'}(x)=a_0(\dot{G})-a_0(\dot{G}')\ne 0\), which means that the spectra of \(\dot{G}\) and \(\dot{G}'\) are disjunct. We will use the following correspondence between the vertices \(\dot{G}\) and \(\dot{G}'\): if \(\Phi _{\dot{G}-v}(x)=\Phi _{\dot{G}'-v'}(x)\), then the vertices v and \(v'\) will be called partners. Observe that partners are the vertices of the same degree.

Finally, we define some signed graphs. A connected signed graph with n vertices is called unicyclic (resp. bicyclic) if it has n (\(n+1\)) edges. A signed bundle consists of an arbitrary number of signed cycles of arbitrary lengths all having a single vertex in common.

3 Constant Term of \(\Phi _{\dot{G}}\)

Here, we express the constant term of the characteristic polynomial of \(\dot{G}\) such that at least one vertex-deleted subgraph of \(\dot{G}\) has no repeated eigenvalues. Our starting point is the following result taken from [9].

Proposition 3.1

[9, Proposition 3] Let \(\dot{G}\) be obtained from a signed graph \(\dot{H}\) of order \(n-1\) by adding a new vertex whose neighbourhood in \(\dot{H}\) is determined by the characteristic \((0, 1, -1)\)-vector \(\mathbf {r}\). The characteristic polynomial of \(\dot{G}\) is given by

$$\begin{aligned} \Phi _{\dot{G}}(x)=\Phi _{\dot{H}}(x)\left( x-\sum _{i=1}^{m}\frac{||Q_i\mathbf {r}||^2}{x-\mu _i}\right) , \end{aligned}$$
(2)

where \(\mu _1, \mu _2, \ldots , \mu _m\) are the distinct eigenvalues of \(\dot{H}\) and \(Q_1, Q_2, \ldots , Q_m\) are the matrices of the orthogonal projections of \(\mathbb {R}^{n-1}\) onto the eigenspaces of \(\dot{H}\) with respect to the canonical basis.

We now compute the constant term of \(\dot{G}\) on the basis of the previous result.

Lemma 3.2

Let \(\dot{G}\) be a signed graph with characteristic polynomial

$$\begin{aligned} \Phi _{\dot{G}}(x)=x^n+a_{n-1}(\dot{G})x^{n-1}+\cdots +a_1(\dot{G})x+a_0(\dot{G}), \end{aligned}$$

and let \(\dot{H}\) be a subgraph of \(\dot{G}\) obtained by deleting a vertex whose neighbourhood in \(\dot{H}\) is determined by the characteristic \((0, 1, -1)\)-vector \(\mathbf {r}\). If \(\dot{H}\) has \(n-1\) distinct eigenvalues \(\mu _1, \mu _2, \ldots , \mu _{n-1}\) with the corresponding unit eigenvectors \(\mathbf {x}_1, \mathbf {x}_2, \ldots , \mathbf {x}_{n-1}\), then

$$\begin{aligned} a_0(\dot{G})=(-1)^{n-1}\sum _{i=1}^{n-1}\alpha _i\prod _{j\ne i}\mu _j, \end{aligned}$$

where \(\alpha _i=(\mathbf {r}^\intercal \mathbf {x}_i)^2\) for \(1\le i\le n-1\).

Proof

Since \(\mu _i\) is a simple eigenvalue, the orthogonal projection of \(\mathbb {R}^{n-1}\) onto its eigenspace is realized by the matrix \(\mathbf {x}_i\mathbf {x}_i^\intercal \) [5, p. 11]. Then, using \(\mathbf {x}_i^\intercal \mathbf {x}_i=1\), we compute \(||\mathbf {x}_i\mathbf {x}_i^\intercal \mathbf {r}||^2=(\mathbf {x}_i\mathbf {x}_i^\intercal \mathbf {r})^\intercal \mathbf {x}_i\mathbf {x}_i^\intercal \mathbf {r}=\mathbf {r}^\intercal \mathbf {x}_i\mathbf {x}_i^\intercal \mathbf {x}_i\mathbf {x}_i^\intercal \mathbf {r}=\mathbf {r}^\intercal \mathbf {x}_i\mathbf {x}_i^\intercal \mathbf {r}=(\mathbf {r}^\intercal \mathbf {x}_i)^2=\alpha _i\). According to (2), we have

$$\begin{aligned} \Phi _{\dot{G}}(x)&=\Phi _{\dot{H}}(x)\left( x-\sum _{i=1}^{n-1}\frac{\alpha _i}{x-\mu _i}\right) =\Phi _{\dot{H}}(x)\left( x-\frac{\sum _{i=1}^{n-1}\alpha _i\prod _{j\ne i}(x-\mu _j)}{\Phi _{\dot{H}}(x)}\right) \\&= x\Phi _{\dot{H}}(x)-\sum _{i=1}^{n-1}\alpha _i\prod _{j\ne i}(x-\mu _j), \end{aligned}$$

which leads to the conclusion that \(a_0(\dot{G})\) is equal to the constant term of \(-\sum _{i=1}^{n-1}\alpha _i\prod _{j\ne i}(x-\mu _j)\), and we are done. \(\square \)

The case in which 0 is an eigenvalue of \(\dot{H}\) is of particular interest.

Corollary 3.3

Let \(\dot{G}\) and \(\dot{H}\) be as in Lemma 3.2. If 0 is an eigenvalue of \(\dot{H}\) and \(\mathbf {x}\) is a corresponding unit eigenvector, then

$$\begin{aligned} a_0(\dot{G})=(-1)^{n-1}(\mathbf {r}^\intercal \mathbf {x})^2\prod _{{\begin{array}{cc} j=1\\ \mu _j\ne 0 \end{array}}}^{n-1}\mu _j.\end{aligned}$$
(3)

Proof

The result follows from Lemma 3.2 by taking into account that the corresponding sum reduces to exactly one term related to the eigenvalue 0. \(\square \)

Now, we list some consequences of the previous results. For the sake of convenience, we assume that 0 takes both signs. Further, if \(\dot{G}-{v}\) is singular (i.e. if zero is one of its eigenvalues), then we denote the product of nonzero eigenvalues of \(\dot{G}-{v}\) by \(\Pi _v\).

Proposition 3.4

Let \(\dot{G}, \dot{G}'\) be a counterexample pair (if any) for Problem 1.2.

  1. (i)

    If at least one vertex-deleted subgraph of \(\dot{G}\) is singular, then \({{\,\mathrm{sign}\,}}(a_0(\dot{G}))={{\,\mathrm{sign}\,}}(a_0(\dot{G}'))\).

  2. (ii)

    If \(\dot{G}\) has a pendant vertex, then \({{\,\mathrm{sign}\,}}(a_0(\dot{G}))={{\,\mathrm{sign}\,}}(a_0(\dot{G}'))\) and \(a_0(\dot{G}), a_0(\dot{G}')\ne 0\).

Proof

  1. (i)

    Let \(v\in V(\dot{G})\) and \(v'\in V (\dot{G}')\) be partners such that \(\dot{G}-v\) and \(\dot{G}'-v'\) are singular. In this case, 0 is a simple eigenvalue in both signed graphs (by Theorem 2.2(i)), which means that \(a_0(\dot{G}), a_0(\dot{G}')\) can be computed by (3). Let \(\mathbf {r}_v\) and \(\mathbf {r}_{v'}\) be the characteristic vectors for v and \(v'\) in \(\dot{G}\) and \(\dot{G}'\), respectively, and suppose that the unit vectors \(\mathbf {x}\) and \(\mathbf {y}\) span the nullspaces for \(\dot{G}-v\) and \(\dot{G}'-v'\), respectively. Taking into account that \((\mathbf {r}_{v}^\intercal \mathbf {x})^2, (\mathbf {r}_{v'}^\intercal \mathbf {y})^2\ge 0\), we get

    $$\begin{aligned} {{\,\mathrm{sign}\,}}(a_0(\dot{G}))&={{\,\mathrm{sign}\,}}\Big ((-1)^{n-1}(\mathbf {r}_{v}^\intercal \mathbf {x})^2\Pi _v\Big )=(-1)^{n-1}(\mathbf {r}_{v}^\intercal \mathbf {x})^2{{\,\mathrm{sign}\,}}(\Pi _v)\\&=(-1)^{n-1}(\mathbf {r}_{v'}^\intercal \mathbf {y})^2{{\,\mathrm{sign}\,}}(\Pi _{v'})={{\,\mathrm{sign}\,}}\Big ((-1)^{n-1}(\mathbf {r}_{v'}^\intercal \mathbf {y})^2\Pi _{v'}\Big )\\&={{\,\mathrm{sign}\,}}(a_0(\dot{G}')). \end{aligned}$$
  2. (ii)

    If \(\dot{G}\) has a pendant vertex, say v, then by deleting its neighbour we arrive at a singular vertex-deleted subgraph (it is singular because it has an isolated vertex), and then the desired equality follows from the previous item.

Moreover, considering the same vertex-deleted subgraph we get that the unit eigenvector \(\mathbf {x}\) afforded by a simple eigenvalue 0 takes 1 at v and 0 at all other vertices. Together with (3), this means that \(a_0(\dot{G})\ne 0\). Since \(\dot{G}\) has a pendant vertex, \(\dot{G}'\) also has a pendant vertex (Theorem 2.1(iii)). Repeating the procedure, this time for the neighbour of a pendant vertex of \(\dot{G}'\), we arrive at \(a_0(\dot{G}')\ne 0\). \(\square \)

Corollary 3.5

The polynomial reconstruction is unique for singular signed graphs with pendant vertices.

Proof

If \(\dot{G}\) is singular, then \(a_0(\dot{G})=0\). If \(\dot{G}\) has a pendant vertex and the polynomial reconstruction is not unique, then Proposition 3.4(ii) tells us that \(a_0(\dot{G})\ne 0\). Thus, we have established a contradiction. \(\square \)

The same result for unsigned graphs has been proved in [10]. It is worth mentioning that the singularity of \(\dot{G}\) is not reconstructible from its polynomial deck.

Proposition 3.6

Suppose that \(\dot{G}\) has a pendant vertex and \(|\Pi _v|<2\) holds for all singular vertex-deleted subgraphs. Then the polynomial reconstruction is unique.

Proof

Assume by way of contradiction that \(\dot{G}'\) is a signed graph which together with \(\dot{G}\) makes a counterexample pair for the reconstruction problem. Let \(v\in V(\dot{G})\) and \(w'\in V(\dot{G}')\) be vertices adjacent to a pendant vertex. Considering the unit vectors that span nullspaces of \(\dot{G}-v\) and \(\dot{G}'-w'\), we get that, for both of them, the unique nonzero coordinate is 1 and corresponds to the unique isolated vertex. Therefore, for both \(\dot{G}\) and \(\dot{G}'\) the term \((\mathbf {r}^\intercal \mathbf {x})^2\) of (3) is 1, and thus \(a_0(\dot{G})=(-1)^{n-1}\Pi _v\) and \(a_0(\dot{G}')=(-1)^{n-1}\Pi _{w'}\). Since \(a_0(\dot{G}),a_0(\dot{G}')\in \mathbb {Z}\) (because they are coefficients of integral polynomials), we have \(\Pi _v, \Pi _{w'}\in \mathbb {Z}\). By the assumption of this proposition, \(|\Pi _v|, |\Pi _{w'}|<2\), and thus \(\Pi _v, \Pi _{w'}\in \{-1, 0, 1\}\), which in turn gives \(a_0(\dot{G}),a_0(\dot{G}')\in \{-1, 0, 1\}\). Applying Proposition 3.4(ii), we get \(a_0(\dot{G})=a_0(\dot{G}')\), hence a contradiction. \(\square \)

4 A Contribution to the Polynomial Reconstruction of Bipartite Graphs with Pendant Vertices

This section is devoted to unsigned graphs. We recall from [3] that bipartiteness of a graph is recognizable from the polynomial deck. According to [1, 3, 10], Problem 1.1 is solved affirmatively for a broad class of bipartite graphs. For example, the polynomial reconstruction of a bipartite graph with an odd number of vertices is unique since it has 0 as an eigenvalue. In what follows, we consider the reconstruction of bipartite graphs with an even number of vertices such that at least one of them is a pendant vertex. We relate the uniqueness of the reconstruction to the chemical invariant known as the HOMO-LUMO index. The HOMO-LUMO index \(R=R(G)\) of a graph with n vertices is the largest absolute value of the \(\lfloor (n+1)/2\rfloor \)th and \(\lceil (n+1)/2\rceil \)th largest eigenvalue of G. In particular case of bipartite graphs, this invariant is either 0 or the smallest positive eigenvalue. The latter occurs whenever 0 is not a repeated eigenvalue of G. More details about this invariant and a wide branch of applications in chemistry can be found in [8] and references therein. We recall the reader that HOMO and LUMO are acronyms derived from ‘Highest Occupied Molecular Orbital’ and ‘Lowest Unoccupied Molecular Orbital’.

The following lemma is needed.

Lemma 4.1

[17, Lemma 41] Let \(\mathbf {x}=(x_1, x_2, \ldots , x_n)^\intercal \) be a unit \(\lambda \)-eigenvector for a Hermitian matrix

$$\begin{aligned} A=\begin{pmatrix} 0&{}\mathbf {a}^\intercal \\ \mathbf {a}&{} B \end{pmatrix}. \end{aligned}$$

If \(\lambda \) is not an eigenvalue of B, then \(|x_1|^2=\dfrac{1}{1+||(\lambda I-B)^{-1}\mathbf {a}||^2}\), where \(||\cdot ||\) is the 2-norm.

We now formulate our result.

Proposition 4.2

Let G be a bipartite graph of even order and at least one pendant vertex. If every vertex-deleted subgraph of G has only simple eigenvalues and for at least one pendant vertex v, the inequality

$$\begin{aligned} \left( 1-{\frac{R(G-u)^2}{R(G-u)^2+d_u-1}}\right) |\Pi _v|<1 \end{aligned}$$
(4)

holds for all vertex-deleted subgraphs \(G-u\) with \(d_u\ge 2\) (where \(R(G-u)\) is the HOMO-LUMO index of \(G-u\), \(\Pi _v\) is the product of nonzero eigenvalues of \(G-v\) and \(d_u\) is the degree of u in G), then the polynomial reconstruction of G is unique.

Proof

As before, we assume that \(G, G'\) is a counterexample pair and, due to Proposition 3.4(i), that \(|a_0(G)|<|a_0(G')|\). Let v be a pendant vertex of G, w be its neighbour and set \(H=G-v\).

We claim that the unit eigenvector \(\mathbf {x}\) associated with 0 for H takes a nonzero value on w. Namely, if \(x_w=0\) then the eigenvector \(\mathbf {y}=\mathbf {x}{\setminus } x_w\) is a 0-eigenvector for \(H-w\). Indeed, \(A_{H}\mathbf {x}=\mathbf {0}\) implies \(A_{H-w}\mathbf {y}=\mathbf {0}\). Therefore, 0 is an eigenvalue of \(H-w\). This means that the multiplicity of 0 in \(G-w=H-w+v\) is at least 2, but this contradicts the assumption of this proposition.

We now prove that 0 is not an eigenvalue of \(H-w\). By assuming the contrary, we get that the multiplicity of 0 is two (since \(H-w\) has an even number of vertices). Thus, there are linearly independent nonzero vectors \(\mathbf {y}\) and \(\mathbf {z}\) such that \(A_{H-w}\mathbf {y}=\mathbf {0}\) and \(A_{H-w}\mathbf {z}=\mathbf {0}\). Without loss of generality, we may say that the adjacency matrix of H has the form

$$\begin{aligned} A_H=\begin{pmatrix} 0&{}\mathbf {a}^\intercal \\ \mathbf {a}&{}A_{H-w} \end{pmatrix}.\end{aligned}$$
(5)

If \(\mathbf {a}^\intercal \mathbf {y}=0\), then \((0, \mathbf {y}^\intercal )^\intercal \) is a 0-eigenvector for H. Since \(\mathbf {x}\) is also a 0-eigenvector with \(x_w\ne 0\), we get that 0 is a repeated eigenvalue in H. The equality \(\mathbf {a}^\intercal \mathbf {z}=0\) leads to the same conclusion. Thus, we have established a contradiction.

For \(\mathbf {a}^\intercal \mathbf {y}=y\ne 0\) and \(\mathbf {a}^\intercal \mathbf {z}=z\ne 0\), we easily verify that \((0, (\mathbf {y}-\frac{y}{z}\mathbf {z})^\intercal )^\intercal \) is an other (apart from \(\mathbf {x}\)) 0-eigenvector for H, and this is a contradiction as before.

We now approximate the coordinate \(x_w\). Let \(A_H\) be partitioned as in (5). Since 0 is an eigenvalue of H and is not an eigenvalue of \(H-w\), from Lemma 4.1 we have

$$\begin{aligned} x_w^2=\frac{1}{1+||(0 I-A_{H-w})^{-1}\mathbf {a}||^2}\ge \frac{1}{1+||A_{H-w}^{-1}||^2 ||\mathbf {a}||^2}. \end{aligned}$$

Since \(||A_{H-w}^{-1}||\) is the largest eigenvalue, say \(\rho \), of \(A_{H-w}^{-1}\), we get

$$\begin{aligned} x_w^2 \ge \frac{1}{1+\rho ^2 ||\mathbf {a}||^2}=\frac{1}{1+\frac{||\mathbf {a}||^2}{R(H-w)^2}}=\frac{1}{1+\frac{d_w}{R(H-w)^2}}=\frac{R(H-w)^2}{R(H-w)^2+d_w(H-w)}, \end{aligned}$$

where \(d_w(H-w)\) is the degree of w in H. Since \(G-w=H-w+u\), we have \(R(H-w)=R(G-w)\), while since w is adjacent to v, we have \(d_w(H-w)=d_w-1\), which gives

$$\begin{aligned} x_w^2\ge \frac{R(G-w)^2}{R(G-w)^2+d_w-1}, \end{aligned}$$

If \(v'\in V(G')\) is a partner of v and \(\mathbf {x}'\) is a unit 0-eigenvector for \(G'-v'\), then we clearly have that the square of the coordinate that corresponds to the neighbour of \(v'\) does not exceed 1. Then using (3), we compute

$$\begin{aligned} 0\le |a_0(G')|-|a_0(G)|\le (1-x_{w}^2)|\Pi _v|\le \left( 1-\frac{R(G-w)^2}{R(G-w)^2+d_w-1}\right) |\Pi _v|< 1, \end{aligned}$$

where the last inequality follows by the assumption of the statement. Since \(a_0(G), a_0(G')\) are integers of the same sign (see Proposition 3.4(i)), we get \(a_0(G)=a_0(G')\), and the proof is complete. \(\square \)

Since the number of edges is recognizable from the spectrum, we can determine the degree of v in G for every \(G-v\). Therefore, on the basis of the polynomial deck one can check the assumption of the previous proposition.

Let us see what we have gained by the previous result. Clearly, larger \(R(G-w)\) gives smaller value on the left-hand side of (4). Taking into account that \(\Pi _v\) is an integer, we get that for \(d_w-1<R(G-w)^2\) the condition of (4) reduces to \(\Pi _v< 2\) for at least one pendant vertex v. This amplifies the result of Proposition 3.6 in particular case of bipartite graphs. The inequality \(d_w-1\ge R(G-w)^2\) allows \(\Pi _v\) to be larger than 2.

5 The Polynomial Reconstruction of Signed Bundles

According to definition given in Sect. 2, there is a particular case in which a signed bundle reduces to a signed cycle. As we said, the polynomial reconstruction of a signed cycle is not unique. In what follows, we prove that this is the only exception for signed bundles. Non-regular signed bundles (i.e. those that are not signed cycles) can be seen as signed graphs in which exactly one vertex has degree distinct from 2, in fact, even and at least 4 (see Fig. 1).

Fig. 1
figure 1

A bundle

We need the following lemma.

Lemma 5.1

Let \(\dot{G}\) and \(\dot{G}'\) be non-regular signed bundles that share the same underlying graph in which no two cycles are of the same length. If \(a_0(\dot{G})\ne a_0(\dot{G}')\), then \(\Phi _{\dot{G}}(x)-\Phi _{\dot{G}'}(x)\ne a_0(\dot{G})-a_0(\dot{G}')\).

Proof

Let \(a_0(\dot{G})\ne a_0(\dot{G})\) and assume by way of contradiction that \(\Phi _{\dot{G}}(x)-\Phi _{\dot{G}'}(x)= a_0(\dot{G})-a_0(\dot{G}')\). Denote by v the vertex of the largest degree in the common underlying graph G. Next denote by \(C_1, C_2, \ldots , C_k\) and \(P_1, P_2, \ldots , P_k\) the set of cycles in G and the corresponding set of paths obtained by deleting v from each of cycles, respectively. Without loss of generality, we may suppose that the cycles are ordered increasingly by length. For \(1\le i\le k\), the cycle \(C_i\) underlies the cycle \(\dot{C}_i\) of \(\dot{G}\) and the cycle \(\dot{C}'_i\) of \(\dot{G}'\).

Using Formula (1), we compute

$$\begin{aligned} \Phi _{\dot{G}}(x)-\Phi _{\dot{G}'}(x)&= x\big (\Phi _{\dot{G}-v}(x)-\Phi _{\dot{G}'-v}(x)\big )-\sum _{w\sim v}\big (\Phi _{\dot{G}-v-w}(x)-\Phi _{\dot{G}'-v-w}(x)\big )\\&\quad -2\sum _{i=1}^{k}\big (\sigma (\dot{C}_i)\Phi _{\dot{G}-\dot{C}_i}(x)-\sigma (\dot{C}'_i)\Phi _{\dot{G}'-\dot{C}'_i}(x)\big ). \end{aligned}$$

Since every signed path switches to its underlying path, the first two terms of the right-hand side are equal to 0. Considering the third one, we get

$$\begin{aligned} \Phi _{\dot{G}}(x)-\Phi _{\dot{G}'}(x)=2\sum _{i=1}^k \big (\sigma (\dot{C}'_i)-\sigma (\dot{C}_i)\big )\prod _{j\ne i}\Phi _{P_j}(x). \end{aligned}$$

Since the cycles are ordered increasingly, we have that the polynomials \(\prod _{j\ne 1}\Phi _{P_j} (x),\) \( \prod _{j\ne 2}\Phi _{P_j}(x),\ldots , \prod _{j\ne k}\Phi _{P_j}(x)\) are ordered decreasingly by the degree. Say that the degree of the polynomial \(\prod _{j\ne i}\Phi _{P_j}(x)\) is \(s_i\). Since \(\Phi _{\dot{G}}(x)-\Phi _{\dot{G}'}(x)= a_0(\dot{G})-a_0(\dot{G}')\), there must be \(\sigma (\dot{C}'_1)-\sigma (\dot{C}_1)=0\), as for otherwise \(x^{s_1}\) would appear in the difference. Proceeding in the same way, we conclude that \(\sigma (\dot{C}'_2)-\sigma (\dot{C}_2)=0\), because of \(x^{s_2}\), and so on. At the end, we get \(\sigma (\dot{C}'_i)-\sigma (\dot{C}_i)=0\) for every i, which in turn implies \(\Phi _{\dot{G}}(x)-\Phi _{\dot{G}'}(x)=0\), and this contradicts the assumption that \(a_0(\dot{G})\ne a_0(\dot{G}')\). \(\square \)

Proposition 5.2

The polynomial reconstruction of non-regular signed bundles is unique.

Proof

Let \(\dot{G}\) be a non-regular signed bundle and assume that \(\dot{G}'\) is a signed graph which together with \(\dot{G}\) makes a counterexample to Problem 1.2. Since the degree of exactly one vertex in \(\dot{G}\) is distinct from 2, in the light of Theorems 2.1(iii) and 2.2(ii), we have exactly two possibilities for \(\dot{G}'\): it is a non-regular signed bundle or a disjoint union of a non-regular signed bundle and a signed cycle. The latter possibility is eliminated immediately by Theorem 2.2(i) since every signed cycle has a repeated eigenvalue (see [13, Theorem 4.1]).

Let further \(\dot{G}'\) be a non-regular signed bundle, and let v and \(v'\) be the vertices of the largest degree in \(\dot{G}\) and \(\dot{G}'\), respectively. Since these are the unique vertices whose degree differs from 2, they must be partners, i.e. they have the same degree and it holds \(\Phi _{\dot{G}-v}(x)=\Phi _{\dot{G}'-v'}(x)\). Observe that \(\dot{G}-v\) and \(\dot{G}'-v'\) are disjoint unions of paths. Moreover, these signed graphs are switching isomorphic, which can be easily seen but we can also refer to [6, Theorem 3.1]. If two paths of \(\dot{G}-v\) are of the same length, then \(\dot{G}-v\) has a repeated eigenvalue which is impossible by Theorem 2.2(i). It follows that \(\dot{G}\) and \(\dot{G}'\) are non-regular signed bundles that share the same underlying graph in which no two cycles are of the same length, i.e. they satisfy the assumptions of Lemma 5.1. The result of the same lemma contradicts the initial assumption of this proof. \(\square \)

6 The Polynomial Reconstruction of Bicyclic Signed Graphs Without Pendant Vertices is Unique

Since Problem 1.2 is addressed affirmatively for trees and unicyclic signed graphs in [13], the next natural step are bicyclic signed graphs. Here, we resolve the same problem under the additional assumption that a signed graph under consideration has no pendant vertices.

Fig. 2
figure 2

An infinite graph, a dumbbell and a theta graph

Proposition 6.1

The polynomial reconstruction of bicyclic signed graphs without pendant vertices is unique.

Proof

There are exactly three non-homeomorphic types of such a signed graph: a signed infinite graph, a signed dumbbell and a signed theta graph (see Fig. 2).

First, we observe that a signed infinite graph is a particular case of a signed bundle which is resolved in Proposition 5.2.

Observe next that the polynomial reconstruction of a signed dumbbell is unique since it has a vertex-deleted subgraph which consists of a signed cycle and another component and therefore has a repeated eigenvalue. (We had a similar situation in the previous section.)

Let further \(\dot{G}\) be a signed theta-graph, and let, as before, \(\dot{G}'\) be a signed graph which together with \(\dot{G}\) makes a counterexample to Problem 1.2. Then, \(\dot{G}'\) is either a signed theta-graph or a disjoint union of a signed theta-graph and a signed cycle. The latter possibility is eliminated immediately, so it remains to consider the former one.

Let \(\dot{C}_1, \dot{C}_2, \dot{C}_3\) (resp. \(\dot{C}'_1, \dot{C}'_2, \dot{C}'_3\)) be the three induced cycles of \(\dot{G}\) (resp. \(\dot{G}'\)) ordered non-decreasingly by length. Let vw be the vertices of degree 3 in \(\dot{G}\). Their partners \(v', w'\) are the vertices of degree 3 in \(\dot{G}'\). Now, \(\dot{G}-v\) and \(\dot{G}'-v'\) share the same spectrum and both are switching isomorphic to T-shape trees. We know from [7] that if two T-shape trees share the same spectrum, then they are necessarily isomorphic, which implies that \(\dot{C}_i\) is equal in length to \(\dot{C}'_i\), for \(1\le i\le 3\).

Suppose now that v and w are non-adjacent. Observe that \(\dot{G}-\dot{C}_i\) and \(\dot{G}'-\dot{C}'_i\) switch to a fixed path, say \(P_i\). Acting as in the proof of Lemma 5.1, we get

$$\begin{aligned} 0\ne a_0(\dot{G})-a_0(\dot{G}')=\Phi _{\dot{G}}(x)-\Phi _{\dot{G}'}(x)=2\sum _{i=1}^3 \big (\sigma (\dot{C}'_i)-\sigma (\dot{C}_i)\big )\Phi _{P_i}(x). \end{aligned}$$
(6)

Denote by \(\ell _i\) the length of \(P_i\). Evidently, \(\ell _1\ge \ell _2\ge \ell _3\ge 0\).

Assume that \(\ell _1>\ell _2\). Then, \(\sigma (\dot{C}'_1)-\sigma (\dot{C}_1)=0\), as for otherwise \(x^{\ell _1+1}\) would appear in the right-hand side of (6). If \(\ell _2>\ell _3\), then we also have \(\sigma (\dot{C}'_i)-\sigma (\dot{C}_i)=0\) for \(i\in \{1,2\}\), and then the right-hand side of (6) is zero, which is impossible. For \(\ell _2=\ell _3\), \(x^{\ell _2+1}\) appears in the right-hand side unless \(\sigma (\dot{C}'_2)-\sigma (\dot{C}_2)=\sigma (\dot{C}_3)-\sigma (\dot{C}'_3)\), but then we again get that all the remaining terms vanish, i.e. that the right-hand side is 0.

Similarly, for \(\ell _1=\ell _2\), there must be \(\sigma (\dot{C}'_1)-\sigma (\dot{C}_1)=\sigma (\dot{C}_2)-\sigma (\dot{C}'_2)\), which implies \(\Phi _{\dot{G}}(x)-\Phi _{\dot{G}'}(x)=2 \big (\sigma (\dot{C}'_3)-\sigma (\dot{C}_3)\big )\Phi _{P_3}(x)\), along with a contradiction obtained as before.

It remains to consider the case in which \(v\sim w\) and \(v'\sim w'\). In this case, there are only paths \(P_1\) and \(P_2\), and the sum of (6) has only two summands. This case is considered by slight modifications in the proof of the previous one, even easier because the number of paths has been reduced. \(\square \)

7 The Polynomial Reconstruction of Signed Graphs with at Most 8 Vertices

In this section, we report some computational results, formulate some open problems, give related comments, but not establish theoretical results.

In [14], Simić and the author have reported the positive answer to Problem 1.2 for signed graphs with at most 6 vertices. The result was obtained by computer search, and here we extend the search to signed graphs with 7 or 8 vertices and confirm that the polynomial reconstruction is unique except for signed cycles.

Here are the details on this result. We observe that at least one of signed graphs from a putative counterexample pair is connected. Indeed, if both are disconnected, then the largest eigenvalues of both of them do appear as roots of polynomials in their common polynomial deck, and thus these signed graphs have a common eigenvalue, which is a contradiction. Therefore, it is sufficient to consider pairs in which at least one signed graph is connected. Moreover, by virtue of Theorem 2.2(ii), for \(n=7\) both candidates are connected, and for \(n=8\) a disconnected one is a disjoint union of connected signed graphs with 4 vertices each. Now, connected representatives of switching isomorphism classes of signed graphs with required numbers of vertices can be found on the web location [16]: there are 42,065 with 7 vertices and 4,880,753 with 8 vertices. In addition, there are just 12 connected representatives with 4 vertices, giving the 66 disconnected candidates with 8 vertices.

We conducted the following computer search. Trees and signed unicyclic graphs are skipped (due to the results of [13]). If at least one vertex-deleted subgraph has a repeated eigenvalue, the signed graph is skipped (Theorem 2.2(i)). Signed graphs whose vertex deleted subgraphs have least eigenvalue greater than \(-2\) are also skipped (due to the result of [14]). Concerning the remaining candidates, for each pair with the same collection of vertex degrees (a) we check whether their characteristic polynomials differ in a constant. If yes, then (b) we compare their polynomial decks. Except for signed cycles, no other signed graphs have passed (a) and (b).

We now recall from [14] the following particular case of Problem 1.2.

Problem 7.1

Given two signed graphs \(\dot{G}\) and \(\dot{G}'\) such that

  1. (a)

    both have at least 3 vertices,

  2. (b)

    none of them is a signed cycle and

  3. (c)

    spectra of their polynomial decks are bounded by \(-2\),

is it true that

$$\begin{aligned} \mathcal {P}(\dot{G})=\mathcal {P}(\dot{G}')\,\Longrightarrow \, \Phi _{\dot{G}}=\Phi _{\dot{G}'}? \end{aligned}$$

There is no need to say in (c) that spectra are bounded ‘from below’, since there is no other option. This problem has been resolved in [14] for signed graphs whose vertex-deleted subgraphs have least eigenvalue greater than \(-2\). Thus, it remains to include the possibility that at least one vertex-deleted subgraph has \(-2\) as an eigenvalue. Since signed graphs of a counterexample pair do not share any eigenvalue, the interlacing argument says that at least one of them is a minimal signed graph for the least eigenvalue \(\ge -2\). (We recall the reader that the least eigenvalue of such a signed graph is less than \(-2\), but the least eigenvalue of every vertex-deleted subgraph is \(\ge -2\).) There is a theoretical result obtained by Vijayakumar [18] stating that such a signed graph has at most 10 vertices. Due to the above computational contribution, the remaining possibilities for our reconstruction problem are \(n=9\) and \(n=10\). It would be interesting to see if this will be resolved in future. (For unsigned graphs, it is resolved in [12].)

We conclude this section with a related problem. Recall that the Laplacian matrix of \(\dot{G}\) is \(D_{\dot{G}}-A_{\dot{G}}\), where \(D_{\dot{G}}\) is the diagonal matrix of vertex degrees. Denote by \(\Psi _{\dot{G}}\) the characteristic polynomial of the Laplacian matrix, and by \(\mathcal {L}(\dot{G})\) the collection of characteristic polynomials of Laplacian matrices of all edge-deleted subgraphs of \(\dot{G}\), i.e.

$$\begin{aligned} \mathcal {L}(\dot{G})=\big \{\Psi _{\dot{G}-e_1}, \Psi _{\dot{G}-e_2}, \ldots , \Psi _{\dot{G}-e_m}\big \}. \end{aligned}$$

Problem 7.2

Given two signed graphs \(\dot{G}\) and \(\dot{G}'\) such that none of them is a signed cycle, is it true that

$$\begin{aligned} \mathcal {L}(\dot{G})=\mathcal {L}(\dot{G}')\,\Longrightarrow \, \Psi _{\dot{G}}=\Psi _{\dot{G}'}? \end{aligned}$$

To show that Problem 7.2 is covered by Problem 7.1, we need some definitions collected from [14, 19]. Introduce the vertex–edge orientation \(\eta \) that maps the set \(V(\dot{G})\times E(\dot{G})\) to \(\{-1, 0, 1\}\) and obeys the following rules: (i) \(\eta (u,vw)=0\) if \(u\notin \{v, w\}\), (ii) \(\eta (u, uv)=1\) or \(\eta (u, uv)=-1\) and (iii) \(\eta (u, uv)\eta (v, uv)=-\sigma (uv)\). The vertex–edge incidence matrix \(B_{\eta }\) of \(\dot{G}\) is derived from \(\dot{G}\) in such a way that its (ie)-entry is equal to \(\eta (i,e)\). Following [14], the signed line graph \(L(\dot{G})\) of \(\dot{G}\) is determined by the adjacency matrix \(B^\intercal _{\eta }B_{\eta }-2I\). In fact, since \(\eta \) is not uniquely defined this is the class of signed graphs that switch one to another. On the other hand, the Laplacian matrix of \(\dot{G}\) can be derived as the row-by-row product of the matrix \(B_{\eta }\) with itself, so it is \(B_{\eta }B_{\eta }^\intercal \). Accordingly, we have \(\Phi _{L(\dot{G})}(x)=(x+2)^{m-n}\Psi _{\dot{G}}(x)\), and therefore \(\Psi _{\dot{G}}\) can be reconstructed from \(\mathcal {L}(\dot{G})\) if \(\Phi _{L(\dot{G})}\) can be reconstructed from \(\mathcal {P}(\dot{G})\). On the other hand, as the spectrum of a signed line graph is bounded by \(-2\), the latter reconstruction is related to Problem 7.1.