Abhiram Ranade IIT Bombay

Slides:



Advertisements
Similar presentations
Approximation algorithms for geometric intersection graphs.
Advertisements

Shortest Vector In A Lattice is NP-Hard to approximate
Planar graphs Algorithms and Networks. Planar graphs2 Can be drawn on the plane without crossings Plane graph: planar graph, given together with an embedding.
C&O 355 Lecture 23 N. Harvey TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A A A A A A A A A.
Lecture 24 Coping with NPC and Unsolvable problems. When a problem is unsolvable, that's generally very bad news: it means there is no general algorithm.
Compact and Low Delay Routing Labeling Scheme for Unit Disk Graphs Chenyu Yan, Yang Xiang, and Feodor F. Dragan (WADS 2009) Kent State University, Kent,
The Theory of NP-Completeness
1 NP-Complete Problems. 2 We discuss some hard problems:  how hard? (computational complexity)  what makes them hard?  any solutions? Definitions 
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.
S. J. Shyu Chap. 1 Introduction 1 The Design and Analysis of Algorithms Chapter 1 Introduction S. J. Shyu.
Parallel Scheduling of Complex DAGs under Uncertainty Grzegorz Malewicz.
A polylogarithmic approximation of the minimum bisection Robert Krauthgamer The Hebrew University Joint work with Uri Feige.
Precedence Constrained Scheduling Abhiram Ranade Dept. of CSE IIT Bombay.
CS774. Markov Random Field : Theory and Application Lecture 17 Kyomin Jung KAIST Nov
Semi-Definite Algorithm for Max-CUT Ran Berenfeld May 10,2005.
Optimization of Pearl’s Method of Conditioning and Greedy-Like Approximation Algorithm for the Vertex Feedback Set Problem Authors: Ann Becker and Dan.
Precedence Constrained Scheduling Abhiram Ranade Dept. of CSE IIT Bombay.
1 Lecture 8: Voronoi Diagram Computational Geometry Prof. Dr. Th. Ottmann Voronoi Diagrams Definition Characteristics Size and Storage Construction Use.
Approximation Algoirthms: Semidefinite Programming Lecture 19: Mar 22.
Graph Clustering. Why graph clustering is useful? Distance matrices are graphs  as useful as any other clustering Identification of communities in social.
Balanced Graph Partitioning Konstantin Andreev Harald Räcke.
Semidefinite Programming
1 Optimization problems such as MAXSAT, MIN NODE COVER, MAX INDEPENDENT SET, MAX CLIQUE, MIN SET COVER, TSP, KNAPSACK, BINPACKING do not have a polynomial.
Randomized Algorithms and Randomized Rounding Lecture 21: April 13 G n 2 leaves
Vertex Cover, Dominating set, Clique, Independent set
2-Layer Crossing Minimisation Johan van Rooij. Overview Problem definitions NP-Hardness proof Heuristics & Performance Practical Computation One layer:
Study Group Randomized Algorithms Jun 7, 2003 Jun 14, 2003.
Lecture 20: April 12 Introduction to Randomized Algorithms and the Probabilistic Method.
Undirected ST-Connectivity In Log Space
1 Introduction to Approximation Algorithms Lecture 15: Mar 5.
Finding a maximum independent set in a sparse random graph Uriel Feige and Eran Ofek.
Undirected ST-Connectivity In Log Space Omer Reingold Slides by Sharon Bruckner.
Packing Element-Disjoint Steiner Trees Mohammad R. Salavatipour Department of Computing Science University of Alberta Joint with Joseph Cheriyan Department.
Domain decomposition in parallel computing Ashok Srinivasan Florida State University COT 5410 – Spring 2004.
The Theory of NP-Completeness 1. Nondeterministic algorithms A nondeterminstic algorithm consists of phase 1: guessing phase 2: checking If the checking.
COMP 175: Computer Graphics March 24, 2015
1 Introduction to Approximation Algorithms. 2 NP-completeness Do your best then.
The Theory of NP-Completeness 1. What is NP-completeness? Consider the circuit satisfiability problem Difficult to answer the decision problem in polynomial.
The Best Algorithms are Randomized Algorithms N. Harvey C&O Dept TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A AAAA.
1 The Theory of NP-Completeness 2012/11/6 P: the class of problems which can be solved by a deterministic polynomial algorithm. NP : the class of decision.
Nattee Niparnan. Easy & Hard Problem What is “difficulty” of problem? Difficult for computer scientist to derive algorithm for the problem? Difficult.
APPROXIMATION ALGORITHMS VERTEX COVER – MAX CUT PROBLEMS
1 Introduction to Approximation Algorithms. 2 NP-completeness Do your best then.
Edge-disjoint induced subgraphs with given minimum degree Raphael Yuster 2012.
TECH Computer Science NP-Complete Problems Problems  Abstract Problems  Decision Problem, Optimal value, Optimal solution  Encodings  //Data Structure.
Approximation Algorithms
Week 10Complexity of Algorithms1 Hard Computational Problems Some computational problems are hard Despite a numerous attempts we do not know any efficient.
1 The Theory of NP-Completeness 2 Cook ’ s Theorem (1971) Prof. Cook Toronto U. Receiving Turing Award (1982) Discussing difficult problems: worst case.
Graph Colouring L09: Oct 10. This Lecture Graph coloring is another important problem in graph theory. It also has many applications, including the famous.
CSE 589 Part VI. Reading Skiena, Sections 5.5 and 6.8 CLR, chapter 37.
NP-COMPLETE PROBLEMS. Admin  Two more assignments…  No office hours on tomorrow.
NP-Complete problems.
Data Structures and Algorithms in Parallel Computing Lecture 2.
CS 3343: Analysis of Algorithms Lecture 25: P and NP Some slides courtesy of Carola Wenk.
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.
Data Structures and Algorithms in Parallel Computing Lecture 7.
New algorithms for Disjoint Paths and Routing Problems
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.
1 Approximation algorithms Algorithms and Networks 2015/2016 Hans L. Bodlaender Johan M. M. van Rooij TexPoint fonts used in EMF. Read the TexPoint manual.
The Theory of NP-Completeness 1. Nondeterministic algorithms A nondeterminstic algorithm consists of phase 1: guessing phase 2: checking If the checking.
The geometric GMST problem with grid clustering Presented by 楊劭文, 游岳齊, 吳郁君, 林信仲, 萬高維 Department of Computer Science and Information Engineering, National.
1 The Theory of NP-Completeness 2 Review: Finding lower bound by problem transformation Problem X reduces to problem Y (X  Y ) iff X can be solved by.
The NP class. NP-completeness Lecture2. The NP-class The NP class is a class that contains all the problems that can be decided by a Non-Deterministic.
CS 140: Sparse Matrix-Vector Multiplication and Graph Partitioning
Approximation algorithms
Algorithms and Networks
Spectral partitioning works: Planar graphs and finite element meshes
James Demmel CS 267 Applications of Parallel Computers Lecture 14: Graph Partitioning - I James Demmel.
Presentation transcript:

Abhiram Ranade IIT Bombay Graph Partitioning Abhiram Ranade IIT Bombay

A load balancing problem Input: undirected graph G. Vertices = processes. Edges = interprocess communication. integer k = number of available processors. Output: Assign processes to processors , 4

A load balancing problem Input: undirected graph G. Vertices = processes. Edges = interprocess communication. integer k = number of available processors. Output: Assign processes to processors Give equal number of processes to each processor. Minimize actual communication , 4

The graph partitioning problem Input: undirected graph G, integer k Output: Partition into subgraphs G1, G2, …, Gk with equal number of vertices, by removing minimum number of edges. , 2 , 3

The graph partitioning problem Input: undirected graph G, integer k Output: Partition into subgraphs G1, G2, …, Gk with equal number of vertices, by removing minimum number of edges. , 2 , 3

Other motivations Divide and conquer algorithms on graphs. Partition into balanced subgraphs. Recurse on subgraphs. Cost of combine step : high if large number of edges between subgraphs. Identify bottlenecks in graph for purpose of fault tolerance etc. Nice connections to geomtry.

Rest of this talk: k=2, i.e. Graph bisection

Outline Basic results Partitioning special classes of graphs Planar graphs FEM (finite element method) graphs Partitioning arbitrary graphs Spectral Methods More advanced methods Heuristics

