Testing Graph Properties Artur Czumaj DIMAP and Department




















































































































- Slides: 116
Testing Graph Properties Artur Czumaj DIMAP and Department of. Computer Science University of Warwick
Testing of Graph Properties • from Fan Chung’s web page
Testing of Graph Properties In general – requires at least linear time (often NP-hard) • With a relaxation: Sublinear-time (or even constant-time) possible from Fan Chung’s web page
Testing of Graph Properties •
Testing of Graph Properties • How can we relax the problem of satisfying a property? • We want to distinguish – between a graph satisfying the property, and – a graph that is far from the property
Property Testing definition •
Property Testing definition
Framework •
Testing properties of graphs •
Testing properties of graphs • 0 1 0 0 1 1 1 0 1 0 0 0 1 1 1 0 0
Testing properties of graphs • 0 1 0 0 1 1 1 0 1 0 0 0 1 1 1 0 0
Testing properties of graphs •
Testing properties of graphs •
Testing of Graph Properties •
Framework •
First model: Adjacency Matrix • 0 1 0 0 1 1 1 0 1 0 0 0 1 1 1 0 0
0 1 First model: 10 01 Adjacency Matrix 0 1 1 • Suitable for dense graphs 1 0 0 1 0 0
0 1 0 0 1 1 1 0 0 0 1 model 0 0 1 Adjacency matrix •
0 1 0 0 1 1 1 0 0 0 1 model 0 0 1 Adjacency matrix • Return YES (always)
0 1 0 0 1 1 1 1 0 0 0 1 1 1 0 0 Adjacency matrix model 0 Another example: • Test if a graph G=(V, E) is planar – We’ve already said: testing is “trivial” for sparse graphs …
0 1 0 0 1 1 1 1 0 0 0 1 1 1 0 0 Adjacency matrix model 0 • Test if a graph G=(V, E) is planar – We’ve already said: testing is “trivial” for sparse graphs … • If G is dense then it’s certainly not planar dense • If G is sparse then it’s not -far from planar sparse • Every graph with less than n 2/2 edges is -close to planar: remove all its edges • How to distinguish between sparse and dense graphs? – test O(1/ ) entries in the matrix: if all zeros then sparse • Two-sided error tester with complexity O(1/ )
0 1 0 0 1 1 1 1 0 0 0 1 1 1 0 0 Adjacency matrix model 0 •
0 1 0 0 1 1 1 1 0 0 0 1 1 1 0 0 Adjacency matrix model 0 [Goldreich, Trevisan’ 03] Wlog we can consider only algorithms of the following form: Any other algorithm will have not more than a quadratic speed-up
0 1 0 0 1 1 1 1 0 0 0 1 1 1 0 0 Adjacency matrix model 0 [Goldreich, Trevisan’ 03] Wlog we can consider only algorithms of the following form: Any other algorithm will have not more than a quadratic speed-up
0 1 0 0 1 1 1 1 0 0 0 1 1 1 0 0 Adjacency matrix model 0 [Goldreich, Trevisan’ 03] Wlog we can consider only algorithms of the following form: Any other algorithm will have not more than a quadratic speed-up
0 1 0 0 1 1 1 0 0 0 1 model 0 0 1 Adjacency matrix •
0 1 0 0 1 1 1 1 0 0 0 1 1 1 0 0 General result 0 •
Main Lemma • 0 1 0 0 1 1 1 0 1 0 0 0 1 1 1 0 0
0 1 0 0 1 1 1 1 0 0 0 1 1 1 0 0 General result 0 • Every hereditary property can be tested in constant-time! (even with one-sided error) [Alon & Shapira, 2003 -2005] • Being hereditary is essentially necessary and sufficient for one-sided error Complete characterization of graph properties testable in constant-time with one-sided error one-sided
0 1 0 0 1 1 1 1 0 0 0 1 1 1 0 0 General result 0 • Every hereditary property can be tested in constant-time! (even with one-sided error) [Alon & Shapira, 2003 -2005] • Similar characterization for two-sided error testing Informally: A graph property is testable in constant-time iff testing can be reduced to testing finitely many Szemeredi partitions [Alon, Fischer, Newman, Shapira’ 09]
0 1 0 0 1 1 1 0 0 0 1 model 0 0 1 Adjacency matrix • There are very fast property testers • They’re very simple – Typical algorithm: • Select a random set of vertices U • Test the property on the subgraph induced by U • The analysis is (often) very hard • We understand this model very well – mostly because of very close relation to combinatorics – Typical running time: (via Szemeredi regularity lemma)
0 1 0 0 1 1 1 0 0 0 1 model 0 0 1 Adjacency matrix • There are very fast property testers • They’re very simple – Typical algorithm: • Select a random set of vertices U • Test the property on the subgraph induced by U • The analysis is (often) very hard • We understand this model very well – mostly because of very close relation to combinatorics – Typical running time: (via Szemeredi regularity lemma)
0 1 0 0 1 1 1 0 0 0 1 model 0 0 1 Adjacency matrix • There are very fast property testers • They’re very simple – Typical algorithm: • Select a random set of vertices U • Test the property on the subgraph induced by U • The analysis is (often) very hard • We understand this model very well – mostly because of very close relation to combinatorics – Typical running time: (via Szemeredi regularity lemma)
0 1 0 0 1 1 1 0 0 0 1 model 0 0 1 Adjacency matrix • • Select a random set of vertices U • Test the property on the subgraph induced by U
0 1 0 0 1 1 1 0 0 0 1 model 0 0 1 Adjacency matrix Very easy example: • Test if a graph contains a triangle (cycle of length 3) Return YES (always) Highly nontrivial example: • Test if a graph is triangle-free
0 1 0 0 1 1 1 0 0 1 m Problems of adjacency 0 matrix •
Other model ?
Graph access model • 1 5 2 2 1 4 3 5 2 4 2 5 1 3 5 2 3
First: Bounded-degree model •
Bounded-degree adjacency list m Testing connectivity
Bounded-degree adjacency list m •
Bounded-degree adjacency list m •
Bounded-degree adjacency list m • What properties can be tested in constant-time? We want a characterization!
Bounded-degree adjacency list m • Testing bipartiteness
Bounded-degree adjacency list m •
Bounded-degree adjacency list m •
Bounded-degree adjacency list m •
Bounded-degree adjacency list m •
Bounded-degree adjacency list m •
Bounded-degree adjacency list m Testing cycle-freeness (acyclicity) Complexity depend on the error-model • One-sided error (always accept cycle-free graphs) • Two-sided error (can err for acceptance and rejection)
Testing cycle-freeness in bounde two-sided error Testing cycle-freeness Complexity depend on the error-model • One-sided error (always accept cycle-free graphs) • Two-sided error (can err for acceptance and rejection) Goldreich and Ron’ 02: Estimate the number of edges Estimate the number of connected components If these numbers “are OK for a forest” then accept Else reject
Testing cycle-freeness in bounde one-sided error Testing cycle-freeness Complexity depend on the error-model • One-sided error (always accept cycle-free graphs) • Two-sided error (can err for acceptance and rejection)
Testing cycle-freeness in bounde one-sided error Testing cycle-freeness Complexity depend on the error-model • One-sided error (always accept cycle-free graphs) • Two-sided error (can err for acceptance and rejection)
Testing cycle-freeness in bounde one-sided error •
Put new nodes on some edges. . . (some = random half)
If the original graph is cycle-free then the obtained graph is bipartite
Testing cycle-freeness in bounde one-sided error
Testing cycle-freeness in bounde one-sided error •
Bounded-degree adjacency list m ( one-sided error) •
Bounded-degree model adjacency list ( one-sided error) •
Bounded-degree model adjacency list ( one-sided error) •
Bounded-degree model adjacency list ( one-sided error) •
Testing planarity
Testing planarity •
Testing planarity • (with two-sided error)
Testing planarity • (with two-sided error)
Testing planarity • (with two-sided error)
Testing planarity • (with two-sided error)
Extension: all minor-closed prope • Every minor-closed property can be tested in a similar way • Minor-closed properties include: – – – Planar, Outer-planar, Series-parallel, Bounded-genus, bounded tree-width, … • Minor = obtained by edge/vertex removal + edge contractions • P is minor-closed if every minor of a graph in P is also in P
Testing expansion • In the adjacency list model, rapidly mixing properties play key role: – If G doesn’t “mix” fast then … testing is fast • Planar graphs don’t mix fast (have large cuts) – Testing properties in planar graphs might be easy • Expanders mix fast: – Testing properties might be hard
Testing expansion
Testing expansion •
Testing expansion •
Testing expansion and clustering In a similar time we can: • Correct an almost expander-graph to become a good expander, even in distributed way • Determine graph clustering into expanders (see my talk on Wednesday) • …
Testing in planar graphs • All previous results assumed the input graph is arbitrary Testing in planar graphs is easier!
• Testing bipartiteness in planar graphs of bounded degree can be done in constant time [assuming is a constant] [C, Sohler, Shapira’ 09]
Testing bipartiteness planar graphsin •
• Testing bipartiteness in planar graphs of bounded degree can be done in constant time [assuming is a constant] [C, Sohler, Shapira’ 09]
Testing hyperfinite graphsin • One can go beyond planar graphs: – It’s enough to have some separatorproperties
Testing in hyperfinite graphs •
These techniques don’t work for •
Arbitrary graphs (no bound for max ma
Adjacency Lists in arbitrary graph • More general model & more challenging model: graphs of arbitrary max-degree
Testing in arbitrary graphs •
Testing in arbitrary planar graph • C, Monemizadeh, Onak, Sohler’ 11 • Testing bipartiteness in planar graphs can be done in constant time • Challenge: how to explore neighbourhood of a node quickly?
Testing in arbitrary planar graph • C, Monemizadeh, Onak, Sohler’ 11 Challenge: analyze random walks of constant length Challenge:
Extensions • Broader class of graphs than planar – Graphs defined by arbitrary fixed forbidden minors
Testing of Digraph Properties • See the talk by Pan Peng on Wednesday (last talk of the workshop)
Summary • Many graph properties can be tested efficiently – Sometimes in constant-time – More often in sublinear-time • But our understanding of testing graph properties – in arbitrary graphs or in directed graphs is still patchy … • Tools: – Combination of algorithm design, combinatorics, analysis of random walks …
Graph Optimization? Property Testing (real life? )
Minimum Spanning Tree (MST) •
Minimum Spanning Tree (MST) • (Chazelle’ 97 )
Estimating the weight of MST •
Idea behind the algorithm •
MST weight vs. #Connected Comp • W=2 - the largest weight 1 2 2 2 2 1 1 2 1 2 2 1
MST weight vs. #Connected Comp • W=2 - the largest weight • There are c=4 connected components induced by weight 1 edges 1 2 2 2 2 1 1 2 1 2 2 1
MST weight vs. #Connected Comp • W=2 - the largest weight • There are c=4 connected components induced by weight 1 edges 1 2 2 2 2 1 1 2 1 2 2 1
MST weight vs. #Connected Comp • W=2 - the largest weight • There are c=4 connected components induced by weight 1 edges 1 2 2 2 2 1 1 2 1 2 2 1
MST weight vs. #Connected Comp •
The Algorithm How to compute/approximate the number of connected components ?
Compute vs. Estimate #Connected components •
Approximating #connected comp •
Unbiased estimator for # of Connected Components •
Unbiased estimator for # of Connected Components
Analysis •
Further analysis: estimating #con •
Further analysis •
Extending CRT algorithm? • The algorithm by Chazelle, Rubinfeld and Trevisan – requires “low” max-weight – requires “low” average degree Can we extend it to dense graphs? Metric graphs?
Metric graphs •
MST in metric graphs • Use properties of metric graphs to improve the approximation algorithm • Multiple sampling approach • Avoid additive error term in counting connected components (major challenge)
Further easy applications •
That’s almost it! • There will be a few great algorithmic conferences in Europe in the next months: • HIGHLIGHTS OF ALGORITHMS, Paris June 6 -8, 2016 HIGHLIGHTS OF ALGORITHMS http: //highlightsofalgorithms. org/ • SODA 2017 in Barcelona, January 2017 SODA 2017
THANK YOU!