Improved Space efficient linear time algorithms for BFS, DFS and applications
Abstract
Recent work by Elmasry et al. (STACS 2015) and Asano et al. (ISAAC 2014), reconsidered classical fundamental graph algorithms focusing on improving the space complexity. We continue this line of work focusing on space. Our first result is a simple data structure that can maintain any subset of a universe of elements using bits and support in constant time, apart from the standard insert, delete and membership queries, the operation {\it findany} that finds and returns any element of the set (or outputs that the set is empty). Using this we give a BFS implementation that takes time using at most bits. Later, we further improve the space requirement of BFS to at most bits. We demonstrate the use of our data structure by developing another data structure using it that can represent a sequence of non-negative integers using at most bits and, in constant time, determine whether the -th element is or decrement it otherwise. We also discuss an algorithm for finding a minimum weight spanning tree of a weighted undirected graph using at most bits. We also provide an implementation for DFS that takes time and bits. Using this DFS algorithm and other careful implementations, we can test biconnectivity, 2-edge connectivity, and determine cut vertices, bridges etc among others, essentially within the same time and space bounds required for DFS. These improve the space required for earlier implementations from bits.
Cite
@article{arxiv.1606.04718,
title = {Improved Space efficient linear time algorithms for BFS, DFS and applications},
author = {Niranka Banerjee and Sankardeep Chakraborty and Venkatesh Raman and Srinivasa Rao Satti},
journal= {arXiv preprint arXiv:1606.04718},
year = {2017}
}
Comments
A preliminary version of this paper appears in the proceedings of COCOON 2016