1 Finding the smallest H-subgraph in real weighted graphs and related problems Raphael Yuster University of Haifa Joint work with: Virginia Vassilevska,

Slides:



Advertisements
Similar presentations
1 Introduction to Algorithms 6.046J/18.401J/SMA5503 Lecture 19 Prof. Erik Demaine.
Advertisements

Algorithms (and Datastructures) Lecture 3 MAS 714 part 2 Hartmut Klauck.
1 Efficient algorithms on sets of permutations, dominance, and real-weighted APSP Raphael Yuster University of Haifa.
On the Density of a Graph and its Blowup Raphael Yuster Joint work with Asaf Shapira.
Presented by Yuval Shimron Course
Lecture 17 Path Algebra Matrix multiplication of adjacency matrices of directed graphs give important information about the graphs. Manipulating these.
 2004 SDU Lecture11- All-pairs shortest paths. Dynamic programming Comparing to divide-and-conquer 1.Both partition the problem into sub-problems 2.Divide-and-conquer.
Matrix sparsification (for rank and determinant computations) Raphael Yuster University of Haifa.
The number of edge-disjoint transitive triples in a tournament.
Fast FAST By Noga Alon, Daniel Lokshtanov And Saket Saurabh Presentation by Gil Einziger.
1 Reduction between Transitive Closure & Boolean Matrix Multiplication Presented by Rotem Mairon.
Computability and Complexity 23-1 Computability and Complexity Andrei Bulatov Search and Optimization.
Complexity 15-1 Complexity Andrei Bulatov Hierarchy Theorem.
Algorithm Design Strategy Divide and Conquer. More examples of Divide and Conquer  Review of Divide & Conquer Concept  More examples  Finding closest.
Applied Discrete Mathematics Week 12: Trees
All Pairs Shortest Paths and Floyd-Warshall Algorithm CLRS 25.2
Dynamic Programming Reading Material: Chapter 7..
Shortest Paths Definitions Single Source Algorithms –Bellman Ford –DAG shortest path algorithm –Dijkstra All Pairs Algorithms –Using Single Source Algorithms.
1 Fast Sparse Matrix Multiplication Raphael Yuster Haifa University (Oranim) Uri Zwick Tel Aviv University ESA 2004.
1 Finding cycles using rectangular matrix multiplication and dynamic programming Raphael Yuster Haifa Univ. - Oranim Uri Zwick Tel Aviv University Uri.
NP-Complete Problems Reading Material: Chapter 10 Sections 1, 2, 3, and 4 only.
Greedy Algorithms Reading Material: Chapter 8 (Except Section 8.5)
1 Shira Zucker Ben-Gurion University of the Negev Advisors: Prof. Daniel Berend Prof. Ephraim Korach Anticoloring for Toroidal Grids.
Shortest Paths Definitions Single Source Algorithms
1 Separator Theorems for Planar Graphs Presented by Shira Zucker.
9-1 Chapter 9 Approximation Algorithms. 9-2 Approximation algorithm Up to now, the best algorithm for solving an NP-complete problem requires exponential.
Greedy Algorithms Like dynamic programming algorithms, greedy algorithms are usually designed to solve optimization problems Unlike dynamic programming.
TECH Computer Science Graph Optimization Problems and Greedy Algorithms Greedy Algorithms  // Make the best choice now! Optimization Problems  Minimizing.
Randomized Algorithms Morteza ZadiMoghaddam Amin Sayedi.
Minimal Spanning Trees What is a minimal spanning tree (MST) and how to find one.
Minimum Spanning Trees
1 A fast algorithm for Maximum Subset Matching Noga Alon & Raphael Yuster.
5.4 Shortest-path problem  Let G=(V,E,w) be a weighted connected simple graph, w is a function from edges set E to position real numbers set. We denoted.
All-Pairs Bottleneck Paths in Vertex Weighted graphs Asaf Shapira Microsoft Research Raphael Yuster University of Haifa Uri Zwick Tel-Aviv University.
Chapter 5 Dynamic Programming 2001 년 5 월 24 일 충북대학교 알고리즘연구실.
Chapter 2 Graph Algorithms.
1 Introduction to Approximation Algorithms. 2 NP-completeness Do your best then.
Trees and Distance. 2.1 Basic properties Acyclic : a graph with no cycle Forest : acyclic graph Tree : connected acyclic graph Leaf : a vertex of degree.
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.
Edge-disjoint induced subgraphs with given minimum degree Raphael Yuster 2012.
Distance sensitivity oracles in weighted directed graphs Raphael Yuster University of Haifa Joint work with Oren Weimann Weizmann inst.
Greedy Algorithms and Matroids Andreas Klappenecker.
1 The number of orientations having no fixed tournament Noga Alon Raphael Yuster.
1 Rainbow Decompositions Raphael Yuster University of Haifa Proc. Amer. Math. Soc. (2008), to appear.
Slide Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley.
1 The Floyd-Warshall Algorithm Andreas Klappenecker.
All-pairs Shortest Paths. p2. The structure of a shortest path: All subpaths of a shortest path are shortest paths. p : a shortest path from vertex i.
Lectures on Greedy Algorithms and Dynamic Programming
The all-pairs shortest path problem (APSP) input: a directed graph G = (V, E) with edge weights goal: find a minimum weight (shortest) path between every.
CSE 589 Part VI. Reading Skiena, Sections 5.5 and 6.8 CLR, chapter 37.
Chapter 10 Graph Theory Eulerian Cycle and the property of graph theory 10.3 The important property of graph theory and its representation 10.4.
1 Decomposition into bipartite graphs with minimum degree 1. Raphael Yuster.
Yuval Peled, HUJI Joint work with Nati Linial, Benny Sudakov, Hao Huang and Humberto Naves.
Generating a d-dimensional linear subspace efficiently Raphael Yuster SODA’10.
Chapter 7 Dynamic Programming 7.1 Introduction 7.2 The Longest Common Subsequence Problem 7.3 Matrix Chain Multiplication 7.4 The dynamic Programming Paradigm.
Finding a Heaviest Triangle is not Harder than Matrix Multiplication Artur Czumaj & Andrzej Lingas.
NOTE: To change the image on this slide, select the picture and delete it. Then click the Pictures icon in the placeholder to insert your own image. Fast.
 Hamilton paths.  Definition 20: A Hamilton paths is a path that contains each vertex exactly once. A Hamilton circuit is a circuit that contains.
