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

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 is a digraph obtained from a sequence of vertex complement operations on G. Dahlhaus et al. showed that, given an adjacency-list representation of G, depth-first search (DFS) on G can be performed in O(n + m) time, where n is the number of vertices and m is the number of edges in 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) algorithm that uses no complicated data-structures.

0

Turn this paper into a lesson

ArcXiv compiles a structured reading guide from this paper's metadata: plain-English importance, contributions, prerequisite concepts, which sections to read first, flashcards, and a quiz. Grounded in the abstract, never invented.

Discussion (0)

Sign in to join the discussion.

Loading comments…