Time Complexity and Parallel Speedup of Relational Queries

  • Slides: 14
Download presentation
Time Complexity and Parallel Speedup of Relational Queries to Solve Graph Problems Carlos Ordonez,

Time Complexity and Parallel Speedup of Relational Queries to Solve Graph Problems Carlos Ordonez, Predrag T. Tosic

Graph analytics • • Exploration Path Connectivity Structure

Graph analytics • • Exploration Path Connectivity Structure

Our contributions • • Unify many algorithms into two iterations Relational queries Time complexity

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) •

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 • | S 0 |=1 or |S 0|=n • S= S*E

Basic Matrix-Vector Iteration • | S 0 |=1 or |S 0|=n • S= S*E • Semiring switching operators: – */sum() – +/min() – */min

Basic Matrix-Matrix • • R=R*E E+=E+ E 2 +. . + Ek Semiring applies

Basic Matrix-Matrix • • R=R*E E+=E+ E 2 +. . + Ek Semiring applies as well Until fixpoint or max path length k

Relational Algebra

Relational Algebra

Time complexity merge sort • Matrix-vector: O(n log n) • Matrix-matrix: – O(m log

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(n 3) – clique of size K=O(n)

Fast algorithm termination immediate fixpoint

Fast algorithm termination immediate fixpoint

Matrix-matrix: Time complexity • Tree • Complete graph

Matrix-matrix: Time complexity • Tree • Complete graph

Hardness of Matrix-Matrix multiplication

Hardness of Matrix-Matrix multiplication

Parallel processing • Matrix-vector – Partition S – replicate S • Matrix-matrix, consider edge

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 • Speedup – sparse : – dense matrix-vector – dense matrix-matrix

Parallel processing speedup • 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

Conclusions • Unified two families of graph algorithms • Relational algebra expressions to evaluate matrix and matrix-vector multiplication • Characterize O() and speedup assuming sparse or dense adjacency matrix