Proof of correctness of Dijkstra’s algorithm: Basically, we need to prove two claims. (1)Let S be the set of vertices for which the shortest path from.
Section Recursion 2  Recursion – defining an object (or function, algorithm, etc.) in terms of itself.  Recursion can be used to define sequences.
Trees.
ICS 353: Design and Analysis of Algorithms NP-Complete Problems King Fahd University of Petroleum & Minerals Information & Computer Science Department.
COMP 6/4030 ALGORITHMS Prim’s Theorem 10/26/2000.
ICS 353: Design and Analysis of Algorithms
Enumerating Distances Using Spanners of Bounded Degree
Chapter 23 Minimum Spanning Tree
Raphael Yuster Haifa University Uri Zwick Tel Aviv University
All pairs shortest path problem
Directed Graphs (Part II)
Integer and fractional packing of graph families
Presentation transcript:

1 Finding the smallest H-subgraph in real weighted graphs and related problems Raphael Yuster University of Haifa Joint work with: Virginia Vassilevska, Ryan Williams CMU

2 The min H-subgraph problem Input: A vertex-weighted graph G=(V,E), where |E|=m and |V|=n. Output: An (induced) H-subgraph with minimum total weight, if exists. 2/3 1/2 3/4 1/3 1/2 H = K 3 real vertex weights Similarly define the edge-weighted version.

3 The min H-subgraph problem We work in the addition-comparison model. All results apply to directed graphs as well. The naïve algorithm solves the min H-subgraph problem in O(n h ) time. The goal: reduce the exponent (problem is conjectured to be not fixed parameter tractable already in the unweighted case). Case h=3 (triangles) studied in [VW – STOC06] who gave the first sub-cubic algorithm.

