Isomorphism Checking in GROOVE

Slides:



Advertisements
Similar presentations
Continuing Abstract Interpretation We have seen: 1.How to compile abstract syntax trees into control-flow graphs 2.Lattices, as structures that describe.
Advertisements

Lecture 24 MAS 714 Hartmut Klauck
1 Nondeterministic Space is Closed Under Complement Presented by Jing Zhang and Yingbo Wang Theory of Computation II Professor: Geoffrey Smith.
gSpan: Graph-based substructure pattern mining
www.brainybetty.com1 MAVisto A tool for the exploration of network motifs By Guo Chuan & Shi Jiayi.
Midwestern State University Department of Computer Science Dr. Ranette Halverson CMPS 2433 – CHAPTER 4 GRAPHS 1.
DFA Minimization Jeremy Mange CS 6800 Summer 2009.
Graph Isomorphism Algorithms and networks. Graph Isomorphism 2 Today Graph isomorphism: definition Complexity: isomorphism completeness The refinement.
The class NP Section 7.3 Giorgi Japaridze Theory of Computability.
Lectures on Network Flows
Complexity 15-1 Complexity Andrei Bulatov Hierarchy Theorem.
1 Introduction to Computability Theory Lecture12: Decidable Languages Prof. Amos Israeli.
Model checking dynamic states in GROOVE Arend Rensink Formal Methods and Tools University of Twente.
2 -1 Chapter 2 The Complexity of Algorithms and the Lower Bounds of Problems.
Validating Streaming XML Documents Luc Segoufin & Victor Vianu Presented by Harel Paz.
Yangjun Chen 1 Bipartite Graph 1.A graph G is bipartite if the node set V can be partitioned into two sets V 1 and V 2 in such a way that no nodes from.
SubSea: An Efficient Heuristic Algorithm for Subgraph Isomorphism Vladimir Lipets Ben-Gurion University of the Negev Joint work with Prof. Ehud Gudes.
Technion 1 (Yet another) decision procedure for Equality Logic Ofer Strichman and Orly Meir Technion.
Theory of Computing Lecture 22 MAS 714 Hartmut Klauck.
Searching in a Graph CS 5010 Program Design Paradigms “Bootcamp” Lesson 8.4 TexPoint fonts used in EMF. Read the TexPoint manual before you delete this.
Jorge Muñoz-Gama Universitat Politècnica de Catalunya (Barcelona, Spain) Algorithms for Process Conformance and Process Refinement.
Swarat Chaudhuri Roberto Lublinerman Pennsylvania State University Sumit Gulwani Microsoft Research CAUCHY Continuity analysis of programs.
Object Oriented Programming Assignment Introduction Dr. Mike Spann
I-Neighbourhood Abstraction in Graph Transformation Arend Rensink University of Twente Based on work with: Jörg Bauer, Iovka Boneva, Dino Distefano, Marcus.
Chapter 1 Fundamental Concepts Introduction to Graph Theory Douglas B. West July 11, 2002.
Approximation Algorithms for Graph Homomorphism Problems Chaitanya Swamy University of Waterloo Joint work with Michael Langberg and Yuval Rabani Open.
Searching in a Graph CS 5010 Program Design Paradigms “Bootcamp” Lesson TexPoint fonts used in EMF. Read the TexPoint manual before you delete this.
1 Symmetry Symmetry Chapter 14 from “Model Checking” by Edmund M. Clarke Jr., Orna Grumberg, and Doron A. Peled presented by Anastasia Braginsky March.
Introduction to Graph Theory By: Arun Kumar (Asst. Professor) (Asst. Professor)
Lab 6 Problem 1: DNA. DNA Given a string with length N, determine the number of occurrences of some given substrings (with length K) in that string. For.
Gspan: Graph-based Substructure Pattern Mining
Theory of Computational Complexity Probability and Computing Chapter Hikaru Inada Iwama and Ito lab M1.
All-pairs Shortest paths Transitive Closure
Methods of Proof.
Special Graphs By: Sandeep Tuli Astt. Prof. CSE.
Proof technique (pigeonhole principle)
Graphs Hubert Chan (Chapter 9) [O1 Abstract Concepts]
Chapter 5 : Trees.
Lexical analysis Finite Automata
Graph-Based Operational Semantics
Bipartite Graphs What is a bipartite graph?
Lectures on Network Flows
Structural testing, Path Testing
Algorithms and networks
Sorting.
Chapter 5. Optimal Matchings
CS 2210 Discrete Structures Algorithms and Complexity
Graphs.
Hierarchy of languages
Concurrent Graph Exploration with Multiple Robots
The Complexity of Algorithms and the Lower Bounds of Problems
Fast Computation of Symmetries in Boolean Functions Alan Mishchenko
Alternating tree Automata and Parity games
Concurrent Graph Exploration with Multiple Robots
Copyright © Cengage Learning. All rights reserved.
Copyright © Cengage Learning. All rights reserved.
Algorithms and networks
Minimal DFA Among the many DFAs accepting the same regular language L, there is exactly one (up to renaming of states) which has the smallest possible.
Lectures on Graph Algorithms: searching, testing and sorting
8/04/2009 Many thanks to David Sun for some of the included slides!
CSCI1600: Embedded and Real Time Software
XML indexing – A(k) indices
Bipartite Graph 1. A graph G is bipartite if the node set V can be partitioned into two sets V1 and V2 in such a way that no nodes from the same set are.
Copyright © Cengage Learning. All rights reserved.
CS100J Lecture 15 Previous Lecture This Lecture Sorting
Introduction to Graph Transformation
Trevor Brown DC 2338, Office hour M3-4pm
ICS 353: Design and Analysis of Algorithms
Instructor: Aaron Roth
Theory of Computability
Presentation transcript:

Isomorphism Checking in GROOVE Kaminski, Seidl et al. Muscholl Arend Rensink, University of Twente GRABATS 2006, Natal, Brazil Isomorphism Checking in GROOVE

Isomorphism Checking in GROOVE Basics Universe of labels Lab Graphs: tuples G = <N,E,src,tgt,lab> Finite set of nodes N Finite set of edges E Source and target mappings src,tgt: E  N Edge labelling lab: E  Lab Isomorphism between G and H (G  H): Mapping f: G  H Bijective node and edge components fN, fE Structure-preserving: fNsrcG = srcHfE etc G and H are “essentially the same” GRABATS 2006, Natal, Brazil Isomorphism Checking in GROOVE

Isomorphism Checking in GROOVE Examples 1 2 3 4 5 a b a b a b a b a b Which of these graphs are isomorphic? 1  3; all others are distinct Which of these graphs are bisimilar? (roughly: can mutually simulate one another) 1  3  5; all others are distinct Which have non-trivial symmetries? 1, 3, 4 and 5 GRABATS 2006, Natal, Brazil Isomorphism Checking in GROOVE

Isomorphism Checking in GROOVE Complexity Traditional isomorphism question For given graphs G and H, is G  H? In NP; unknown to be either in P or NP-hard Essential concept: graph certificate Existing algorithms use partition refinement Extended isomorphism question For given graph G and set of graphs S, find H  S such that G  H, if it exists More general: above case given by S = {H} Graph certificates also help in this problem GRABATS 2006, Natal, Brazil Isomorphism Checking in GROOVE

Isomorphism Checking in GROOVE Graph certificates (1) Graph cerficate mapping Universe Cert of certificates; e.g., Nat Mapping c: Graph  Cert Invariance: G  H implies c(G) = c(H) Example: c: G  |EG| Use 1: conservative approximation of iso c(G)  c(H) implies (G  H) Use 2: hash value in set of graphs S a b a b a b a b a b c=4 c=4 c=4 c=4 c=4 GRABATS 2006, Natal, Brazil Isomorphism Checking in GROOVE

Isomorphism Checking in GROOVE Graph certificates (2) Refinement: element certificate mapping Mappings cN: Graph  Node  Cert cE: Graph  Edge  Cert Invariance: isomorphism f: G  H implies cN(G) = cN(H)  fN and cE(G) = cE(H)  fE Example: cN(G): n  |tgtG-1(n)|, cE(G): e  hash(labG(e)) a b 1 2 1 2 a b 1 2 a b a b 1 2 a b 1 2 hash: a  1, b  2 GRABATS 2006, Natal, Brazil Isomorphism Checking in GROOVE

Isomorphism Checking in GROOVE Graph Certificates (3) Use 1: Predict isomorphism f: G  H implies fN  cN-1(H)  cN(G) fE  cE-1(H)  cE(G) Use 2: Define graph certificate mapping c1(G) = nN cV(G,n) + eE cE(G,e) c2(G) = <{cV(G,n)|n N},{cE(G,e)|e E}> 1 2 1 2 1 2 1 2 1 2 <{1},{1,2}> c1=12 <{0,1,2},{1,2}> c1=12 <{1},{1,2}> c1=12 <{0,2},{1,2}> c1=12 <{1},{1,2}> c1=12 GRABATS 2006, Natal, Brazil Isomorphism Checking in GROOVE

Inspiration: bisimilarity Relation G over nodes + edges Largest symmetrical relation such that src(e1)  n2 implies e1  e2 for some e2 with src(e2)=n2 and lab(e2)=lab(e1) vice versa for target nodes Weaker than isomorphism: f: G  H an iso implies n GH fN(n) and e GH fE(e) a b a b Bisimilar graphs Equally coloured nodes Equally labelled edges GRABATS 2006, Natal, Brazil Isomorphism Checking in GROOVE

Bisimilarity co-inductively Algorithm: G = i i given Sequence of relations with i+1  i 0 = (NGNG)  { (e1,e2)  EGEG | lab(e1)=lab(e2) } e1 i+1 e2 if src(e1) i src(e2) and tgt(e1) i tgt(e2) n1 i+1 n2 if i+1 is a total relation between src-1(n1) and src-1(n2) as well as between tgt-1(n1) and tgt-1(n2) Sequence converges for finite graphs Average complexity: |G| log |G| First iteration: All nodes, equally labelled edges Second iteration: Equally coloured nodes Equally labelled edges Third iteration: convergence a b a b GRABATS 2006, Natal, Brazil Isomorphism Checking in GROOVE

Isomorphism Checking in GROOVE The algorithm (1) Iterated construction of certificates Inspired by bisimilarity characterisation Sequence of mappings (cNi,cEi)i Starting point: simple case like before Next steps: use end nodes/incident edges n i n2 implies cNi(n1)=cNi(n2), also for edges Not vice versa: certificates not precise Convergence: use partition size |N/i| Partition size may grow due to imprecision Stop when |N/i|  |N/i-1| Derived graph certificate as hash key GRABATS 2006, Natal, Brazil Isomorphism Checking in GROOVE

Isomorphism Checking in GROOVE The algorithm (2) Recall “extended isomorphism question” For given graph G and set of graphs S, find H  S such that G  H, if it exists If c(G) is fresh, no such H exists If c(H) = c(G), test for G  H Test for equality (equal node and edge sets) If cNi is injective (|N/i|=|N|), G  H iff { (n,cNi(n)) | nNG } yields an iso Otherwise, more complex extended iso test If  G  H, it is a false positive: add G to S GRABATS 2006, Natal, Brazil Isomorphism Checking in GROOVE

Definition of element certificates Node mapping: cNi(n) = 1 if i = 0 cNi-1(v) + 2 n=src(e) ciE(e) + n=tgt(e) ciE(e) Edge mapping: cEi(e) = hash(lab(e)) if i = 0 newCert(cEi-1(e),lab(e),cNi(src(e)),cNi(tgt(e))) newCert determines “quality”: Should reduce imprecision/confusion Should be “maximally injective” Derived graph certificate c(G) = nN cVi(n) + eE cEi(e) GRABATS 2006, Natal, Brazil Isomorphism Checking in GROOVE

Isomorphism Checking in GROOVE Example newCert(old,lab,src,tgt) := old + 2 src + tgt a b a b a b a b a b 1 2 1 2 1 2 1 2 1 2 17 18 5 6 17 19 18 21 5 6 4 7 17 18 5 6 19 20 7 4 17 18 5 6 190 193 57 59 190 193 57 59 232 233 85 43 190 193 57 59 |N/| = 2 |N/| = 2 c = 998 |N/| = 1 |N/| = 1 |N/| = 4 c = 97 |N/| = 2 c = 998 |N/| = 2 |N/| = 1 |N/| = 2 c = 1186 |N/| = 1 |N/| = 2 |N/| = 2 c = 998 |N/| = 2 |N/| = 1 GRABATS 2006, Natal, Brazil Isomorphism Checking in GROOVE

Implementation new edge certification function int[] tmp = new int[vSize]; // temporary node certificates int partSize = 1, oldPartSize; // partition size // initialise the certificates for (int e = 0; e < eSize; e++) eCert[e] = hash(lab[e]); for (int v = 0; v < vSize; v++) vCert[v] = 1; do { // calculate the new edge certificates for (int e = 0; e < eSize; e++) { eCert[e] = newCert(eCert[e], lab[e], vCert[src[e]], vCert[tgt[e]]); // propagate to the endpoints tmp[src[e]] += eCert[e]; tmp[tgt[e]] += 2*eCert[e]; } // calculate new node certificates and determine partition size IntSet certSet = new IntSet(); oldPartSize = partSize; for (int v = 0; v < vSize; v++) { // copy the temporary node certificates to the real ones vCert[v] = tmp[v]; tmp[v] = 0; certSet.add(vCert[v]); partSize = certSet.size(); } while (partSize > oldPartSize); // continue while the number of cells still grows new edge certification function special set to count ints GRABATS 2006, Natal, Brazil Isomorphism Checking in GROOVE

Isomorphism Checking in GROOVE Example (2) 1 2 3 4 5 190 193 57 59 17 19 18 21 5 6 4 7 190 193 57 59 232 233 85 43 190 193 57 59 c1 = 998 c2 = 97 c3 = 998 c4 = 1186 c5 = 998 S0 = empty: c1 = 998 not in c(S0), 1 is fresh S1 = {1}: c2=97 not in c(S1), 2 is fresh S2 = {1,2}: c3 = 998 = c1 in c(s2), |N/|  |N|; 3  1 after extended iso test, 3 not fresh S3 = {1,2}: c4 = 1186 not in c(S3), 4 is fresh S4 = {1,2,4}: c5 = 998 = c1 in c(s4), |N/|  |N|;  (5  1) after extended iso test, 5 is fresh GRABATS 2006, Natal, Brazil Isomorphism Checking in GROOVE

Isomorphism Checking in GROOVE Experiments Mutex algorithm [Heckel] Small states (graphs up to 6 nodes) “Unpredictable” symmetries Dining philosophers n-fold symmetry; here n = 12 No node creation/deletion Concurrent append Symmetry mainly due to confluence List length 8, 4 concurrent methods Gossiping girls Huge amount of symmetry; here for 8 girls GRABATS 2006, Natal, Brazil Isomorphism Checking in GROOVE

Isomorphism Checking in GROOVE Results GRABATS 2006, Natal, Brazil Isomorphism Checking in GROOVE

Isomorphism Checking in GROOVE Conclusion Experience: performance acceptable Large fraction of total exploration time Pays off for problems with many symmetries Certificates are very good predictor for iso Related work: McKay (Nauty) Based on the same principles Idea: in case of non-injective element certificates, break symmetry and observe effects Not straightforward to reuse Future work: avoid the iso check! Take confluence into account Optionally switch off isomorphism checking GRABATS 2006, Natal, Brazil Isomorphism Checking in GROOVE