English

Simple DFS on the Complement of a Graph and on Partially Complemented Digraphs

Data Structures and Algorithms 2013-11-11 v1

Abstract

A complementation operation on a vertex of a digraph changes all outgoing arcs into non-arcs, and outgoing non-arcs into arcs. A partially complemented digraph G~\widetilde{G} is a digraph obtained from a sequence of vertex complement operations on GG. Dahlhaus et al. showed that, given an adjacency-list representation of G~\widetilde{G}, depth-first search (DFS) on GG can be performed in O(n+m~)O(n + \widetilde{m}) time, where nn is the number of vertices and m~\widetilde{m} is the number of edges in G~\widetilde{G}. To achieve this bound, their algorithm makes use of a somewhat complicated stack-like data structure to simulate the recursion stack, instead of implementing it directly as a recursive algorithm. We give a recursive O(n+m~)O(n+\widetilde{m}) algorithm that uses no complicated data-structures.

Keywords

Cite

@article{arxiv.1311.1859,
  title  = {Simple DFS on the Complement of a Graph and on Partially Complemented Digraphs},
  author = {Benson Joeris and Nathan Lindzey and Ross M. McConnell and Nissa Osheim},
  journal= {arXiv preprint arXiv:1311.1859},
  year   = {2013}
}
R2 v1 2026-06-22T02:03:27.038Z