2 research outputs found

    Biconnectivity, stst-numbering and other applications of DFS using O(n)O(n) bits

    Full text link
    We consider space efficient implementations of some classical applications of DFS including the problem of testing biconnectivity and 22-edge connectivity, finding cut vertices and cut edges, computing chain decomposition and stst-numbering of a given undirected graph GG on nn vertices and mm edges. Classical algorithms for them typically use DFS and some Ω(lgn)\Omega (\lg n) bits\footnote{We use lg\lg to denote logarithm to the base 22.} of information at each vertex. Building on a recent O(n)O(n)-bits implementation of DFS due to Elmasry et al. (STACS 2015) we provide O(n)O(n)-bit implementations for all these applications of DFS. Our algorithms take O(mlgcnlglgn)O(m \lg^c n \lg\lg n) time for some small constant cc (where c2c \leq 2). Central to our implementation is a succinct representation of the DFS tree and a space efficient partitioning of the DFS tree into connected subtrees, which maybe of independent interest for designing other space efficient graph algorithms.Comment: 18 pages, 4 figures, Preliminary version of this article appeared in the proceedings of 27th ISAAC 2016, Journal version is accepted to JCSS and will soon appea

    Frameworks for Designing In-place Graph Algorithms

    Full text link
    Read-only memory model is a classical model of computation to study time-space tradeoffs of algorithms. One of the classical results on the ROM model is that any sorting algorithm that uses O(s) words of extra space requires Ω(n2/s)\Omega (n^2/s) comparisons for lgnsn/lgn \lg n \leq s \leq n/\lg n and the bound has also been recently matched by an algorithm. However, if we relax the model (from ROM), we do have sorting algorithms (say Heapsort) that can sort using O(nlgn)O(n \lg n) comparisons using O(lgn)O(\lg n) bits of extra space, even keeping a permutation of the given input sequence at any point of time during the algorithm. We address similar questions for graph algorithms. We show that a simple natural relaxation of ROM model allows us to implement fundamental graph search methods like BFS and DFS more space efficiently than in ROM. By simply allowing elements in the adjacency list of a vertex to be permuted, we show that, on an undirected or directed connected graph GG having nn vertices and mm edges, the vertices of GG can be output in a DFS or BFS order using O(lgn)O(\lg n) bits of extra space and O(n3lgn)O(n^3 \lg n) time. Thus we obtain similar bounds for reachability and shortest path distance (both for undirected and directed graphs). With a little more (but still polynomial) time, we can also output vertices in the lex-DFS order. As reachability in directed graphs and shortest path distance are NL-complete, and lex-DFS is P-complete, our results show that our model is more powerful than ROM if L \neq P. En route, we also introduce and develop algorithms for another relaxation of ROM where the adjacency lists of the vertices are circular lists and we can modify only the heads of the lists. All our algorithms are simple but quite subtle, and we believe that these models are practical enough to spur interest for other graph problems in these models
    corecore