Graph Isomorphism and Related Problems Graph Isomorphism

Graph Isomorphism and Related Problems Graph Isomorphism

Graph Isomorphism and Related Problems Graph Isomorphism Graph Isomorphism Two graphs G1 = (V1; E1) and G2 = (V2; E2) are isomorphic if there is a bijection ': V1 ! V2 such that, for all u; v 2 V1, uv 2 E1 if and only if '(u)'(v) 2 E2. Isomorphism of two graphs G1 and G2 is denoted as G1 ' G2. 2 / 10 Graph Isomorphism { Related Problems Subgraph Isomorphism I Determine if G is isomorphic to a subgraph of H. Largest Common Subgraph I For two given graphs G1 and G2, find the largest graph H such that H is isomorphic to a subgraph of G1 and to a subgraph of G2. Theorem There is (probably) no polynomial time algorithm to solve the Subgraph Isomorphism problem. c In 2015, Babai presented a proof that there is a O 2log n time algorithm to solve the Graph Isomorphism problem. (Result is not peer reviewed yet.) 3 / 10 Isomorphism of Trees Isomorphism of Trees Centers I A vertex v is center of G, if ecc(v) = rad(G). I A tree has at most two centers which can be found in linear time. In case of two, both are adjacent. Finding ceters in trees I Pick an arbitrary vertex v. I Find a vertex x with d(v; x) = ecc(v). I Find a vertex y with d(x; y) = ecc(x). I Then, ecc(x) = ecc(y) = diam(T) and the vertices in the middle of the path from x to y are centers of T (two vertices if d(x; y) is odd, one vertex if d(x; y) is even). Note: There is a linear time algorithm to compute the eccentricity of every vertex in a tree in linear time. 5 / 10 Isomorphism of Trees Rooted Tree We say (V; E; r) is a tree with root r if (V; E) is a tree and r 2 V. Isomorphism of Rooted Trees Two rooted trees T1 = (V1; E1; r1) and T2 = (V2; E2; r2) are isomorphic if there is a bijection ': V1 ! V2 such that, for all u; v 2 V1, uv 2 E1 if and only if '(u)'(v) 2 E2 and '(r1) = '(r2). T1 T2 T3 T1 and T3 are isometric. However, T2 is not isometric to T1 and T3. 6 / 10 Isomorphism of Trees Theorem If there is an O(f (n)) time algorithm A to check if two rooted trees are isomorphic, then there is an O(f (n)) time algorithm A∗ to check if two ordinary trees are isomorphic. ∗ Proof: We design A (T1; T2) as follows: Find the centers of T1 and T2. Then, there are three cases. C1 Both have only one center (c1 and c2). Retrun A(T1; c1; T2; c2) 0 0 C2 Both have two centers (c1, c1, c2, and c2). 0 Retrun A(T1; c1; T2; c2) _A(T1; c1; T2; c2) C3 Different number of centers. Return False Therefore, it is enough if we can check rooted trees. 7 / 10 Aho-Hopcroft-Ullman-Algorithm Let T1 and T2 be two rooted trees with corresponding roots r1 and r2. With Fi;j, we denote the forest created by removing all vertices v 2 Ti with d(v; ri) ≤ j. Theorem T1 is isometric to T2 if and only if, for all i, F1;i is isometric to F2;i. Algorithm idea: I Check bottom-up if F1;i is isometric to F2;i. I Note: The lowest layer contains only leaves. I Use that F1;i+1 is isometric to F2;i+1 when checking F1;i and F2;i. 8 / 10 Aho-Hopcroft-Ullman-Algorithm Input: Two rooted trees T1 and T2 with the corresponding roots r1 and r2 and with height h. 1 Compute the depth of each vertex in T1 and T2. 2 To each leaf, assign the integer 0. 3 For i = h − 1 DownTo 1 4 hAssign integers to all nodes with depth i.i 5 T1 and T2 are isomorphic if and only if r1 and r2 have the same integer assigned. 9 / 10 Aho-Hopcroft-Ullman-Algorithm 1 Procedure AssignIntegers(i) 2 For Each v 2 Vi (the set of non-leaf vertices with depth i) 3 Create a sorted tuple tv containing the integers assigned to the children of v. 4 Let S1 and S2 be the sets of tuples created for vertices in T1 and T2 with depth i. 5 Sort S1 and S2 lexicographically and compare them. If S1 6= S2, Stop. T1 and T2 are not isomorphic. 6 Assign integers, continuously and beginning with 1, to vertices in Vi such that two vertices have the same integer assigned if and only if they have equal tuples. 10 / 10.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    10 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us