Symmetry Breaking a e b x b d c y v f g Worker 1 Data Graph 70
Symmetry Breaking a e b x b d c y d f g Worker 1 Data Graph 71
Symmetry Breaking a e u x b x b d c y v y d f g Data Graph Worker 2 Worker 1 72
Symmetry Breaking a e d x b x b d c y v y d f g Data Graph Worker 2 Worker 1 73
Symmetry Breaking a e d x b x b d c y b y d f g Data Graph Worker 2 Worker 1 74
Symmetry Breaking a e d a b a b d c y b y d f g Data Graph Worker 2 Worker 1 75
Symmetry Breaking a e d a b a b d c g b g d f g Data Graph Worker 2 Worker 1 76
Symmetry Breaking a e d a b a b d c g b g d f g Data Graph Worker 2 Worker 1 77
Symmetry Breaking u x y v u < v 78
Symmetry Breaking u x y v x < y 79
Symmetry Breaking u x y v u < v x < y 80
Core Pattern u x y v 81
Core Pattern x u v y 82
Core Pattern x u v y 83
Core Pattern a e b b d c d f g Data Graph Pattern-Unaware 84
Core Pattern a e b a b d c d f g Data Graph Pattern-Unaware 85
Core Pattern a e b a b d c d f g Data Graph Pattern-Unaware 86
Core Pattern a e b a b d c g d f g Data Graph Pattern-Unaware 87
Core Pattern a e b a b d c g d f g Data Graph Pattern-Unaware 88
Core Pattern a e b x b d c y d f g Data Graph Pattern-Aware 89
Core Pattern a e b x b d c y d f g Data Graph Pattern-Aware 90
Core Pattern a e b x b d c y d f g Data Graph Pattern-Aware 91
Core Pattern a e b a b d c g d f g Data Graph Pattern-Aware 92
Core Pattern a e b a b d c g d f h g Data Graph Pattern-Aware 93
Core Pattern a e b a b a b d c g d h d f h g Data Graph Pattern-Aware 94
Core Pattern a e b a b a b d c g d h d f h g Data Graph Pattern-Aware 95
Pattern Awareness • Symmetry breaking (RECOMB ‘07) Pattern • Core pattern reduction Matching (SIGMOD ‘16) 96
Pattern Awareness • Early termination Pattern Matching 97
Early Termination bool globalClusteringCoefficient(int bound) { DataGraph G( “path/to/graph/” ); auto triplet = PatternGenerator::star(3); int numTriplets = count(G, {triplet}); auto countAndCheck = [=](auto &&match, auto &&aggregator) { int numTriangles = aggregator.readValue(match.pattern); if (3*numTriangles/numTriplets > bound) aggregator.stop(); else aggregator.map(match.pattern, 1); } auto triangle = PatternGenerator::clique(3); auto result = match<Pattern, int>(G, triangle, countAndCheck); return 3*result[triangle]/numTriplets > bound; } 98
Early Termination bool globalClusteringCoefficient(int bound) { DataGraph G(“path/to/graph/”); auto triplet = PatternGenerator::star(3); int numTriplets = count(G, {triplet}); auto countAndCheck = [=](auto &&match, auto &&aggregator) { int numTriangles = aggregator.readValue(match.pattern); if (3*numTriangles/numTriplets > bound) aggregator.stop(); else aggregator.map(match.pattern, 1); } auto triangle = PatternGenerator::clique(3); auto result = match<Pattern, int>(G, triangle, countAndCheck); return 3*result[triangle]/numTriplets > bound; } 99
Recommend
More recommend