Computing the determinant of a signed graph

: A signed graph is a simple graph in which every edge has a positive or negative sign. In this article, we employ several algebraic techniques to compute the determinant of a signed graph in terms of the spectrum of a vertex-deleted subgraph. Particular cases, including vertex-deleted subgraphs without repeated eigenvalues or singular vertex-deleted subgraphs are considered. As applications, an algorithm for the determinant of a signed graph with pendant edges is established, the determinant of a bicyclic graph and the determinant of a chain graph are computed. In the end, the uniqueness of the polynomial reconstruction for chain graphs is proved.


Introduction
A signed graph G ˙is a finite, undirected graph without loops or parallel edges, in which every edge is assigned either positive or negative sign.The vertex set is denoted by ( ) V G ˙, and the order n is the number of vertices of G ˙.The adjacency matrix A G ˙has +1 or −1 for adjacent vertices, depending on the sign of the connecting edge.The sign of an edge e is denoted by ( ) σ e , and σ can be seen as the sign function (or the signature) that maps the edge set to { } + − 1, 1 .In this context, an ordinary (unsigned) graph is interpreted as a signed graph without negative edges.In this case, the graph is simply denoted by G, i.e., the absence of a dot symbol refers to the all- positive edge signature.The negation −G ˙of G ˙is obtained by reversing the sign of every edge of G ˙.A cycle C ˙in G is positive if the product of its edge signs ( ) σ C ˙is 1.Otherwise, it is negative.
of G ˙is the characteristic polynomial of A G ˙. To designate the signed graph, we occasionally write ( ) a G i for the corresponding coefficients.Similarly, the determinant ( ) G det ˙equals the product of the eigenvalues taken with multiplicities.We say that G ˙is singular if its determinant is zero, or if zero is one of its eigenvalues.
We recall that the coefficients of the characteristic polynomial can be computed by the Sachs formula for signed graphs [1].Accordingly, a basic figure in a signed graph is a disjoint union of edges and cycles (without isolated vertices), and where i is the set of basic figures on i vertices in G, ( )  p B is the number of components of B, ( ) c B is the set of cycles in B and ( ) ( ) Therefore, we have noted two possible ways to compute the determinant ( ) G det ˙: the first is based on the eigenvalues, and the second is based on basic figures.In this work, we put focus on vertex-deleted subgraphs of G ˙and express ( ) G det ˙in terms of their eigenvalues.(A vertex-deleted subgraph is obtained by removing a single vertex from G ˙and all edges incident to it.)Particular cases concerning vertex-deleted subgraphs without repeated eigenvalues and singular vertex-deleted subgraphs are considered.We also compute the determinant of two standard products, the tensor product and the Cartesian product, of signed graphs in terms of the eigenvalues of the corresponding graphs.
We recall from the study by Zaslavsky [2] that a fundamental operation on signed graphs is switching.It means reversing the sign of every edge located between a vertex subset and its complement.Signed graphs obtained in this way are said to be switching equivalent, and they share the same spectrum.Consequently, they share the same determinant.This means that once we have computed the determinant of a single signed graph, it remains unchanged for the entire switching class.Since an ordinary graph is interpreted as a signed graph, the results obtained in this study remain valid for ordinary graphs and also for signed graphs that are switching equivalent to them; they are also known as balanced signed graphs.Even more, signed graphs are switching isomorphic if one of them is isomorphic to a signed graph that switches to the other one.Again, the determinant is unchanged.
We apply our results to derive several consequences.First, an algorithm for the determinant of a signed graph with pendant edges is provided.Next, the determinant of an ordinary bicyclic graph and an ordinary chain graph is computed (definitions of these graphs are given in the last section).Finally, we show that the polynomial reconstruction of a chain graph from the collection of characteristic polynomials of its vertexdeleted subgraphs is unique.
In relation to our results on bicyclic graphs, we observe that the determinant of a tree is ( ) if it has a perfect matching and 0 otherwise, while the determinant of a unicyclic graph is computed in the study by Simić and Stanić [3] (see also [4]), and thus, the result reported in this article figures as the next natural step.
Concerning the polynomial reconstruction, it is worth mentioning that this is a challenging open problem considered in many references published in the last 50 years, so far without any counterexample [4].
Finally, the results obtained in this article can be compared to the results obtained in the study by Liu and You [5] where the authors computed the nullity of a signed bicyclic graph, i.e., the multiplicity of zero in the corresponding spectrum.Evidently, the nullity is nonzero if and only if the same holds for the determinant.
Our terminology is standard, and some notation is introduced in the following sections.For undefined notions, we refer to [2,6].
In Section 2, we compute the determinant of G ˙. Section 3 is devoted to the aforementioned applications.
2 Determinant of G Ẇe start this section by recalling a lemma that will be needed in the sequel.
Lemma 2.1.[7] Let G ˙be obtained from a signed graph H ˙of order − n 1 by adding a new vertex whose neighborhood in H ˙is determined by the characteristic ( ) − 0, 1, 1 -vector r.The characteristic polynomial of G is given as follows: are the distinct eigenvalues of are the matrices of the orthogonal projections of − n 1 onto the eigenspaces of H ˙with respect to the canonical basis.are their multiplicities, then the determinant of G ˙is where i are mutually orthogonal unit vectors that make an eigenbasis of μ i .
Proof.The orthogonal projection of − n 1 onto the eigenspace of μ i is realized by the matrix where the fourth equality follows since distinct eigenvectors are mutually orthogonal, and the fifth equality follows since the eigenvectors are unit.If ( ) m x H ˙denotes the minimal polynomial of H ˙, then on the basis of Lemma 2.1, we compute In particular, this means that the constant term a n of ( ) x Φ G ˙is equal to the constant term of ( ) The desired result follows from There are some consequences of Theorem 2.2.
where x is a unit eigenvector associated with 0.
, where d is the degree of the deleted vertex.
(iv) If G ˙is nonsingular and each of its vertex-deleted subgraph is singular, then , where Δ is the maximum vertex degree in G ˙. Equality holds if G ˙is regular and r is an eigenvector to zero in every vertex-deleted subgraph. Proof.
, in equation ( 2) when we also have = − k n 1.For (ii), if 0 is a nonsimple eigenvalue of H ˙, then the right-hand side of equation ( 2) is 0; this assertion follows from the interlacing theorem as well.If 0 is a simple eigenvalue, the right-hand side of equation ( 2) reduces to exactly one term given in the formulation of this corollary, and we are done.
Under the notation of Theorem 2.2, we have , by the Cauchy-Schwarz inequality, which leads to (iii).
For (iv), by the interlacing theorem, 0 is a simple eigenvalue in every vertex-deleted subgraph.Substituting , giving , by (iii).An other consequence of the latter equality is that the terms have the same sign for every v of G ˙. Summing over the vertex set ( ) V G ˙, we obtain where the latter equality follows from ( ) ( ) ).The equality holds if Δ is the common vertex degree in G ˙(i.e., if G ˙is regular) and the equality is attained in the Cauchy-Schwarz inequality (i.e., if r and x are linearly dependent) which gives the desired assertion.□ We proceed with determinants of two products.Let G ˙1 and G ˙2 be signed graphs with eigenvalues ˙□ 1 2 has the same vertex set, and the vertices are adjacent if and only if either = u v 1 , and ≤ ≤ j n 1 2 .This leads to the next result.
Proof.For (i), since the eigenvalues are λ μ i j , the determinant is computed as

