defining relations on graphs how hard is it in the
play

Defining relations on graphs: how hard is it in the presence of node - PowerPoint PPT Presentation

Defining relations on graphs: how hard is it in the presence of node partitions? M. Praveen and B. Srivathsan CMI 9 February 2015 Regular Path Queries on Graphs a b u v c a b u v Regular Path Queries on Graphs a b u v c a


  1. Defining relations on graphs: how hard is it in the presence of node partitions? M. Praveen and B. Srivathsan CMI 9 February 2015

  2. Regular Path Queries on Graphs a b u v c a b u ′ v ′

  3. Regular Path Queries on Graphs a b u v c a b u ′ v ′ ab Regular path query Q : x − − → y

  4. Regular Path Queries on Graphs a b u v c a b u ′ v ′ ab Regular path query Q : x − − → y Q ( G ) = {� u , v � , � u ′ , v ′ �}

  5. RPQ-definability a b u v c a b u ′ v ′ ◮ ◮ {� u , v �}

  6. RPQ-definability a b u v c a b u ′ v ′ ◮ ◮ {� u , v �} ◮ Is there a RPQ Q such that Q ( G ) = {� u , v �} ?

  7. RPQ-definability a b u v c a b u ′ v ′ ◮ ◮ {� u , v �} ◮ Is there a RPQ Q such that Q ( G ) = {� u , v �} ? ◮ [Antonopoulos, Neven, Servais 2013] RPQ-definability is Pspace -complete.

  8. Node partitions 1 2 1 a b u v c a b u ′ v ′ 2 1 2

  9. Node partitions 1 2 1 a b u v c a b u ′ v ′ 2 1 2 ↓ r 1 . ab [ r = 1 ] Regular data path query Q : x − − − − − − − → y

  10. Node partitions 1 2 1 a b u v c a b u ′ v ′ 2 1 2 ↓ r 1 . ab [ r = 1 ] Regular data path query Q : x − − − − − − − → y Q ( G ) = {� u , v �}

  11. Node partitions 1 2 1 a b u v c a b u ′ v ′ 2 1 2 ↓ r 1 . ab [ r = 1 ] Regular data path query Q : x − − − − − − − → y Q ( G ) = {� u , v �} e ::= ε | a | e + e | e + | ↓ r . e | e [ c ] c ::= r = | r � = | c ∧ c | c ∨ c | ¬ c

  12. RDPQ-definability 1 2 1 a b u v c a b u ′ v ′ 2 1 2 ◮ ◮ {� u , v �}

  13. RDPQ-definability 1 2 1 a b u v c a b u ′ v ′ 2 1 2 ◮ ◮ {� u , v �} ◮ Is there a RDPQ Q such that Q ( G ) = {� u , v �} ? ◮ We study the complexity of RDPQ-definability.

  14. Motivation - schema mappings Stuttgart Chennai Bordeaux Chennai Bordeaux friend colleague friend colleague

  15. Motivation - schema mappings Stuttgart Chennai Bordeaux Chennai Bordeaux friend colleague friend colleague

  16. Motivation - schema mappings Stuttgart Chennai Bordeaux Chennai Bordeaux friend colleague friend colleague ↓ r 1 . ( friend + collegue ) ∗ [ r = 1 ]

  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 of relation pairs. 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.

  18. Related work . . . D. Calvanese, G. De Giacomo, M. Lenzerini, and M. Y. Vardi. Simplifying schema mappings. In ICDT , pages 114–125, 2011. P. Barcel´ o, J. P´ erez, and J. Reutter. Schema mappings and data exchange for graph databases. In ICDT , pages 189–200, 2013.

  19. Regular Expressions with Equality 1 1 0 0 a a a u 1 v 1 3 0 0 1 a a a u 2 v 2 1 1 2 3 a a a u 3 v 3 Q = ( a · ( a ) = · a ) =

  20. Regular Expressions with Equality 1 1 0 0 a a a u 1 v 1 3 0 0 1 a a a u 2 v 2 1 1 2 3 a a a u 3 v 3 Q = ( a · ( a ) = · a ) = Q ( G ) = {� u 1 , v 1 �}

  21. Regular Expressions with Equality 1 1 0 0 a a a u 1 v 1 3 0 0 1 a a a u 2 v 2 1 1 2 3 a a a u 3 v 3 Q = ( a · ( a ) = · a ) = Q ( G ) = {� u 1 , v 1 �} e ::= ε | a | e + e | e + | e = | e � =

  22. Number of registers 2 3 2 3 a a a u 1 v 1 0 2 1 0 a a a u 2 v 2 1 2 2 3 a a a u 3 v 3

  23. Number of registers 2 3 2 3 a a a u 1 v 1 0 2 1 0 a a a u 2 v 2 1 2 2 3 a a a u 3 v 3 Q = ↓ r 1 · a · ↓ r 2 · a [ r = 1 ] · a [ r = 2 ]

  24. Number of registers 2 3 2 3 a a a u 1 v 1 0 2 1 0 a a a u 2 v 2 1 2 2 3 a a a u 3 v 3 Q = ↓ r 1 · a · ↓ r 2 · a [ r = 1 ] · a [ r = 2 ] Q ( G ) = {� u 1 , v 1 �}

  25. Results ◮ RDPQ mem -definability is Expspace -complete. ◮ k − RDPQ mem -definability is in NSpace ( O ( n 2 δ k )). ◮ RDPQ = -definability is Pspace -complete. ◮ UCRDPQ-definability is coNP -complete.

  26. Witnesses for RPQ-definability a a u v c a b u ′ v ′

  27. Witnesses for RDPQ-definability 1 2 1 a a u v c a a u ′ v ′ 1 2 2

  28. Witnesses for RDPQ-definability u v c u ′ u ′ v ′ v ′

  29. Witnesses for RDPQ-definability � � u v c u ′ u ′ v ′ v ′

  30. Witnesses for RDPQ-definability � � � � � � u v c u ′ u ′ v ′ v ′ � � � � � �

  31. Witnesses for RDPQ-definability � � � ↓ r � � � u v c u ′ u ′ v ′ v ′ � � � � � �

  32. Witnesses for RDPQ-definability � � � [ r = ] ↓ r � � � u v c u ′ u ′ v ′ v ′ � � � � � �

  33. Witnesses for RDPQ-definability � � � [ r = ] ↓ r � � � u v c u ′ u ′ v ′ v ′ � ↓ r � � � � �

  34. Witnesses for RDPQ-definability � � � [ r = ] ↓ r � � � u v c u ′ u ′ v ′ v ′ [ r = ] � ↓ r � � � � �

  35. Expspace Lower Bound t f . . . t 3 t i t 2 2 n

  36. Expspace Lower Bound t f p 1 q 1 illegal tilings . . . p 2 q 2 all tilings t 3 t i t 2 2 n

  37. Expspace Lower Bound t f p 1 q 1 illegal tilings . . . p 2 q 2 all tilings t 3 t i t 2 2 n There exists a legal tiling iff {� p 2 , q 2 �} is definable.

  38. Expspace Lower Bound t f . . . t 3 t i t 2 2 n

  39. Expspace Lower Bound t f t i t 2 . . . . . . t 3 t i t 2 2 n

  40. Expspace Lower Bound t f t i t 2 . . . . . . t 3 t 3 t i t 2 . . . 2 n

  41. Expspace Lower Bound t f ↓ r n · · · ↓ r 2 ↓ r 2 t i t 2 . . . . . . t 3 t 3 t i t 2 . . . 2 n

  42. Expspace Lower Bound t f ↓ r n · · · ↓ r 2 ↓ r 2 t i r = r = r � = · · · t 2 . n 2 1 . . . . . t 3 r = r = r = · · · t 3 2 1 n t i t 2 . . . 2 n

  43. Conclusion ◮ RDPQ mem -definability is Expspace -complete. ◮ k − RDPQ mem -definability is in NSpace ( O ( n 2 δ k )). ◮ RDPQ = -definability is Pspace -complete. ◮ UCRDPQ-definability is coNP -complete.

  44. Conclusion ◮ RDPQ mem -definability is Expspace -complete. ◮ k − RDPQ mem -definability is in NSpace ( O ( n 2 δ k )). ◮ RDPQ = -definability is Pspace -complete. ◮ UCRDPQ-definability is coNP -complete. Thank you. Questions?

Recommend


More recommend