首页> 外文期刊>Theory of computing systems >Space Efficient Linear Time Algorithms for BFS, DFS and Applications
【24h】

Space Efficient Linear Time Algorithms for BFS, DFS and Applications

机译:适用于BFS,DFS及其应用程序的节省空间的线性时间算法

获取原文
获取原文并翻译 | 示例

摘要

Research on space efficient graph algorithms, particularly for stconnectivity, has a long history including the celebrated polynomial time, O( lg n) bits1 algorithm in undirected graphs by Reingold J. JACM. 55( 4) ( 2008), and polynomial time, n/ 2 ( v lg n) bits algorithm in directed graphs by Barnes et al. SICOMP. 27( 5), 1273- 1282 ( 1998). Recent works by Asano et al. ISAAC ( 2014) and Elmasry et al. STACS ( 2015), reconsidered classical fundamental graph algorithms focusing on improving the space complexity. Elmasry et al. gave, among others, an implementation of breadth first search ( BFS) in a graph G with n vertices and m edges, taking the optimal O( m+ n) time using O( n) bits improving the na ive O( n lg n) bits implementation. Similarly, Asano et al. provided space efficient implementations for performing depth first search (DFS) in a graph G. We continue this line of work focusing on improving the space requirement for implementing a few classical graph algorithms. Our first result is a simple data structure that can maintain any subset S of a universe of u elements using just u + o(u) bits and supports in constant time, apart from the standard insert, delete and membership queries, the operation findany that finds and returns any element of the set (or outputs that the set is empty). It can also enumerate all elements present currently in the set in no particular order in O(k + 1) time where k is the number of elements currently belonging to the set. While this data structure supports a weaker set of operations than that of Elmasry et al. STACS (2015), it is simple, more space efficient and is sufficient to support a BFS implementation optimally in O(m+ n) time using at most 2n+ o(n) bits. Later, we further improve the space requirement of BFS to at most n lg 3+ o(n) bits albeit with a slight increase in running time to O(mlg nf (n)) time where f (n) is any extremely slow growing function of n, and the o term in the space is a function of f (n). We also discuss a similar time- space tradeoff result for finding a minimum weight spanning tree of a weighted (bounded by polynomial in n) undirected graph using n + O(n/ f (n)) bits and O(mlg nf (n)) time, for any function f (n) such that 1 = f (n) = n. ForDFS in a graph G, we provide an implementation taking O(m+ n) time and O(n lg m/ n) bits. This partially answers at least for sparse graphs, a question asked by Asano et al. ISAAC (2014) whether DFS can be performed in O(m+ n) time and using O(n) bits, and also simultaneously improves the DFS result of Elmasry et al. STACS (2015). Using our DFS algorithm and other careful implementations, we show how one can also test for biconnectivity, 2- edge connectivity, and find cut vertices and bridges of a given undirected graph within the same time and space bounds; earlier classical linear time algorithms for these problems used (n lg n) bits of space.
机译:空间有效图算法的研究,特别是对连通性的研究,由来已久,包括著名的多项式时间,Reingold J. JACM的无向图中的O(lg n)bits1算法。 55(4)(2008)和多项式时间,Barnes等人在有向图中使用n / 2(v lg n)位算法。 SICOMP。 27(5),1273-1282(1998)。浅野等人的最新著作。 ISAAC(2014)和Elmasry等。 STACS(2015),重新考虑了经典基础图算法,重点是提高空间复杂度。 Elmasry等。给出了在具有n个顶点和m个边的图G中进行广度优先搜索(BFS)的实现,并使用O(n)位获取最优O(m + n)时间,从而改善了原始O(n lg n)位实现。同样,浅野等。提供了用于在图G中执行深度优先搜索(DFS)的节省空间的实现。我们继续进行这一系列工作,重点是提高实现一些经典图算法所需的空间。我们的第一个结果是一个简单的数据结构,它可以仅使用u + o(u)位来维护u个元素宇宙的任何子集S,并在恒定时间内提供支持,除了标准的插入,删除和成员资格查询外,该操作还可以找到查找并返回集合的任何元素(或输出该集合为空)。它还可以枚举O(k + 1)时间中集合中当前存在的所有元素,而没有特定的顺序,其中k是当前属于集合的元素数量。尽管此数据结构支持的操作集比Elmasry等人的操作集弱。 STACS(2015)简单,节省空间,并且足以使用最多2n + o(n)位在O(m + n)时间内以最佳方式支持BFS实现。稍后,我们将BFS的空间需求进一步提高到最多n lg 3+ o(n)个位,尽管运行时间略微增加到O(mlg nf(n))个时间,其中f(n)的增长非常慢是n的函数,而空间中的o项是f(n)的函数。我们还讨论了类似的时空折衷结果,用于使用n + O(n / f(n))位和O(mlg nf(n))找到加权(在n中以多项式为界)无向图的最小权重生成树)时间,对于任何函数f(n)使得1 = f(n)= n。对于图G中的DFS,我们提供了一个采用O(m + n)时间和O(n lg m / n)位的实现。这至少部分回答了稀疏图,Asano等人提出了一个问题。 ISAAC(2014)是否可以在O(m + n)时间内使用O(n)位执行DFS,并且还同时改善了Elmasry等人的DFS结果。 STACS(2015)。使用我们的DFS算法和其他仔细的实现,我们展示了如何也可以测试双向连通性,2边连通性,以及如何在相同的时间和空间范围内找到给定无向图的切割顶点和桥。针对这些问题的早期经典线性时间算法使用了(n lg n)位空间。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号