ArticlePDF Available

# An $O(n^2)$ Algorithm for the Characteristic Polynomial of a Tree

Authors:

## Abstract

We describe an algorithm, that uses O(n) arithmetic operations, for computing the determinant of the matrix M = (A + αI), where A is the adjacency matrix of an order n tree. Combining this algorithm with interpolation, we derive a simple algorithm requiring O(n 2) arithmetic operations, to find the characteristic polynomial of the adjacency matrix of any tree. We apply our algorithm and recompute a 22-degree characteristic polynomial, which had been incorrectly reported in the quantum chemistry literature. keywords: tree, adjacency matrix, characteristic polynomial.
A preview of the PDF is not available
... To compute the characteristic polynomials of the Laplacian matrix, we use a straightforward translation of an algorithm due to Jacobs, Machado and Trevisan [13] to the context of Laplacian matrices (see [7] for details about this adaptation; the algorithm in [13] calculates the characteristic polynomial of the adjacency matrix). One of the advantages of this method is that it can be slightly modified in such a way that we can determine, for any α ∈ R, the number of Laplacian eigenvalues of a tree T that are larger than α, equal to α and smaller than α, respectively (see [14] for the original work, which deals with eigenvalues of the adjacency matrix, and [7] for the adaptation to the Laplacian scenario). ...
... To compute the characteristic polynomials of the Laplacian matrix, we use a straightforward translation of an algorithm due to Jacobs, Machado and Trevisan [13] to the context of Laplacian matrices (see [7] for details about this adaptation; the algorithm in [13] calculates the characteristic polynomial of the adjacency matrix). One of the advantages of this method is that it can be slightly modified in such a way that we can determine, for any α ∈ R, the number of Laplacian eigenvalues of a tree T that are larger than α, equal to α and smaller than α, respectively (see [14] for the original work, which deals with eigenvalues of the adjacency matrix, and [7] for the adaptation to the Laplacian scenario). ...
... In the case p = 0, we may replace the additive term 1 by 1/2 in the upper bound given in (13). In particular, instead of (19), it suffices to show that ...
Article
Full-text available
We investigate the problem of ordering trees according to their Laplacian energy. More precisely, given a positive integer $n$, we find a class of cardinality approximately $\sqrt{n}$ whose elements are the $n$-vertex trees with largest Laplacian energy. The main tool for establishing this result is a new upper bound on the sum $S_k(T)$ of the $k$ largest Laplacian eigenvalues of an $n$-vertex tree $T$ with diameter at least four, where $k \in \{1,...,n\}$.
... The following results may be found in van Dam and Haemers [9]. From Jacobs et al. [4] we have the following algorithm which is used extensively in our results. The algorithm operates directly on a (rooted) tree and works bottom-up. ...
... The algorithm Diagonalize finds a diagonal matrix D that is congruent to A(T ) + αI, for any real number α. Hence the next result follows [4]: We would like to point out that Algorithm 1 may also be used to compute the characteristic polynomial det(λI − A), where λ is an indeterminate. We may use Diagonalize(T, −λ) to compute det(A − λI). ...
Article
In 1973 Schwenk [7] proved that almost every tree has a cospectral mate. Inspired by Schwenk's result, in this paper we study the spectrum of two family of trees. The p-sun of order 2p+1 is a star K1,p with an edge attached to each pendant vertex, which we show to be determined by its spectrum among connected graphs. The (p,q)-double sun of order 2(p+q+1) is the union of a p-sun and a q-sun by adding an edge between their central vertices. We determine when the (p,q)-double sun has a cospectral mate and when it is determined by its spectrum among connected graphs. Our method is based on the fact that these trees have few distinct eigenvalues and we are able to take advantage of their nullity to shorten the list of candidates.
... After we saw how to do this, we sought solutions to other algebraic problems involving the trees. These included finding the LUP decomposition [30] of the adjacency matrix, computing the characteristic polynomial [29,26] of the adjacency matrix, and computing the inverse of a tree's incidence matrix [25] with Machado and Pereira. While most of our work has been algebraic, we also wrote a beautiful number theoretic paper characterizing so-called Chebyshev numbers [27], and discovered a primality testing algorithm based on Chebyshev polynomials [28], both co-written with Mohammad Rayes. ...
Chapter
Motivated by classic tree algorithms, in 1995 we designed a bottom-up O(n) algorithm to compute the determinant of a tree’s adjacency matrix A. In 2010 an O(n) algorithm was found for constructing a diagonal matrix congruent to A + xIn, $$x \in \mathbb {R}$$, enabling one to easily count the number of eigenvalues in any interval. A variation of the algorithm allows Laplacian eigenvalues in trees to be counted. We conjecture that for any tree T of order n ≥ 2, at least half of its Laplacian eigenvalues are less than $$\bar {d} = 2 - \frac {2}{n}$$, its average vertex degree.
... Certainly this running time can be reduced a little better, if we combine our method with the algorithm proposed by Jacob et al. [6] , which reduces to O ( n 2 ) the running time of tree algorithm. ...
Article
A generalized lollipop graph is formed by connecting a tree and a threshold graph with an edge. Motivated by a sequence of algorithms that compute the characteristic polyno- mial of some classes of graphs, we present an algorithm for computing the characteristic polynomial of generalized lollipop graph with relation to signless Laplacian matrix Q . As application, we show how to construct graphs having Q -cospectral mate.
... After we saw how to do this, we sought solutions to other algebraic problems involving the trees. These included finding the LUP decomposition [30] of the adjacency matrix, computing the characteristic polynomial [29,26] of the adjacency matrix, and computing the inverse of a tree's incidence matrix [25] with Machado and Pereira. While most of our work has been algebraic, we also wrote a beautiful number theoretic paper characterizing so-called Chebyshev numbers [27], and discovered a primality testing algorithm based on Chebyshev polynomials [28], both co-written with Mohammad Rayes. ...
Article
Full-text available
Motivated by classic tree algorithms, in 1995 we designed a bottom-up $O(n)$ algorithm to compute the determinant of a tree's adjacency matrix $A$. In 2010 an $O(n)$ algorithm was found for constructing a diagonal matrix congruent to $A + xI_n$, $x \in \mathbb{R}$, enabling one to easily count the number of eigenvalues in any interval. A variation of the algorithm allows Laplacian eigenvalues in trees to be counted. We conjecture that for any tree $T$ of order $n \geq 2$, at least half of its Laplacian eigenvalues are less than $\bar{d} = 2 - \frac{2}{n}$, its average vertex degree.
... Algorithms and formulas for the characteristic polynomial of trees have been studied in [5,6,11] and by M. Fürer, who in [4], presented an O(n log 2 n) algorithm for computing the characteristic polynomial of a tree on n vertices. ...
Article
Full-text available
We present an algorithm for constructing the characteristic polynomial of a threshold graph’s adjacency matrix. The algorithm is based on a diagonalization procedure that is easy to describe. It can be implemented using $O(n)$ space and with running time $O(n^2)$.
... The study of eigenvalues and characteristic polynomials of trees is a well-developed part of spectral graph theory [1]. Also since the publication of the seminal monograph [1], numerous results along these lines have been obtained, e. g.23456789. If G is a graph on n vertices and λ 1 , λ 2 , . . . ...
Article
Full-text available
Let Pn be the n-vertex path, whose vertices are labelled consecutively by v1; v2; : : : ; vn . For a ¸ 1 and 1 · i · n , the generalized broom Pn(i; a) is the (n+a)-vertex tree, obtained by attaching a pendent vertices to the vertex vi of Pn . For a; b ¸ 1 and 1 · i < j · n , the generalized double broom Pn(i; ajj; b) is the (n + a + b)-vertex tree, obtained by attaching a pendent vertices to the vertex vi of Pn , and b pendent vertices to the vertex vj of Pn . In this paper we study the spectra and energies of Pn , Pn(i; a) , and Pn(i; ajj; b) , but some more general results are also pointed out.
... Note that n 5. One can show (for instance, adapting the algorithm of Jacobs et al. [7] to the Laplacian matrix) that the characteristic polynomial of the Laplacian matrix of T is equal to ...
Article
Given an n-vertex graph G=(V,E), the Laplacian spectrum of G is the set of eigenvalues of the Laplacian matrix L=D-A, where D and A denote the diagonal matrix of vertex-degrees and the adjacency matrix of G, respectively. In this paper, we study the Laplacian spectrum of trees. More precisely, we find a new upper bound on the sum of the k largest Laplacian eigenvalues of every n-vertex tree, where k∈{1,…,n}. This result is used to establish that the n-vertex star has the highest Laplacian energy over all n-vertex trees, which answers affirmatively to a question raised by Radenković and Gutman [10].
Conference Paper
Full-text available
Article
Full-text available
The characteristic polynomial of a graph is the characteristic polynomial of its adjacency matrix. Finding efficient algorithms for computing characteristic polynomial of graphs is an active area of research and for some graph classes, like threshold graphs, there exist very fast algorithms which exploit combinatorial structure of the graphs. In this paper, we put forward some novel ideas based on divisor technique to obtain fast algorithms for computing the characteristic polynomial of threshold and chain graphs.
Article
Full-text available
Let T be a tree, A its adjacency matrix, and α a scalar. We describe a linear-time algorithm for reducing the matrix αIn + A. Applications include computing the rank of A, finding a maximum matching in T, computing the rank and determinant of the associated neighborhood matrix, and computing the characteristic polynomial of A.
Article
Full-text available
A new graph product is introduced, and the characteristic polynomial of a graph so–formed is given as a function of the characteristic polynomials of the factor graphs. A class of trees produced using this product is shown to be characterized by spectral properties.
Article
http://deepblue.lib.umich.edu/bitstream/2027.42/135469/1/blms0321.pdf
Article
We describe a simple, O(n 2 logn) algorithm to find the characteristic polynomial of the adjacency matrix of any tree. An example is given showing the algorithm applied to a 13-vertex tree.
Article
The abstract for this document is available on CSA Illumina.To view the Abstract, click the Abstract button above the document title.
Book
Theoretical background Perturbation theory Error analysis Solution of linear algebraic equations Hermitian matrices Reduction of a general matrix to condensed form Eigenvalues of matrices of condensed forms The LR and QR algorithms Iterative methods Bibliography Index.