evaluation and enumeration problems for regular path
play

Evaluation and Enumeration Problems for Regular Path Queries Wim - PowerPoint PPT Presentation

Evaluation and Enumeration Problems for Regular Path Queries Wim Martens and Tina Trautner University of Bayreuth Practice QUERYING PATHS IN GRAPH DATABASES WIM MARTENS AND TINA TRAUTNER Graph Database d Prague a o r road road


  1. Evaluation and Enumeration Problems for Regular Path Queries Wim Martens and Tina Trautner University of Bayreuth

  2. Practice QUERYING PATHS IN GRAPH DATABASES WIM MARTENS AND TINA TRAUTNER

  3. Graph Database d Prague a o r road road Bayreuth road r o a d Passau Vienna road l i a r road road Salzburg Munich Node- and Edge-labeled directed graph WIM MARTENS AND TINA TRAUTNER

  4. Warm Up Question d Prague a o r road road Bayreuth road r o a d Passau Vienna road l i a r road road Salzburg Munich How many paths from Bayreuth to Vienna match the regular path query (road)* ? WIM MARTENS AND TINA TRAUTNER

  5. Warm Up Question d Prague a o r road road Bayreuth road r o a d Passau Vienna road l i a r road road Salzburg Munich How many paths from Bayreuth to Vienna match the regular path query (road)* ? (How many paths from Bayreuth to Vienna only use road-edges?) WIM MARTENS AND TINA TRAUTNER

  6. Warm Up Question d Prague a o r road road Bayreuth road r o a d Passau Vienna road l i a r road road Salzburg Munich How many paths from Bayreuth to Vienna match the regular path query (road)* ? (How many paths from Bayreuth to Vienna only use road-edges?) [Theoreticians]: ∞ [SPARQL 2018]: 1 [SPARQL 2012]: 3 [Cypher]: 5 WIM MARTENS AND TINA TRAUTNER

  7. Warm Up Question d Prague a o r road road Bayreuth road r o a d Passau Vienna road l i a r road road Salzburg Munich How many paths from Bayreuth to Vienna match the regular path query (road)* ? (How many paths from Bayreuth to Vienna only use road-edges?) all paths [Theoreticians]: ∞ [SPARQL 2018]: 1 is there at least one path? paths without node repetition [SPARQL 2012]: 3 [Cypher]: 5 paths without edge repetition WIM MARTENS AND TINA TRAUTNER

  8. Warm Up Question d Prague a o r road road Bayreuth road r o a d Passau Vienna road l i a r road road Salzburg Munich How many paths from Bayreuth to Vienna match the regular path query (road)* ? (How many paths from Bayreuth to Vienna only use road-edges?) all paths [Theoreticians]: ∞ [SPARQL 2018]: 1 is there at least one path? paths without node repetition [SPARQL 2012]: 3 [Cypher]: 5 paths without edge repetition WIM MARTENS AND TINA TRAUTNER

  9. Warm Up Question d Prague a o r road road Bayreuth road r o a d Passau Vienna road l i a r road road Salzburg Munich How many paths from Bayreuth to Vienna match the regular path query (road)* ? (How many paths from Bayreuth to Vienna only use road-edges?) all paths [Theoreticians]: ∞ [SPARQL 2018]: 1 is there at least one path? paths without node repetition [SPARQL 2012]: 3 [Cypher]: 5 paths without edge repetition WIM MARTENS AND TINA TRAUTNER

  10. Warm Up Question d Prague a o r road road Bayreuth road r o a d Passau Vienna road l i a r road road Salzburg Munich How many paths from Bayreuth to Vienna match the regular path query (road)* ? (How many paths from Bayreuth to Vienna only use road-edges?) all paths [Theoreticians]: ∞ [SPARQL 2018]: 1 is there at least one path? paths without node repetition [SPARQL 2012]: 3 [Cypher]: 5 paths without edge repetition WIM MARTENS AND TINA TRAUTNER

  11. Warm Up Question d Prague a o r road road Bayreuth road r o a d Passau Vienna road l i a r road road Salzburg Munich How many paths from Bayreuth to Vienna match the regular path query (road)* ? (How many paths from Bayreuth to Vienna only use road-edges?) all paths [Theoreticians]: ∞ [SPARQL 2018]: 1 is there at least one path? paths without node repetition [SPARQL 2012]: 3 [Cypher]: 5 paths without edge repetition WIM MARTENS AND TINA TRAUTNER

  12. Warm Up Question d Prague a o r road road Bayreuth road r o a d Passau Vienna road l i a r road road Salzburg Munich How many paths from Bayreuth to Vienna match the regular path query (road)* ? (How many paths from Bayreuth to Vienna only use road-edges?) all paths [Theoreticians]: ∞ [SPARQL 2018]: 1 is there at least one path? paths without node repetition [SPARQL 2012]: 3 [Cypher]: 5 paths without edge repetition WIM MARTENS AND TINA TRAUTNER

  13. Warm Up Question d Prague a o r road road Bayreuth road r o a d Passau Vienna road l i a r road road Salzburg Munich How many paths from Bayreuth to Vienna match the regular path query (road)* ? (How many paths from Bayreuth to Vienna only use road-edges?) all paths [Theoreticians]: ∞ [SPARQL 2018]: 1 is there at least one path? paths without node repetition [SPARQL 2012]: 3 [Cypher]: 5 paths without edge repetition WIM MARTENS AND TINA TRAUTNER

  14. The Point There are different ways of matching paths in graphs and any of them can make sense WIM MARTENS AND TINA TRAUTNER

  15. The Point There are different ways of matching paths in graphs and any of them can make sense But which variant do you want to use in a system? WIM MARTENS AND TINA TRAUTNER

  16. Theory ON QUERYING PATHS IN GRAPH DATABASES WIM MARTENS AND TINA TRAUTNER

  17. Computational Problems Input graph (the data) Regular expression ! called regular path query (RPQ) WIM MARTENS AND TINA TRAUTNER

  18. Computational Problems Input graph (the data) Regular expression ! called regular path query (RPQ) Problem Path existence Is there a path from to that matches ! ? WIM MARTENS AND TINA TRAUTNER

  19. Computational Problems Input graph (the data) Regular expression ! called regular path query (RPQ) Problem Path counting How many paths from to match ! ? WIM MARTENS AND TINA TRAUTNER

  20. Computational Problems Input graph (the data) Regular expression ! called regular path query (RPQ) Problem Path enumeration Enumerate the paths from to that match ! WIM MARTENS AND TINA TRAUTNER

  21. Considering Different Paths Arbitrary paths Boolean paths Paths without node repetitions Paths without edge repetitions WIM MARTENS AND TINA TRAUTNER

  22. Considering Different Paths Arbitrary paths Boolean paths Paths without node repetitions Paths without edge repetitions WIM MARTENS AND TINA TRAUTNER

  23. Considering Different Paths Arbitrary paths Paths without node repetitions WIM MARTENS AND TINA TRAUTNER

  24. Considering Different Paths Arbitrary paths Simple paths WIM MARTENS AND TINA TRAUTNER

  25. Complexity of RPQ Evaluation Existence Counting Enumeration Arbitrary paths Simple paths in P in FP polynomial delay NP-hard #P-hard too much delay WIM MARTENS AND TINA TRAUTNER

  26. Complexity of RPQ Evaluation Existence Coun,ng Enumeration Arbitrary paths Simple paths “user happy”: in P in FP polynomial delay “user unhappy”: NP-hard #P-hard too much delay WIM MARTENS AND TINA TRAUTNER

  27. Complexity of RPQ Evaluation Existence Counting Enumeration Arbitrary paths Simple paths “user happy”: in P in FP polynomial delay “user unhappy”: NP-hard #P-hard too much delay WIM MARTENS AND TINA TRAUTNER

  28. Complexity of RPQ Evaluation Existence Counting Enumeration Arbitrary paths Simple paths similar to counting words in language of regular expression #P-complete [Kannan et al., SODA 1995] WIM MARTENS AND TINA TRAUTNER

  29. Complexity of RPQ Evaluation Existence Counting Enumeration Arbitrary paths Simple paths Is there a simple path matching ! ∗ #! ∗ ? NP-complete [Mendelzon, Wood, SICOMP 1995] essentially because „simple path via a node“ is NP-hard [Fortune et al., TCS 1980] Is there a simple path matching !! ∗ ? NP-complete [Lapaugh, Papadimitriou, Networks 1984] WIM MARTENS AND TINA TRAUTNER

  30. Complexity of RPQ Evaluation Existence Counting Enumeration Arbitrary paths Simple paths Is there a simple path matching ! ∗ #! ∗ ? NP-complete [Mendelzon, Wood, SICOMP 1995] essentially because „simple path via a node“ is NP-hard [Fortune et al., TCS 1980] Is there a simple path matching !! ∗ ? NP-complete [Lapaugh, Papadimitriou, Networks 1984] [Bagan, Bonifati, Groz PODS 2013] Dichotomy for which expressions the data complexity of this problem is in P or NP-complete WIM MARTENS AND TINA TRAUTNER

  31. Theory VS Systems Theory: Systems: WIM MARTENS AND TINA TRAUTNER

  32. Theory VS Systems Theory: „Simple paths are computationally difficult, even for very small RPQs“ Systems: WIM MARTENS AND TINA TRAUTNER

  33. Theory VS Systems Theory: „Simple paths are computationally difficult, even for very small RPQs“ Systems: „But we use simple paths and we‘re fine“ WIM MARTENS AND TINA TRAUTNER

  34. What is going on with these ths ? sim simple ple pa paths WIM MARTENS AND TINA TRAUTNER

  35. RPQs in SPARQL Query Logs [Bonifati, M., Timm, PVLDB 2017] Extracted 247,404 RPQs from SPARQL query logs (2009 - 2017) (from DBPedia, biological databases, British museum, Wikidata, …) WIM MARTENS AND TINA TRAUTNER

  36. RPQs in SPARQL Query Logs [Bonifati, M., Timm, PVLDB 2017] Extracted 247,404 RPQs from SPARQL query logs (2009 - 2017) (from DBPedia, biological databases, British museum, Wikidata, …) Only very few different kinds of RPQs ( ± 17) WIM MARTENS AND TINA TRAUTNER

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend