SlideShare ist ein Scribd-Unternehmen logo
1 von 21
Downloaden Sie, um offline zu lesen
Sketching Graphs
• 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, fitting 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
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 finite 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
• In semi-streaming, want to process graph defined 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
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
a) Connectivity
b) Applications
a) Connectivity
b) Applications
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
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
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)
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)
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
• 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
a) Connectivity
b) Applications
a) Connectivity
b) Applications
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 Sparsifier Graph
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
Ingredient 2: Connectivity Sketches
Sketch: Simultaneously construct k independent
sketches {M1AG, M2AG, ... MkAG} for connectivity.
Run Algorithm in Sketch Space:
Use M1AG, to find a spanning forest F1 of G
Use M2AG-M2AF1=M2(AG-AF1)=M2(AG-F1) to find F2
Use M3AG-M3AF1-M3AF2=M3(AG-F1-F2) to find F3
etc.
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 Sparsifier Graph
Bipartiteness
• Idea: Given G, define 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.
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 find 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)
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, sparsifiers, spanners, bipartite,
minimum spanning trees, small cliques, matchings, ...
Lec 2-2

Weitere ähnliche Inhalte

Was ist angesagt?

Minimal spanning tree class 15
Minimal spanning tree class 15Minimal spanning tree class 15
Minimal spanning tree class 15
Kumar
 

Was ist angesagt? (20)

Minimal spanning tree class 15
Minimal spanning tree class 15Minimal spanning tree class 15
Minimal spanning tree class 15
 
APPLICATION OF NUMERICAL METHODS IN SMALL SIZE
APPLICATION OF NUMERICAL METHODS IN SMALL SIZEAPPLICATION OF NUMERICAL METHODS IN SMALL SIZE
APPLICATION OF NUMERICAL METHODS IN SMALL SIZE
 
Approximation algorithms
Approximation algorithmsApproximation algorithms
Approximation algorithms
 
Aplicaciones de la derivada
Aplicaciones de la derivadaAplicaciones de la derivada
Aplicaciones de la derivada
 
Dijkstra algorithm a dynammic programming approach
Dijkstra algorithm   a dynammic programming approachDijkstra algorithm   a dynammic programming approach
Dijkstra algorithm a dynammic programming approach
 
Graph Summarization with Quality Guarantees
Graph Summarization with Quality GuaranteesGraph Summarization with Quality Guarantees
Graph Summarization with Quality Guarantees
 
Aplicaciones de la derivada
Aplicaciones de la derivadaAplicaciones de la derivada
Aplicaciones de la derivada
 
Algorithmic Data Science = Theory + Practice
Algorithmic Data Science = Theory + PracticeAlgorithmic Data Science = Theory + Practice
Algorithmic Data Science = Theory + Practice
 
Vertex cover Problem
Vertex cover ProblemVertex cover Problem
Vertex cover Problem
 
Lecture warshall floyd
Lecture warshall floydLecture warshall floyd
Lecture warshall floyd
 
Hprec7.1
Hprec7.1Hprec7.1
Hprec7.1
 
TRIEST: Counting Local and Global Triangles in Fully-Dynamic Streams with Fix...
TRIEST: Counting Local and Global Triangles in Fully-Dynamic Streams with Fix...TRIEST: Counting Local and Global Triangles in Fully-Dynamic Streams with Fix...
TRIEST: Counting Local and Global Triangles in Fully-Dynamic Streams with Fix...
 
Algorithms explained
Algorithms explainedAlgorithms explained
Algorithms explained
 
Approximation Algorithms
Approximation AlgorithmsApproximation Algorithms
Approximation Algorithms
 
1
11
1
 
Ijcatr03051008Implementation of Matrix based Mapping Method Using Elliptic Cu...
Ijcatr03051008Implementation of Matrix based Mapping Method Using Elliptic Cu...Ijcatr03051008Implementation of Matrix based Mapping Method Using Elliptic Cu...
Ijcatr03051008Implementation of Matrix based Mapping Method Using Elliptic Cu...
 
Spanning trees
Spanning treesSpanning trees
Spanning trees
 
Elliptic curve cryptography
Elliptic curve cryptographyElliptic curve cryptography
Elliptic curve cryptography
 
Barcode reader
Barcode readerBarcode reader
Barcode reader
 
d
dd
d
 

Ähnlich wie Lec 2-2

Skiena algorithm 2007 lecture18 application of dynamic programming
Skiena algorithm 2007 lecture18 application of dynamic programmingSkiena algorithm 2007 lecture18 application of dynamic programming
Skiena algorithm 2007 lecture18 application of dynamic programming
zukun
 
2010 3-24 cryptography stamatiou
2010 3-24 cryptography stamatiou2010 3-24 cryptography stamatiou
2010 3-24 cryptography stamatiou
vafopoulos
 
On algorithmic problems concerning graphs of higher degree of symmetry
On algorithmic problems concerning graphs of higher degree of symmetryOn algorithmic problems concerning graphs of higher degree of symmetry
On algorithmic problems concerning graphs of higher degree of symmetry
graphhoc
 
