34
A New Parallel Algorithm for Connected Components in Dynamic Graphs Authored by: Robert McColl, Oded Green, David A. Bader Presented by: Omar Obeya

Presented by: Omar Obeya A New Parallel Algorithm for ...people.csail.mit.edu/jshun/6886-s18/lectures/lecture8-1.pdf · A New Parallel Algorithm for Connected Components in Dynamic

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Presented by: Omar Obeya A New Parallel Algorithm for ...people.csail.mit.edu/jshun/6886-s18/lectures/lecture8-1.pdf · A New Parallel Algorithm for Connected Components in Dynamic

A New Parallel Algorithm for Connected Components in Dynamic GraphsAuthored by: Robert McColl, Oded Green, David A. BaderPresented by: Omar Obeya

Page 2: Presented by: Omar Obeya A New Parallel Algorithm for ...people.csail.mit.edu/jshun/6886-s18/lectures/lecture8-1.pdf · A New Parallel Algorithm for Connected Components in Dynamic

Connected Components Problem

Page 3: Presented by: Omar Obeya A New Parallel Algorithm for ...people.csail.mit.edu/jshun/6886-s18/lectures/lecture8-1.pdf · A New Parallel Algorithm for Connected Components in Dynamic

DynamicConnected Components Problem

● Operations○ Query node○ Insert Edge○ Delete Edge

Page 4: Presented by: Omar Obeya A New Parallel Algorithm for ...people.csail.mit.edu/jshun/6886-s18/lectures/lecture8-1.pdf · A New Parallel Algorithm for Connected Components in Dynamic

Connected Components Problem

Page 5: Presented by: Omar Obeya A New Parallel Algorithm for ...people.csail.mit.edu/jshun/6886-s18/lectures/lecture8-1.pdf · A New Parallel Algorithm for Connected Components in Dynamic

Connected Components Problem

Page 6: Presented by: Omar Obeya A New Parallel Algorithm for ...people.csail.mit.edu/jshun/6886-s18/lectures/lecture8-1.pdf · A New Parallel Algorithm for Connected Components in Dynamic

Goals ● Parallel● Exact● Dynamic

Page 7: Presented by: Omar Obeya A New Parallel Algorithm for ...people.csail.mit.edu/jshun/6886-s18/lectures/lecture8-1.pdf · A New Parallel Algorithm for Connected Components in Dynamic

Reformatting the problem

Given a deletion classify whether it is safe

- 100% True positive.- Minimum false negative.

Page 8: Presented by: Omar Obeya A New Parallel Algorithm for ...people.csail.mit.edu/jshun/6886-s18/lectures/lecture8-1.pdf · A New Parallel Algorithm for Connected Components in Dynamic

Approach I: Adjacency List Intersection A

B

C

D

E

Page 9: Presented by: Omar Obeya A New Parallel Algorithm for ...people.csail.mit.edu/jshun/6886-s18/lectures/lecture8-1.pdf · A New Parallel Algorithm for Connected Components in Dynamic

Approach II: Spanning Tree

Page 10: Presented by: Omar Obeya A New Parallel Algorithm for ...people.csail.mit.edu/jshun/6886-s18/lectures/lecture8-1.pdf · A New Parallel Algorithm for Connected Components in Dynamic

Approach II: Spanning Tree

Page 11: Presented by: Omar Obeya A New Parallel Algorithm for ...people.csail.mit.edu/jshun/6886-s18/lectures/lecture8-1.pdf · A New Parallel Algorithm for Connected Components in Dynamic

Approach II: Spanning Tree

Page 12: Presented by: Omar Obeya A New Parallel Algorithm for ...people.csail.mit.edu/jshun/6886-s18/lectures/lecture8-1.pdf · A New Parallel Algorithm for Connected Components in Dynamic

Approach II: Spanning Tree

Page 13: Presented by: Omar Obeya A New Parallel Algorithm for ...people.csail.mit.edu/jshun/6886-s18/lectures/lecture8-1.pdf · A New Parallel Algorithm for Connected Components in Dynamic

Solution ● Maintain Neighbor-Parent list of ThreshPN “neighpars” only.

● At Deletion:○ if it has a parent, or have

a neighbour that has a parent.

○ Otherwise: recalculate.● Use STINGER

Page 14: Presented by: Omar Obeya A New Parallel Algorithm for ...people.csail.mit.edu/jshun/6886-s18/lectures/lecture8-1.pdf · A New Parallel Algorithm for Connected Components in Dynamic

Definitions

Page 15: Presented by: Omar Obeya A New Parallel Algorithm for ...people.csail.mit.edu/jshun/6886-s18/lectures/lecture8-1.pdf · A New Parallel Algorithm for Connected Components in Dynamic

Initialization

Page 16: Presented by: Omar Obeya A New Parallel Algorithm for ...people.csail.mit.edu/jshun/6886-s18/lectures/lecture8-1.pdf · A New Parallel Algorithm for Connected Components in Dynamic

Initialization ● Parallel BFS● Put neighpars in your

list if there is room.● Use -ve values for

neighbours and +ve values for parents.

Page 17: Presented by: Omar Obeya A New Parallel Algorithm for ...people.csail.mit.edu/jshun/6886-s18/lectures/lecture8-1.pdf · A New Parallel Algorithm for Connected Components in Dynamic

Insertion

