Upcoming SlideShare
×

# Lec 2-2

316 views

Published on

Published in: Technology
0 Likes
Statistics
Notes
• Full Name
Comment goes here.

Are you sure you want to Yes No
• Be the first to comment

• Be the first to like this

Views
Total views
316
On SlideShare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
3
0
Likes
0
Embeds 0
No embeds

No notes for slide

### Lec 2-2

1. 1. Sketching Graphs
2. 2. • Random linear projection M: Rn→Rk that preserves properties of any v∈Rn with high probability where k≪n. • Many Results: Estimating norms, entropy, support size, quantiles, heavy hitters, ﬁtting histograms and polynomials, ... • RichTheory: Related to compressed sensing and sparse recovery, dimensionality reduction and metric embeddings, ... Linear Sketches 0 B B B B B B B B @ v 1 C C C C C C C C A = 0 @Mv 1 A 0 @ M 1 A ! answer
3. 3. Sketching Graphs? ? Question: Are there sketches for structured objects like graphs? • Example: Project O(n2)-dimensional adjacency matrix AG to Õ(n) dimensions and still determine if graph is bipartite? ! No cheating! Assume M is ﬁnite precision etc. 0 @ M 1 A 0 B B B B B B B B @ AG 1 C C C C C C C C A = 0 @ MAG 1 A ! answer
4. 4. • In semi-streaming, want to process graph deﬁned by edges e1, ..., em with Õ(n) memory and reading sequence in order. • [Muthukrishnan 05; Feigenbaum, Kannan, McGregor, Suri, Zhang 05] • Dynamic Graphs: Work on graph streams doesn’t support edge deletions! Work on dynamic graphs stores entire graph! • Example: Connectivity is easy if edges are only inserted... • Sketches: To delete e from G: update MAG➝MAG-MAe=MAG-e 1 2 3 4 5 6 7 8 9 Why? Graph Streams
5. 5. G1=(V,E1) G2=(V,E2) G3=(V,E3) G4=(V,E4) Input: G=(V,E) Output: MG=MG1+MG2+MG3+MG4 MG1 MG2 MG3 MG4 Why? Distributed Processing
6. 6. a) Connectivity b) Applications a) Connectivity b) Applications
7. 7. Connectivity • Thm: Can check connectivity with O(nlog3 n)-size sketch. • Main Idea: a) Sketch! b) Run Algorithm in Sketch Space • Catch: Sketch must be homomorphic for algorithm operations. Original Graph Sketch Space AlgorithmAlgorithm ANSWER Sketch
8. 8. Algorithm (Spanning Forest): 1. For each node, select an incident edge 2.Contract selected edges. Repeat until no edges. Lemma: Takes O(log n) steps and selected edges include spanning forest. Ingredient 1: Basic Connectivity Algorithm
9. 9. For node i, let ai be vector indexed by node pairs. Non-zero entries: ai[i,j]=1 if j>i and ai[i,j]=-1 if j<i. Example: Lemma: For any subset of nodes S⊂V, Ingredient 2: Graph Representation 1 2 3 5 4 {1,2} {1,3} {1,4} {1,5} {2,3} {2,4} {2,5} {3,4} {3,5} {4,5} a1 = 1 1 0 0 0 0 0 0 0 0 a2 = 1 0 0 0 1 0 0 0 0 0 support X i2S ai ! = E(S, V S)
10. 10. Ingredient 3: l0-Sampling Lemma: Exists random C∈Rdxm with d=O(log2 m) such that for any a ∈ Rm with probability 9/10. [Cormode, Muthukrishnan, Rozenbaum 05; Jowhari, Saglam,Tardos 11] Ca ! e 2 support(a)
11. 11. Sketch: Apply log n sketches Ci to each aj Run Algorithm in Sketch Space: Use C1aj to get incident edge on each node j For i=2 to t: To get incident edge on supernode S⊂V use: Recipe: Sketch & Compute on Sketches ! e 2 support( X j2S aj ) = E(S, V S) X j2S Ci aj = Ci 0 @ X j2S aj 1 A
12. 12. • Thm: Can check connectivity with O(nlog3 n)-size sketch. • Main Idea: a) Sketch! b) Run Algorithm in Sketch-Space • Catch: Sketch must be homomorphic for algorithm operations. Connectivity Original Graph Sketch Space AlgorithmAlgorithm ANSWER Sketch
13. 13. a) Connectivity b) Applications a) Connectivity b) Applications
14. 14. k-Connectivity • A graph is k-connected if every cut has size ≥ k. • Thm: Can check k-connectivity with O(nklog3 n)-size sketch. • Extension: There exists a O(ε-2nlog5 n)-size sketch with which we can approximate all cuts up to a factor (1+ε). Original Graph Sparsiﬁer Graph
15. 15. Algorithm (k-Connectivity): 1. Let F1 be spanning forest of G(V,E) 2.For i=2 to k: 2.1. Let Fi be spanning forest of G(V,E-F1-...-Fi-1) Lemma: G(V,F1+...+Fk) is k-connected iff G(V,E) is. Ingredient 1: Basic Algorithm
16. 16. Ingredient 2: Connectivity Sketches Sketch: Simultaneously construct k independent sketches {M1AG, M2AG, ... MkAG} for connectivity. Run Algorithm in Sketch Space: Use M1AG, to ﬁnd a spanning forest F1 of G Use M2AG-M2AF1=M2(AG-AF1)=M2(AG-F1) to ﬁnd F2 Use M3AG-M3AF1-M3AF2=M3(AG-F1-F2) to ﬁnd F3 etc.
17. 17. k-Connectivity • A graph is k-connected if every cut has size ≥ k. • Thm: Can check k-connectivity with O(nklog3 n)-size sketch. • Extension: There exists a O(ε-2nlog4 n)-size sketch with which we can approximate all cuts up to a factor (1+ε). Original Graph Sparsiﬁer Graph
18. 18. Bipartiteness • Idea: Given G, deﬁne graph G’ where a node v becomes v1 and v2 and edge (u,v) becomes (u1,v2) and (u2,v1). • Lemma: Number of connected components doubles iff G is bipartite. Can sketch G’ implicitly. • Thm: Can check bipartiteness with O(nlog3 n)-size sketch.
19. 19. Minimum Spanning Tree • Idea: If ni is the number of connected components if we ignore edges with weight greater than (1+ε)i, then: • Thm: Can (1+ε) approximate MST in one-pass dynamic semi-streaming model. • Thm: Can ﬁnd exact MST in dynamic semi-streaming model using O(log n/log log n) passes. w(MST)  X i ✏(1 + ✏)i ni  (1 + ✏)w(MST)
20. 20. Summary • Graph Sketches: Initiates the study of linear projections that preserve structural properties of graphs.Application to dynamic-graph streams and are embarrassingly parallelizable. • Properties: Connectivity, sparsiﬁers, spanners, bipartite, minimum spanning trees, small cliques, matchings, ...