Problem Solving by Computer Finite Element Method
Problem Solving by Computer Finite Element MethodProblem Solving by Computer Finite Element Method
Problem Solving by Computer Finite Element Method
Peter Herbert
 

Ähnlich wie Lec 2-2 (20)

Exhaustive Combinatorial Enumeration
Exhaustive Combinatorial EnumerationExhaustive Combinatorial Enumeration
Exhaustive Combinatorial Enumeration
 
parameterized complexity for graph Motif
parameterized complexity for graph Motifparameterized complexity for graph Motif
parameterized complexity for graph Motif
 
Graphical Model Selection for Big Data
Graphical Model Selection for Big DataGraphical Model Selection for Big Data
Graphical Model Selection for Big Data
 
Lego like spheres and tori, enumeration and drawings
Lego like spheres and tori, enumeration and drawingsLego like spheres and tori, enumeration and drawings
Lego like spheres and tori, enumeration and drawings
 
ODD HARMONIOUS LABELINGS OF CYCLIC SNAKES
ODD HARMONIOUS LABELINGS OF CYCLIC SNAKESODD HARMONIOUS LABELINGS OF CYCLIC SNAKES
ODD HARMONIOUS LABELINGS OF CYCLIC SNAKES
 
Skiena algorithm 2007 lecture18 application of dynamic programming
Skiena algorithm 2007 lecture18 application of dynamic programmingSkiena algorithm 2007 lecture18 application of dynamic programming
Skiena algorithm 2007 lecture18 application of dynamic programming
 
graph theory
graph theorygraph theory
graph theory
 
ON ALGORITHMIC PROBLEMS CONCERNING GRAPHS OF HIGHER DEGREE OF SYMMETRY
ON ALGORITHMIC PROBLEMS CONCERNING GRAPHS OF HIGHER DEGREE OF SYMMETRYON ALGORITHMIC PROBLEMS CONCERNING GRAPHS OF HIGHER DEGREE OF SYMMETRY
ON ALGORITHMIC PROBLEMS CONCERNING GRAPHS OF HIGHER DEGREE OF SYMMETRY
 
Proof of Kraft Mc-Millan theorem - nguyen vu hung
Proof of Kraft Mc-Millan theorem - nguyen vu hungProof of Kraft Mc-Millan theorem - nguyen vu hung
Proof of Kraft Mc-Millan theorem - nguyen vu hung
 
2010 3-24 cryptography stamatiou
2010 3-24 cryptography stamatiou2010 3-24 cryptography stamatiou
2010 3-24 cryptography stamatiou
 
Public Key Cryptography
Public Key CryptographyPublic Key Cryptography
Public Key Cryptography
 
Odd Harmonious Labelings of Cyclic Snakes
Odd Harmonious Labelings of Cyclic SnakesOdd Harmonious Labelings of Cyclic Snakes
Odd Harmonious Labelings of Cyclic Snakes
 
Computation of Electromagnetic Fields Scattered from Dielectric Objects of Un...
Computation of Electromagnetic Fields Scattered from Dielectric Objects of Un...Computation of Electromagnetic Fields Scattered from Dielectric Objects of Un...
Computation of Electromagnetic Fields Scattered from Dielectric Objects of Un...
 
On algorithmic problems concerning graphs of higher degree of symmetry
On algorithmic problems concerning graphs of higher degree of symmetryOn algorithmic problems concerning graphs of higher degree of symmetry
On algorithmic problems concerning graphs of higher degree of symmetry
 
MATLABgraphPlotting.pptx
MATLABgraphPlotting.pptxMATLABgraphPlotting.pptx
MATLABgraphPlotting.pptx
 
Learning multifractal structure in large networks (KDD 2014)
Learning multifractal structure in large networks (KDD 2014)Learning multifractal structure in large networks (KDD 2014)
Learning multifractal structure in large networks (KDD 2014)
 
EDGE-TENACITY IN CYCLES AND COMPLETE GRAPHS
EDGE-TENACITY IN CYCLES AND COMPLETE GRAPHSEDGE-TENACITY IN CYCLES AND COMPLETE GRAPHS
EDGE-TENACITY IN CYCLES AND COMPLETE GRAPHS
 
Problem Solving by Computer Finite Element Method
Problem Solving by Computer Finite Element MethodProblem Solving by Computer Finite Element Method
Problem Solving by Computer Finite Element Method
 
Edge tenacity in cycles and complete
Edge tenacity in cycles and completeEdge tenacity in cycles and complete
Edge tenacity in cycles and complete
 
Graph theory concepts complex networks presents-rouhollah nabati
Graph theory concepts   complex networks presents-rouhollah nabatiGraph theory concepts   complex networks presents-rouhollah nabati
Graph theory concepts complex networks presents-rouhollah nabati
 

Mehr von Atner Yegorov

презентация1
презентация1презентация1
презентация1
Atner Yegorov
 

Mehr von Atner Yegorov (20)

