DOC PREVIEW
Berkeley COMPSCI C267 - Lecture 18: Graph Partitioning – Part I

This preview shows page 1-2-3-20-21-40-41-42 out of 42 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 42 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 42 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 42 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 42 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 42 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 42 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 42 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 42 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 42 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

CS 267: Applications of Parallel Computers Lecture 18: Graph Partitioning – Part IOutline of Graph Partitioning LecturesDefinition of Graph PartitioningApplicationsSparse Matrix Vector MultiplicationCost of Graph PartitioningFirst Heuristic: Repeated Graph BisectionOverview of Bisection HeuristicsEdge Separators vs. Vertex SeparatorsNodal Coordinates: How Well Can We Do?Nodal Coordinates: Inertial PartitioningInertial Partitioning: Choosing LInertial Partitioning: choosing L (continued)Nodal Coordinates: Random SpheresRandom Spheres: Well Shaped GraphsGeneralizing Lipton/Tarjan to Higher DimensionsStereographic ProjectionChoosing a Random SphereRandom Sphere Algorithm (Gilbert)Nodal Coordinates: SummaryCoordinate-Free: Breadth First Search (BFS)Breadth First SearchPartitioning via Breadth First SearchCoordinate-Free: Kernighan/LinKernighan/Lin: Preliminary DefinitionsKernighan/Lin AlgorithmComments on Kernighan/Lin AlgorithmCoordinate-Free: Spectral BisectionMotivation for Spectral BisectionBasic DefinitionsExample of In(G) and L(G) for Simple MeshesProperties of Incidence and Laplacian matricesSpectral Bisection AlgorithmMotivation for Spectral Bisection (recap)Details for Vibrating String AnalogyDetails for Vibrating String (continued)A “vibrating string” for L(1D mesh)Eigenvectors of L(1D mesh)2nd eigenvector of L(planar mesh)4th eigenvector of L(planar mesh)Computing v2 and l2 of L(G) using LanczosReferences01/14/19 CS267, Yelick 1CS 267: Applications of Parallel ComputersLecture 18:Graph Partitioning – Part IKathy Yelickhttp://www-inst.eecs.berkeley.edu/~cs26701/14/19 CS267, YelickOutline of Graph Partitioning Lectures•Review definition of Graph Partitioning problem•Overview of heuristics•Partitioning with Nodal Coordinates•Planar graphs•How well can graphs be partitioned in theory?•Graphs in higher dimensions•Partitioning without Nodal Coordinates•Multilevel Acceleration•BIG IDEA, appears often in scientific computing•Comparison of Methods and Applications01/14/19 CS267, Yelick 3Definition 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 Bisection1 (2)2 (2) 3 (1)4 (3)5 (1)6 (2)7 (3)8 (1)546121212301/14/19 CS267, Yelick 4Applications•Telephone network design•Original application, algorithm due to Kernighan•Load Balancing while Minimizing Communication•Sparse Matrix times 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•Sparse Gaussian Elimination•Used to reorder rows and columns to increase parallelism, decrease “fill-in”•Data mining and clustering•Physical Mapping of DNA01/14/19 CS267, Yelick 5Sparse Matrix Vector Multiplication01/14/19 CS267, Yelick 6Cost 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 heuristics01/14/19 CS267, Yelick 7First Heuristic: Repeated Graph Bisection•To partition N into 2k parts•bisect graph recursively k times•Henceforth discuss mostly graph bisection01/14/19 CS267, Yelick 8Overview of Bisection Heuristics•Partitioning with Nodal Coordinates•Each node has x,y,z coordinates  partition space•Partitioning without Nodal Coordinates•E.g., Sparse matrix of Web documents•A(j,k) = # times keyword j appears in URL k•Multilevel acceleration (BIG IDEA)•Approximate problem by “coarse graph”, do so recursively01/14/19 CS267, Yelick 9Edge Separators vs. Vertex Separators•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 convenientG = (N, E), Nodes N and Edges EEs = green edges or blue edgesNs = red vertices01/14/19 CS267, Yelick 10Nodal Coordinates: How Well Can We Do?•Consider a special case:•A graph with nodal coordinates•The graph is planar•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 algorithms01/14/19 CS267, Yelick 11Nodal 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 side1. Choose a line L through the pointsL given by a*(x-xbar)+b*(y-ybar)=0, with a2+b2=1; (a,b) is unit vector  to L 2. Project each point to the lineFor each nj = (xj,yj), compute coordinate Sj = -b*(xj-xbar) + a*(yj-ybar) along L3. Compute the medianLet Sbar = median(S1,…,Sn)4. Use median to partition the nodesLet nodes with Sj < Sbar be in N1, rest in N2 (a,b)L(xbar,ybar)01/14/19 CS267, Yelick 12Inertial 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 nameLLN1 N2N1N201/14/19 CS267, Yelick 13Inertial Partitioning: choosing L (continued)j (length of j-th


View Full Document

Berkeley COMPSCI C267 - Lecture 18: Graph Partitioning – Part I

Documents in this Course
Lecture 4

Lecture 4

52 pages

Split-C

Split-C

5 pages

Lecture 5

Lecture 5

40 pages

Load more
Download Lecture 18: Graph Partitioning – Part I
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lecture 18: Graph Partitioning – Part I and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lecture 18: Graph Partitioning – Part I 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?