4 Results – the vertex weighted case For fixed H with h vertices, a minimum weight (induced) H-subgraph can be found in O(n t(ω,h) ) time. ω < [Coppersmith-Winograd ’90] is the exponent of fast square matrix multiplication (possibly ω = 2+o n (1) someday). The exponent t(ω,h) in our theorem is obtained by solving a small integer program.

5 t(ω,h) : definition t(ω,h) → 3h/(6-ω)≤ 0.828h

6 ht(ω,h)t(ω,h)unweightedω=2.376 ω=2.376 unweighted 32+1/(4-ω)ω ω ω /(4-ω)2ω2ω /(4-ω)2ω ω ω+33ω3ω /(4-ω)3ω ω+2 6+5/(4-ω) (ω=2) 3ω (ω=2) (ω=2) Improves (ω+3)/2 VW-STOC06

7 Proof – the vertex weighted case Assume H=K h G=(V,E)V={1,2,…,n} w: V → R For a positive integer t let S t be the set of all t-subsets of V sorted by their total weight. |S t | < n t and can be sorted in O(n t log n) time. Suppose h=a+b+c where a,b,c are positive integers. Create two 0-1 matrices M 1 =M 1 (G,a,b) M 2 =M 2 (G,b,c)

8 Proof – the vertex weighted case The matrix M 1 SaSa S b (sorted) X Y 1: X U Y = K a+b 0: otherwise

9 Proof – the vertex weighted case The matrix M 2 S b (sorted) ScSc Y Z 1: Y U Z = K b+c 0: otherwise

10 Proof – the vertex weighted case Compute M 3 =M 1 M 2 Suppose (i) M 3 (X,Z) > 0 (ii) X U Z induces a K a+c  Y  S b so that M 1 (X,Y)=1 M 2 (Y,Z)=1 hence X U Y U Z is a K h Y is called a witness for the pair (X,Z). If Y is the minimal witness in the sorted S b then w(X)+w(Y)+w(Z) is the weight of the smallest K h containing X U Z.

11 Proof – the vertex weighted case Let W be the minimal witness matrix of the product of two 0-1 matrices C=AB. W[i,j]= 0 : C[i,j]=0 k : A[i,k]=B[k,j]=1, A[i.k’]B[k’,j]=0 k’<k Computing W for dimensions n 1,n 2,n 3 denoted f(n 1,n 2,n 3 ) Need to prove: min a+b+c=h f(n a,n b,n c ) = O(n t(ω,h) )

12 Computing minimal witnesses Computing a matrix of witnesses can be done in essentially the same time needed to perform the product ([Seidel ’95], [Alon+Naor ’96]). Problem: Gives no clue on the minimum witness. [Kowaluk and Lingas ’05] f(n,n,n) = O(n 2+1/(4-ω) ) They considered a different problem: computing all pairs lca in a dag This already gives the case t(ω,3)=2+1/(4-ω) We need to extend their result to other dimensions and optimize upon the choices of a,b,c.

13 nana … nbnb nbnb nμnμ nμnμ ncnc nμnμ nμnμ... A1A1 ApAp B1B1 BpBp …... a+b+c=h 0< μ≤b μ split C i = A i B i i=1,…p C=AB= ∑C i

14 Let r be the smallest index for which C r [i,j]>0 If r does not exist then W[i,j]=0. Otherwise let k be the smallest index for which A r [i,k]=B r [k,j]=1. W[i,j] = (r-1)n μ +k. Computing W[i,j]

15 Computing W Computing a single witness: O(p+n μ ) Computing all witnesses: O(n a+c (p +n μ )) Computing a single C i : O(n a-μ n c-μ n ω μ ) Computing all C i : O(p(n a-μ n c-μ n ω μ )) Overall running time O(n a+c (p+n μ ) + p(n a+c+(ω-2)μ )) = O(n h-(3- ω) μ +n h-b+μ )

16 Computing W For h=3 take a=1 b=1 c=1 μ=1/(4-ω) For h=4 takea=1 b=2 c=1 μ=1 For h=5 takea=2 b=2 c=1 μ=1 For h=7 takea=2 b=3 c=2μ=3/(4-ω) For h=9 takea=3 b=4 c=2 μ=2

