James Demmel http://www.cs.berkeley.edu/~demmel/cs267_Spr99 CS 267 Applications of Parallel Computers Lecture 14: Graph Partitioning - I James Demmel.

Slides:



Advertisements
Similar presentations
Approximation algorithms for geometric intersection graphs.
Advertisements

L30: Partitioning 성균관대학교 조 준 동 교수
 Distance Problems: › Post Office Problem › Nearest Neighbors and Closest Pair › Largest Empty and Smallest Enclosing Circle  Sub graphs of Delaunay.
Online Social Networks and Media. Graph partitioning The general problem – Input: a graph G=(V,E) edge (u,v) denotes similarity between u and v weighted.
CS774. Markov Random Field : Theory and Application Lecture 17 Kyomin Jung KAIST Nov
CS267 L17 Graph Partitioning III.1 Demmel Sp 1999 CS 267 Applications of Parallel Computers Lecture 17: Graph Partitioning - III James Demmel
CS 584. Review n Systems of equations and finite element methods are related.
Finite Mathematics & Its Applications, 10/e by Goldstein/Schneider/SiegelCopyright © 2010 Pearson Education, Inc. 1 of 71 Chapter 1 Linear Equations and.
CS267 L14 Graph Partitioning I.1 Demmel Sp 1999 CS 267 Applications of Parallel Computers Lecture 14: Graph Partitioning - I James Demmel
EDA (CS286.5b) Day 6 Partitioning: Spectral + MinCut.
CS267 L15 Graph Partitioning II.1 Demmel Sp 1999 CS 267 Applications of Parallel Computers Lecture 15: Graph Partitioning - II James Demmel
Expanders Eliyahu Kiperwasser. What is it? Expanders are graphs with no small cuts. The later gives several unique traits to such graph, such as: – High.
CS267 L15 Graph Partitioning II.1 Demmel Sp 1999 CS 267 Applications of Parallel Computers Lecture 15: Graph Partitioning - II James Demmel
02/23/2005CS267 Lecture 101 CS 267: Applications of Parallel Computers Graph Partitioning James Demmel
15-853Page :Algorithms in the Real World Separators – Introduction – Applications.
Domain decomposition in parallel computing Ashok Srinivasan Florida State University COT 5410 – Spring 2004.
Graph partition in PCB and VLSI physical synthesis Lin Zhong ELEC424, Fall 2010.
Abhiram Ranade IIT Bombay
GRAPH Learning Outcomes Students should be able to:
CS 450: Computer Graphics REVIEW: OVERVIEW OF POLYGONS
A D V A N C E D C O M P U T E R G R A P H I C S CMSC 635 January 15, 2013 Quadric Error Metrics 1/20 Quadric Error Metrics.
Unit 5 Vocab By: Mika Hamady. Acute Angle Definition: An acute angle is an angle that is less then 90 degrees. Examples: 1.A 43 degree angle is acute.
CSE554AlignmentSlide 1 CSE 554 Lecture 5: Alignment Fall 2011.
Graph Algorithms. Definitions and Representation An undirected graph G is a pair (V,E), where V is a finite set of points called vertices and E is a finite.
CS 290H Lecture 5 Elimination trees Read GLN section 6.6 (next time I’ll assign 6.5 and 6.7) Homework 1 due Thursday 14 Oct by 3pm turnin file1.
Lecture 5: Mathematics of Networks (Cont) CS 790g: Complex Networks Slides are modified from Networks: Theory and Application by Lada Adamic.
CS 584. Load Balancing Goal: All processors working all the time Efficiency of 1 Distribute the load (work) to meet the goal Two types of load balancing.
Lines, Angles, & Circles MATH 102 Contemporary Math S. Rook.
Week 11 - Monday.  What did we talk about last time?  Binomial theorem and Pascal's triangle  Conditional probability  Bayes’ theorem.
InterConnection Network Topologies to Minimize graph diameter: Low Diameter Regular graphs and Physical Wire Length Constrained networks Nilesh Choudhury.
CS774. Markov Random Field : Theory and Application Lecture 02
Presented by: S. K. Pandey PGT Physics K. V. Khandwa Kinematics Vectors.
CS 484 Load Balancing. Goal: All processors working all the time Efficiency of 1 Distribute the load (work) to meet the goal Two types of load balancing.
Domain decomposition in parallel computing Ashok Srinivasan Florida State University.
Spectral Partitioning: One way to slice a problem in half C B A.
Graphs, Vectors, and Matrices Daniel A. Spielman Yale University AMS Josiah Willard Gibbs Lecture January 6, 2016.
 In the previews parts we have seen some kind of segmentation method.  In this lecture we will see graph cut, which is a another segmentation method.
