SLIDE 1 Defining relations on graphs: how hard is it in the presence of node partitions?
- M. Praveen and B. Srivathsan
CMI
9 February 2015
SLIDE 2
Regular Path Queries on Graphs
u v u′ v′ a b c a b
SLIDE 3 Regular Path Queries on Graphs
u v u′ v′ a b c a b Regular path query Q : x
ab
− − → y
SLIDE 4 Regular Path Queries on Graphs
u v u′ v′ a b c a b Regular path query Q : x
ab
− − → y Q(G) = {u, v, u′, v′}
SLIDE 5 RPQ-definability
◮
u v u′ v′ a b c a b
◮ {u, v}
SLIDE 6 RPQ-definability
◮
u v u′ v′ a b c a b
◮ {u, v} ◮ Is there a RPQ Q such that Q(G) = {u, v}?
SLIDE 7 RPQ-definability
◮
u v u′ v′ a b c a b
◮ {u, v} ◮ Is there a RPQ Q such that Q(G) = {u, v}? ◮ [Antonopoulos, Neven, Servais 2013] RPQ-definability is
Pspace-complete.
SLIDE 8
Node partitions
u 1 2 v 1 u′ 1 2 v′ 2 a b c a b
SLIDE 9 Node partitions
u 1 2 v 1 u′ 1 2 v′ 2 a b c a b Regular data path query Q : x
↓r1.ab[r=
1 ]
− − − − − − − → y
SLIDE 10 Node partitions
u 1 2 v 1 u′ 1 2 v′ 2 a b c a b Regular data path query Q : x
↓r1.ab[r=
1 ]
− − − − − − − → y Q(G) = {u, v}
SLIDE 11 Node partitions
u 1 2 v 1 u′ 1 2 v′ 2 a b c a b Regular data path query Q : x
↓r1.ab[r=
1 ]
− − − − − − − → y Q(G) = {u, v} e ::= ε | a | e + e | e+ | ↓ r.e | e[c] c ::= r= | r= | c ∧ c | c ∨ c | ¬c
SLIDE 12 RDPQ-definability
◮
u 1 2 v 1 u′ 1 2 v′ 2 a b c a b
◮ {u, v}
SLIDE 13 RDPQ-definability
◮
u 1 2 v 1 u′ 1 2 v′ 2 a b c a b
◮ {u, v} ◮ Is there a RDPQ Q such that Q(G) = {u, v}? ◮ We study the complexity of RDPQ-definability.
SLIDE 14
Motivation - schema mappings
Chennai Bordeaux Chennai Stuttgart Bordeaux friend colleague friend colleague
SLIDE 15
Motivation - schema mappings
Chennai Bordeaux Chennai Stuttgart Bordeaux friend colleague friend colleague
SLIDE 16 Motivation - schema mappings
Chennai Bordeaux Chennai Stuttgart Bordeaux friend colleague friend colleague ↓ r1.(friend + collegue)∗[r=
1 ]
SLIDE 17 Related work
G.H.L. Fletcher, M. Gyssens, J. Paredaens, and D. V. Gucht. On the expressive power of the relational algebra on finite sets
IEEE Trans. Knowledge and Data Engg., 21(6):939–942, 2009.
- G. Gottlob and P. Senellart.
Schema mapping discovery from data instances.
- J. ACM, 57(2):6:1–6:37, 2010.
- A. Das Sarma, A. Parameswaran, H. Garcia-Molina, and
- J. Widom.
Synthesizing view definitions from data. In Proceedings, ICDT, pages 89–103, 2010.
- B. Alexe, B. T. Cate, P. G. Kolaitis, and W. Tan.
Designing and refining schema mappings via data examples. In SIGMOD, pages 133–144, 2011.
SLIDE 18 Related work . . .
- D. Calvanese, G. De Giacomo, M. Lenzerini, and M. Y. Vardi.
Simplifying schema mappings. In ICDT, pages 114–125, 2011.
erez, and J. Reutter. Schema mappings and data exchange for graph databases. In ICDT, pages 189–200, 2013.
SLIDE 19
Regular Expressions with Equality
u1 1 v1 1 a a a u2 3 v2 1 a a a u3 1 2 3 v3 1 a a a Q = (a · (a)= · a)=
SLIDE 20
Regular Expressions with Equality
u1 1 v1 1 a a a u2 3 v2 1 a a a u3 1 2 3 v3 1 a a a Q = (a · (a)= · a)= Q(G) = {u1, v1}
SLIDE 21
Regular Expressions with Equality
u1 1 v1 1 a a a u2 3 v2 1 a a a u3 1 2 3 v3 1 a a a Q = (a · (a)= · a)= Q(G) = {u1, v1} e ::= ε | a | e + e | e+ | e= | e=
SLIDE 22
Number of registers
u1 2 3 2 v1 3 a a a u2 1 v2 2 a a a u3 1 2 3 v3 2 a a a
SLIDE 23 Number of registers
u1 2 3 2 v1 3 a a a u2 1 v2 2 a a a u3 1 2 3 v3 2 a a a Q =↓ r1 · a· ↓ r2 · a[r=
1 ] · a[r= 2 ]
SLIDE 24 Number of registers
u1 2 3 2 v1 3 a a a u2 1 v2 2 a a a u3 1 2 3 v3 2 a a a Q =↓ r1 · a· ↓ r2 · a[r=
1 ] · a[r= 2 ]
Q(G) = {u1, v1}
SLIDE 25 Results
◮ RDPQmem-definability is Expspace-complete. ◮ k − RDPQmem-definability is in NSpace(O(n2δk)). ◮ RDPQ=-definability is Pspace-complete. ◮ UCRDPQ-definability is coNP-complete.
SLIDE 26
Witnesses for RPQ-definability
u v u′ v′ a a c a b
SLIDE 27
Witnesses for RDPQ-definability
u v u′ v′ 1 2 1 1 2 2 a a a a c
SLIDE 28
Witnesses for RDPQ-definability
u v u′ v′ u′ v′ c
SLIDE 29
Witnesses for RDPQ-definability
u v u′ v′ u′ v′ c
SLIDE 30
Witnesses for RDPQ-definability
u v u′ v′ u′ v′ c
SLIDE 31 Witnesses for RDPQ-definability
u v u′ v′ u′ v′ c
SLIDE 32 Witnesses for RDPQ-definability
u v u′ v′ u′ v′ c
[r=]
SLIDE 33 Witnesses for RDPQ-definability
u v u′ v′ u′ v′ c
[r=] ↓ r
SLIDE 34 Witnesses for RDPQ-definability
u v u′ v′ u′ v′ c
[r=] ↓ r [r=]
SLIDE 35
Expspace Lower Bound
ti t2 t3 . . . tf 2n
SLIDE 36
Expspace Lower Bound
ti t2 t3 . . . tf 2n p1 illegal tilings q1 p2 all tilings q2
SLIDE 37
Expspace Lower Bound
ti t2 t3 . . . tf 2n p1 illegal tilings q1 p2 all tilings q2 There exists a legal tiling iff {p2, q2} is definable.
SLIDE 38
Expspace Lower Bound
ti t2 t3 . . . tf 2n
SLIDE 39
Expspace Lower Bound
ti t2 t3 . . . tf 2n ti t2 . . .
SLIDE 40
Expspace Lower Bound
ti t2 t3 . . . tf 2n ti t2 . . . t3 . . .
SLIDE 41
Expspace Lower Bound
ti t2 t3 . . . tf 2n ti t2 . . . t3 . . . ↓ rn · · · ↓ r2 ↓ r2
SLIDE 42 Expspace Lower Bound
ti t2 t3 . . . tf 2n ti t2 . . . t3 . . . ↓ rn · · · ↓ r2 ↓ r2 r=
n
· · · r=
2
r=
1
r=
n
· · · r=
2
r=
1
SLIDE 43 Conclusion
◮ RDPQmem-definability is Expspace-complete. ◮ k − RDPQmem-definability is in NSpace(O(n2δk)). ◮ RDPQ=-definability is Pspace-complete. ◮ UCRDPQ-definability is coNP-complete.
SLIDE 44 Conclusion
◮ RDPQmem-definability is Expspace-complete. ◮ k − RDPQmem-definability is in NSpace(O(n2δk)). ◮ RDPQ=-definability is Pspace-complete. ◮ UCRDPQ-definability is coNP-complete.
Thank you. Questions?