Page 18: Presented by: Omar Obeya A New Parallel Algorithm for ...people.csail.mit.edu/jshun/6886-s18/lectures/lecture8-1.pdf · A New Parallel Algorithm for Connected Components in Dynamic

● Intra-connecting edges○ In Parallel○ If don’t have a parent,

add s if it was a parent.

○ If have a parent. ■ Try add s if it was

neighbour■ Must add s if it was

parent (unless list is full of parents).

Page 19: Presented by: Omar Obeya A New Parallel Algorithm for ...people.csail.mit.edu/jshun/6886-s18/lectures/lecture8-1.pdf · A New Parallel Algorithm for Connected Components in Dynamic

● Inter-connecting edges○ In Series○ Special handle

singletons.○ Merge the labeling of

the smaller component with the bigger.

Page 20: Presented by: Omar Obeya A New Parallel Algorithm for ...people.csail.mit.edu/jshun/6886-s18/lectures/lecture8-1.pdf · A New Parallel Algorithm for Connected Components in Dynamic

Deletion

Page 21: Presented by: Omar Obeya A New Parallel Algorithm for ...people.csail.mit.edu/jshun/6886-s18/lectures/lecture8-1.pdf · A New Parallel Algorithm for Connected Components in Dynamic

● Maintain Data structure○ In Parallel

■ Remove S from list■ Recalc Has Parent?■ Mark safe if possible

○ In Series■ Mark safe if possible■ Otherwise repair

Page 22: Presented by: Omar Obeya A New Parallel Algorithm for ...people.csail.mit.edu/jshun/6886-s18/lectures/lecture8-1.pdf · A New Parallel Algorithm for Connected Components in Dynamic

Repair

Page 23: Presented by: Omar Obeya A New Parallel Algorithm for ...people.csail.mit.edu/jshun/6886-s18/lectures/lecture8-1.pdf · A New Parallel Algorithm for Connected Components in Dynamic
Page 24: Presented by: Omar Obeya A New Parallel Algorithm for ...people.csail.mit.edu/jshun/6886-s18/lectures/lecture8-1.pdf · A New Parallel Algorithm for Connected Components in Dynamic

● Parallel BFS○ Search for a

connection back to the s component

Page 25: Presented by: Omar Obeya A New Parallel Algorithm for ...people.csail.mit.edu/jshun/6886-s18/lectures/lecture8-1.pdf · A New Parallel Algorithm for Connected Components in Dynamic

● Disconnected -> done.● Relabel all vertices

discovered.● Second Parallel BFS

○ Relabel more undiscovered vertices.

Page 26: Presented by: Omar Obeya A New Parallel Algorithm for ...people.csail.mit.edu/jshun/6886-s18/lectures/lecture8-1.pdf · A New Parallel Algorithm for Connected Components in Dynamic

Quantitative Results

Page 27: Presented by: Omar Obeya A New Parallel Algorithm for ...people.csail.mit.edu/jshun/6886-s18/lectures/lecture8-1.pdf · A New Parallel Algorithm for Connected Components in Dynamic

Unsafe Deletions

As we store more neighbors we get lower false negative

Page 28: Presented by: Omar Obeya A New Parallel Algorithm for ...people.csail.mit.edu/jshun/6886-s18/lectures/lecture8-1.pdf · A New Parallel Algorithm for Connected Components in Dynamic

Performance Results

Page 29: Presented by: Omar Obeya A New Parallel Algorithm for ...people.csail.mit.edu/jshun/6886-s18/lectures/lecture8-1.pdf · A New Parallel Algorithm for Connected Components in Dynamic

Scaling

Scales sublinearly.

Page 30: Presented by: Omar Obeya A New Parallel Algorithm for ...people.csail.mit.edu/jshun/6886-s18/lectures/lecture8-1.pdf · A New Parallel Algorithm for Connected Components in Dynamic

Speed up

Speed up (over static) depends on graph density and not no. of threads.

Page 31: Presented by: Omar Obeya A New Parallel Algorithm for ...people.csail.mit.edu/jshun/6886-s18/lectures/lecture8-1.pdf · A New Parallel Algorithm for Connected Components in Dynamic

Graph Dependency

The algorithm speedup is very graph dependent

Page 32: Presented by: Omar Obeya A New Parallel Algorithm for ...people.csail.mit.edu/jshun/6886-s18/lectures/lecture8-1.pdf · A New Parallel Algorithm for Connected Components in Dynamic

Weak Points ● Percentage of deletion is 6.25%

● Graph Dependent● No probabilistic

theoretical bounds

Page 33: Presented by: Omar Obeya A New Parallel Algorithm for ...people.csail.mit.edu/jshun/6886-s18/lectures/lecture8-1.pdf · A New Parallel Algorithm for Connected Components in Dynamic

Future Work ● Threshold can be a function of no. of edges.

● What about adjacency matrix intersection using a popular node?

Page 34: Presented by: Omar Obeya A New Parallel Algorithm for ...people.csail.mit.edu/jshun/6886-s18/lectures/lecture8-1.pdf · A New Parallel Algorithm for Connected Components in Dynamic

References ● McColl, Robert, Oded Green, and David A. Bader. "A new parallel algorithm for connected components in dynamic graphs." In High Performance Computing (HiPC), 2013 20th International Conference on, pp. 246-255. IEEE, 2013.