1 Entropy Waves, The Zigzag Graph Product, and New Constant-Degree Expanders Omer Reingold Salil Vadhan Avi Wigderson Lecturer: Oded Levy.
Laplacian Matrices of Graphs: Algorithms and Applications ICML, June 21, 2016 Daniel A. Spielman.
CS 140: Sparse Matrix-Vector Multiplication and Graph Partitioning
Laplacian Matrices of Graphs: Algorithms and Applications ICML, June 21, 2016 Daniel A. Spielman.
High Performance Computing Seminar
CSE 554 Lecture 8: Alignment
Algorithms and Networks
Spectral partitioning works: Planar graphs and finite element meshes
A Continuous Optimization Approach to the Minimum Bisection Problem
CS 290H Administrivia: April 16, 2008
Minimum Spanning Tree 8/7/2018 4:26 AM
In this section, we will learn about: Using integration to find out
Haim Kaplan and Uri Zwick
CS 267: Applications of Parallel Computers Graph Partitioning
CS 240A: Graph and hypergraph partitioning
Space Vectors Problem 3.19 Determine the moment about the origin of the coordinate system, given a force vector and its distance from the origin. This.
CS 267: Applications of Parallel Computers Graph Partitioning
Grids Geometry Computational Geometry
Vectors and the Geometry of Space
ESE534: Computer Organization
Lecture 16: Earth-Mover Distance
Randomized Algorithms CS648
CS 267: Applications of Parallel Computers Graph Partitioning
CS 267: Applications of Parallel Computers Graph Partitioning
Haim Kaplan and Uri Zwick
James Demmel 11/30/2018 Graph Partitioning James Demmel 04/30/2010 CS267,
CS 267: Applications of Parallel Computers Graph Partitioning
CS 267: Applications of Parallel Computers Graph Partitioning
CS 290H Lecture 3 Fill: bounds and heuristics
3.3 Network-Centric Community Detection
Read GLN sections 6.1 through 6.4.
CS 267: Applications of Parallel Computers Graph Partitioning
“Traditional” image segmentation
Presentation transcript:

James Demmel http://www.cs.berkeley.edu/~demmel/cs267_Spr99 CS 267 Applications of Parallel Computers Lecture 14: Graph Partitioning - I James Demmel http://www.cs.berkeley.edu/~demmel/cs267_Spr99

Review definition of Graph Partitioning problem Outline of Heuristics Partitioning with Nodal Coordinates Partitioning without Nodal Coordinates Multilevel Acceleration BIG IDEA, will appear often in course Available Software good sequential and parallel software availble Comparison of Methods Applications

Definition of Graph Partitioning Given a graph G = (N, E, WN, WE) N = nodes (or vertices), E = edges WN = node weights, WE = edge weights Ex: N = {tasks}, WN = {task costs}, edge (j,k) in E means task j sends WE(j,k) words to task k Choose a partition N = N1 U N2 U … U NP such that The sum of the node weights in each Nj is “about the same” The sum of all edge weights of edges connecting all different pairs Nj and Nk is minimized Ex: balance the work load, while minimizing communication Special case of N = N1 U N2: Graph Bisection

Load Balancing while Minimizing Communication Applications Load Balancing while Minimizing Communication Sparse Matrix time Vector Multiplication Solving PDEs N = {1,…,n}, (j,k) in E if A(j,k) nonzero, WN(j) = #nonzeros in row j, WE(j,k) = 1 VLSI Layout N = {units on chip}, E = {wires}, WE(j,k) = wire length Telephone network design Original application, algorithm due to Kernighan Sparse Gaussian Elimination Used to reorder rows and columns to increase parallelism, decrease “fill-in” Physical Mapping of DNA Evaluating Bayesian Networks?

Sparse Matrix Vector Multiplication

Cost of Graph Partitioning Many possible partitionings to search: n choose n/2 ~ sqrt(2n/pi)*2n bisection possibilities Choosing optimal partitioning is NP-complete Only known exact algorithms have cost = exponential(n) We need good heuristics

First Heuristic: Repeated Graph Bisection To partition N into 2k parts, bisect graph recursively k times Henceforth discuss mostly graph bisection

Overview of Partitioning Heuristics for Bisection Partitioning with Nodal Coordinates Each node has x,y,z coordinates Partition nodes by partitioning space Partitioning without Nodal Coordinates Sparse matrix of Web: A(j,k) = # times keyword j appears in URL k Multilevel acceleration (BIG IDEA) Approximate problem by “coarse graph”, do so recursively

Edge Separators vs. Vertex Separators of G(N,E) Edge Separator: Es (subset of E) separates G if removing Es from E leaves two ~equal-sized, disconnected components of N: N1 and N2 Vertex Separator: Ns (subset of N) separates G if removing Ns and all incident edges leaves two ~equal-sized, disconnected components of N: N1 and N2 Making an Ns from an Es: pick one endpoint of each edge in Es How big can |Ns| be, compared to |Es| ? Making an Es from an Ns: pick all edges incident on Ns How big can |Es| be, compared to |Ns| ? We will find Edge or Vertex Separators, as convenient Es = green edges or blue edges Ns = red vertices

