Weakly chordal graph algorithms via handles

We use the notion of handle, introduced by Hayward, to improve algorithms for weakly chordal graphs. For recognition we reduce the time complexity from O(n2m) to O(rn 2) and the space complexity from O(n 3) to O(n + m), and also produce a hole or antihole if the input graph is not weakly chordal. For the optimization problems clique, independent set, coloring, and clique covering, we reduce the time complexity from O(n 4) to O(nm). 1 I n t r o d u c t i o n a n d M o t i v a t i o n Pk and Ck denote respectively the induced path and cycle with k vertices. Ck is the complement of Ck. A hole is an induced cycle with five or more vertices and an antihole is the complement of a hole. We use n and m respectively for the number of vertices and edges of a graph. Sees and misses mean "is adjacent to" and "is not adjacent to" respectively. A vertex misses an edge if it misses both vertices of the edge. For a subset S of the vertex set V(G) of a graph G, G[S] is the subgraph inducedby S and N(S) is the neighborhood of S, namely the vertices of V(G) S which see some vertex of S. A graph is weakly chordal (also called weakly triangulated) if it contains no holes and no antiholes. Weakly chordal graphs, introduced by Hayward [2], are a well studied class of perfect graphs. Hayward, Ho~ng, and Maffray characterized weakly chordal graphs via the presence of a two-pair, namely a pair of nonadjacent vertices such that every induced path between them has exactly two edges. Their theorem is: THEOREM 1.1. [5] A graph is weakly chordal if and only if each induced subgraph either is a clique or contains a two-pair of the subgraph. A number of algorithms on weakly chordal graphs work by repeatedly finding a two-pair {x, y} and modifying the neighborhoods of x and/or y. This is the basis "--rg~ported by NSERC, NSF, URC/Indiana State University ?Department of Computing Science, University of Alberta, Edmonton Canada T6G 2H1, hayward~cs.ualberta.ca tDepartment of Computer Science, Vanderbilt University, Nashville TN 37235, spin~vuse.vanderbilt.edu §Computer Science Department, University of Dayton, 300 College Park, Dayton OH 42469-2160, rst@cps.udayton.edu of the previously best algorithms for recognizing weakly chordal graphs [8] and for solving a variety of optimization problems on weakly chordal graphs [8, 5] (namely weighted and unweighted versions of maximum clique, minimum vertex coloring, maximum independent set and minimum clique covering) The fastest algorithm for finding a two-pair [1] runs in O(nm) time and works on general graphs. In this paper we give a structural result specifying where a two-pair can be located in a weakly chordal graph. While this does not lead to an improvement in the time to find a single two-pair, it does lead to an improvement in the time to find a sequence of twopairs in a graph as the graph is modified during weakly chordal recognition and optimization algorithms. The previously best recognition algorithm for weakly chordal graphs [8] takes O(n 4) time and O(nm) space. We improve on this algorithm by taking only O(m 2) time and O(n + m) space, and producing as a certificate a hole or antihole whenever the input graph is not weakly chordal (the previous algorithm does not do this). This is analogous to the well known O(m + n) time chordal graph recognition algorithm [6], which can also produce in this time an induced cycle of length four or more whenever the input graph is not chordal. The previously best optimization algorithms for weakly chordal graphs [8], based on the algorithms of [5] and an O(nm) time algorithm for finding a twopair [1], repeat the following process: find a two-pair and modify the graph, either by adding an edge to a two-pair or by collapsing a two-pair to form a single vertex. These algorithms take O(n2m) and O(n 4) time in the unweighted and weighted cases respectively. Our algorithms can solve the unweighted optimization problems, which only involve collapsing two-pairs, in O(nm) time. Our algorithms rely on the following notion due to Hayward [3, 4]: a handle in a graph G is a proper vertex subset H with size at least two, such that G[H] is connected, some component J ~ H of G N(H) satisfies N(J) = N(H), and each vertex of N(H) sees at least one vertex of each edge of G[H]. J is called a cohandle of H. Notice that N(H) is a minimal separator of H and J. THEOREM 1.2. [3, 4] A graph has a handle if and only