Presented by Yuval Shimron Course 236801 1.12.2010.

Slides:



Advertisements
Similar presentations
Great Theoretical Ideas in Computer Science for Some.
Advertisements

Bart Jansen 1.  Problem definition  Instance: Connected graph G, positive integer k  Question: Is there a spanning tree for G with at least k leaves?
1 Decomposing Hypergraphs with Hypertrees Raphael Yuster University of Haifa - Oranim.
Greed is good. (Some of the time)
A Separator Theorem for Graphs with an Excluded Minor and its Applications Paul Seymour Noga Alon Robin Thomas Lecturer : Daniel Motil.
Graph Isomorphism Algorithms and networks. Graph Isomorphism 2 Today Graph isomorphism: definition Complexity: isomorphism completeness The refinement.
1 NP-completeness Lecture 2: Jan P The class of problems that can be solved in polynomial time. e.g. gcd, shortest path, prime, etc. There are many.
Minimum Spanning Trees Definition Two properties of MST’s Prim and Kruskal’s Algorithm –Proofs of correctness Boruvka’s algorithm Verifying an MST Randomized.
Noga Alon Institute for Advanced Study and Tel Aviv University
The number of edge-disjoint transitive triples in a tournament.
Fast FAST By Noga Alon, Daniel Lokshtanov And Saket Saurabh Presentation by Gil Einziger.
CSL758 Instructors: Naveen Garg Kavitha Telikepalli Scribe: Manish Singh Vaibhav Rastogi February 7 & 11, 2008.
Chapter 23 Minimum Spanning Trees
SE561 Math Foundations Week 11 Graphs I
1 Finding cycles using rectangular matrix multiplication and dynamic programming Raphael Yuster Haifa Univ. - Oranim Uri Zwick Tel Aviv University Uri.
DAST 2005 Tirgul 11 (and more) sample questions. DAST 2005 Q.Let G = (V,E) be an undirected, connected graph with an edge weight function w : E→R. Let.
Analysis of Algorithms CS 477/677
SubSea: An Efficient Heuristic Algorithm for Subgraph Isomorphism Vladimir Lipets Ben-Gurion University of the Negev Joint work with Prof. Ehud Gudes.
1 Separator Theorems for Planar Graphs Presented by Shira Zucker.
Applied Discrete Mathematics Week 12: Trees
Maximal Independent Set Distributed Algorithms for Multi-Agent Networks Instructor: K. Sinan YILDIRIM.
Packing Element-Disjoint Steiner Trees Mohammad R. Salavatipour Department of Computing Science University of Alberta Joint with Joseph Cheriyan Department.
9.2 Graph Terminology and Special Types Graphs
GRAPH Learning Outcomes Students should be able to:
Analysis of Algorithms
Theory of Computing Lecture 10 MAS 714 Hartmut Klauck.
Physical Mapping of DNA Shanna Terry March 2, 2004.
Chapter 9 – Graphs A graph G=(V,E) – vertices and edges
Algorithms for Enumerating All Spanning Trees of Undirected and Weighted Graphs Presented by R 李孟哲 R 陳翰霖 R 張仕明 Sanjiv Kapoor and.
MST Many of the slides are from Prof. Plaisted’s resources at University of North Carolina at Chapel Hill.
GRAPHS CSE, POSTECH. Chapter 16 covers the following topics Graph terminology: vertex, edge, adjacent, incident, degree, cycle, path, connected component,
Spring 2015 Lecture 11: Minimum Spanning Trees
Lecture 5.2: Special Graphs and Matrix Representation CS 250, Discrete Structures, Fall 2013 Nitesh Saxena Adopted from previous lectures by Zeph Grunschlag.
Approximating the Minimum Degree Spanning Tree to within One from the Optimal Degree R 陳建霖 R 宋彥朋 B 楊鈞羽 R 郭慶徵 R
UNC Chapel Hill Lin/Foskey/Manocha Minimum Spanning Trees Problem: Connect a set of nodes by a network of minimal total length Some applications: –Communication.
Edge-disjoint induced subgraphs with given minimum degree Raphael Yuster 2012.
Copyright © Zeph Grunschlag, More on Graphs.
 2004 SDU Lecture 7- Minimum Spanning Tree-- Extension 1.Properties of Minimum Spanning Tree 2.Secondary Minimum Spanning Tree 3.Bottleneck.