Item (ii) can be proved by taking into account that the adjacency matrix of
2 .Notwithstanding, we may use the eigenvalues and compute the determinant as follows: 2 .The second product follows by the symmetry.□ Note that if the spectrum of G ˙2 is symmetric (with respect to the origin), then ( ) , and so, in this case, the determinant is ( )

Applications
In this section, we provide several results based on the previous theorems.

An algorithm for the determinant of a bicyclic graph
We provide an algorithm for computing the determinant of a signed graph with pendant edges.It is based on the Heilbronner's Formula: If u is a pendant vertex of G ˙and v is its neighbor, then ( ) [8] for signed graphs and [6, Theorem 2.3.4] for the particular case of ordinary graphs).It follows that (

Algorithm 1. Compute determinant
Require Signed graph G ˙with n vertices and pendant edges = k 0 while there is a pendant edge uv do Observing Algorithm 1, we note that since the search on vertices of degree 0 or 1 is linear, the time complexity depends on the complexity of computing the determinant of a reduced signed graph in the last line.Depending on the approach, it varies around (( ) ) − O n k 2 3 .However, one may observe that the previous procedure may reduce the initial signed graph to a comparatively small subgraph.In other words, as k is larger, the computation is simpler.Moreover, during the procedure, an isolated vertex may appear, and then the determinant is 0.
We apply Algorithm 1 to compute the determinant of an ordinary bicyclic graph, i.e., a connected graph with n vertices and + n 1 edges.
(iv) Let H be a disjoint union of two cycles with p and q vertices, respectively.Then, , (v) Let H have s vertices and consists of two cycles of length p and q, respectively, along with an internal path between them.Then,