Some basic results NP-hard even for k=2. Reduction from MAX-CUT. Polytime algorithm known for trees Moderately hard exercise. Dynamic programming Other graph classes: next Approximation algorithm: O(log1.5n) factor known. intro to some of the ideas: later

Planar graphs NP-complete? Not known. Lipton-Tarjan Planar Separator Algorithm: Any planar graph with n vertices can be bisected by removing O(√n) vertices and incident edges. O(√n) edges for bounded degree graphs. Algorithm may give O(√n) separator even if smaller exists. Optimal for “Natural planar graphs” which cannot be bisected without removing Ω(√n) vertices.

Planar separator theorem Every planar graph can be bisected by removing O(√n) vertices. Lipton-Tarjan proof: uses clever breadth first search. Today: Alternate proof Elegant connection to geometry. Extends to other geometrically embedded graphs, e.g. FEM graphs.

Representing planar graphs by “kissing” disks http://isabelandbenson.wordpress.com/2012/02/12/a-planar-separation-proof-using-koebes-theorem/

Circle packing theorem Theorem [Koebe 1936] For every planar graph with n vertices, there exist disjoint circles c1, c2, …, cn such that ci and cj are tangential iff vi, vj are connected by an edge. …Kissing disk embedding

Circle packing example (Wikipedia)

Algorithm to find a Planar Separator Get a kissing disk embedding. Stereographically project it onto a sphere. Find “center point” of disk centers. Adjust so that center point moves to sphere center Separator = random great circle through center. Theorem: Each hemisphere has θ(n) vertices. Expected number of edges cut = O(√n).

Remark Algorithm may not produce exact bisection, but say, ¼, ¾ split of vertices. Repeat on larger partition if balance not achieved. ¾ splits into 9/16, 3/16 Combine ¼ + 3/16 = 7/16. Now we have better balance: 7/16, 9/16. Repeating log times suffices. Number of edges cut increase only by constant factor.

Stereographic projection Input: Disk embedding on horizontal plane. Place a sphere on the plane. Point P’ on plane mapped to P on sphere such that PP’ passes through North Pole. Circles map to circles! (Wikipedia)

Algorithm to find a Planar Separator Get a kissing disk embedding. ✓ Stereographically project it onto a sphere. ✓ Find “center point” of disk centers. Adjust so that center point moves to sphere center Separator = random great circle through center.

Centerpoint C of n points C = point such that any plane through it has at least n/4 points on both sides. Centerpoints exist, and may not be unique. Approximate centerpoints are easily found. Will guarantee at least n/Q points on both sides, where Q maybe > 4.

Algorithm to find a Planar Separator Get a kissing disk embedding. ✓ Stereographically project it onto a sphere. ✓ Find “center point” of disk centers. ✓ Adjust so that center point moves to sphere center Separator = random great circle through center.

Adjusting the centerpoint Centerpoint shown in red. Project back onto inclined plane. Use a bigger sphere having same point of contact. How does red point move?

Where are we? We have a sphere with a disk on it for each vertex. Disks touch if corresponding vertices have an edge. Center of sphere = centerpoint of vertices. What will happen if we partition using some great circle? Centerpoint: θ(n) vertices will be on each side Will too many disks intersect with great circle?

How many disks intersect with a random great circle? Pick a random great circle = pick a random point as its north pole. Probability = Band area/sphere area = 2r*2πR/4πR2 = r/R disk of radius r R = sphere radius Band in which north pole should lie to intersect with disk.

Expected number of intersections E = r1/R + r2/R + … rn/R We know: πr12 + πr22 + … + πrn2 ≤ 4πR2 E is maximized when all ri are equal, ri ≤ 2R/√n E ≤ n * (2R/√n)/R = 2√n Plane has at least n/4 vertices on each side By removing incident edges on √n vertices we get ¼ - ¾ partition of vertices. Clearly such a partition exists! QED!

Remarks Nice connection between graph theory and geometry. Great circle when projected back, becomes a circle on the graph. “Circle separator” Do we need circles? Can we hope to get good partitions using a straight line? There exist graphs for which this is not possible. In practice, Lipton-Tarjan’s original algorithm will be faster than above algorithm.

Finite Element Method (FEM) Graphs http://www.geuz.org/gmsh/gallery/bike.png

