Carlos Ordonez, Predrag T. Tosic Time Complexity and Parallel Speedup of Relational Queries to Solve Graph Problems Carlos Ordonez, Predrag T. Tosic 1
Graph analytics Exploration Path Connectivity Structure
Our contributions Unify many algorithms into two iterations Relational queries Time complexity based on matrix density Parallel processing
Preliminaries G definition: G=(V,E), n=|V|,m=|E| E sparse matrix: m=O(n) Iterative algorithms Matrix-Vector multiplication Matrix-Matrix multiplication
Basic Matrix-Vector Iteration | S0 |=1 or |S0|=n S= S*E Semiring switching operators: */sum() +/min() */min
Basic Matrix-Matrix R=R*E E+=E+ E2 + .. + Ek Semiring applies as well Until fixpoint or max path length k
Relational Algebra
Time complexity merge sort Matrix-vector: O(n log n) Matrix-matrix: O(m log m) if m=O(f(n)) not assumed from O(n) to O(n3) clique of size K=O(n)
Fast algorithm termination immediate fixpoint
Matrix-matrix: Time complexity Tree Complete graph
Hardness of Matrix-Matrix multiplication
Parallel processing Matrix-vector Partition S replicate S Matrix-matrix, consider edge (i,j) Partition by source vertex i: neighbors are local Partition by destination vertex j: neighbors are local Partition by edge i,j: neighbors not local
Parallel processing speedup sparse : dense matrix-vector dense matrix-matrix Partitioning Hashing Sorting: parallel merge sort Computation Local Distributed
Conclusions Unified two families of graph algorithms Relational algebra expressions to evaluate matrix-matrix and matrix-vector multiplication Characterize O() and speedup assuming sparse or dense adjacency matrix