Bipartite Roots of Graphs
Total Page:16
File Type:pdf, Size:1020Kb
Bipartite Roots of Graphs Lap Chi Lau ∗ Department of Computer Science University of Toronto Graph H is a root of graph G if there exists a positive integer k such that x and y are adjacent in G if and only if their distance in H is at most k. Motwani and Sudan proved the NP-completeness of graph square recognition and conjectured that it is also NP-complete to recognize squares of bipartite graphs. The main result of this paper is to show that squares of bipartite graphs can be recognized in polynomial time. In fact, we give a polynomial time algorithm to count the number of different bipartite square roots of a graph, although this number could be exponential in the size of the input graph. By using the ideas developed, we are able to give a new and simpler linear time algorithm to recognize squares of trees and a new algorithmic proof that tree square roots are unique up to isomorphism. Finally, we prove the NP-completeness of recognizing cubes of bipartite graphs. Keywords: bipartite roots, graph roots, graph powers, bipartite graphs, graph algorithms. ∗Email address: [email protected]. Telephone number: 416-978-4837. Address: De- partment of Computer Science, 10 King's College Road, Toronto, Ontario, M5S 3G4, CANADA 1 Bipartite Roots of Graphs 2 1 Introduction Root and root finding are concepts familiar to most branches of mathematics. In graph theory, H is a root of G = (V; E) if there exists a positive integer k such that x and y are adjacent in G if and only if their distance in H is at most k. If H is a kth root of G, then we write G = H k and call G the kth power of H (see Figure 1). Figure 1: G (a tree), G2 and G3 For any class of graphs, recognition is a fundamental structural and algo- rithmic problem; in this paper, we study the recognition problems on graph powers. Ordinarily, it is a difficult task to determine whether a given graph G has a k-th root or not. Also, the number of k-th roots could be exponential in the size of the input graph. In 1960, Ross and Harary [10] characterized squares of trees and showed that tree square roots, when they exist, are unique up to isomorphism. In 1967, Mukhopadhyay [9] characterized gen- eral graphs which possess a square root and in the following year Geller [3] solved the problem for general digraphs. In 1974, Escalante, Montejano and Rojano [1] characterized graphs and digraphs with a k-th root. However, all characterizations of powers of general graphs are not polynomial in the sense that they do not yield polynomial time algorithms. The complexity of graph power recognition was unresolved until 1994 when Motwani and Sudan [8] proved the NP-completeness of recognizing squares of graphs and stated that they believed it is also NP-complete to recognize squares of bipartite graphs. About the same time, Lin and Skiena [7] gave linear time algorithms for recognizing squares of trees and, based on the characterization given by Harary, Karp and Tutte [4], finding square roots of planar graphs. Recently, Lau and Corneil [6] presented polynomial time algorithms for recognizing k-th powers of proper interval graphs for every fixed k. On the other hand, they showed the NP-completeness of recognizing squares of chordal graphs, recognizing squares of split graphs and recognizing chordal graphs that are squares of some graph. Bipartite Roots of Graphs 3 1.1 Our results The main result of this paper is to show that squares of bipartite graphs can be recognized in polynomial time. In Section 2, we give an overview of this algorithm and show how to reduce the problem of recognizing squares of bipartite graphs to two auxiliary problems. The algorithm for the first auxiliary problem is given in Section 3, and an involved algorithm for the second auxiliary problem is presented in Section 4. Then, in Section 5, we show how to modify the algorithm to count the number of different bipartite square roots of a graph. Using the techniques developed, in Section 6, we present a new and simpler linear time algorithm to recognize square of trees, and a new algorithmic proof that tree square roots are unique up to isomorphism. Finally, in Section 7, we show the NP-completeness of recognizing cubes of bipartite graphs. 1.2 Notation and definitions Our basic notation and terminology reference is [11]. We denote a graph G with vertex set V (G) and edge set E(G) by G = (V; E). When u and v are endpoints of an edge, they are adjacent and are neighbors. We write u $ v or uv 2 E(G) for \u is adjacent to v". All the graphs we consider are simple, undirected and loopless, unless otherwise specified. The complement G of a simple graph G is the simple graph with vertex set V (G) defined by uv 2 E(G) if and only if uv 2= E(G). A graph G0 = (V 0; E0) is a subgraph of G = (V; E) if V 0 ⊆ V and E0 ⊆ E. G0 is an induced subgraph of G, written G[V 0], if it is a subgraph of G and it contains all the edges uv such that u; v 2 V 0 and uv 2 E(G). The degree of a vertex v in a graph G, written deg(v) is the number of edges incident with v. The maximum degree is denoted ∆(G). The open neighborhood NG(v) of v is the set of vertices adjacent to v in G, and the closed neighborhood NG[v] of v is NG(v) [ fvg. When U is a set of vertices, NG[U] = Sv2U NG[v]. If G has a u,v-path, then the distance from u to v, written dG(u; v) is the least length of any u; v-path. The k-th k neighborhood NG(v) of v is the set of vertices at distance k from v. A graph G is connected if each pair of vertices in G is connected by a path; otherwise, G is disconnected. A maximal connected subgraph of G is a subgraph that is connected and is not contained in any other connected subgraph. The components of a graph are its maximal connected subgraphs. A clique in a graph G is a set of pairwise adjacent vertices. When the set has size r, the clique is denoted by Kr. An independent set (or stable Bipartite Roots of Graphs 4 set) in a graph is a set of pairwise nonadjacent vertices. The clique number !(G) is the maximum clique size in G; while the independence number α(G) is the maximum independent set size in G. The chromatic number χ(G) of a graph G is the minimum number of colors needed to label the vertices so that adjacent vertices receive different colors. The clique cover number θ(G) of a graph G is the minimum number of cliques in G needed to cover V (G). These four parameters of a graph are very important in many optimization problems on graphs. A graph is bipartite if there is a bipartition of its vertex set into two disjoint stable sets called the partite sets of G. Two vertices are on the same side if they are in the same partite set; otherwise, they are on different sides. A complete bipartite graph is a bipartite graph such that two vertices are adjacent if and only if they are on different sides. When the sets have size r and s, the complete bipartite graph is denoted by Kr;s. A tree is a connected graph with no cycle. A leaf is a vertex v of degree 1; the only neighbor of v is the parent of v. A star is a tree with diameter 2, and a double star is a tree with diameter 3. 2 Squares of bipartite graphs In this section, we give an overview of the polynomial time algorithm to solve the Square of Bipartite Graph (SB) problem. Problem. Square of Bipartite Graph (SB) Instance. A graph G. Question. Does there exist a bipartite graph B such that B 2 = G? Henceforth, we assume without loss of generality that G is connected; hence B must also be connected. The following simple observation is very useful in later proofs. Proposition 2.1 Let B be a bipartite graph such that B 2 = G. If uv 2 E(G) and u; v are on different sides of B, then uv 2 E(B). Proof. Suppose, by way of contradiction, that uv 2= E(B). Since u and v are on different sides of B, they do not share any common neighbor in B. So uv 2= E(B2) and this contradicts the assumption that B2 = G. As a result, uv 2 E(B). Here we introduce two important auxiliary problems to solve SB. Let B = (X; Y; E) be a bipartite graph with X and Y as the partite sets. Bipartite Roots of Graphs 5 Suppose we fix the partite sets of the bipartite roots of G. Then, from Proposition 2.1, the edge set of the bipartite root is forced. In fact, the unique bipartite root candidate is B = (X; Y; E) with E(B) = fuv j uv 2 E(G) and u 2 X and v 2 Y g. Extending this idea, we show that the fol- lowing problem can be solved in polynomial time. Problem. SB with a Specified Neighborhood (SBN) Instance.