Cograph editing: Merging modules is equivalent to editing P_4s




Cograph editing, modular decomposition, module merge, prime modules, P_4


The modular decomposition of a graph G = (V, E) does not contain prime modules if and only if G is a cograph, that is, if no quadruple of vertices induces a simple connected path P4. The cograph editing problem consists in inserting into and deleting from G a set F of edges so that H = (V, E △ F) is a cograph and |F| is minimum. This NP-hard combinatorial optimization problem has recently found applications, e.g., in the context of phylogenetics. Efficient heuristics are hence of practical importance. The simple characterization of cographs in terms of their modular decomposition suggests that instead of editing G one could operate directly on the modular decomposition. We show here that editing the induced P4s is equivalent to resolving prime modules by means of a suitable defined merge operation on the submodules. Moreover, we characterize so-called module-preserving edit sets and demonstrate that optimal pairwise sequences of module-preserving edit sets exist for every non-cograph. This eventually leads to an exact algorithm for the cograph editing problem as well as fixed-parameter tractable (FPT) results when cograph editing is parameterized by the so-called modular-width. In addition, we provide two heuristics with time complexity O(|V|3), resp., O(|V|2).