Здравоохранение Чувашии 2015
Здравоохранение Чувашии 2015Здравоохранение Чувашии 2015
Здравоохранение Чувашии 2015
 
Чувашия. Итоги за 5 лет. 2015
Чувашия. Итоги за 5 лет. 2015Чувашия. Итоги за 5 лет. 2015
Чувашия. Итоги за 5 лет. 2015
 
Инвестиционная политика Чувашской Республики 2015
Инвестиционная политика Чувашской Республики 2015Инвестиционная политика Чувашской Республики 2015
Инвестиционная политика Чувашской Республики 2015
 
Господдержка малого и среднего бизнеса в Чувашии 2015
Господдержка малого и среднего бизнеса в Чувашии 2015Господдержка малого и среднего бизнеса в Чувашии 2015
Господдержка малого и среднего бизнеса в Чувашии 2015
 
ИННОВАЦИИ В ПРОМЫШЛЕННОСТИ ЧУВАШИИ. 2015
ИННОВАЦИИ В ПРОМЫШЛЕННОСТИ ЧУВАШИИ. 2015ИННОВАЦИИ В ПРОМЫШЛЕННОСТИ ЧУВАШИИ. 2015
ИННОВАЦИИ В ПРОМЫШЛЕННОСТИ ЧУВАШИИ. 2015
 
Брендинг Чувашии
Брендинг ЧувашииБрендинг Чувашии
Брендинг Чувашии
 
VIII Экономический форум Чебоксары
VIII Экономический форум ЧебоксарыVIII Экономический форум Чебоксары
VIII Экономический форум Чебоксары
 
Рейтин инвестклимата в регионах 2015
Рейтин инвестклимата в регионах 2015Рейтин инвестклимата в регионах 2015
Рейтин инвестклимата в регионах 2015
 
Аттракционы тематического парка, Татарстан
Аттракционы тематического парка, ТатарстанАттракционы тематического парка, Татарстан
Аттракционы тематического парка, Татарстан
 
Тематический парк, Татарстан
Тематический парк, ТатарстанТематический парк, Татарстан
Тематический парк, Татарстан
 
Будущее журналистики
Будущее журналистикиБудущее журналистики
Будущее журналистики
 
Будущее нишевых СМИ
Будущее нишевых СМИБудущее нишевых СМИ
Будущее нишевых СМИ
 
Relap
RelapRelap
Relap
 
Будущее онлайн СМИ в регионах
Будущее онлайн СМИ в регионах Будущее онлайн СМИ в регионах
Будущее онлайн СМИ в регионах
 
Война форматов. Как люди читают новости
Война форматов. Как люди читают новости Война форматов. Как люди читают новости
Война форматов. Как люди читают новости
 
Национальная технологическая инициатива
Национальная технологическая инициативаНациональная технологическая инициатива
Национальная технологическая инициатива
 
О РАЗРАБОТКЕ И РЕАЛИЗАЦИИ НАЦИОНАЛЬНОЙ ТЕХНОЛОГИЧЕСКОЙ ИНИЦИАТИВЫ
О РАЗРАБОТКЕ И РЕАЛИЗАЦИИ НАЦИОНАЛЬНОЙ  ТЕХНОЛОГИЧЕСКОЙ ИНИЦИАТИВЫ О РАЗРАБОТКЕ И РЕАЛИЗАЦИИ НАЦИОНАЛЬНОЙ  ТЕХНОЛОГИЧЕСКОЙ ИНИЦИАТИВЫ
О РАЗРАБОТКЕ И РЕАЛИЗАЦИИ НАЦИОНАЛЬНОЙ ТЕХНОЛОГИЧЕСКОЙ ИНИЦИАТИВЫ
 
Участники заседания по модернизации
Участники заседания по модернизацииУчастники заседания по модернизации
Участники заседания по модернизации
 
Город Innopolis
Город InnopolisГород Innopolis
Город Innopolis
 
презентация1
презентация1презентация1
презентация1
 

Kürzlich hochgeladen

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 

Kürzlich hochgeladen (20)

Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 

Lec 2-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, fitting 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. 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 finite 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. • In semi-streaming, want to process graph defined 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. 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. a) Connectivity b) Applications a) Connectivity b) Applications
  • 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. 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. 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. 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. 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. • 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. a) Connectivity b) Applications a) Connectivity b) Applications
  • 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 Sparsifier Graph
  • 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. Ingredient 2: Connectivity Sketches Sketch: Simultaneously construct k independent sketches {M1AG, M2AG, ... MkAG} for connectivity. Run Algorithm in Sketch Space: Use M1AG, to find a spanning forest F1 of G Use M2AG-M2AF1=M2(AG-AF1)=M2(AG-F1) to find F2 Use M3AG-M3AF1-M3AF2=M3(AG-F1-F2) to find F3 etc.
  • 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 Sparsifier Graph
  • 18. Bipartiteness • Idea: Given G, define 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. 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 find 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. 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, sparsifiers, spanners, bipartite, minimum spanning trees, small cliques, matchings, ...