# Space-Efficient DFS and Applications: Simpler, Leaner, Faster

The problem of space-efficient depth-first search (DFS) is reconsidered. A particularly simple and fast algorithm is presented that, on a directed or undirected input graph G=(V,E) with n vertices and m edges, carries out a DFS in O(n+m) time with n+∑_v∈ V_> 3_2(d_v-1) +O( n)< n+m+O( n) bits of working memory, where d_v is the (total) degree of v, for each v∈ V, and V_> 3={v∈ V| d_v> 3}. A slightly more complicated variant of the algorithm works in the same time with at most n+(4/5)m+O( n) bits. It is also shown that a DFS can be carried out in a graph with n vertices and m edges in O(n+m^* n) time with O(n) bits or in O(n+m) time with either O(n(4+m/n)) bits or, for arbitrary integer k> 1, O(n^(k) n) bits. These results among them subsume or improve most earlier results on space-efficient DFS. Some of the new time and space bounds are shown to extend to applications of DFS such as the computation of cut vertices, bridges, biconnected components and 2-edge-connected components in undirected graphs.

research
12/28/2018

### Fast Breadth-First Search in Still Less Space

It is shown that a breadth-first search in a directed or undirected grap...
research
01/27/2001

### Linear-Time Succinct Encodings of Planar Graphs via Canonical Orderings

Let G be an embedded planar undirected graph that has n vertices, m edge...
research
10/16/2018

### Nearly Optimal Space Efficient Algorithm for Depth First Search

We design a space-efficient algorithm for performing depth-first search ...
research
06/19/2019

research
11/27/2017

### Frameworks for Designing In-place Graph Algorithms

Read-only memory model is a classical model of computation to study time...
research
08/10/2020

### Connected Components in Undirected Set–Based Graphs. Applications in Object–Oriented Model Manipulation

This work introduces a novel algorithm for finding the connected compone...
research
05/16/2023

### Random Edge Coding: One-Shot Bits-Back Coding of Large Labeled Graphs

We present a one-shot method for compressing large labeled graphs called...