17 Additional features Number of comparisons is pretty small: h=3n log n + m h=4n 2 log n + m h=5n 2 log n + mn h=6n 2 log n + m 2 Can solve the decision problem: Given a real interval I  R is there an (induced) H-subgraph whose weight is within I ? Use binary search within the matrices C 1, …,C p Running time increases only by log n factor.

18 Additional features Can find smallest K 2,k in O(n 2+1/(4-ω) ) < O(n ) time. Result is meaningful also when the weights are large integers: β(G,H) the H edge-covering number maximum number of edges incident with H-subgraph β(G,K 3 )=

19 Sparse graphs A triangle can be found in O(m 2ω/(ω+1) ) < O(m 1.41 ) time [Alon+Y+Zwick ’97] Let Δ be a parameter. Vertices in Y having degree > Δ. |Y| < 2m/Δ Triangles with vertex in V-Y examined in O(mΔ) time. Smallest triangle inside Y found in O(|Y| 2+1/(4-ω) ) time. Overall: O(mΔ+(m/Δ) 2+1/(4-ω) ) Optimizing on Δ: O(m (18-4ω)/(13-3ω) ) < O(m 1.45 ) Finding the smallest weighted triangle

20 Edge weighted graphs H has k vertices. Color V(G) with k colors, randomly. Colorful H sometimes easier to find. Probability of being colorful: k!/k k > e -k Can be derandomized. The color coding method [Alon+Y+Zwick ’95]

21 Edge weighted graphs A and B two compatible matrices in R U ∞ The distance product D=A  B defined by D[i,j] = min k A[i,k]+B[k,j] If A and B are square matrices of order n, then D can be computed in O(n 3 ) time. [Chan ’05] Only O(n 3 /log n) time needed! Consequence: Min H-subgraph in O(n k /log n) time. Distance products

22 Edge weighted graphs A minimum weight k-cycle can be found, w.h.p., in 2 O(k) n 3 /log n time. For k=o(log log n) this is sub-cubic. For each pair u,v find the shortest colorful path of length k-1 connecting them in 2 O(k) n 3 /log n time. Assume k is a power of 2 (we use recursion). Let C 1 be a set of k/2 colors. C 2 = C-C 1. V i – the vertices colored with a color from C i. G i – the subgraph induced by V i.

23 Edge weighted graphs Recursively find, for each pair in V i, a colorful path in G i of length k/2-1. Record the results in matrices A 1 and A 2. B – the matrix with rows indexed by V 1 and columns indexed by V 2. B[u,v]=w(u,v). The distance product D C1,C2 =A 1  B  A 2 gives for each pair of vertices, the shortest colorful path of length k-1 where the first k/2 vertices are colored from C 1 and the last k/2 vertices are colored from C 2.

24 Edge weighted graphs By considering all choices for (C 1,C 2 ) (less than 2 k choices) we obtain an n  n matrix D where D[u,v] is the shortest colorful path of length k-1 between u and v. The number of distance products using this approach satisfies t(k) ≤ 2 k t(k/2). Thus, t(k) = 2 O(k). Each product costs O(n 3 /log n).

25 Chromatic subgraphs G=(V,E) an edge-colored graph (number of colors is arbitrary). We consider The monochromatic H-subgraph problem The rainbow H-subgraph problem Both problems are not easier than the (uncolored) H-subgraph existence problem. Are they also not harder?

26 Rainbow subgraphs We use color reduction. Suppose H has t edges. f : C → {1,2,…,t}. We now have only t colors. A rainbow H now is also originally rainbow. f random – an original rainbow H will remain rainbow after reduction with probability t!/t t. Do this 2 O(t) times and it will happen w.h.p. at least once. Can be derandomized. Cost is only O(log n) factor.

27 Rainbow subgraphs When we have only t colors, same algorithm for the uncolored version can be used to detect a monochromatic H. Example K 6

28 Monochromatic subgraphs For any connected fixed graph H with 3k+j vertices (j=0,1,2), a monochromatic H can be detected in O(n ωk+j ), except of H=K 3. Example K 6 Running time identical to (uncolored) detection. Triangles can be found only in O(n (3+ ω )/2 ) < o(n ).