3 research outputs found

    Nearly Optimal Space Efficient Algorithm for Depth First Search

    Full text link
    We design a space-efficient algorithm for performing depth-first search traversal(DFS) of a graph in O(m+nlogn)O(m+n\log^* n) time using O(n)O(n) bits of space. While a normal DFS algorithm results in a DFS-tree (in case the graph is connected), our space bounds do not permit us even to store such a tree. However, our algorithm correctly outputs all edges of the DFS-tree. The previous best algorithm (which used O(n)O(n) working space) took O(mlogn)O(m \log n) time (Asano, Izumi, Kiyomi, Konagaya, Ono, Otachi, Schweitzer, Tarui, Uehara (ISAAC 2014) and Elmasry, Hagerup, Krammer (STACS 2015)). The main open question left behind in this area was to design faster algorithm for DFS using O(n)O(n) bits of space. Our algorithm answers this open question as it has a nearly optimal running time (as the DFS takes O(m+n)O(m+n) time even if there is no space restriction)

    Sorting and Ranking of Self-Delimiting Numbers with Applications to Tree Isomorphism

    Full text link
    Assume that an NN-bit sequence SS of kk self-delimiting numbers is given as input. We present space-efficient algorithms for sorting, dense ranking and (competitive) ranking SS on the word RAM model with word size Ω(logN)\Omega(\log N) bits. Our algorithms run in O(k+NlogN)O(k + \frac{N}{\log N}) time and use O(N)O(N) bits. The sorting algorithm returns the given numbers in sorted order, stored within a bit-vector of NN bits, whereas our ranking algorithms construct data structures that allow us subsequently to return the (dense) rank of each number xx in SS in constant time if the position of xx in SS is given together with xx. As an application of our algorithms we give an algorithm for tree isomorphism, which runs in O(n)O(n) time and uses O(n)O(n) bits on nn-node trees. The previous best linear-time algorithm for tree isomorphism uses Θ(nlogn)\Theta(n \log n) bits

    Space-Efficient Vertex Separators for Treewidth

    Full text link
    For nn-vertex graphs with treewidth k=O(n1/2ϵ)k = O(n^{1/2-\epsilon}) and an arbitrary ϵ>0\epsilon>0, we present a word-RAM algorithm to compute vertex separators using only O(n)O(n) bits of working memory. As an application of our algorithm, we give an O(1)O(1)-approximation algorithm for tree decomposition. Our algorithm computes a tree decomposition in ckn(loglogn)lognc^k n (\log \log n) \log^* n time using O(n)O(n) bits for some constant c>0c > 0. We finally use the tree decomposition obtained by our algorithm to solve Vertex Cover, Independent Set, Dominating Set, MaxCut and qq-Coloring by using O(n)O(n) bits as long as the treewidth of the graph is smaller than clognc' \log n for some problem dependent constant 0<c<10 < c' < 1
    corecore