4 research outputs found

    Fast Breadth-First Search in Still Less Space

    Full text link
    It is shown that a breadth-first search in a directed or undirected graph with nn vertices and mm edges can be carried out in O(n+m)O(n+m) time with nlog23+O((logn)2)n\log_2 3+O((\log n)^2) bits of working memory

    A Constant-Time Colored Choice Dictionary with Almost Robust Iteration

    Get PDF
    A (colored) choice dictionary is a data structure that is initialized with positive integers n and c and subsequently maintains a sequence of n elements of {0,...,c-1}, called colors, under operations to inspect and to update the color in a given position and to return the position of an occurrence of a given color. Choice dictionaries are fundamental in space-efficient computing. Some applications call for the additional operation of dynamic iteration, i.e., enumeration of the positions containing a given color while the sequence of colors may change. An iteration is robust if it enumerates every position that contains the relevant color throughout the iteration but never enumerates a position more than once or when it does not contain the color in question. We describe the first choice dictionary that executes every operation in constant amortized time and almost robust iteration in constant amortized time per element enumerated. The iteration is robust, except that it may enumerate some elements a second time. The data structure occupies n log_2 c+O((log n)^2) bits. The time and space bounds assume that c=O((log n)^{1/2}(log log n)^{-{3/2}})

    Enumeration of far-apart pairs by decreasing distance for faster hyperbolicity computation

    Get PDF
    Hyperbolicity is a graph parameter which indicates how much the shortest-path distance metric of a graph deviates from a tree metric. It is used in various fields such as networking, security, and bioinformatics for the classification of complex networks, the design of routing schemes, and the analysis of graph algorithms. Despite recent progress, computing the hyperbolicity of a graph remains challenging. Indeed, the best known algorithm has time complexity O(n^{3.69}), which is prohibitive for large graphs, and the most efficient algorithms in practice have space complexity O(n^2). Thus, time as well as space are bottlenecks for computing the hyperbolicity. In this paper, we design a tool for enumerating all far-apart pairs of a graph by decreasing distances. A node pair (u, v) of a graph is far-apart if both v is a leaf of all shortest-path trees rooted at u and u is a leaf of all shortest-path trees rooted at v. This notion was previously used to drastically reduce the computation time for hyperbolicity in practice. However, it required the computation of the distance matrix to sort all pairs of nodes by decreasing distance, which requires an infeasible amount of memory already for medium-sized graphs. We present a new data structure that avoids this memory bottleneck in practice and for the first time enables computing the hyperbolicity of several large graphs that were far out-of-reach using previous algorithms. For some instances, we reduce the memory consumption by at least two orders of magnitude. Furthermore, we show that for many graphs, only a very small fraction of far-apart pairs have to be considered for the hyperbolicity computation, explaining this drastic reduction of memory. As iterating over far-apart pairs in decreasing order without storing them explicitly is a very general tool, we believe that our approach might also be relevant to other problems

    Fast breadth-first search in still less space

    No full text
    corecore