Graphs with Nodal Coordinates - Planar graphs Planar graph can be drawn in plane without edge crossings Ex: m x m grid of m2 nodes: $ vertex separator Ns with |Ns| = m = sqrt(|N|) (see last slide for m=5 ) Theorem (Tarjan, Lipton, 1979): If G is planar, $ Ns such that N = N1 U Ns U N2 is a partition, |N1| <= 2/3 |N| and |N2| <= 2/3 |N| |Ns| <= sqrt(8 * |N|) Theorem motivates intuition of following algorithms

Graphs with Nodal Coordinates: Inertial Partitioning For a graph in 2D, choose line with half the nodes on one side and half on the other In 3D, choose a plane, but consider 2D for simplicity Choose a line L, and then choose an L^ perpendicular to it, with half the nodes on either side Remains to choose L 1) L given by a*(x-xbar)+b*(y-ybar)=0, with a2+b2=1; (a,b) is unit vector ^ to L 2) For each nj = (xj,yj), compute coordinate Sj = -b*(xj-xbar) + a*(yj-ybar) along L 3) Let Sbar = median(S1,…,Sn) 4) Let nodes with Sj < Sbar be in N1, rest in N2

Inertial Partitioning: Choosing L Clearly prefer L on left below Mathematically, choose L to be a total least squares fit of the nodes Minimize sum of squares of distances to L (green lines on last slide) Equivalent to choosing L as axis of rotation that minimizes the moment of inertia of nodes (unit weights) - source of name

Inertial Partitioning: choosing L (continued) (a,b) is unit vector perpendicular to L Sj (length of j-th green line)2 = Sj [ (xj - xbar)2 + (yj - ybar)2 - (-b*(xj - xhar) + a*(yj - ybar))2 ] … Pythagorean Theorem = a2 * Sj (xj - xbar)2 + 2*a*b* Sj (xj - xbar)*(xj - ybar) + b2 Sj (yj - ybar)2 = a2 * X1 + 2*a*b* X2 + b2 * X3 = [a b] * X1 X2 * a X2 X3 b Minimized by choosing (xbar , ybar) = (Sj xj , Sj yj) / N = center of mass (a,b) = eigenvector of smallest eigenvalue of X1 X2 X2 X3

Graphs with Nodal Coordinates: Random lines and circles Emulate Lipton/Tarjan in higher dimensions than planar (2D) Take an n by n by n mesh of |N| = n3 nodes Edges to 6 nearest neighbors Partition by taking plane parallel to 2 axes Cuts n2 =|N|2/3 = O(|E|2/3) edges

Random lines and circles: Well Shaped Graphs Need Notion of “well shaped” graphs in 3D, higher D Any graph fits in 3D without edge crossings! Approach due to Miller, Teng, Thurston, Vavasis Def: A k-ply neighborhood system in d dimensions is a set {D1,…,Dn} of closed disks in Rd such that no point in Rd is strictly interior to more than k disks Def: An (a,k) overlap graph is a graph defined in terms of a >= 1 and a k-ply neighborhood system {D1,…,Dn}: There is a node for each Dj, and an edge from j to k if expanding the radius of the smaller of Dj and Dk by >a causes the two disks to overlap Ex: n-by-n mesh is a (1,1) overlap graph Ex: Any planar graph is (a,k) overlap for some a,k

Generalizing Lipton/Tarjan to higher dimensions Theorem (Miller, Teng, Thurston, Vavasis, 1993): Let G=(N,E) be an (a,k) overlap graph in d dimensions with n=|N|. Then there is a vertex separator Ns such that N = N1 U Ns U N2 and N1 and N2 each has at most n*(d+1)/(d+2) nodes Ns has at most O(a * k1/d * n(d-1)/d ) nodes When d=2, same as Lipton/Tarjan Algorithm: Choose a sphere S in Rd Edges that S “cuts” form edge separator Es Build Ns from Es Choose “randomly”, so that it satisfies Theorem with high probability

Stereographic Projection Stereographic projection from plane to sphere In d=2, draw line from p to North Pole, projection p’ of p is where the line and sphere intersect Similar in higher dimensions

Choosing a Random Sphere Do stereographic projection from Rd to sphere in Rd+1 Find centerpoint of projected points Any plane through centerpoint divides points ~evenly There is a linear programming algorithm, cheaper heuristics Conformally map points on sphere Rotate points around origin so centerpoint at (0,…0,r) for some r Dilate points (unproject, multiply by sqrt((1-r)/(1+r)), project) this maps centerpoint to origin (0,…,0) Pick a random plane through origin Intersection of plane and sphere is circle Unproject circle yields desired circle C in Rd Create Ns: j belongs to Ns if a*Dj intersects C

Partitioning with Nodal Coordinates - Summary Algorithms are efficient Rely on graphs having nodes connected (mostly) to “nearest neighbors” in space Common when graph arises from physical model Can have difficulty when mesh “graded” much denser in some places than others