Download presentation
Presentation is loading. Please wait.
Published byBrittney Malone Modified over 9 years ago
1
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
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
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
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. ω < 2.376 [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
5 t(ω,h) : definition t(ω,h) → 3h/(6-ω)≤ 0.828h
6
6 ht(ω,h)t(ω,h)unweightedω=2.376 ω=2.376 unweighted 32+1/(4-ω)ω2.6162.376 4ω+1 3.376 5ω+2 4.376 64+2/(4-ω)2ω2ω5.2324.752 74+3/(4-ω)2ω+15.8485.752 82ω+2 6.752 92ω+33ω3ω7.7527.128 106+4/(4-ω)3ω+18.4638.128 11 3ω+2 6+5/(4-ω) (ω=2) 3ω+2 9.128 8.5 (ω=2) 9.128 8 (ω=2) Improves (ω+3)/2 VW-STOC06
7
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
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
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
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
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
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
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
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
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
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
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
18 Additional features Can find smallest K 2,k in O(n 2+1/(4-ω) ) < O(n 2.616 ) 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 )=8 2 3 4 3 4 1 1
19
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
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
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
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
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
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
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
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
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
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 2.688 ).
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.