H
s even p q odd s p even q odd s p q even s p q odd s p odd q even s odd p q even det 1 4 1 , , , , (vi) Let H consists of two cycles of length p and q, sharing a common vertex.
p q q p q 1 2 1 2 1 2 1 2 (vii) Let H consists of two vertices and three internal paths between them having p, q, and r vertices, respec- H p even q r odd p q r even p q even r odd p q r odd det 2 p q r p p q r p q r p q Proof.Observe that G contains as an induced subgraph either two cycles joined by a path, two cycles with a common vertex, or three paths sharing the same endvertices.Accordingly, Algorithm 1 results in either a graph without vertices, a graph with an isolated vertex, a cycle, two disjoint cycles, or one of the aforementioned induced subgraphs.In other words, items (i)-(vii) cover all the possibilities.It remains to compute the determinant of H . Items (i) and (ii) are obvious.The remaining ones are based on equation (1) (where i is the number of vertices in H ), and the fact that ( ) ( ) = − H a det 1 i i .Now, items (iii) and (iv) follow by a direct algebraic computation.For (v)-(vii), we demonstrate the proofs of certain representative cases, while the remaining ones are considered analogously.
For (v), with p q , , and s even, there are exactly four perfect matchings in H , which gives the term ( ) − ∕ 4 1 s 2 .Removing the first (resp.second) cycle, we obtain a graph with two perfect matchings, which by equation ( 1 . Finally, exactly one basic figure contains both cycles, giving ( ) ( ) − − − ∕ 4 1 s p q 2 .Summing up, we arrive at the desired result.
For (vi), with p and q odd, H has + − p q 1 vertices, which is an odd number, and so H has no perfect matching.Removing any cycle, we obtain exactly one perfect matching, which by equation (1) leads to . For (vii), with p even, q and r odd, two perfect matchings give the first term, and the remaining basic figure (the cycle of length + + q r 2 with the set of independent edges) gives the second one.At the end, note that if the number of vertices in H is odd and all cycles are even, then there is no required basic figure , and ( ) = H det 0 (this occurs in (v)-(vii)).□

3.2
The determinant of a chain graph and a contribution to the polynomial reconstruction problem -free graph (i.e., it does not contain the pair of nonadjacent edges, the triangle, or the pentagon as an induced subgraph).It follows that it is a bipartite graph whose color classes are partitioned into h nonempty cells, i.e., ⋃ = U i h i 1 and ⋃ = V i h i 1 , respectively.All vertices in U s are joined to all vertices in . We know from [9,10] that the determinant of a chain graph is zero if and only if at least one cell contains at least two vertices.To compute the determinant in general case, it remains to consider the situation in which every cell contains a single vertex.This is performed in the next theorem.Theorem 3.2.Let H be a vertex-deleted subgraph of a nonsingular chain graph G.Then, be the vertices of G, and assume that they correspond to the cells shown in Figure 1 (since G is nonsingular, every cell has exactly one vertex).Observe that H has an isolated vertex if and only if either ≅ − H G u 1 or ≅ − H G v 1 .In this case, the unit eigenvector to 0 in H takes 1 on the isolated vertex and 0 on the remaining vertices, and then the result follows from Corollary 2.3(ii).Computing the determinant of a signed graph  7 , then H has a pair of nonadjacent vertices sharing the same neighbor- hood, and a unit eigenvector associated with zero in H takes 2  2 on one of these vertices, − 2 2 on the other one, and 0 on the remaining vertices.Observing that w is adjacent to exactly one vertex of the mentioned pair, we arrive at the desired result by employing the same corollary.□ An interesting consequence of the previous result is that the product of eigenvalues of every vertexdeleted subgraph of G (defined in the theorem) is constant whenever this subgraph has no isolated vertices.Of course, the same holds for two subgraphs with an isolated vertex, even more they share the same spectrum.In what follows, we use the latter observation.Before this, we mention another detail.Remark 3.3.If H of Theorem 3.2 has an isolated vertex, then the result holds in general, so for any nonsingular graph along with unchanged proof.
The polynomial reconstruction problem, posed by Cvetković in 1973, asks whether the characteristic polynomial of a graph G with at least three vertices is uniquely determined by the collection of characteristic polynomials of its vertex-deleted subgraphs.An experienced reader will recognize this problem as a spectral counterpart to the famous Ulam's reconstruction conjecture.Many details on the polynomial reconstruction problem, and its generalizations and relations with other problems can be found in the recent survey [4].In particular, no counterexamples are known, the reconstruction is unique for graphs with at most 10 vertices, and the characteristic polynomial of G is determined up to the constant term ( ) , where n is the order of G.The conjecture has been confirmed for many graph classes, and here we contribute by proving that the polynomial reconstruction is unique for chain graphs.
Theorem 3.4.The polynomial reconstruction of chain graphs is unique.
Proof.It is sufficient to show that we are able to compute the determinant of a graph from the collection of characteristic polynomials of vertex-deleted subgraphs (the so-called polynomial deck).
First, if at least one cell of a chain graph G has more than one vertex, then there exists a vertex outside this particular cell whose removal leaves a graph in which the multiplicity of 0 is at least 2, which by the interlacing argument implies that the determinant of every graph with the same polynomial deck is 0.
If every cell contains a single vertex, then G is nonsingular.Let H be a graph that together with G, form a counterexample pair for the polynomial reconstruction problem.We have the following setting: H is bipartite, it has the same vertex degrees as G, and vertex-deleted subgraphs sharing the same characteristic polynomial are obtained by removing vertices of the same degree [4].
The color classes of a graph H are equal in size; otherwise, 0 with multiplicity at least 2 would appear in the spectrum of a vertex-deleted subgraph, which is impossible by an interlacing argument since G is non- singular.The vertex of maximum degree (equal to the class size) in H is adjacent to a vertex of degree 1; otherwise, two vertices of maximum degree belong to the same color class of H , and then, we would arrive at a vertex-deleted subgraph with 0 of multiplicity at least 2, which is impossible.
Let w and ′ w be vertices of maximum degree in G and H , respectively, such that − G w and − ′ H w share the same characteristic polynomial.By Theorem 3.2 and Remark 3.3, G and H share the same determinant, and we are done.□ Some other unusual applications of determinants for particular classes of signed graphs can be found in [11].In addition, we point out that walks in a signed graph are related particular products of eigenvalues, i.e., the determinant [12] (see also [13]).

Figure 1 :
Figure 1: A sketch of a chain graph.
Computing the determinant of a signed graph  3 Corollary 2.3.Let G ˙and H ˙be as in Theorem 2.2.
(i) If H ˙has no repeated eigenvalues, then ( ) Computing the determinant of a signed graph  5 Theorem 3.1.Assume that the while loop of Algorithm 1 applied to a bicyclic graph G results in a graph H.Then,