1 / 16

Web Data Management

Web Data Management. Bisimulation. In this lecture. Semistructured data model Graph Simulation and Bisimulation Computing (bi)simulation Resources Adding structure to semistructured data  by Buneman, Davidson, Fernandez, Suciu, in ICDT 97

louie
Download Presentation

Web Data Management

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Web Data Management Bisimulation

  2. In this lecture • Semistructured data model • Graph Simulation and Bisimulation • Computing (bi)simulation Resources Adding structure to semistructured data by Buneman, Davidson, Fernandez, Suciu, in ICDT 97 Data on the WebAbiteboul, Buneman, Suciu : section 6.4

  3. The Semistructured Data Model Bib &o1 complex object paper paper book references &o12 &o24 &o29 references references author page author year author title http title title publisher author author author &o43 &25 &96 1997 last firstname atomic object firstname lastname first lastname &243 &206 “Serge” “Abiteboul” “Victor” 122 133 “Vianu” Object Exchange Model (OEM)

  4. Syntax for Semistructured Data May omit oid’s: { paper: { author: “Abiteboul”, author: { firstname: “Victor”, lastname: “Vianu”}, title: “Regular path queries …”, page: { first: 122, last: 133 } } }

  5. Set Semantics for Trees Want to say that {a, a, b} = {a, b} Define equality for trees first, then for graphs Definition Two trees t, t’ are equal, t=t’, if: • They are both atomic values with same value • t = {t1, ..., tm}, t’ = {t1’, ..., tn’} and: • i=1,...,m, j=1,...,n s.t. ti = tj’ • j=1,...,n, i=1,...,m s.t. ti = tj’

  6. Set Semantics: Example a b b = a a b c c d c d c c c c c d 1 2 2 1 1 1 1 2 e e e 3 3 3

  7. Set Semantics for Graphs • Previous definition does not apply directly to graphs with cycles • Need to adapt it  bisimulation • First, we will define a simulation

  8. R G1 G2 x1 x2 a y1 Graph Simulation DefinitionTwo edge-labeled graphs G1, G2 A simulation is a relation R between nodes: • if (x1, x2)  R, and (x1,a,y1)  G1, then exists (x2,a,y2)  G2 (same label) s.t. (y1,y2)  R a R y2 Note: if we insist that R be a function  graph homeomorphism

  9. Graph Bisimulation DefinitionTwo edge-labeled graphs G1, G2 A bisimulation is a relation R between nodes s.t. both R and R-1 are simulations

  10. Set Semantics for Semistructured Data DefinitionTwo rooted graphs G1, G2 are equal if there exists a bisimulation R from G1 to G2 such that (root(G1), root(G2))  R • Notation: G1  G2 • For trees, this is precisely our earlier definition

  11. Examples of Bisimilar Graphs a b b a = c c c a a = a a a a ...

  12. Examples of non-Bisimilar Graphs • This is a simulation but not a bisimulation • Why ? • Notice: G1, G2 have the same sets of paths a a a G1= G2= b c b c

  13. Examples of Simulation • Simulation acts like “subset” {a, b}  {a, b, c} {a, b:{c}}  {d, a:{e,f}, b:{c,g}} • Question: • if DB1 DB2 and DB2 DB1 then DB1 DB2 ? c a b a b d b a a b e c g f c

  14. Answer if DB1 DB2 and DB2 DB1 then DB1 DB2 ? No. Here is a counter example: DB1 DB2 a a a b b DB1 DB2 and DB2 DB1 but NOT DB1 DB2

  15. Facts About a (Bi)Simulation • The empty set is always a (bi)simulation • If R, R’ are (bi)simulations, so is R U R’ • Hence, there always exists a maximal (bi)simulation: • Checking if DB1=DB2: compute the maximal bisimulation R, then test (root(DB1),root(DB2)) in R

  16. Computing a (Bi)Simulation • Computing the maximal (bi)simulation: • Start with R = nodes(G1) x nodes(G2) • While exists (x1, x2)  R that violates the definition, remove (x1, x2) from R • This runs in polynomial time ! Better: • O((m+n)log(m+n)) for bisimulation • O(m n) for simulation • Compare to finding a graph homeomorphism ! NP Complete

More Related