Presentation is loading. Please wait.

Presentation is loading. Please wait.

Testing the Diameter of Graphs Michal Parnas Dana Ron.

Similar presentations


Presentation on theme: "Testing the Diameter of Graphs Michal Parnas Dana Ron."— Presentation transcript:

1 Testing the Diameter of Graphs Michal Parnas Dana Ron

2 Property Testing of Graphs Let G = (V,E) be an undirected graph. A Testing Algorithm of property P: The algorithm can query on the incidence relations of vertices in G. If G has property P: Accept. If G is “far” from P: Reject.

3 Previous Representations of Graphs Adjacency Matrix [GGR]. Queries: Is (u,v)  E.  -far:  n 2 edges should be modified. Dense graphs. Incidence Lists of bounded length d [GR]. Queries: Who is i’th neighbor of v?  -far:  d  n edges should be modified. Sparse bounded degree graphs. 1 1 1 10 0 00 0 1 n 1n1n 1 2 … d 1 n

4 Our Model G = (V,E) an undirected graph, |V| = n, |E|  m. Representation: Incidence lists of varying length. Queries: Who is i’th neighbor of v?  -far:  m edge modifications. 1 n

5 A Testing Algorithm A testing algorithm for a parameterized property P s is given: Distance parameter 0 <  < 1. Query access to a graph G having at most m edges. Boundary function  (  ). The algorithm: Should accept with probability at least 2/3, if G has property P s. Should reject with probability at least 2/3, if G is  -far from property. PsPs  Accept Reject

6 The Diameter Problem Question: Is the diameter of G at most D or is it  -far from diameter  (D)? The algorithms differ in: The boundary function  (  ). The query and time complexities. The feasible values of .

7 Our Results Time and Query Complexity: 1. 2.

8 Related Work Testing Algebraic Properties (Linearity and Low degree) Program Testing: Blum & Luby & Rubinfeld, Rubinfeld, Rubinfeld & Sudan... PCP: Babai & Fortnow & Lund, Babai & Fortnow & Lund & Szegedy, Feige & Goldwasser, Lovasz & Safra & Szegedy, Arora & Lund & Safra, Arora & Safra... Testing Graph Properties (Colorability, Connectivity, Properties defined by first order formula) Goldreich & Goldwasser & Ron, Goldreich & Ron, Alon & Fischer & Krivelevich & Szegedy, Alon & Krivelevich. Testing Other Properties (Monotonicity, Regular languanges) Goldreich & Goldwasser & Lehman & Ron, Dodis & Goldreich & Lehman & Raskhodnikova & Ron & Samorodnitsky, Ergun & Kannan & Kumar & Rubinfeld & Viswanathan, Kearns & Ron, Alon & Krivelevich & Newman & Szegedy.

9 Algorithm Input: D, n, m, . Parameters: C, k, . Set Uniformly select starting vertices. For each starting vertex - perform a BFS to distance at most C until k vertices are reached. If at most  S starting vertices reach < k vertices then accept, otherwise reject. Time and Query Complexity: O(k 2  S)= O(k 2 /  n,m )

10 Illustration of the Algorithm 1 S C 2 3

11 Proof of Correctness Good Vertex: If C-neighborhood contains  k vertices. Bad Vertex: If C-neighborhood contains < k vertices. C We Show: Diameter  D Almost (all) vertices are good. Diameter >  (D) Many vertices are bad.

12 Lemma 1: If at least (1-1/k)n of the vertices are good, then the graph can be transformed into a graph with diameter at most 4C+2 by adding at most 2n/k edges. Proof: c c c c Good Bad Reducing the Diameter

13 Lemma 2: If at least (1-  /2)  n of the vertices are good, where k = (4/  )ln(4/  ), then the graph can be transformed into a graph with diameter at most 2C+2, by adding at most  n edges. Proof: Select centers in a greedy manner and connect them. Balls may overlap. Corollary: If G is  -far from diameter 2C+2, then there exist more than n  n,m /2 bad vertices, where k= (4 /  n,m )  ln(4 /  n,m ). Proof: Set  =  n,m in Lemma 2.

14 Proof of Item 1 Parameters: C = D  = 0 Diameter  D All vertices are good. Diameter >  (D) = 2D+2 bad vertices. Lemma 2

15 Proof of Item 2 Parameters: Diameter > 2C+2 =  (D) = Lemma 2 bad vertices (fraction of bad  2  ).

16 Item 2 - Continued Diameter  D Fraction of bad vertices   /2. Lemma 3: Let Diameter  D number of bad vertices  k i+1. Lemma 3

17 Proof of Lemma 3 Assume there are more than k i+1 bad vertices. Diameter D D/2 - neighborhoods intersect. D/2 u1u1 utut u2u2 v u2u2 v utut u1u1 u 1,…,u t bad vertices, t = k i.

18 Tree Lemma (Special Case) Let T be a tree of height h and size t. There exists a leaf in T whose 4h/3-neighborhood contains at least vertices. v i = 2, C = 2D/3. By Tree Lemma, there exists a leaf u j whose C-neighborhood contains at least vertices. u j is not bad. Proof: (Proof of Lemma 3)

19 Tree Lemma Let T be a tree of height h and size t, and let a < h. There exists a leaf in T whose (h+a)-neighborhood contains at least vertices. Proof: Define - Solve recursively -

20  -far For any fixed parameterized property P s, any 0 0, a graph G having at most m edges is  -far from property P s if the number of edges that need to be added and/or removed from G in order to obtain a graph having the property, is greater than  m. Otherwise, G is  -close to P s.

21 Range of  Corollary: Every connected graph with n vertices and m edges is  -close to having diameter D for every Theorem: Every connected graph on n vertices can be transformed into a graph of diameter at most D by adding at most 2n/(D-1) edges. Set:

22 Reducing the Diameter of a Graph Lemma: If the C-neighborhood of each vertex contains k vertices, then the graph can be transformed into a graph with diameter at most 4C+2 by adding at most n/k edges. c c c c

23 Our Results For  (D) = 2D+2, and every , a one-sided error algorithm. For every  (D) = 2  i  log (D/2 + 1) a two-sided error algorithm, where  = For Example: i = 2,  (D) = 4D/3 + 2,  = i = log(D/2 + 1),  (D) = D + 4 Time and Query Complexity:


Download ppt "Testing the Diameter of Graphs Michal Parnas Dana Ron."

Similar presentations


Ads by Google