FEM Graphs 3 dimensional object represented by collection of volumes, “elements” Element size: Small where physical properties vary a lot. Large where physical properties vary less. “Aspect ratio” of elements is small, i.e. elements are not flat/narrow. Useful for to reduce floating point overflow..

FEM Graphs continued Effectively we have a “kissing disk” embedding of elements in 3 dimensional space. Theorem[Miller-Thurston 1990] A 3d FEM mesh with n elements of small aspect ratio can be bisected by removing O(n2/3) edges. Partitioning FEM graphs is useful for load balancing on parallel computers.

Partitioning General Graphs Don’t insist on bisection. Sparsity = |C|/|S| Cut ratio = |C|/(|S||V-S|) Sparsity/C.Ratio ≈ |V| We study algorithms that attempt to find cuts of minimum ratio. We can get bisection by repeating if necessary. V - S S C

Strategy Our optimization problem is expressed in the language of graphs. Pose it as a problem on integer variables. NP-complete. Find a similar problem on real variables that can be solved in polynomial time. Exploiting the symmetry, get back an integer solution. Hope: it is close to the optimal.

Algebraic definition of cut ratio x = bit vector. xi = 1 iff ith vertex is in S. No. of crossing edges: |S||V-S| = Want to minimize S V-S 1 3 4 2

General Algorithmic Strategy: Relaxation Problem 1: minimize 3x2 - 5x, x is an integer. Problem 2: minimize 3x2 - 5x, x is real. - Easier to solve, make derivative = 0 etc. - min(Problem 1) ≥ min(Problem 2) Problem 2 = Relaxation of problem 1 Strategy to solve problem 1: solve problem 2 and then take a nearby solution. Minimizing cut ratio: similar idea..

Relaxation to “solve” for cut ratio Want to find Allow real values Suppose we can solve for x. We will “round” solution high = 1. Low = 0. Insist that xi add to 1

contd. Lij = -1 if (i,j) is an edge, = degree(i) if i=j, =0 otherwise L = “Laplacian of the graph” σ2 is second smallest “Eigenvalue of L” Can be calculated quickly. minimizing x can also be calculated.

Algorithm for finding good ratio cut Construct Laplacian matrix Find second smallest eigenvector Choose threshold t. Partition = {i | xi ≤ t}, {i | xi > t} How to choose t? Try all possible choices, and take one having best ratio. “Spectral Method” : eigenvectors involved.

How good is the partition Cheeger’s Theorem: Partition found by previous algorithm will have cut ratio at most Difficult proof Optimal partition will have cut ratio at least Just proved! Seems to work well in practice

Examples Cycle on n vertices: Spectral method finds optimal partition. Bounded degree planar graphs: Spectral method finds O(√n) sized bisector. Binary hypercube: Spectral methods will find cut of ratio √4logn / n, whereas opt ratio = 1/n

Remarks about intuition How did we steer the analysis towards the Laplacian? Experience Laplacian arises in solving differential equation, where second eigenvalue gives how graph may “vibrate”. Vibration mode points to cuts. Laplacian is related to SVD, singular value decomposition. SVD of a point cloud identifies length, breadth, width of cloud. Small cuts are perpendicular to length.

Advanced methods Starting point: Different ways to relax. If you relax too much, you may be able to solve the new problem more easily, but the solution will be too far. Arora-Rao-Vazirani 04 : stricter relaxation. Always give cut with ratio = O(√log n) times optimal.

Heuristics Graph coarsening [Metis 04]: Pick disjoint edges in graph. Merge endpoints of each edge into a single vertex. (fast) Repeat several times. Find partition for final “coarse” graph using sophisticated method. (slow, but on small graph) Final partition induces partition on original graph.

Concluding Remarks Important problem Many applications Many interesting methods. Theory + Heuristic. Deep connections to geometry.

Generalization of bisection We may need to cut many edges to bisect, but by cutting very few we may get ¼ - ¾ split. May be useful to know such “bottlenecks” Even for bisection, it might be easier to get one piece at a time

c-balanced partitioning For a fixed c, remove as few edges as possible to get subgraphs of size cn, (1-c)n. If c=O(1), we can use repeatedly to achieve bisection. Example: c = 0.1 After 1 application we have 0.1 – 0.9 split. Apply once more on 0.9 : 0.1, 0.09, 0.81 Apply log times on larger piece and extract n/2 vertices. Bisection!