Arxiv:1808.03411V2 [Cs.DS] 20 Nov 2018 Mle Hti Ssnua.A Singular
Total Page:16
File Type:pdf, Size:1020Kb
Linear time algorithm to check the singularity of block graphs ⋆ Ranveer Singh1, Naomi Shaked-Monderer2, and Abraham Berman3 1 Technion-Israel Institute of Technology, Haifa 32000, Israel [email protected], 2 The Max Stern Yezreel Valley College, Yezreel Valley 19300, Israel [email protected], 3 Technion-Israel Institute of Technology, Haifa 32000, Israel [email protected] Abstract. A block graph is a graph in which every block is a complete graph. Let G be a block graph and let A(G) be its (0,1)-adjacency matrix. Graph G is called nonsingular (singular) if A(G) is nonsingular (singular). Characterizing nonsingular block graphs is an interesting open problem proposed by Bapat and Roy in 2013. In this article, we give a linear time algorithm to check whether a given block graph is singular or not. Keywords: block, block graph, nonsingular graph, nullity AMS Subject Classifications. 15A15, 05C05. 1 Introduction Let G = (V (G), E(G)) be a undirected graph with vertex set V (G) and edge set E(G). Let the cardinality |V (G)| (also called the order of G) be equal to n. The adjacency matrix A(G) = (aij ) of G is the square matrix of order n defined by 1 if the vertices i, j are connected by an edge, aij = (0 if i = j or i, j are not connected by an edge, where 1 ≤ i, j ≤ n. A graph G is called nonsingular (singular) if A(G) is nonsingular (singular), that is, the determinant of A(G) is nonzero (zero). The rank of G, denoted by r(G), is the rank of the adjacency matrix A(G). If G has full rank, that is, r(G)= n, then G is nonsingular, otherwise, it is singular. The nullity of G, denoted by η(G), is equal to the number of zero eigenvalues of A(G). By the rank-nullity theorem r(G)+ η(G) = n. Thus a zero nullity of a graph G implies that it is nonsingular while a positive nullity implies that it is singular. A cut-vertex of G is a vertex whose removal results in an increase in the number of connected components. Let G1 = (V1, E1) and G2 = (V2, E2) be graphs on disjoint sets of vertices. Their arXiv:1808.03411v2 [cs.DS] 20 Nov 2018 disjoint union G1 + G2 is the graph G1 + G2 = (V1 ∪ V2, E1 ∪ E2). A coalescence of graphs G1 and G2 is any graph obtained from the disjoint union G1 + G2 by identifying a vertex v1 of G1 with a vertex v2 of G2, that is, merging v1, v2 into a single vertex v. If v1, and v2 have loops of weights α1, α2, respectively, then in the coalescence v will have a loop of weight (α1 + α2). A block in a graph is a maximal connected subgraph that has no cut-vertex ([21], p.15). Note that if a connected graph has no cut-vertex, then it itself is a block. The blocks and cut-vertices in any graph can found in linear time [11]. A block in a graph G is called a pendant block if it has one cut-vertex of G. Two blocks are called adjacent blocks if they share a cut-vertex of G. A complete graph on n vertices is denoted by Kn. If every block of a graph is a complete graph then it is called a block graph. An example of block graph is given in Figure 1(a), where the blocks are the induced subgraph on the vertex-sets {3, 5, 6, 7}, {1, 4, 3, 2}, {2, 11, 12}, and {1, 10, 8, 9}. For more details on the block graphs see ([2], Chapter 7). A well-known problem, proposed in 1957, by Collatz and Sinogowitz, is to characterize graphs with positive nullity [20]. Nullity of graphs is applicable in various branches of science, in particular, quantum chemistry, ⋆ This work is supported by the Joint NSFC-ISF Research Program (jointly funded by the National Natural Science Foundation of China and the Israel Science Foundation (Nos. 11561141001, 2219/15). H¨uckel molecular orbital theory [9,14] and social networks theory [15]. There has been significant work on the nullity of undirected graphs like trees [6,8,10], unicyclic graphs [12,16,12], and bicyclic graphs [3,5,23]. It is well-known that a tree is nonsingular if and only if it has a perfect matching. Since a tree is a block graph, it is natural to investigate in general which block graphs are nonsingular. The combinatorial formulae for the determinant of block graphs are known in terms of size and arrangements of its blocks [4,18,17]. But, due to a myriad of the possibility of sizes and arrangements of the blocks it is difficult in general to classify nonsingular or singular block graphs. In [19], some classes of singular and nonsingular block graphs are given. However, it is still an open problem. In this paper, we give a linear time algorithm to determine whether a given graph is singular or not. Thanks to the eminent computer scientist Alan Turing, the matrix determinant can be computed in the polynomial time using the LUP decomposition of the matrix, where L is a lower triangular matrix, U is an upper triangular matrix, P is a permutation matrix. Interestingly, the asymptotic complexity of the matrix determinant is the same as that of matrix multiplication of two matrices of the same order. The theorem which relates the complexity of matrix product and the matrix determinant is as follows. Theorem 1. [1] Let M(n) be the time required to multiply two n × n matrices over some ring, and A be an n × n matrix. Then, we can compute the determinant of A in O(M(n)) steps. Rank, nullity is also calculated using LUP decomposition, hence their complexities are also the same as that of the matrix determinant or product of two matrices of the same order. The fastest matrix product takes time of O(n2.373)[7,22,13]. In this article, we give a linear time algorithm to check whether a given block graph G of order n, is singular or nonsingular (full rank). The algorithm is linear in n. We will not make use of matrix product or elementary row/column operations during any stage of the computation, instead, we prove first results using elementary row/column operation on matrices and use them to treat pendant blocks of the block graphs. The rest of the article is organised as follows. In Section 2, we mention some notations and preliminar- ies used in the article. In Section 3, we give necessary and sufficient condition for any block graph to be nonsingular by using prior results of elementary row/column operation given in Section 2. In Section 4, we provide an outline for Algorithm 1 and provide some examples in support of it. A proof of the correctness of Algorithm 1 is given in Section 5. 2 Notations and preliminary results If Q is a subgraph of graph G, then G \ Q denotes the induced subgraph of G on the vertex subset V (G) \ V (Q). Here, V (G) \ V (Q) is the standard set-theoretic subtraction of vertex sets. If Q consists of a single vertex v, then we write G \ v for G \ Q. J, j, O, o denote the all-one matrix, all-one column vector, zero matrix, zero column vector of suitable order, respectively. w denotes a (0, 1)-column vector of suitable order. diag(x1,...,xn) denotes the diagonal matrix of order n, where the i-th diagonal entry is xi,i = 1,...,n. If a graph has no vertices (hence no edges) we call it a void graph. Theorem 2. Consider a matrix x1 1 ... 1 .. 1 x2 . M = = J − D, (1) . . .. .. 1 1 ... 1 x n where D = diag(1 − x1,..., 1 − xn). 1. If exactly one of x1,...,xn is equal to 1, then M is nonsingular. 2. If any two (or more) of x1,...,xn are equal to 1, then M is singular. 3. If xi 6=1,i =1,...,n. Let n 1 S = . 1 − x i=1 i X Then (a) M is nonsingular if and only if S 6=1. (b) if S =1 and xn+1 is any real number, then the matrix M j jT x n+1 is nonsingular. 4. If M is nonsingular, then the matrix M j M˜ = jT α can be transformed to the following matrix using elementary row and column operations M o , oT α + γ where − S if x 6=1,i =1, . n, γ = S−1 i (2) (−1 if exactly one of x1,...,xn is equal to 1. Proof. 1. Without loss of generality, let x1 = 1. By subtracting the 1-st row from the rest of the rows, M can be transformed to the matrix, 1 1 ... 1 . 0 (x − 1) .. 2 , . .. .. 1 0 ... 0 (x − 1) n n whose determinant i=2(xi − 1) is nonzero. 2. In this case two rows (or columns) are the same. 3. (a) We have Q D − J = D1/2(I − D−1/2JD−1/2)D1/2, T D−1/2JD−1/2 = D−1/2jjT D−1/2 = D−1/2j D−1/2j . Let y = D−1/2j. The J − D = M is nonsingular if and only if I− yyT is nonsingular. Since the eigenvalues of yyT are ||y||2 = yT y and 0, the eigenvalues of the matrix I − yyT are 1 − ||y||2 and 1 hence it is nonsingular if and only if ||y||2 6=1.