1 / 58

基于半外存的 I/O 高效大图独立集算法研究

基于半外存的 I/O 高效大图独立集算法研究. 答 辩 人 : 刘钰 指 导 老 师: 陆嘉恒 教授 专 业: 计算机应用技术. 2014/5/21. 目 录. 研究背景 相关工作 问题定义 算法设计 算法效率分析 总结. 研究背景. 独立集( Independent Set, IS ). 对图 G=(V,E) , G 的独立集 I 定义为: 1)I 是 V 的子集; 2) 任意 u, v I ,满足 (u, v) E 。. 4. 5. 8. 3. 7. 2. 6. 12. 10. 1. 9.

christmas
Download Presentation

基于半外存的 I/O 高效大图独立集算法研究

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 基于半外存的I/O高效大图独立集算法研究 答 辩 人 : 刘钰 指导 老 师: 陆嘉恒 教授 专 业: 计算机应用技术 2014/5/21

  2. 目录 • 研究背景 • 相关工作 • 问题定义 • 算法设计 • 算法效率分析 • 总结

  3. 研究背景 独立集(Independent Set, IS) 对图G=(V,E),G的独立集I定义为: 1)I是V的子集; 2)任意u, v I,满足(u, v) E。 4 5 8 3 7 2 6 12 10 1 9 11 13

  4. 研究背景 极大独立集(Maximal Independent Set)和最大独立集(Maximum Independent Set, MIS) 对图G=(V,E)的独立集I,如果不存在独立集I’,使得II’,称I为极大独立集; G的独立集中基数(cardinality)最大的独立集称为最大独立集。(最大独立集不一定唯一,且必为极大独立集。) 4 5 8 G的一个极大独立集 3 7 2 6 12 10 1 9 11 13

  5. 研究背景 极大独立集(Maximal Independent Set)和最大独立集(Maximum Independent Set, MIS) 对图G=(V,E)的独立集I,如果不存在独立集I’,使得II’,称I为极大独立集; G的独立集中基数(cardinality)最大的独立集称为最大独立集。(最大独立集不一定唯一,且必为极大独立集。) 4 5 8 G的一个最大独立集 3 7 2 6 12 10 1 9 11 13

  6. 研究背景 • 独立集的应用举例 • 地图标注(Map Labeling) • 最大容错编码 • MIS在大图上的应用举例 • 其他应用

  7. 研究背景 • 地图标注(Map Labeling) 图 1‑1 对250个城市的一种标注方法 图 1‑2 对应图1-1构造的图计算最大独立集

  8. 研究背景 • 最大容错编码 • 给定编码长度n,在00…0到11…1中选出若干码字组成定长编码方案 • 码字有容错性要求 • 一位删除 • 两位删除 • 单位取反 • 单个Z-channel错误 • 尽量给出最大的编码集合,以表示更多信息 n n

  9. 研究背景 • MIS在大图上的应用举例 • 在某些计算大规模图上任意两点间可达性(reachability)的算法中,计算尽量大的独立集能使算法效率提升 • Fu A W C, Wu H, Cheng J, et al. Is-label: an independent-set based labeling scheme for point-to-point distance querying[J]. Proceedings of the VLDB Endowment, 2013, 6(6): 457-468.

  10. 研究背景 • 其他应用 • 计算机视觉/模式识别 • 对图进行区块分割,然后进行图匹配 • 市场图(Market Graph) • 无线传感网络 • 计算连通支配集

  11. 目录 • 研究背景 • 相关工作 • 问题定义 • 算法设计 • 算法效率分析 • 总结

  12. 确切计算最大独立集的内存算法 Nicolas Bourgeois et al, Fast Algorithms for Max Independent Set in Graphs of Small Average Degree, Algorithmica 2009. 该文提出了如何利用最大度为Δ的图上的Maximum Independent Set计算出最大度为Δ+1的图上的MIS。对于平均度为5的图算法时间复杂度为O(1.1969n). 近似计算最大独立集的内存算法 独立集难以(近似)计算的理论结果 (近似)计算最大独立集的外存算法 外存图算法 相关工作 研究背景

  13. 近似计算最大独立集的内存算法 局部优化算法 Piotr Berman et al, Approximating maximum independent set in bounded degree graphs, SODA 1994. 该论文理论上给出了多项式时间的近似算法,p.r=5/(Δ+3). 然而算法复杂度高于|V|50. 贪心算法 p.r=3/(Δ+2) or 2/(average_degree(G)+2) Greedyk Algorithm. 通过每次考虑大小为k的子集,算法为贪心算法的一般情况。 k值越大,算法的理论保证越好,但实际上Greedy2比 Greedy有稍许提高, k值再大后算法复杂度大增,但实际效果差不多。H.Y. LAU et al, The Greedier the Better: An Efficient Algorithm for Approximating Maximum Independent Set, Journal of Combinatorial Optimization, 2001. 相关工作 研究背景 performance_ratio(A)=min for all G|A(G)|/α(G) , 其中A为给定近似算法, α(G)为图G的MIS。

  14. 近似计算最大独立集的内存算法 局部优化算法(特例) 1-2-swap+0-1-swap算法。论文SANJEEV KHANNAet al, On Syntactic versus Computational Views of Approximability, SIAM Journal on Computing , 1999. 讨论了该方法的近似比p.r=2/(Δ+1) 。该算法是多项式时间的,然而论文未给出实现方式和具体算法。 相关工作 研究背景

  15. 独立集难以(近似)计算的理论结果 任意图 NP-complete MAX-SNP 不能得到近似比大于n1−ϵ,ϵ>0 ,除非P = NP. 幂次定律图 不能以近似比(1-2(c1-O(log2c1))/(c1(c1+1)ζ(β)))近似 相关工作 研究背景

  16. (近似)计算最大独立集的外存算法 Maximal_Independent_Set算法。遍历G,容易得到一个极大独立集。任何极大独立集满足|IS| ≥|V|/(Δ+1).通过维护一个外存上的优先队列(Priority Queue),该算法需要的内存空间小于|V|。该算法的主要缺点是对于求得的独立集大小没有理论保证,实际中求得的结果一般明显小于贪心算法等的结果。N.Zeh, I/O-Efficient Algorithms for Shortest Path Related Problems. PhD thesis, School of Computer Science, Carleton University, 2002. 相关工作 研究背景

  17. Reference C. H. Papadimitriou and M. Yannakakis, Optimization, approximation and complexity classes, JCSS 43, (1991), 425-440. S. Arora, C. Lund, R. Motwani, M. Sudan and M. Szegedy, Proof verification and hardness of approximation problems, Proc. 33rd FOCS, (1992) 14-23. D.S. Johnson, The NP-Completeness Column: An Ongoing Guide, On multi-prover interactive proofs, probabilistically checkable proofs and approximation algorithms, J. of Algorithms 13, (1992) 502-524. Nicolas Bourgeois et al, Fast Algorithms for Max Independent Set in Graphs of Small Average Degree, Algorithmica 2009. Piotr Berman et al, Approximating maximum independent set in bounded degree graphs, SODA 1994. N.Zeh, I/O-Efficient Algorithms for Shortest Path Related Problems. PhD thesis, School of Computer Science, Carleton University, 2002. SANJEEV KHANNAet al, On Syntactic versus Computational Views of Approximability, SIAM Journal on Computing , 1999. Halldorsson , Greed is Good: Approximating Independent Sets in Sparse and Bounded-Degree Graphs, STOC 1994. H.Y. LAU et al, The Greedier the Better: An Efficient Algorithm for Approximating Maximum Independent Set, Journal of Combinatorial Optimization, 2001. M. Goldberg et al, Experimental Evaluation of the Greedy and Random Algorithms for Finding Independent Sets in Random Graphs, Lecture Notes in Computer Science, 2005. 相关工作 研究背景

  18. 目录 • 研究背景 • 相关工作 • 问题定义 • 算法设计 • 算法效率分析 • 总结

  19. 为什么需要新的外存算法?(1/3) 现实中遇到的图规模越来越大,比如现在实验用的图facebook_sg, Web-UK07等点的数目有几千万到数亿,无法全部装入内存。如果在这样的大图上计算独立集,就需要开发外存算法; 在内存环境下,算法复杂度的主要衡量标准是时间复杂度(time complexity);贪心算法动态维护图中点的度,可以较高效地实现, 且几乎不存在实际效果超出贪心算法的高效算法; 在外存(external memory)或半外存(semi-external)环境下,算法复杂度的主要衡量标准是I/O复杂度( I/O complexity);贪心算法复杂度为O(average_degree(G)|ISGreedy|)。在实际的大图上得到独立集大小都大于|V|/2(大图近似服从power-law distribution),算法实际不可行。 问题定义 主要研究内容

  20. 为什么需要新的外存算法?(2/3) 通过研究发现,对于外存图算法,一般的处理模式为 存在问题: 由于实际上不存在较好的图分割(Graph Partition)算法,所以在合并阶段难以处理; 对于实际的大图,深度优先遍历(DFS)不能完成,使用上述算法模式的BFS要数个小时; 且对于最大独立集问题,边界处理复杂度较高,且得到的独立集大小难有理论保证。 问题定义 主要研究内容 1.将图分割成若干子图或压缩成规模较小的图,能装入内存; 2.使用内存算法处理每一部分或压缩图; 3.合并处理结果得到原图上的结果。

  21. 为什么需要新的外存算法?(3/3) 问题定义 主要研究内容 半外存图算法(semi-external graph algorithm)定义:对于图G=(V,E),如果算法内存使用量M满足: c|V|≤M<<|E| 则称该算法为半外存算法,其中c为较小常数。

  22. 研究问题定义 I/O模型 基本算子scan和sort,避免随机访问(random access) scan(N)=O(N)/B sort(N)=O(N/B*logM/BN/B) I/O复杂度和CPU复杂度 I/O复杂度应低于O(|V|)以保证在大图上可行 CPU复杂度尽量低 内存使用量 c<=4 or 5 算法性能保证 衡量标准?(计算近似比或MIS上界的方法) 问题定义 主要研究内容

  23. 目录 • 研究背景 • 相关工作 • 问题定义 • 算法设计 • 算法效率分析 • 总结

  24. 算法设计 主要研究内容 1-k-swap (before) IS vertex ~IS vertex

  25. 算法设计 主要研究内容 1-k-swap (after) IS vertex ~IS vertex

  26. 算法设计 主要研究内容 2-k-swap (before) IS vertex ~IS vertex

  27. 算法设计 主要研究内容 2-k-swap (after) IS vertex ~IS vertex

  28. 算法设计 主要研究内容 问题 1-k-交换可以在一次读取文件过程中处理完(即不存在1-k-交换)?

  29. 算法框架 算法设计 主要研究内容 I/O复杂度 CPU复杂度 1次排序文件 + 1次扫描文件 预处理算法(Pre-processing):SemiExternalGreedy O((|V|+|E|)log|V|) finish? Yes (算法结束) No 执行一轮1-k-swap交换 每轮O(|V|log|V|+|E|) 3次扫描文件 算法的I/O复杂度和CPU复杂度皆取决于1-k-交换的执行轮数,而与每轮交换了多少点无关。

  30. 算法设计 主要研究内容 4 5 8 3 7 2 6 12 10 1 9 11 13 vertex_id state parent |count

  31. 算法设计 主要研究内容 4 5 8 3 7 2 6 12 10 1 9 11 13 vertex_id state parent |count offset 1 2 3 4 5 6 7 8 9 10 11 12 13

  32. 算法设计 主要研究内容 4 13(graphsize) 7 4 12 9 13 9 2 1 3 5 4 6 8 4 9 1 2 3 6 3 1 2 6 4 5 7 8 6 1 3 5 10 1 9 11 11 1 9 10 9 8 10 11 12 13 5 8 3 7 2 6 12 10 1 9 11 13

  33. 算法设计 主要研究内容 4 13(graphsize) 7 4 12 9 13 9 2 1 3 5 4 6 8 4 9 1 2 3 6 3 1 2 6 4 5 7 8 6 1 3 5 10 1 9 11 11 1 9 10 9 8 10 11 12 13 5 8 3 7 2 6 12 10 1 9 11 13

  34. 算法设计 主要研究内容 4 13(graphsize) 7 4 12 9 13 9 2 1 3 5 4 6 8 4 9 1 2 3 6 3 1 2 6 4 5 7 8 6 1 3 5 10 1 9 11 11 1 9 10 9 8 10 11 12 13 5 8 3 7 2 6 12 10 1 9 11 13

  35. 算法设计 主要研究内容 4 4 5 8 3 5 8 3 7 2 6 7 2 6 12 10 12 10 1 9 1 9 11 13 11 13

  36. 特殊情况 算法设计 主要研究内容 p q u v t s

  37. 2-k-swap 算法设计 主要研究内容 1-k-swap

  38. 2-k-swap能换完吗? 算法设计 主要研究内容 u v clique clique c1 a1 b1 … c2 a2 b2 bn … …

  39. 无爪图(claw-free graph)与增广路径(Augmenting Path) 算法设计 主要研究内容

  40. 无爪图(claw-free graph)与增广路径(Augmenting Path) 算法设计 主要研究内容 clique clique clique clique

  41. 目录 • 研究背景 • 相关工作 • 问题定义 • 算法设计 • 算法效率分析 • 总结

  42. 随机图模型:(α,β)模型 算法效率分析 主要研究内容

  43. 随机图模型:(α,β)模型 ->球桶模型(balls and bins) 算法效率分析 主要研究内容 from ~IS from IS from IS from ~IS … … … d=1 d=1 d=1 d=2 d=3 d=… IS IS IS ~IS IS ~IS

  44. 算法效率分析 主要研究内容 引理1 对于β>2的PLRG,静态度大于log|V|的点以大概率不会被SemiExternalGreedy选进独立集。 引理2 对于β>2的PLRG,静态度大于log|V|的点以大概率不会被One-to-K-Swap选进独立集。 算法以大概率(w.h.p) 在log|V|轮结束 引理3 One-to-K-Swap以大概率使用静态度大的k个点交换静态度小的独立集点。

  45. 算法效率分析 主要研究内容 引理3 w is candidate ? a IS ~ ~ ~ IS ~ b

  46. 算法效率分析 主要研究内容 引理3 w IS a b ~ IS ~ w ~ IS IS ~ IS ~ u v

  47. 算法效率分析 主要研究内容 引理3 v IS ~ IS a b c ~ ~ p u v ~ IS ~ a IS IS IS ~

  48. 算法效率分析 主要研究内容 引理3 w ~ IS ~ IS a b c ~ p u w b IS ~ ~ a IS IS ~ ~

  49. 算法效率分析 主要研究内容 算法在β>2的PLRG上的I/O复杂度: 预处理算法SemiExternalGreedy: sort(|V|+|E|)+scan(|V|+|E|) One-to-K-Swap: scan(|V|+|E|)log|V| (|V|+|E|)/B*(log|V|+logM/B(|V|+|E|)/B) 算法在β>2的PLRG上的CPU复杂度: 预处理算法SemiExternalGreedy: O((|V|+|E|)/B* logM/B(|V|+|E|)/B+(|V|+|E|)logM) One-to-K-Swap: O((|V|+|E|)log|V|)

  50. 算法效率分析 主要研究内容 实验数据集

More Related