Presented by: Omar Obeya A New Parallel Algorithm for...
Transcript of Presented by: Omar Obeya A New Parallel Algorithm for...
![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](https://reader034.fdocuments.in/reader034/viewer/2022051909/5ffe226527cf63401d01a7c7/html5/thumbnails/1.jpg)
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](https://reader034.fdocuments.in/reader034/viewer/2022051909/5ffe226527cf63401d01a7c7/html5/thumbnails/2.jpg)
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](https://reader034.fdocuments.in/reader034/viewer/2022051909/5ffe226527cf63401d01a7c7/html5/thumbnails/3.jpg)
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](https://reader034.fdocuments.in/reader034/viewer/2022051909/5ffe226527cf63401d01a7c7/html5/thumbnails/4.jpg)
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](https://reader034.fdocuments.in/reader034/viewer/2022051909/5ffe226527cf63401d01a7c7/html5/thumbnails/5.jpg)
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](https://reader034.fdocuments.in/reader034/viewer/2022051909/5ffe226527cf63401d01a7c7/html5/thumbnails/6.jpg)
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](https://reader034.fdocuments.in/reader034/viewer/2022051909/5ffe226527cf63401d01a7c7/html5/thumbnails/7.jpg)
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](https://reader034.fdocuments.in/reader034/viewer/2022051909/5ffe226527cf63401d01a7c7/html5/thumbnails/8.jpg)
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](https://reader034.fdocuments.in/reader034/viewer/2022051909/5ffe226527cf63401d01a7c7/html5/thumbnails/9.jpg)
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](https://reader034.fdocuments.in/reader034/viewer/2022051909/5ffe226527cf63401d01a7c7/html5/thumbnails/10.jpg)
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](https://reader034.fdocuments.in/reader034/viewer/2022051909/5ffe226527cf63401d01a7c7/html5/thumbnails/11.jpg)
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](https://reader034.fdocuments.in/reader034/viewer/2022051909/5ffe226527cf63401d01a7c7/html5/thumbnails/12.jpg)
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](https://reader034.fdocuments.in/reader034/viewer/2022051909/5ffe226527cf63401d01a7c7/html5/thumbnails/13.jpg)
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](https://reader034.fdocuments.in/reader034/viewer/2022051909/5ffe226527cf63401d01a7c7/html5/thumbnails/14.jpg)
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](https://reader034.fdocuments.in/reader034/viewer/2022051909/5ffe226527cf63401d01a7c7/html5/thumbnails/15.jpg)
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](https://reader034.fdocuments.in/reader034/viewer/2022051909/5ffe226527cf63401d01a7c7/html5/thumbnails/16.jpg)
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](https://reader034.fdocuments.in/reader034/viewer/2022051909/5ffe226527cf63401d01a7c7/html5/thumbnails/17.jpg)
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](https://reader034.fdocuments.in/reader034/viewer/2022051909/5ffe226527cf63401d01a7c7/html5/thumbnails/18.jpg)
● 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](https://reader034.fdocuments.in/reader034/viewer/2022051909/5ffe226527cf63401d01a7c7/html5/thumbnails/19.jpg)
● 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](https://reader034.fdocuments.in/reader034/viewer/2022051909/5ffe226527cf63401d01a7c7/html5/thumbnails/20.jpg)
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](https://reader034.fdocuments.in/reader034/viewer/2022051909/5ffe226527cf63401d01a7c7/html5/thumbnails/21.jpg)
● 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](https://reader034.fdocuments.in/reader034/viewer/2022051909/5ffe226527cf63401d01a7c7/html5/thumbnails/22.jpg)
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](https://reader034.fdocuments.in/reader034/viewer/2022051909/5ffe226527cf63401d01a7c7/html5/thumbnails/23.jpg)
![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](https://reader034.fdocuments.in/reader034/viewer/2022051909/5ffe226527cf63401d01a7c7/html5/thumbnails/24.jpg)
● 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](https://reader034.fdocuments.in/reader034/viewer/2022051909/5ffe226527cf63401d01a7c7/html5/thumbnails/25.jpg)
● 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](https://reader034.fdocuments.in/reader034/viewer/2022051909/5ffe226527cf63401d01a7c7/html5/thumbnails/26.jpg)
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](https://reader034.fdocuments.in/reader034/viewer/2022051909/5ffe226527cf63401d01a7c7/html5/thumbnails/27.jpg)
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](https://reader034.fdocuments.in/reader034/viewer/2022051909/5ffe226527cf63401d01a7c7/html5/thumbnails/28.jpg)
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](https://reader034.fdocuments.in/reader034/viewer/2022051909/5ffe226527cf63401d01a7c7/html5/thumbnails/29.jpg)
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](https://reader034.fdocuments.in/reader034/viewer/2022051909/5ffe226527cf63401d01a7c7/html5/thumbnails/30.jpg)
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](https://reader034.fdocuments.in/reader034/viewer/2022051909/5ffe226527cf63401d01a7c7/html5/thumbnails/31.jpg)
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](https://reader034.fdocuments.in/reader034/viewer/2022051909/5ffe226527cf63401d01a7c7/html5/thumbnails/32.jpg)
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](https://reader034.fdocuments.in/reader034/viewer/2022051909/5ffe226527cf63401d01a7c7/html5/thumbnails/33.jpg)
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](https://reader034.fdocuments.in/reader034/viewer/2022051909/5ffe226527cf63401d01a7c7/html5/thumbnails/34.jpg)
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.