1 CS104 : Discrete Structures Chapter V Graph Theory.
Based on slides by Y. Peng University of Maryland
The Tutte Polynomial Graph Polynomials winter 05/06.
Discrete Structures Lecture 12: Trees Ji Yanyan United International College Thanks to Professor Michael Hvidsten.
Indian Institute of Technology Kharagpur PALLAB DASGUPTA Graph Theory: Introduction Pallab Dasgupta, Professor, Dept. of Computer Sc. and Engineering,
GRAPHS THEROY. 2 –Graphs Graph basics and definitions Vertices/nodes, edges, adjacency, incidence Degree, in-degree, out-degree Subgraphs, unions, isomorphism.
Data Structures & Algorithms Graphs
Problems on Paired Graphs Stephen Hedetniemi, Alice McRae, Dee Parks, Kelly Wise and come join in…
CSE 589 Part VI. Reading Skiena, Sections 5.5 and 6.8 CLR, chapter 37.
Chapter 10 Graph Theory Eulerian Cycle and the property of graph theory 10.3 The important property of graph theory and its representation 10.4.
Graph Theory and Applications
Chapter 23: Minimum Spanning Trees: A graph optimization problem Given undirected graph G(V,E) and a weight function w(u,v) defined on all edges (u,v)
Strings Basic data type in computational biology A string is an ordered succession of characters or symbols from a finite set called an alphabet Sequence.
Algorithms for hard problems WQO theory and applications to parameterized complexity Juris Viksna, 2015.
Introduction to Graph Theory By: Arun Kumar (Asst. Professor) (Asst. Professor)
Algorithms for hard problems Parameterized complexity Bounded tree width approaches Juris Viksna, 2015.
Introduction to NP Instructor: Neelima Gupta 1.
Introduction Wireless Ad-Hoc Network  Set of transceivers communicating by radio.
1 GRAPH Learning Outcomes Students should be able to: Explain basic terminology of a graph Identify Euler and Hamiltonian cycle Represent graphs using.
CHAPTER SIX T HE P ROBABILISTIC M ETHOD M1 Zhang Cong 2011/Nov/28.
Theory of Computational Complexity Probability and Computing Chapter Hikaru Inada Iwama and Ito lab M1.
Lecture 5.2: Special Graphs and Matrix Representation
Minimum Spanning Tree 8/7/2018 4:26 AM
Graph theory Definitions Trees, cycles, directed graphs.
Algorithms and networks
Graph Algorithms Using Depth First Search
Structural graph parameters Part 2: A hierarchy of parameters
Based on slides by Y. Peng University of Maryland
Algorithms and networks
Raphael Yuster Haifa University Uri Zwick Tel Aviv University
INTRODUCTION A graph G=(V,E) consists of a finite non empty set of vertices V , and a finite set of edges E which connect pairs of vertices .
Minimum Spanning Trees
Presentation transcript:

Presented by Yuval Shimron Course

 Find solutions to sub-cases of the Subgraph Isomorphism Problem in polynomial time.  Find More efficient solutions to some sub- cases that already had polynomial time solutions.  Find simple paths and cycles of specific length k.  This was the initial goal of the authors… 2

 (1) For a fixed k, if G=(V,E) contains a cycle of length k it can be found in O(V ω ) expected time or O(V ω logV) worst-case time (ω<2.376 is the exponent of matrix multiplication).  (2) For a fixed k, if a planar graph G=(V,E) contains a cycle of length k it can be found in O(V) expected time or O(VlogV) worst-case time (Applies also to any non-trivial minor- closed family of graphs). 3

 (3) If G=(V,E) contains a subgraph isomorphic to a bounded tree-width graph H=(V H,E H ) where |V H | = O(logV), then such a subgraph can be found in polynomial time.  Was not previously known even if H were just a simple path of length O(logV).  Shows that the LOG PATH problem is in NC (and not just in P). 4

 Randomized method  Vertices are randomly colored using k = |V H | colors.  If |V H | = O(logV), then with a small (but only polynomial small) probability all the vertices of the (isomorphic to H) subgraph are colored in distinct colors.  Makes the task of finding this ‘color-coded’ subgraph much easier. ▪ Be patient… 5

 De-randomized algorithm?  Needs a family of colorings of G, such that every subset of k vertices of G is assigned with distinct colors by at least one of these coloring. ▪ In other words, a family of perfect hash functions from {1, 2, …, |V|} to {1, 2, …, k}.  Only “small” loss of efficiency. 6

 If acyclic – simple  O(E) time for a simple algorithm.  So eliminate cycles:  Choose a random permutation.  Build by using : ▪ Direct the edges: 7

 Every directed path of length k in G’ is a simple path of length k in G.  Every simple path of length k in G has a 2/(k+1)! chance of becoming a directed path in G’.  So if no path of length k was found in G’ repeat the process.  The expected number of times this process is repeated is at most (k+1)!/2. 8

 So we get O(E(k+1)!) time complexity.  This is also the result for the directed case. ▪ Delete edges that don’t agree with.  Use the following fact + DFS to reduce it to O(V(k+1)!) for the undirected case:  Every graph with V vertices and at least k|V| edges contains a path of length k.  So first run a DFS on the original graph.  Apply the above algorithm only if no vertex of depth k was found (answered in O(k|V|) time). 9

 Choose random acyclic orientation G’.  Raise the adjacency matrix of G’ to the power of k-1 using O(logk) matrix multiplications.  This gives all the pairs of vertices connected by a path of length k-1.  Check if any of these pairs are connected.  If so.  If not, repeat the process. ▪ Expected number of at most k!/2 time.  Complexity: O(k!(logk)V ω )=O(V ω ) for a fixed k. 10

 To find a path of length k-1 in a graph G we can choose a random coloring of the vertices of G in k colors.  Every simple path of length k-1 in G has a chance of k!/k k > e -k to become colorful.  Each vertex is colored with a different color.  We can find it using lemma

 Use Color-Coding to find a colorful path of length k-1 in 2 O(k) E worst case time (if exists).  Actually it finds a path of length k that starts at a specific vertex s. ▪ but we can always add some vertex s to G (with a new color).  The algorithm uses a given (random) coloring c : V {1, 2, … k}  The algorithm uses a dynamic programming approach. 12

 Suppose we’ve found for each vertex v the sets of colors on colorful paths of length i that connects s and v.  A collection of at most color sets.  For that we only need to record the color sets appearing on i-length paths.  And not the path themselves…  We inspect every color set C of that collection. 13

 We also inspect every edge (v,u) in E.  If we add to the collection of u that corresponds to colorful paths of length i+1.  The graph G contains a colorful path of length k-1 iff the final collection, corresponds to paths of length k-1, of at least one vertex is non-empty. 14

 The number of operations is at most.  The proof holds for both directed and undirected graphs. 15

 We can find all pairs of vertices connected by path of length k-1 in or worst case time.  To get time simply run 3.1 algorithm |V| times, from each vertex of G=(V,E).  Use recursive approach to get time. 16

 Keep all partitions of {1,2,…,k} into two subsets C 1,C 2 of size k/2 each. There are such partitions.  For each partition, split G into two graphs derived from C 1, C 2 coloring.  Recursively find pairs of vertices connected by paths of k/2-1.  Store the results in Boolean matrices A 1,A 2. 17

 Define B to be a Boolean matrix of adjacency relations between V 1,V 2 vertices.  Compute A 1 BA 2.  You get all pairs connected by paths of length k-1 ▪ First k/2 vertices are colored by colors from C 1 ▪ Last k/2 vertices are colored by colors from C 2  By OR-ing all the matrices obtained from all the partitions you get your answer.  Time complexity? 18

 A simple path of length k-1 in a directed / undirected graph G=(V,E) can be found (if exists) in:  expected time for undirected graph. ▪ DFS…  expected time for directed graph.  A simple cycle of size k in a directed / undirected graph G=(V,E) can be found (if exists) in either or expected time.  Simply use lemma

 The previous randomized algorithms can be derandomized with a loss of efficiency.  Extra logV factor to the complexity.  What we need is a family of k-perfect hash functions from {1, 2, …, |V|} to {1, 2, …, k}.  If we use these hash functions we know that for every subset of k vertices there exists a coloring that gives each vertex in it, a distinct color. 20

 There exists an algorithm that constructs a k-perfect family of hash functions from {1, 2,..., n} to {1, 2,..., k}.  But its size is.  There also exists an algorithm that constructs a k-perfect family of hash functions from {1, 2,..., n} to {1, 2,..., k 2 } that its size is. 21

 So we use 2-level hashing:  Mapping from {1, 2,..., n} to {1, 2,..., k 2 } by using the second algorithm.  Mapping from {1, 2,..., k 2 } to {1, 2,..., k} by using the first algorithm..  And we get just the promised extra O(logV) time.  The value of each element can be evaluated in O(1) time. 22

 Use k-perfect hash coloring functions.  Choose a random coloring (ant not a permutation) c : V --> {1, 2, … k}  Remove edges (u,v) s.t..  Direct remaining edges (u,v) from u to v.  Again G’, the obtained graph, is acyclic.  Simple path of length k in G has a probability of 2k -k to become a directed path in G’.  Different from the Color-Coding method. 23

 An undirected graph G is d-degenerate if every subgraph of it has a vertex of degree at most d.  Smallest such d is called the degeneracy or the max-min degree of G.  Maximum over the minimum degrees of all sub-graphs of G.  If G is d-degenerate then clearly. 24

 Let G be a connected undirected graph.  An acyclic orientation of G=(V,E) such that for every v we have can be found in O(E) time. 25

 A graph H is a minor of undirected graph G if it can be obtained from G by the removal and the contraction of edges.  A family C of graphs is minor-closed if a minor of any graph in it is also a member of the family.  If such C is non-trivial then all graphs in C are of bounded degeneracy.  s.t.. 26

 Consider the family of planar graphs C planar  It is minor-closed.  Each planar graph has a vertex whose degree is at most 5. . 27

 Let C be a non-trivial minor-closed family of graphs and let be a fixed parameter. There exists a randomized algorithm that given an undirected graph in C finds a C k - cycle of size k in it if one exists, in O(V) expected time.  Proof:  Let G = (V,E) be a graph in C that contains a C k.  Choose a random coloring c : V -> {1, 2, 3, …, k}.  C k is considered well-colored if colored in a consecutive way by the colors 1, 2, …, k. 28

 The C k in G has a chance of 2/k k-1 to be well-colored.  Can we find it efficiently?  Yes, but with some probability…  Assume that the degeneracy of C is d = O(1).  We describe a randomized algorithm that given a coloring c, finds C k with probability of 1/(2d) k.  Combining both gives a probability of at least so the expected time is. 29

 We can assume all edges of G connect vertices that are colored by consecutive colors (mod k).  Edges that don’t may be safely removed.  We orientate the graph so that the out-degree of all the vertices is at most d.  This takes only O(V) time.  The algorithm tries to find the edge that connects the vertices in C k colored by k and k-1: v k,v k-1. It “flipps coins” to guess it’s orientation and index – 2d possible combinations. 30

 For each guess of such index i  If the orientation is from v k-1 to v k : ▪ All edges that leave v k-1 but whose index is not i are removed.  Otherwise does the opposite. ▪ (for edges that leave v k )  Result is the graph G’ that contains a C k with a probability of at least 1/(2d).  A forest of rooted stars. 31

 Each such star is contracted into a single vertex and assigned with the color k-1.  The obtained graph is denoted by G’’.  G’’ contains a well-colored C k-1 iff G’ contains a well-colored C k.  Since each edge of G’ and therefore G’’ connects consecutively colored vertices.  G’’ is also a graph in the minor-closed family C.  So we recursively look for C k-1. 32

 It will take us O((k-1)V) expected time.  And yields C k-1 with a probability of at least 1/(2d) k-1.  Obviously it’s easy to reconstruct C k from C k-1.  We can stop the recursion when k=3 and use an existing algorithm for finding triangles in a general graph in time.  Any triangle in a three-colored graph is well- colored.  is in our case. 33

 There exists a determinist algorithm that given a graph in C, finds C k if exist, in O(VlogV) WC time.  Proof:  Instead of using random coloring we exhaust a list of k O(k) logV colorings that has this property: ▪ Every sequence of k vertices is consecutively colored by 1,2,…,k by at list one coloring of the list.  Instead of guessing the direction and index of each edge in the C k we exhaust for each coloring all the (2d) k possible choices. ▪ If G contains a C k then at least one C k will be found this way. 34

 A graph G 1 is said to be isomorphic to a graph G 2 if there exists a bijection: f : V(G 1 ) -> V(G 2 ) such that any two vertices u and v of G 1 are adjacent in G 1 iff ƒ(u) and ƒ(v) are adjacent in G 2. 35

 Let F be a directed/undirected forest on k vertices. Let G be a directed/undirected graph.  A sub-graph isomorphic to F can be found if exists in:  expected time in the directed case.  expected time in the undirected case. 36

 Proof:  Start as usual, by choosing a random coloring: c : V -> {1, …, k} of G.  With a probability of at least e -k the copy of F in G becomes colorful. ▪ Meaning, each vertex is assigned with a different color.  Suppose that F is composed of l (directed) trees T 1, T 2, …, T l with k 1, k 2, …, k l vertices each.  Let F i be the (directed) forest composed of T 1, T 2, …, T i. 37

 For each we find the color sets that appear on colorful copies of T i in G.  Note that copies of T i, T j with disjoint color sets are necessarily disjoint.  Then, in 2 O(k) time we find the color sets that appear on colorful copies of F i for.  If the collection corresponding to F=F l is not empty then G contains a colorful copy of F.  How do we find it…? 38

 How do we find the color sets that appear on colorful copies of T i in G?  Let t be an arbitrary vertex in T i =T.  For each vertex v in G we find the color sets that appear on copies of T in which v plays the role of r.  If T is a singe vertex then it’s easily done…  Otherwise let e=(r,r’) be a (directed) edge in T. ▪ We break T into two (directed) sub-trees T’, T’’. 39

 We recursively find, for each vertex v in G, the color sets in copies of T’ and T’’ in which v plays the role of r and then of r’.  For every (directed) edge (u,v) we update u’s collection with v’s collection if they are disjoint.  The complexity of this recursive algorithm is as required.  For the undirected case we use the fact that a graph with at least k|V| edges contains as a subgraph any forest on k vertices. 40

 Remember tree-width of a graph G?  The minimum tree-width over all possible tree- decomposition of G to (X,T).  T = (I, F) is a tree.  X = { X i : i I} is a set of subsets of V such that: ▪ The union of all X i s equals to V. ▪ For every edge (u,v) of G there exists an i such that u,v are in X i. ▪ If, and j is on the path from i to k in T then: 41

 Let H be a directed or undirected graph on k vertices with tree-width t. Let G be a directed or undirected graph.  A sub-graph of G, isomorphic to H, if one exists, can be found in expected time and in worst case time.  Proof is similar to that of Theorem 6.1.  So we will skip it... 42

 In [RS86b] it is shown that if C is a minor closed family of graphs that excludes at least one planar graph G’ then there exists a (huge) constant c G’ such that every graph in C has a tree-width of at most c G’.  So we can use 6.3 wherever |V H | = O(logV) and H excludes at least one planar graph.  and decide in polynomial time whether G contains a graph isomorphic to H. 43

 As a very special case of Theorem 6.3 we get that the LOG PATH problem is in P  A path of logV vertices is a tree.  In addition, all the algorithms we described are easily parallelizable.  So we get that the LOG PATH problem and other problems are in NC. 44

 The Color-Coding method efficiently finds k- vertex simple paths, k-vertex cycles, and other small sub-graphs within a given graph using probabilistic algorithms.  The Color-Coding method is a good example of demonstrating de-randomization techniques.  Algorithms presented can be easily parallelized.  Yielding efficient NC algorithms. 45