Adjacency Maps and Efficient Graph Algorithms

被引:1
作者
Valiente, Gabriel [1 ]
机构
[1] Tech Univ Catalonia, Dept Comp Sci, E-08034 Barcelona, Spain
关键词
discrete mathematics; graph theory; performance and testing of algorithms; adjacency matrices; adjacency lists; adjacency maps;
D O I
10.3390/a15020067
中图分类号
TP18 [人工智能理论];
学科分类号
081104 ; 0812 ; 0835 ; 1405 ;
摘要
Graph algorithms that test adjacencies are usually implemented with an adjacency-matrix representation because the adjacency test takes constant time with adjacency matrices, but it takes linear time in the degree of the vertices with adjacency lists. In this article, we review the adjacency-map representation, which supports adjacency tests in constant expected time, and we show that graph algorithms run faster with adjacency maps than with adjacency lists by a small constant factor if they do not test adjacencies and by one or two orders of magnitude if they perform adjacency tests.
引用
收藏
页数:10
相关论文
共 11 条
[1]  
[Anonymous], 2009, Introduction to Algorithms
[2]  
Bollobas B, 2001, Random Graphs
[3]  
Coolen T, 2017, GENERATING RANDOM NETWORKS AND GRAPHS
[4]  
Goodrich M.T., 2013, Data Structures and Algorithms in Python
[5]  
Hagberg A, 2008, P 7 PYTH SCI C SCIPY, V2008, P11
[6]  
Mehlhorn K., 1999, LEDA PLATFORM COMBIN
[7]  
Siek Jeremy G, 2001, The Boost Graph LibraryUser Guide and Reference Manual (C++-depth)
[8]  
Tarjan R., 1971, Conference record 1971 12th annual symposium on switching and automata theory, P114, DOI 10.1137/0201010
[9]  
Tarjan R., 1983, Data Structures and Network Algorithms
[10]   Trading uninitialized space for time [J].
Valiente, G .
INFORMATION PROCESSING LETTERS, 2004, 92 (01) :9-13