使用CUDA的GPU上的Bellman-Ford单源最短路径算法

总览 (Overview)Traversing large graphs to compute different information has various use cases in the real-world like social media networks, communication networks, search engine indexing & page ra...
摘要由CSDN通过智能技术生成

总览 (Overview)

Traversing large graphs to compute different information has various use cases in the real-world like social media networks, communication networks, search engine indexing & page rank, VLSI design and biological network analysis. Bellman-Ford, Dijkstra’s and Delta Stepping are widely used Single Source Shortest Path Algorithm (SSSP) algorithms. Dijkstra’s algorithm provides a work efficient implementation, whereas Bellman-Ford provides scope for easy parallel implementation. Delta Stepping algorithm introduces a trade-off between the two. This article presents three parallel implementation techniques to accelerate the Bellman-Ford SSSP algorithm using Compute Unified Device Architecture (CUDA) on General-purpose computing on graphics processing units (GPGPU). We also compare the performance of all three variations on large graphs. We observed that the run time of a sequential implementation can be reduced by 99.4% for a sparse graph with 400k vertices and 1 million edges with optimized CUDA implementation.

遍历大型图以计算不同的信息在现实世界中有各种用例,例如社交媒体网络,通信网络,搜索引擎索引和页面排名,VLSI设计和生物网络分析。 Bellman-Ford,Dijkstra和Delta Stepping是广泛使用的单一源最短路径算法(SSSP)算法。 Dijkstra的算法提供了工作高效的实现,而Bellman-Ford提供了易于并行实现的范围。 增量步进算法在两者之间进行了权衡。 本文介绍了三种并行实现技术,这些技术可在图形处理单元(GPGPU)的通用计算上使用计算统一设备体系结构(CUDA)来加速Bellman-Ford SSSP算法。 我们还比较了大型图上所有三个变体的性能。 我们观察到,对于具有400k顶点和100万条边的稀疏图,使用优化的CUDA实现,顺序实现的运行时间可以减少99.4%。

什么是单一来源最短路径(SSSP)? (What is Single Source Shortest Path (SSSP)?)

A Graph G = (V, E) where V is set of vertices and E is set of Edges. An edge (u,v,w) is a path from node u to v and its weight is w. If we think the nodes as cities, then the edges are routes between the cities and weights are the distance between the cities.

图G =(V,E),其中V是顶点集,E是边集。 边(u,v,w)是从节点u到v的路径,其权重为w。 如果我们将节点视为城市,则边缘是城市之间的路线,权重是城市之间的距离。

In the example graph shown below V = {A, B, C, D, E} and E = {(A,B,9), (A,C,4), (B,C,10), (B,D,2), (B,E,3), (C,D,2), (C,E,11), (D,B,2),(E,D,2)}. Single source shortest path is a shortest distance from a source vertex e.g. “A” to all other vertices.

在下面显示的示例图中,V = {A,B,C,D,E},E = {(A,B,9),(A,C,4),(B,C,10),(B, D,2),(B,E,3),(C,D,2),(C,E,11),(D,B,2),(E,D,2)}。 单个源最短路径是从源顶点(例如“ A”)到所有其他顶点的最短距离。

Image for post
Direct Weighted Graph
直接加权图

In the above example graph, SSSP from source vertex “A” to all other vertices is given by the blue arrows. i.e A → C → D → B → E

在上面的示例图中,蓝色箭头表示从源顶点“ A”到所有其他顶点的SSSP。 即A→C→D→B→E

资料集 (Data set)

We used two different types of large graphs. USA road network graph data sets from DIMACS Shortest Paths Implementation challenge (The Center for Discrete Mathematics and Theoretical Computer Science. 9th DIMACS Implementation Challenge) and random generated graphs using SPRAND tool by Cherkassky, Goldberg and Radzik (Reference [1])

我们使用了两种不同类型的大型图。 美国道路网络图形数据集来自DIMACS最短路径实施挑战( 离散数学和理论计算机科学中心。第9次DIMACS实施挑战 ),以及Cherkassky,Goldberg和Radzik使用SPRAND工具随机生成的图形(参考[1])。

图表示 (Graph Representation)

A graph G(V, E) is generally represented via an adjacency matrix or adjacency list. For a sparse graph such as road networks, adjacency list is the preferred representation, since it takes less space. Compressed Sparse Row (CSR) repre

  • 1
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值